        ; FILE "return3.c"
        SECTION .text
GLOBAL foo

foo: 
        push    ebp                 ; function call
        mov     ebp,esp

        sub     esp,16

        mov     ecx, [ebp+8]        ; ecx := ptr to return value
        mov     dword [ebp-8],7     ; copy 7 to x.part1
        mov     dword [ebp-4],9     ; copy 9 to x.part2

        mov     eax, [ebp-8]        ; retrieve x, put in edx:eax
        mov     edx, [ebp-4]
        mov     [ecx],eax           ; store in address specified by ECX
        mov     [ecx+4],edx
        mov     eax,ecx             ; remember address

        leave
        ret     4                   ; return then immediately pop off 4 bytes

