cc.addFunc(FuncSignatureT<int, r_State*>());
X86Gp state_ref = cc.newUIntPtr();
cc.setArg(0, state_ref);
CCFuncCall* print_call = cc.call(imm_ptr(printf), FuncSignatureT<int, const char*, uint32_t*>());
print_call->setArg(0, imm_ptr("state: 0x%p\n"));
print_call->setArg(1, state_ref);
when this function is called, the address of the pointer printed is different to the one passed. And when i try to do anything with it my program throws an access violation.