         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2  
     3    %integer x, i
     4  
     5    %integername in
     6    %integerarray ira(0:9)
 0004 C7 45 E0 01 00 00 00                  MOV DWORD PTR [%EBP-32],#1
 000B C7 45 E4 00 00 00 00                  MOV DWORD PTR [%EBP-28],#0
 0012 C7 45 E8 09 00 00 00                  MOV DWORD PTR [%EBP-24],#9
 0019 C7 45 EC 83 00 00 00                  MOV DWORD PTR [%EBP-20],#131
 0020 8D 45 E0                              LEA %EAX,[%EBP-32]
 0023 50                                    PUSH %EAX
 0024 E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 0027 83 C4 04                              ADD %ESP,#4
 002A 8D 4D E0                              LEA %ECX,[%EBP-32]
 002D 89 E3                                 MOV %EBX,%ESP
 002F 29 D3                                 SUB %EBX,%EDX
 0031 89 5D D8                              MOV [%EBP-40],%EBX
 0034 89 4D DC                              MOV [%EBP-36],%ECX
 0037 01 C3                                 ADD %EBX,%EAX
 0039 89 DC                                 MOV %ESP,%EBX
     7    %integernamearray ina(0:9)
 003B C7 45 C8 01 00 00 00                  MOV DWORD PTR [%EBP-56],#1
 0042 C7 45 CC 00 00 00 00                  MOV DWORD PTR [%EBP-52],#0
 0049 C7 45 D0 09 00 00 00                  MOV DWORD PTR [%EBP-48],#9
 0050 C7 45 D4 83 00 00 00                  MOV DWORD PTR [%EBP-44],#131
 0057 8D 45 C8                              LEA %EAX,[%EBP-56]
 005A 50                                    PUSH %EAX
 005B E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 005E 83 C4 04                              ADD %ESP,#4
 0061 8D 4D C8                              LEA %ECX,[%EBP-56]
 0064 89 E3                                 MOV %EBX,%ESP
 0066 29 D3                                 SUB %EBX,%EDX
 0068 89 5D C0                              MOV [%EBP-64],%EBX
 006B 89 4D C4                              MOV [%EBP-60],%ECX
 006E 01 C3                                 ADD %EBX,%EAX
 0070 89 DC                                 MOV %ESP,%EBX
     8    %integernamearrayname inan
     9    %integermap im(%integer i); %result == i; %end
 0072 EB 00                                 JMP L1001
 0074                      L1002  EQU $
 0074 C8 00 00 02                           ENTER 0000,2
 0078 8D 45 08                              LEA %EAX,[%EBP+8]
 007B C9                                    LEAVE
 007C C3                                    RET
 007D                      L1001  EQU $
    10    %integermap im2(%integer i); %result == in; %end
?I unused
    11    %integermap im3(%integer i); %result == ira(i); %end
    12    %integermap im4(%integer i); %result == ina(i); %end
    13    %integermap im5(%integer i); %result == inan(i); %end
    14    in == i
    15    x = i
 007D                      L1003  EQU $
 007D C8 00 00 02                           ENTER 0000,2
 0081 8B 75 FC                              MOV %ESI,[%EBP-4]
 0084 8B 46 F0                              MOV %EAX,[%ESI-16]
 0087 C9                                    LEAVE
 0088 C3                                    RET
 0089                      L1001  EQU $
 0089                      L1004  EQU $
 0089 C8 00 00 02                           ENTER 0000,2
 008D FF 75 08                              PUSH DWORD PTR [%EBP+8]
 0090 8B 7D FC                              MOV %EDI,[%EBP-4]
 0093 FF 77 DC                              PUSH DWORD PTR [%EDI-36]
 0096 89 7D F4                              MOV [%EBP-12],%EDI
 0099 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 009C 83 C4 08                              ADD %ESP,#8
 009F 89 C3                                 MOV %EBX,%EAX
 00A1 8B 75 F4                              MOV %ESI,[%EBP-12]
 00A4 03 5E D8                              ADD %EBX,[%ESI-40]
 00A7 89 D8                                 MOV %EAX,%EBX
 00A9 C9                                    LEAVE
 00AA C3                                    RET
 00AB                      L1001  EQU $
 00AB                      L1005  EQU $
 00AB C8 00 00 02                           ENTER 0000,2
 00AF FF 75 08                              PUSH DWORD PTR [%EBP+8]
 00B2 8B 7D FC                              MOV %EDI,[%EBP-4]
 00B5 FF 77 C4                              PUSH DWORD PTR [%EDI-60]
 00B8 89 7D F4                              MOV [%EBP-12],%EDI
 00BB E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00BE 83 C4 08                              ADD %ESP,#8
 00C1 89 C3                                 MOV %EBX,%EAX
 00C3 8B 75 F4                              MOV %ESI,[%EBP-12]
 00C6 03 5E C0                              ADD %EBX,[%ESI-64]
 00C9 8B 03                                 MOV %EAX,[%EBX]
 00CB C9                                    LEAVE
 00CC C3                                    RET
 00CD                      L1001  EQU $
 00CD                      L1006  EQU $
 00CD C8 00 00 02                           ENTER 0000,2
 00D1 FF 75 08                              PUSH DWORD PTR [%EBP+8]
 00D4 8B 7D FC                              MOV %EDI,[%EBP-4]
 00D7 FF 77 BC                              PUSH DWORD PTR [%EDI-68]
 00DA 89 7D F4                              MOV [%EBP-12],%EDI
 00DD E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00E0 83 C4 08                              ADD %ESP,#8
 00E3 89 C3                                 MOV %EBX,%EAX
 00E5 8B 75 F4                              MOV %ESI,[%EBP-12]
 00E8 03 5E B8                              ADD %EBX,[%ESI-72]
 00EB 8B 03                                 MOV %EAX,[%EBX]
 00ED C9                                    LEAVE
 00EE C3                                    RET
 00EF                      L1001  EQU $
 00EF 8D 45 F4                              LEA %EAX,[%EBP-12]
 00F2 89 45 F0                              MOV [%EBP-16],%EAX
 00F5 8B 45 F4                              MOV %EAX,[%EBP-12]
 00F8 89 45 F8                              MOV [%EBP-8],%EAX
    16    x = in
 00FB 8B 7D F0                              MOV %EDI,[%EBP-16]
 00FE 8B 07                                 MOV %EAX,[%EDI]
 0100 89 45 F8                              MOV [%EBP-8],%EAX
    17    x = ira(i)
 0103 FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 0106 FF 75 DC                              PUSH DWORD PTR [%EBP-36]
 0109 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 010C 83 C4 08                              ADD %ESP,#8
 010F 89 C3                                 MOV %EBX,%EAX
 0111 03 5D D8                              ADD %EBX,[%EBP-40]
 0114 8B 1B                                 MOV %EBX,[%EBX]
 0116 89 5D F8                              MOV [%EBP-8],%EBX
    18    in == ira(i)
 0119 FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 011C FF 75 DC                              PUSH DWORD PTR [%EBP-36]
 011F E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0122 83 C4 08                              ADD %ESP,#8
 0125 89 C6                                 MOV %ESI,%EAX
 0127 03 75 D8                              ADD %ESI,[%EBP-40]
 012A 89 75 F0                              MOV [%EBP-16],%ESI
    19    x = ira(i)
 012D FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 0130 FF 75 DC                              PUSH DWORD PTR [%EBP-36]
 0133 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0136 83 C4 08                              ADD %ESP,#8
 0139 89 C7                                 MOV %EDI,%EAX
 013B 03 7D D8                              ADD %EDI,[%EBP-40]
 013E 8B 3F                                 MOV %EDI,[%EDI]
 0140 89 7D F8                              MOV [%EBP-8],%EDI
    20    ira(i) = i
 0143 FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 0146 FF 75 DC                              PUSH DWORD PTR [%EBP-36]
 0149 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 014C 83 C4 08                              ADD %ESP,#8
 014F 89 C3                                 MOV %EBX,%EAX
 0151 03 5D D8                              ADD %EBX,[%EBP-40]
 0154 8B 45 F4                              MOV %EAX,[%EBP-12]
 0157 89 03                                 MOV [%EBX],%EAX
    21    in == ina(i)
 0159 FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 015C FF 75 C4                              PUSH DWORD PTR [%EBP-60]
 015F E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0162 83 C4 08                              ADD %ESP,#8
 0165 89 C6                                 MOV %ESI,%EAX
 0167 03 75 C0                              ADD %ESI,[%EBP-64]
 016A 8B 36                                 MOV %ESI,[%ESI]
 016C 89 75 F0                              MOV [%EBP-16],%ESI
    22    x = ina(i)
 016F FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 0172 FF 75 C4                              PUSH DWORD PTR [%EBP-60]
 0175 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0178 83 C4 08                              ADD %ESP,#8
 017B 89 C7                                 MOV %EDI,%EAX
 017D 03 7D C0                              ADD %EDI,[%EBP-64]
 0180 8B 3F                                 MOV %EDI,[%EDI]
 0182 8B 3F                                 MOV %EDI,[%EDI]
 0184 89 7D F8                              MOV [%EBP-8],%EDI
    23    ina(x) = i
 0187 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 018A FF 75 C4                              PUSH DWORD PTR [%EBP-60]
 018D E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0190 83 C4 08                              ADD %ESP,#8
 0193 89 C3                                 MOV %EBX,%EAX
 0195 03 5D C0                              ADD %EBX,[%EBP-64]
 0198 8B 1B                                 MOV %EBX,[%EBX]
 019A 8B 45 F4                              MOV %EAX,[%EBP-12]
 019D 89 03                                 MOV [%EBX],%EAX
    24    inan == ina
 019F 8B 45 C4                              MOV %EAX,[%EBP-60]
 01A2 89 45 BC                              MOV [%EBP-68],%EAX
 01A5 8B 45 C0                              MOV %EAX,[%EBP-64]
 01A8 89 45 B8                              MOV [%EBP-72],%EAX
    25    in == inan(i)
 01AB FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 01AE FF 75 BC                              PUSH DWORD PTR [%EBP-68]
 01B1 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 01B4 83 C4 08                              ADD %ESP,#8
 01B7 89 C6                                 MOV %ESI,%EAX
 01B9 03 75 B8                              ADD %ESI,[%EBP-72]
 01BC 8B 36                                 MOV %ESI,[%ESI]
 01BE 89 75 F0                              MOV [%EBP-16],%ESI
    26    inan(i) = x
 01C1 FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 01C4 FF 75 BC                              PUSH DWORD PTR [%EBP-68]
 01C7 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 01CA 83 C4 08                              ADD %ESP,#8
 01CD 89 C7                                 MOV %EDI,%EAX
 01CF 03 7D B8                              ADD %EDI,[%EBP-72]
 01D2 8B 3F                                 MOV %EDI,[%EDI]
 01D4 8B 45 F8                              MOV %EAX,[%EBP-8]
 01D7 89 07                                 MOV [%EDI],%EAX
    27    x = inan(i)
 01D9 FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 01DC FF 75 BC                              PUSH DWORD PTR [%EBP-68]
 01DF E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 01E2 83 C4 08                              ADD %ESP,#8
 01E5 89 C3                                 MOV %EBX,%EAX
 01E7 03 5D B8                              ADD %EBX,[%EBP-72]
 01EA 8B 1B                                 MOV %EBX,[%EBX]
 01EC 8B 1B                                 MOV %EBX,[%EBX]
 01EE 89 5D F8                              MOV [%EBP-8],%EBX
    28    in == im(i)
 01F1 FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 01F4 E8 00 00                              CALL 'IM' (INTERNAL L1002 )
 01F7 83 C4 04                              ADD %ESP,#4
 01FA 89 45 F0                              MOV [%EBP-16],%EAX
    29    x = im(i)
 01FD FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 0200 E8 00 00                              CALL 'IM' (INTERNAL L1002 )
 0203 83 C4 04                              ADD %ESP,#4
 0206 8B 00                                 MOV %EAX,[%EAX]
 0208 89 45 F8                              MOV [%EBP-8],%EAX
    30    im(i) = x
 020B FF 75 F4                              PUSH DWORD PTR [%EBP-12]
 020E E8 00 00                              CALL 'IM' (INTERNAL L1002 )
 0211 83 C4 04                              ADD %ESP,#4
 0214 8B 4D F8                              MOV %ECX,[%EBP-8]
 0217 89 08                                 MOV [%EAX],%ECX
    31  %endofprogram
 0219 C9                                    LEAVE
 021A C3                                    RET
?IM5 unused
?IM4 unused
?IM3 unused
?IM2 unused

    39 Statements compiled



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


