What comes after that? The "push" statement in assembly is normally used to put that value to the next function call. If you are trying to use "push", be aware that changing architectures can make your code go wierd, such as when the endianess changes (different order of pushing values), or (as in your case), the size of an int has changed, and now the function is recieving a different sized value to what it wants (e.g. 32bit rather than 16bit, or 16bit rather than 8bit, or something like that...). You should then specify the exact bit-width of "test" in your C++ code to be like int8_t, or something like that.
For your question about replacing this with C++ code, try something like a "va_list", because this appears to be a way of supplying a function with a variable amount of arguments.
Remember, I'm not an expert at this (I could be completely wrong), but from my knowledge of assembly and computer architecture in general this is what your problem appears to me to be.