         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2  
     3  %integer x
     4  %integername xp
     5  %integerarray ra(0:9)
 0004 C7 45 E4 01 00 00 00                  MOV DWORD PTR [%EBP-28],#1
 000B C7 45 E8 00 00 00 00                  MOV DWORD PTR [%EBP-24],#0
 0012 C7 45 EC 09 00 00 00                  MOV DWORD PTR [%EBP-20],#9
 0019 C7 45 F0 83 00 00 00                  MOV DWORD PTR [%EBP-16],#131
 0020 8D 45 E4                              LEA %EAX,[%EBP-28]
 0023 50                                    PUSH %EAX
 0024 E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 0027 83 C4 04                              ADD %ESP,#4
 002A 8D 4D E4                              LEA %ECX,[%EBP-28]
 002D 89 E3                                 MOV %EBX,%ESP
 002F 29 D3                                 SUB %EBX,%EDX
 0031 89 5D DC                              MOV [%EBP-36],%EBX
 0034 89 4D E0                              MOV [%EBP-32],%ECX
 0037 01 C3                                 ADD %EBX,%EAX
 0039 89 DC                                 MOV %ESP,%EBX
     6  
     7  %routine test1(%integer xi1)
 003B EB 00                                 JMP L1001
 003D                      L1002  EQU $
 003D C8 00 00 02                           ENTER 0000,2
     8    x = xi1
 0041 8B 75 FC                              MOV %ESI,[%EBP-4]
 0044 8B 45 08                              MOV %EAX,[%EBP+8]
 0047 89 46 F8                              MOV [%ESI-8],%EAX
     9    xi1 = x
 004A 8B 46 F8                              MOV %EAX,[%ESI-8]
 004D 89 45 08                              MOV [%EBP+8],%EAX
    10  %end
 0050 C9                                    LEAVE
 0051 C3                                    RET
 0052                      L1001  EQU $
    11  
    12  %routine test2(%integername xin1)
 0052                      L1003  EQU $
 0052 C8 00 00 02                           ENTER 0000,2
    13    xin1 == x
 0056 8B 7D FC                              MOV %EDI,[%EBP-4]
 0059 8D 47 F8                              LEA %EAX,[%EDI-8]
 005C 89 45 08                              MOV [%EBP+8],%EAX
    14    xin1 == xp
 005F 8B 47 F4                              MOV %EAX,[%EDI-12]
 0062 89 45 08                              MOV [%EBP+8],%EAX
    15    xin1 = x
 0065 8B 5D 08                              MOV %EBX,[%EBP+8]
 0068 8B 47 F8                              MOV %EAX,[%EDI-8]
 006B 89 03                                 MOV [%EBX],%EAX
    16    xin1 = xp
 006D 8B 75 08                              MOV %ESI,[%EBP+8]
 0070 8B 5F F4                              MOV %EBX,[%EDI-12]
 0073 8B 03                                 MOV %EAX,[%EBX]
 0075 89 06                                 MOV [%ESI],%EAX
    17  %end
 0077 C9                                    LEAVE
 0078 C3                                    RET
 0079                      L1001  EQU $
    18  
    19  %routine test4(%integer xi2,xi3)
 0079                      L1004  EQU $
 0079 C8 00 00 02                           ENTER 0000,2
    20    xi2 = xi3
 007D 8B 45 08                              MOV %EAX,[%EBP+8]
 0080 89 45 0C                              MOV [%EBP+12],%EAX
    21    xi3 = xi2
 0083 8B 45 0C                              MOV %EAX,[%EBP+12]
 0086 89 45 08                              MOV [%EBP+8],%EAX
    22  %end
 0089 C9                                    LEAVE
 008A C3                                    RET
 008B                      L1001  EQU $
    23  
    24  %routine test7(%integerarrayname xran1)
 008B                      L1005  EQU $
 008B C8 00 00 02                           ENTER 0000,2
    25    xran1 == ra
 008F 8B 75 FC                              MOV %ESI,[%EBP-4]
 0092 8B 46 E0                              MOV %EAX,[%ESI-32]
 0095 89 45 0C                              MOV [%EBP+12],%EAX
 0098 8B 46 DC                              MOV %EAX,[%ESI-36]
 009B 89 45 08                              MOV [%EBP+8],%EAX
    26    xran1(4) = x
 009E 6A 04                                 PUSH #4
 00A0 FF 75 0C                              PUSH DWORD PTR [%EBP+12]
 00A3 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00A6 83 C4 08                              ADD %ESP,#8
 00A9 89 C7                                 MOV %EDI,%EAX
 00AB 03 7D 08                              ADD %EDI,[%EBP+8]
 00AE 8B 5D FC                              MOV %EBX,[%EBP-4]
 00B1 8B 43 F8                              MOV %EAX,[%EBX-8]
 00B4 89 07                                 MOV [%EDI],%EAX
    27    x = xran1(4)
 00B6 6A 04                                 PUSH #4
 00B8 FF 75 0C                              PUSH DWORD PTR [%EBP+12]
 00BB E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00BE 83 C4 08                              ADD %ESP,#8
 00C1 89 C6                                 MOV %ESI,%EAX
 00C3 03 75 08                              ADD %ESI,[%EBP+8]
 00C6 8B 7D FC                              MOV %EDI,[%EBP-4]
 00C9 8B 36                                 MOV %ESI,[%ESI]
 00CB 89 77 F8                              MOV [%EDI-8],%ESI
    28  %end
 00CE C9                                    LEAVE
 00CF C3                                    RET
 00D0                      L1001  EQU $
    29  
    30  %routine test12(%integernamearrayname xinan1)
 00D0                      L1006  EQU $
 00D0 C8 00 00 02                           ENTER 0000,2
    31    xinan1(4) == xp
 00D4 6A 04                                 PUSH #4
 00D6 FF 75 0C                              PUSH DWORD PTR [%EBP+12]
 00D9 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00DC 83 C4 08                              ADD %ESP,#8
 00DF 89 C3                                 MOV %EBX,%EAX
 00E1 03 5D 08                              ADD %EBX,[%EBP+8]
 00E4 8B 75 FC                              MOV %ESI,[%EBP-4]
 00E7 8B 46 F4                              MOV %EAX,[%ESI-12]
 00EA 89 03                                 MOV [%EBX],%EAX
    32    xp == xinan1(4)
 00EC 6A 04                                 PUSH #4
 00EE FF 75 0C                              PUSH DWORD PTR [%EBP+12]
 00F1 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00F4 83 C4 08                              ADD %ESP,#8
 00F7 89 C7                                 MOV %EDI,%EAX
 00F9 03 7D 08                              ADD %EDI,[%EBP+8]
 00FC 8B 5D FC                              MOV %EBX,[%EBP-4]
 00FF 8B 3F                                 MOV %EDI,[%EDI]
 0101 89 7B F4                              MOV [%EBX-12],%EDI
    33    xinan1(4) = x
 0104 6A 04                                 PUSH #4
 0106 FF 75 0C                              PUSH DWORD PTR [%EBP+12]
 0109 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 010C 83 C4 08                              ADD %ESP,#8
 010F 89 C6                                 MOV %ESI,%EAX
 0111 03 75 08                              ADD %ESI,[%EBP+8]
 0114 8B 36                                 MOV %ESI,[%ESI]
 0116 8B 7D FC                              MOV %EDI,[%EBP-4]
 0119 8B 47 F8                              MOV %EAX,[%EDI-8]
 011C 89 06                                 MOV [%ESI],%EAX
    34    x = xinan1(4)
 011E 6A 04                                 PUSH #4
 0120 FF 75 0C                              PUSH DWORD PTR [%EBP+12]
 0123 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0126 83 C4 08                              ADD %ESP,#8
 0129 89 C3                                 MOV %EBX,%EAX
 012B 03 5D 08                              ADD %EBX,[%EBP+8]
 012E 8B 75 FC                              MOV %ESI,[%EBP-4]
 0131 8B 1B                                 MOV %EBX,[%EBX]
 0133 8B 1B                                 MOV %EBX,[%EBX]
 0135 89 5E F8                              MOV [%ESI-8],%EBX
    35  %end
 0138 C9                                    LEAVE
 0139 C3                                    RET
 013A                      L1001  EQU $
    36  
    37  %endofprogram
 013A C9                                    LEAVE
 013B C3                                    RET
?TEST12 unused
?TEST7 unused
?TEST4 unused
?TEST2 unused
?TEST1 unused

    30 Statements compiled



 ELF object file generated from IMP source file: '/home/gtoal/src/compilers101/new-parser/imps/tests/test195.imp'
 +----------+---------------------+---------+---------+---------+------------+
 | Sections |       Symbols       | Code    | Data    | Diag    | Total size |
 +----------+----------+----------+---------+---------+---------+------------+
 |  (count) | Internal | External | (bytes) | (bytes) | (bytes) | (bytes)    |
 +----------+----------+----------+---------+---------+---------+------------+
 |       11 |        9 |        8 |     333 |       0 |     192 |        525 |
 +----------+----------+----------+---------+---------+---------+------------+


