I found that the issue is EXACTLY that the stdcall function calling
matter is not being done.
I added the code __asm__( "pushl
%ebp\n\t" "pushl
%ebp\n\t" "pushl
%ebp\n\t" "pushl
%ebp\n\t" "pushl
%ebp\n\t" ); before one of the functions that required 5 input variables and it
worked [along with all the other code, I did the same before each].
I just used %ebp just because that was in the code i cut.
The reason this works is because with normal cdecl calls, the caller
cleans up the stack, not the function [which is how stdcall works], so
TCC is generating code to pop off the data after the function is called,
but since the stdcall function already did that, its popping off stuff it
shouldn't which causes the subprogram to spiral downward into a crash.