         Edinburgh IMP77 Compiler - Version 8.4-2024.12.18

     1  %begin
 0000 C8 00 00 01                           ENTER 0000,1
     2  
     3    %integer i
     4    %recordformat rf(%record (rf) %name next, %integer i)
     5  
     6  
     7  
     8    %record (rf) rec
     9    %record (rf) %name recn
    10    %record (rf) %array ra(0:10)
 0004 C7 45 DC 01 00 00 00                  MOV DWORD PTR [%EBP-36],#1
 000B C7 45 E0 00 00 00 00                  MOV DWORD PTR [%EBP-32],#0
 0012 C7 45 E4 0A 00 00 00                  MOV DWORD PTR [%EBP-28],#10
 0019 C7 45 E8 09 01 00 00                  MOV DWORD PTR [%EBP-24],#265
 0020 8D 45 DC                              LEA %EAX,[%EBP-36]
 0023 50                                    PUSH %EAX
 0024 E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 0027 83 C4 04                              ADD %ESP,#4
 002A 8D 4D DC                              LEA %ECX,[%EBP-36]
 002D 89 E3                                 MOV %EBX,%ESP
 002F 29 D3                                 SUB %EBX,%EDX
 0031 89 5D D4                              MOV [%EBP-44],%EBX
 0034 89 4D D8                              MOV [%EBP-40],%ECX
 0037 01 C3                                 ADD %EBX,%EAX
 0039 89 DC                                 MOV %ESP,%EBX
    11    %record (rf) %name %array rna(0:10)
 003B C7 45 C4 01 00 00 00                  MOV DWORD PTR [%EBP-60],#1
 0042 C7 45 C8 00 00 00 00                  MOV DWORD PTR [%EBP-56],#0
 0049 C7 45 CC 0A 00 00 00                  MOV DWORD PTR [%EBP-52],#10
 0050 C7 45 D0 89 00 00 00                  MOV DWORD PTR [%EBP-48],#137
 0057 8D 45 C4                              LEA %EAX,[%EBP-60]
 005A 50                                    PUSH %EAX
 005B E8 0A 00                              CALL '_IMPADEF' (EXTERN 10)
 005E 83 C4 04                              ADD %ESP,#4
 0061 8D 4D C4                              LEA %ECX,[%EBP-60]
 0064 89 E3                                 MOV %EBX,%ESP
 0066 29 D3                                 SUB %EBX,%EDX
 0068 89 5D BC                              MOV [%EBP-68],%EBX
 006B 89 4D C0                              MOV [%EBP-64],%ECX
 006E 01 C3                                 ADD %EBX,%EAX
 0070 89 DC                                 MOV %ESP,%EBX
    12    %record (rf) %name %array %name rnan
    13    %record (rf) %map rm(%integer i);  %result == rec;  %end
 0072 EB 00                                 JMP L1001
 0074                      L1002  EQU $
 0074 C8 00 00 02                           ENTER 0000,2
 0078 8B 75 FC                              MOV %ESI,[%EBP-4]
 007B 8D 46 F0                              LEA %EAX,[%ESI-16]
 007E C9                                    LEAVE
 007F C3                                    RET
 0080                      L1001  EQU $
?I unused
    14    %integer x
    15    x = rec_i
 0080 8B 45 F4                              MOV %EAX,[%EBP-12]
 0083 89 45 B0                              MOV [%EBP-80],%EAX
    16    x = rec_next_i
 0086 8B 7D F0                              MOV %EDI,[%EBP-16]
 0089 8B 47 04                              MOV %EAX,[%EDI+4]
 008C 89 45 B0                              MOV [%EBP-80],%EAX
    17    x = rec_next_next_i
 008F 8B 5D F0                              MOV %EBX,[%EBP-16]
 0092 8B 03                                 MOV %EAX,[%EBX]
 0094 8B 40 04                              MOV %EAX,[%EAX+4]
 0097 89 45 B0                              MOV [%EBP-80],%EAX
    18    recn == ra(i)
 009A FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 009D FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 00A0 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00A3 83 C4 08                              ADD %ESP,#8
 00A6 89 C6                                 MOV %ESI,%EAX
 00A8 03 75 D4                              ADD %ESI,[%EBP-44]
 00AB 89 75 EC                              MOV [%EBP-20],%ESI
    19    recn == ra(i)_next
 00AE FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 00B1 FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 00B4 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00B7 83 C4 08                              ADD %ESP,#8
 00BA 89 C7                                 MOV %EDI,%EAX
 00BC 03 7D D4                              ADD %EDI,[%EBP-44]
 00BF 8B 3F                                 MOV %EDI,[%EDI]
 00C1 89 7D EC                              MOV [%EBP-20],%EDI
    20    recn == ra(i)_next_next
 00C4 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 00C7 FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 00CA E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00CD 83 C4 08                              ADD %ESP,#8
 00D0 89 C3                                 MOV %EBX,%EAX
 00D2 03 5D D4                              ADD %EBX,[%EBP-44]
 00D5 8B 1B                                 MOV %EBX,[%EBX]
 00D7 8B 1B                                 MOV %EBX,[%EBX]
 00D9 89 5D EC                              MOV [%EBP-20],%EBX
    21    ra(i) = rec
 00DC FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 00DF FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 00E2 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 00E5 83 C4 08                              ADD %ESP,#8
 00E8 89 C6                                 MOV %ESI,%EAX
 00EA 03 75 D4                              ADD %ESI,[%EBP-44]
 00ED 89 F7                                 MOV %EDI,%ESI
 00EF B9 08 00 00 00                        MOV %ECX,#8
 00F4 8D 75 F0                              LEA %ESI,[%EBP-16]
 00F7 F3 A4                                 REP MOVSB
    22    ra(i)_i = i
 00F9 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 00FC FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 00FF E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0102 83 C4 08                              ADD %ESP,#8
 0105 89 C7                                 MOV %EDI,%EAX
 0107 03 7D D4                              ADD %EDI,[%EBP-44]
 010A 8B 45 F8                              MOV %EAX,[%EBP-8]
 010D 89 47 04                              MOV [%EDI+4],%EAX
    23    ra(i)_next = rec
 0110 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 0113 FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 0116 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0119 83 C4 08                              ADD %ESP,#8
 011C 89 C3                                 MOV %EBX,%EAX
 011E 03 5D D4                              ADD %EBX,[%EBP-44]
 0121 8B 3B                                 MOV %EDI,[%EBX]
 0123 B9 08 00 00 00                        MOV %ECX,#8
 0128 8D 75 F0                              LEA %ESI,[%EBP-16]
 012B F3 A4                                 REP MOVSB
    24    ra(i)_next = recn
 012D FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 0130 FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 0133 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0136 83 C4 08                              ADD %ESP,#8
 0139 89 C6                                 MOV %ESI,%EAX
 013B 03 75 D4                              ADD %ESI,[%EBP-44]
 013E 8B 3E                                 MOV %EDI,[%ESI]
 0140 B9 08 00 00 00                        MOV %ECX,#8
 0145 8B 75 EC                              MOV %ESI,[%EBP-20]
 0148 F3 A4                                 REP MOVSB
    25    ra(i)_next_i = i
 014A FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 014D FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 0150 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0153 83 C4 08                              ADD %ESP,#8
 0156 89 C7                                 MOV %EDI,%EAX
 0158 03 7D D4                              ADD %EDI,[%EBP-44]
 015B 8B 3F                                 MOV %EDI,[%EDI]
 015D 8B 45 F8                              MOV %EAX,[%EBP-8]
 0160 89 47 04                              MOV [%EDI+4],%EAX
    26    ra(i)_next_next = rec
 0163 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 0166 FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 0169 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 016C 83 C4 08                              ADD %ESP,#8
 016F 89 C3                                 MOV %EBX,%EAX
 0171 03 5D D4                              ADD %EBX,[%EBP-44]
 0174 8B 3B                                 MOV %EDI,[%EBX]
 0176 8B 3F                                 MOV %EDI,[%EDI]
 0178 B9 08 00 00 00                        MOV %ECX,#8
 017D 8D 75 F0                              LEA %ESI,[%EBP-16]
 0180 F3 A4                                 REP MOVSB
    27    ra(i)_next_next = recn
 0182 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 0185 FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 0188 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 018B 83 C4 08                              ADD %ESP,#8
 018E 89 C6                                 MOV %ESI,%EAX
 0190 03 75 D4                              ADD %ESI,[%EBP-44]
 0193 8B 3E                                 MOV %EDI,[%ESI]
 0195 8B 3F                                 MOV %EDI,[%EDI]
 0197 B9 08 00 00 00                        MOV %ECX,#8
 019C 8B 75 EC                              MOV %ESI,[%EBP-20]
 019F F3 A4                                 REP MOVSB
    28    ra(i)_next_next_i = i
 01A1 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 01A4 FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 01A7 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 01AA 83 C4 08                              ADD %ESP,#8
 01AD 89 C7                                 MOV %EDI,%EAX
 01AF 03 7D D4                              ADD %EDI,[%EBP-44]
 01B2 8B 3F                                 MOV %EDI,[%EDI]
 01B4 8B 3F                                 MOV %EDI,[%EDI]
 01B6 8B 45 F8                              MOV %EAX,[%EBP-8]
 01B9 89 47 04                              MOV [%EDI+4],%EAX
    29    x = ra(i)_i
 01BC FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 01BF FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 01C2 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 01C5 83 C4 08                              ADD %ESP,#8
 01C8 89 C3                                 MOV %EBX,%EAX
 01CA 03 5D D4                              ADD %EBX,[%EBP-44]
 01CD 8B 5B 04                              MOV %EBX,[%EBX+4]
 01D0 89 5D B0                              MOV [%EBP-80],%EBX
    30    x = ra(i)_next_i
 01D3 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 01D6 FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 01D9 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 01DC 83 C4 08                              ADD %ESP,#8
 01DF 89 C6                                 MOV %ESI,%EAX
 01E1 03 75 D4                              ADD %ESI,[%EBP-44]
 01E4 8B 36                                 MOV %ESI,[%ESI]
 01E6 8B 76 04                              MOV %ESI,[%ESI+4]
 01E9 89 75 B0                              MOV [%EBP-80],%ESI
    31    x = ra(i)_next_next_i
 01EC FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 01EF FF 75 D8                              PUSH DWORD PTR [%EBP-40]
 01F2 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 01F5 83 C4 08                              ADD %ESP,#8
 01F8 89 C7                                 MOV %EDI,%EAX
 01FA 03 7D D4                              ADD %EDI,[%EBP-44]
 01FD 8B 3F                                 MOV %EDI,[%EDI]
 01FF 8B 3F                                 MOV %EDI,[%EDI]
 0201 8B 7F 04                              MOV %EDI,[%EDI+4]
 0204 89 7D B0                              MOV [%EBP-80],%EDI
    32    recn == rec
 0207 8D 45 F0                              LEA %EAX,[%EBP-16]
 020A 89 45 EC                              MOV [%EBP-20],%EAX
    33    x = recn_i
 020D 8B 5D EC                              MOV %EBX,[%EBP-20]
 0210 8B 43 04                              MOV %EAX,[%EBX+4]
 0213 89 45 B0                              MOV [%EBP-80],%EAX
    34    x = recn_next_i
 0216 8B 75 EC                              MOV %ESI,[%EBP-20]
 0219 8B 06                                 MOV %EAX,[%ESI]
 021B 8B 40 04                              MOV %EAX,[%EAX+4]
 021E 89 45 B0                              MOV [%EBP-80],%EAX
    35    x = recn_next_next_i
 0221 8B 7D EC                              MOV %EDI,[%EBP-20]
 0224 8B 07                                 MOV %EAX,[%EDI]
 0226 8B 18                                 MOV %EBX,[%EAX]
 0228 8B 43 04                              MOV %EAX,[%EBX+4]
 022B 89 45 B0                              MOV [%EBP-80],%EAX
    36    recn = rec
 022E 8B 7D EC                              MOV %EDI,[%EBP-20]
 0231 B9 08 00 00 00                        MOV %ECX,#8
 0236 8D 75 F0                              LEA %ESI,[%EBP-16]
 0239 F3 A4                                 REP MOVSB
    37    recn_i = i
 023B 8B 75 EC                              MOV %ESI,[%EBP-20]
 023E 8B 45 F8                              MOV %EAX,[%EBP-8]
 0241 89 46 04                              MOV [%ESI+4],%EAX
    38    recn_next = rec
 0244 8B 7D EC                              MOV %EDI,[%EBP-20]
 0247 8B 3F                                 MOV %EDI,[%EDI]
 0249 B9 08 00 00 00                        MOV %ECX,#8
 024E 8D 75 F0                              LEA %ESI,[%EBP-16]
 0251 F3 A4                                 REP MOVSB
    39    recn_next_i = i
 0253 8B 7D EC                              MOV %EDI,[%EBP-20]
 0256 8B 07                                 MOV %EAX,[%EDI]
 0258 8B 4D F8                              MOV %ECX,[%EBP-8]
 025B 89 48 04                              MOV [%EAX+4],%ECX
    40    recn_next_next = rec
 025E 8B 5D EC                              MOV %EBX,[%EBP-20]
 0261 8B 03                                 MOV %EAX,[%EBX]
 0263 8B 38                                 MOV %EDI,[%EAX]
 0265 B9 08 00 00 00                        MOV %ECX,#8
 026A 8D 75 F0                              LEA %ESI,[%EBP-16]
 026D F3 A4                                 REP MOVSB
    41    recn_next_next = recn
 026F 8B 75 EC                              MOV %ESI,[%EBP-20]
 0272 8B 06                                 MOV %EAX,[%ESI]
 0274 8B 38                                 MOV %EDI,[%EAX]
 0276 B9 08 00 00 00                        MOV %ECX,#8
 027B 8B 75 EC                              MOV %ESI,[%EBP-20]
 027E F3 A4                                 REP MOVSB
    42    recn_next_next_i = i
 0280 8B 7D EC                              MOV %EDI,[%EBP-20]
 0283 8B 07                                 MOV %EAX,[%EDI]
 0285 8B 18                                 MOV %EBX,[%EAX]
 0287 8B 45 F8                              MOV %EAX,[%EBP-8]
 028A 89 43 04                              MOV [%EBX+4],%EAX
    43    recn == rna(i)
 028D FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 0290 FF 75 C0                              PUSH DWORD PTR [%EBP-64]
 0293 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0296 83 C4 08                              ADD %ESP,#8
 0299 89 C6                                 MOV %ESI,%EAX
 029B 03 75 BC                              ADD %ESI,[%EBP-68]
 029E 8B 36                                 MOV %ESI,[%ESI]
 02A0 89 75 EC                              MOV [%EBP-20],%ESI
    44    recn == rna(i)_next
 02A3 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 02A6 FF 75 C0                              PUSH DWORD PTR [%EBP-64]
 02A9 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 02AC 83 C4 08                              ADD %ESP,#8
 02AF 89 C7                                 MOV %EDI,%EAX
 02B1 03 7D BC                              ADD %EDI,[%EBP-68]
 02B4 8B 3F                                 MOV %EDI,[%EDI]
 02B6 8B 3F                                 MOV %EDI,[%EDI]
 02B8 89 7D EC                              MOV [%EBP-20],%EDI
    45    recn == rna(i)_next_next
 02BB FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 02BE FF 75 C0                              PUSH DWORD PTR [%EBP-64]
 02C1 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 02C4 83 C4 08                              ADD %ESP,#8
 02C7 89 C3                                 MOV %EBX,%EAX
 02C9 03 5D BC                              ADD %EBX,[%EBP-68]
 02CC 8B 1B                                 MOV %EBX,[%EBX]
 02CE 8B 1B                                 MOV %EBX,[%EBX]
 02D0 8B 1B                                 MOV %EBX,[%EBX]
 02D2 89 5D EC                              MOV [%EBP-20],%EBX
    46    rec = rna(i)
 02D5 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 02D8 FF 75 C0                              PUSH DWORD PTR [%EBP-64]
 02DB E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 02DE 83 C4 08                              ADD %ESP,#8
 02E1 89 C6                                 MOV %ESI,%EAX
 02E3 03 75 BC                              ADD %ESI,[%EBP-68]
 02E6 8D 7D F0                              LEA %EDI,[%EBP-16]
 02E9 B9 08 00 00 00                        MOV %ECX,#8
 02EE 8B 36                                 MOV %ESI,[%ESI]
 02F0 F3 A4                                 REP MOVSB
    47    rec = rna(i)_next
 02F2 FF 75 F8                              PUSH DWORD PTR [%EBP-8]
 02F5 FF 75 C0                              PUSH DWORD PTR [%EBP-64]
 02F8 E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 02FB 83 C4 08                              ADD %ESP,#8
 02FE 89 C7                                 MOV %EDI,%EAX
 0300 03 7D BC                              ADD %EDI,[%EBP-68]
 0303 89 7D AC                              MOV [%EBP-84],%EDI
 0306 6A 00                                 PUSH #0
 0308 68 00 00 00 00                        PUSH COT+#0
 030D E8 09 00                              CALL '_IMPAREF' (EXTERN 9)
 0310 83 C4 08                              ADD %ESP,#8
    48    rec = rna(i)_next_next
    49    x = rna(i)_i
    50    x = rna(i)_next_i
    51    x = rna(i)_next_next_i
    52    rnan == rna
    53    recn == rnan(i)
    54    recn == rnan(i)_next
    55    recn == rnan(i)_next
    56    rec  = rnan(i)
    57    rec  = rnan(i)_next
    58    rec  = rnan(i)_next
    59    x = rnan(i)_i
    60    x = rnan(i)_next_i
    61    x = rnan(i)_next_next_i
    62    rnan(i)_i = x
    63    rnan(i)_next = rec
    64    rnan(i)_next == recn
    65    rnan(i)_next_i = x
    66    rnan(i)_next_next = rec
    67    rnan(i)_next_next == recn
    68    rnan(i)_next_next_i = x
    69    recn == rm(i)
    70    recn == rm(i)_next
    71    recn == rm(i)_next_next
    72    recn_i = rm(i)_i
    73    recn_i = rm(i)_next_i
    74    recn_i = rm(i)_next_next_i
    75    rm(i) = rec
    76    rm(i)_next = rec
    77    rm(i)_next_i = x
    78    rm(i)_next == recn
    79    rm(i)_next_next = rec
    80    rm(i)_next_next_i = x
    81    rm(i)_next_next == recn
    82    x = rm(i)_i
    83    x = rm(i)_next_i
    84    x = rm(i)_next_next_i
    85    rm(i)_i = x
    86    rm(i)_next = rec
    87    rm(i)_next = recn
    88    rm(i)_next_i = x
    89    rm(i)_next_next = rec
    90    rm(i)_next_next = recn
    91    rm(i)_next_next_i = x
    92  %endofprogram

    90 Statements compiled



 ELF object file generated from IMP source file: '/home/gtoal/src/compilers101/new-parser/imps/tests/test186.imp'
 +----------+---------------------+---------+---------+---------+------------+
 | Sections |       Symbols       | Code    | Data    | Diag    | Total size |
 +----------+----------+----------+---------+---------+---------+------------+
 |  (count) | Internal | External | (bytes) | (bytes) | (bytes) | (bytes)    |
 +----------+----------+----------+---------+---------+---------+------------+
 |       11 |        5 |        8 |     831 |       0 |      64 |        895 |
 +----------+----------+----------+---------+---------+---------+------------+


