 
 M: x86.64 %alien-callback ( quot -- )
     param-reg-1 swap %load-reference
-    "c_to_factor" %vm-invoke-2nd-arg ;
+    param-reg-2 %mov-vm-ptr
+    "c_to_factor" f %alien-invoke ;
 
 M: x86.64 %callback-value ( ctype -- )
     ! Save top of data stack

        [ param-reg-3 swap heap-size MOV ] bi
        param-reg-1 0 box-struct-field@ MOV
        param-reg-2 1 box-struct-field@ MOV
        "box_small_struct" %vm-invoke-4th-arg
    ] with-return-regs ;

: struct-return@ ( n -- operand )

    ! Save top of data stack
    RSP 8 SUB
    param-reg-1 PUSH
    param-reg-1 %mov-vm-ptr
    ! Restore data/call/retain stacks
    "unnest_stacks" f %alien-invoke
    ! Put former top of data stack in param-reg-1
    param-reg-1 POP
    RSP 8 ADD
