#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int inb(int);
int inl(int);
int inw(int);
int /*<<< orphan*/ iopl(int);
int /*<<< orphan*/ outb(int, unsigned char);
int /*<<< orphan*/ outw(int, int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int i, HTotal, HDisplay, HSyncStart, HSyncEnd, VTotal, VDisplay, VSyncStart,
      VSyncEnd;
  unsigned char storeReg, bpp, shift, IOSS = 0, MSS = 0, again = 0;
  unsigned short port;
  int isHiQV = 0;
  int is69030 = 0;
  iopl(3);
  printf("0x3C6\t0x%X\n", inw(0x3C6));
  outb(0x3D6, 0x02);
  storeReg = inb(0x3D7);
  if (storeReg == 0xE0 || storeReg == 0xE4 || storeReg == 0xE5 ||
      storeReg == 0xF4 || storeReg == 0xC0) {
    isHiQV = 1;
  } else if (storeReg == 0x30) {
    outb(0x3D6, 0x03);
    storeReg = inb(0x3D7);
    if (storeReg == 0xC) {
      isHiQV = 1;
      is69030 = 1;
      IOSS = inb(0x3CD);
      MSS = inb(0x3CB);
      outb(0x3CD, ((IOSS & 0xE0) | 0x11));
      outb(0x3CB, ((MSS & 0xF0) | 0x8));
      again = 1;
      printf("Pipeline A:\n");
    }
  }
again:
  printf("port 0x3D6 (C&T)\n");
  storeReg = inb(0x3D6);
  shift = 3;
  if (isHiQV == 1) {
    outw(0x102, 1);
    printf("0x%2.2X\n", inb(0x3C3) & 0xFF);
    outb(0x3C3, 0);
    outb(0x3C3, 1);
    for (i = 0; i < 0xFF; i++) {
      outb(0x3D6, i);
      printf("XR 0x%2.2X\t0x%2.2X\n", i, inb(0x3D7) & 0xFF);
    }
    outb(0x3D6, 0xE2);
    bpp = inb(0x3D7) & 0xF0;
  } else {
    outb(0x3D6, 0x70);
    outw(0x3D6, (inw(0x3D6) | 0x8070));
    outw(0x46E8, 0x0016);
    outw(0x102, 1);
    outw(0x46E8, 0x000E);
    printf("0x%2.2X\n", inb(0x3C3) & 0xFF);
    outb(0x3C3, 0);
    outw(0x46E8, 0x0000);
    outw(0x46E8, 0x000E);
    outb(0x3C3, 1);
    outw(0x46E8, 0x0000);
    for (i = 0; i < 0x80; i++) {
      outb(0x3D6, i);
      printf("XR 0x%2.2X\t0x%2.2X\n", i, inb(0x3D7) & 0xFF);
    }
    outb(0x3D6, 0x2B);
    bpp = inb(0x3D7) & 0xF0;
  }
  switch (bpp) {
  case 0x20:
    bpp = 4;
    break;
  case 0x30:
    bpp = 8;
    break;
  case 0x40:
    bpp = 16;
    shift = 2;
    break;
  case 0x50:
    bpp = 24;
    break;
  default:
    bpp = 0;
  }
  outb(0x3D6, storeReg);
  printf("\nport 0x3D4 (CRTC)\n");
  storeReg = inb(0x3D4);
  if (isHiQV == 1) {
    for (i = 0; i < 0x7F; i++) {
      outb(0x3D4, i);
      printf("CR 0x%2.2X\t0x%2.2X\n", i, inb(0x3D5) & 0xFF);
    }
    outb(0x3D4, storeReg);
    printf("\nport 0x3D0 (Flat Panel)\n");
    storeReg = inb(0x3D0);
    for (i = 0; i < 0x7F; i++) {
      outb(0x3D0, i);
      printf("FR 0x%2.2X\t0x%2.2X\n", i, inb(0x3D1) & 0xFF);
    }
    outb(0x3D1, storeReg);
    printf("\nport 0x3D2 (Multimedia)\n");
    storeReg = inb(0x3D2);
    for (i = 0; i < 0x7F; i++) {
      outb(0x3D2, i);
      printf("MR 0x%2.2X\t0x%2.2X\n", i, inb(0x3D3) & 0xFF);
    }
    outb(0x3D3, storeReg);
  } else {
    for (i = 0; i < 0x40; i++) {
      outb(0x3D4, i);
      printf("CR 0x%2.2X\t0x%2.2X\n", i, inb(0x3D5) & 0xFF);
    }
    outb(0x3D4, storeReg);
  }
  printf("port 0x3CE (GC)\n");
  storeReg = inb(0x3CE);
  for (i = 0; i < 0x10; i++) {
    outb(0x3CE, i);
    printf("GC 0x%2.2X\t0x%2.2X\n", i, inb(0x3CF) & 0xFF);
  }
  outb(0x3CE, storeReg);
  printf("port 0x3C4 (Sequencer)\n");
  storeReg = inb(0x3C4);
  for (i = 0; i < 0x10; i++) {
    outb(0x3C4, i);
    printf("SQ 0x%2.2X\t0x%X2.2\n", i, inb(0x3C5) & 0xFF);
  }
  outb(0x3C4, storeReg);
  printf("port 0x3C0 (Attribute)\n");
  inb(0x3DA);
  storeReg = inb(0x3C0);
  for (i = 0; i < 0xFF; i++) {
    inb(0x3DA);
    outb(0x3C0, i);
    printf("AT 0x%2.2X\t0x%2.2X\n", i, inb(0x3C1) & 0xFF);
  }
  inb(0x3DA);
  outb(0x3C0, storeReg);
  printf("0x3CC\t0x%X\n", inb(0x3CC) & 0xFF);
  printf("0x3C2\t0x%X\n", inb(0x3C2) & 0xFF);
  printf("0x3C3\t0x%X\n", inb(0x3C2) & 0xFF);
  printf("0x3CA\t0x%X\n", inb(0x3CA) & 0xFF);
  printf("0x3DA\t0x%X\n", inb(0x3DA) & 0xFF);
  printf("\nRAMDAC\nport\tvalue\n");
  for (port = 0x83C6; port < 0x83CA; port++) {
    printf("0x%4X\t0x%4X\n", port, inw(port));
  }
  if (isHiQV != 1) {
    printf("\nBitBLT\nport\tvalue\n");
    for (port = 0x83D0; port <= 0x9FD0; port += 0x400) {
      printf("0x%4.4X\t0x%4X\n", port, inw(port));
    }
    printf("\nH/W cursor\nport\tvalue\n");
    for (port = 0xA3D0; port <= 0xB3D0; port += 0x400) {
      printf("0x%4.4X\t0x%4X\n", port, inw(port));
    }
    outb(0x3D6, 0x70);
    outw(0x3D6, (inw(0x3D6) | 0x8070));
    printf("0x46E8\t0x%8X\n", inl(0x46E8));
    printf("0x4AE8\t0x%8X\n", inl(0x4AE8));
    printf("0x102\t0x%8X\n", inl(0x102));
    printf("0x103\t0x%8X\n", inl(0x103));
  }
  storeReg = inb(0x3D4);
  {
    outb(0x3D4, 0);
    HTotal = ((inb(0x3D5) & 0xFF) + 5) << shift;
    outb(0x3D4, 1);
    HDisplay = ((inb(0x3D5) & 0xFF) + 1) << shift;
    outb(0x3D4, 4);
    HSyncStart = ((inb(0x3D5) & 0xFF) + 1) << shift;
    outb(0x3D4, 5);
    HSyncEnd = inb(0x3D5) & 0x1F;
    outb(0x3D4, 5);
    HSyncEnd += HSyncStart >> shift;
    HSyncEnd <<= shift;
    outb(0x3D4, 6);
    VTotal = inb(0x3D5) & 0xFF;
    outb(0x3D4, 7);
    VTotal |= (inb(0x3D5) & 0x1) << 8;
    VTotal |= (inb(0x3D5) & 0x20) << 4;
    VTotal += 2;
    VDisplay = (inb(0x3D5) & 0x2) << 7;
    VDisplay |= (inb(0x3D5) & 0x40) << 3;
    VSyncStart = (inb(0x3D5) & 0x4) << 6;
    VSyncStart |= (inb(0x3D5) & 0x80) << 2;
    outb(0x3D4, 0x12);
    VDisplay |= inb(0x3D5) & 0xFF;
    VDisplay += 1;
    outb(0x3D4, 0x10);
    VSyncStart |= inb(0x3D5) & 0xFF;
    outb(0x3D4, 0x11);
    VSyncEnd = inb(0x3D5) & 0xF;
    VSyncEnd += VSyncStart;
  }
  outb(0x3D4, storeReg);
  printf("\nModeLine with port 0x3D4 (CRTC) %d %d %d %d %d %d %d %d\n",
         HDisplay, HSyncStart, HSyncEnd, HTotal, VDisplay, VSyncStart, VSyncEnd,
         VTotal);
  if (is69030 == 1) {
    if (again == 1) {
      again = 0;
      printf("\n\nPipeline B:\n");
      outb(0x3CD, ((IOSS & 0xE0) | 0x1F));
      outb(0x3CB, ((MSS & 0xF0) | 0xF));
      goto again;
    } else {
      outb(0x3CD, IOSS);
      outb(0x3CB, MSS);
      printf("\n\n0x3CB\t0x%X  (MSS)\n", inb(0x3CB) & 0xFF);
      printf("0x3CD\t0x%X  (IOSS)\n", inb(0x3CD) & 0xFF);
    }
  }
  iopl(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x2c(%rbp)
movb   $0x0,-0x2d(%rbp)
movb   $0x0,-0x2e(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    $0x3,%edi
call   1050 <iopl@plt>
mov    $0x3c6,%edi
call   1030 <inw@plt>
mov    %eax,%esi
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3d6,%edi
mov    $0x2,%esi
call   1060 <outb@plt>
mov    $0x3d7,%edi
call   1070 <inb@plt>
mov    %al,-0x29(%rbp)
movzbl -0x29(%rbp),%eax
cmp    $0xe0,%eax
je     1227 <main+0xb7>
movzbl -0x29(%rbp),%eax
cmp    $0xe4,%eax
je     1227 <main+0xb7>
movzbl -0x29(%rbp),%eax
cmp    $0xe5,%eax
je     1227 <main+0xb7>
movzbl -0x29(%rbp),%eax
cmp    $0xf4,%eax
je     1227 <main+0xb7>
movzbl -0x29(%rbp),%eax
cmp    $0xc0,%eax
jne    1233 <main+0xc3>
movl   $0x1,-0x34(%rbp)
jmp    12df <main+0x16f>
movzbl -0x29(%rbp),%eax
cmp    $0x30,%eax
jne    12da <main+0x16a>
mov    $0x3d6,%edi
mov    $0x3,%esi
call   1060 <outb@plt>
mov    $0x3d7,%edi
call   1070 <inb@plt>
mov    %al,-0x29(%rbp)
movzbl -0x29(%rbp),%eax
cmp    $0xc,%eax
jne    12d5 <main+0x165>
movl   $0x1,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
mov    $0x3cd,%edi
call   1070 <inb@plt>
mov    %al,-0x2c(%rbp)
mov    $0x3cb,%edi
call   1070 <inb@plt>
mov    %al,-0x2d(%rbp)
movzbl -0x2c(%rbp),%eax
and    $0xe0,%eax
or     $0x11,%eax
mov    $0x3cd,%edi
movzbl %al,%esi
call   1060 <outb@plt>
movzbl -0x2d(%rbp),%eax
and    $0xf0,%eax
or     $0x8,%eax
mov    $0x3cb,%edi
movzbl %al,%esi
call   1060 <outb@plt>
movb   $0x1,-0x2e(%rbp)
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12da <main+0x16a>
jmp    12df <main+0x16f>
jmp    12e4 <main+0x174>
lea    0xd2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3d6,%edi
call   1070 <inb@plt>
mov    %al,-0x29(%rbp)
movb   $0x3,-0x2b(%rbp)
cmpl   $0x1,-0x34(%rbp)
jne    13d8 <main+0x268>
mov    $0x102,%edi
mov    $0x1,%esi
call   1090 <outw@plt>
mov    $0x3c3,%edi
call   1070 <inb@plt>
mov    %eax,%esi
and    $0xff,%esi
lea    0xdaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3c3,%edi
xor    %esi,%esi
call   1060 <outb@plt>
mov    $0x3c3,%edi
mov    $0x1,%esi
call   1060 <outb@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jge    13b2 <main+0x242>
mov    -0x8(%rbp),%eax
mov    $0x3d6,%edi
movzbl %al,%esi
call   1060 <outb@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    $0x3d7,%edi
call   1070 <inb@plt>
mov    -0x3c(%rbp),%esi
mov    %eax,%edx
and    $0xff,%edx
lea    0xc8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    135e <main+0x1ee>
mov    $0x3d6,%edi
mov    $0xe2,%esi
call   1060 <outb@plt>
mov    $0x3d7,%edi
call   1070 <inb@plt>
and    $0xf0,%eax
mov    %al,-0x2a(%rbp)
jmp    150e <main+0x39e>
mov    $0x3d6,%edi
mov    $0x70,%esi
call   1060 <outb@plt>
mov    $0x3d6,%edi
call   1030 <inw@plt>
mov    %eax,%esi
or     $0x8070,%esi
mov    $0x3d6,%edi
call   1090 <outw@plt>
mov    $0x46e8,%edi
mov    $0x16,%esi
call   1090 <outw@plt>
mov    $0x102,%edi
mov    $0x1,%esi
call   1090 <outw@plt>
mov    $0x46e8,%edi
mov    $0xe,%esi
call   1090 <outw@plt>
mov    $0x3c3,%edi
call   1070 <inb@plt>
mov    %eax,%esi
and    $0xff,%esi
lea    0xc96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3c3,%edi
xor    %esi,%esi
call   1060 <outb@plt>
mov    $0x46e8,%edi
xor    %esi,%esi
call   1090 <outw@plt>
mov    $0x46e8,%edi
mov    $0xe,%esi
call   1090 <outw@plt>
mov    $0x3c3,%edi
mov    $0x1,%esi
call   1060 <outb@plt>
mov    $0x46e8,%edi
xor    %esi,%esi
call   1090 <outw@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    14ed <main+0x37d>
mov    -0x8(%rbp),%eax
mov    $0x3d6,%edi
movzbl %al,%esi
call   1060 <outb@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    $0x3d7,%edi
call   1070 <inb@plt>
mov    -0x40(%rbp),%esi
mov    %eax,%edx
and    $0xff,%edx
lea    0xb53(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1499 <main+0x329>
mov    $0x3d6,%edi
mov    $0x2b,%esi
call   1060 <outb@plt>
mov    $0x3d7,%edi
call   1070 <inb@plt>
and    $0xf0,%eax
mov    %al,-0x2a(%rbp)
movzbl -0x2a(%rbp),%eax
mov    %eax,-0x44(%rbp)
sub    $0x20,%eax
je     1556 <main+0x3e6>
jmp    1523 <main+0x3b3>
mov    -0x44(%rbp),%eax
sub    $0x30,%eax
je     155f <main+0x3ef>
jmp    1534 <main+0x3c4>
mov    -0x44(%rbp),%eax
sub    $0x40,%eax
je     1568 <main+0x3f8>
jmp    1545 <main+0x3d5>
mov    -0x44(%rbp),%eax
sub    $0x50,%eax
je     1575 <main+0x405>
jmp    157e <main+0x40e>
movb   $0x4,-0x2a(%rbp)
jmp    1582 <main+0x412>
movb   $0x8,-0x2a(%rbp)
jmp    1582 <main+0x412>
movb   $0x10,-0x2a(%rbp)
movb   $0x2,-0x2b(%rbp)
jmp    1582 <main+0x412>
movb   $0x18,-0x2a(%rbp)
jmp    1582 <main+0x412>
movb   $0x0,-0x2a(%rbp)
mov    $0x3d6,%edi
movzbl -0x29(%rbp),%esi
call   1060 <outb@plt>
lea    0xaa8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3d4,%edi
call   1070 <inb@plt>
mov    %al,-0x29(%rbp)
cmpl   $0x1,-0x34(%rbp)
jne    1722 <main+0x5b2>
movl   $0x0,-0x8(%rbp)
cmpl   $0x7f,-0x8(%rbp)
jge    160d <main+0x49d>
mov    -0x8(%rbp),%eax
mov    $0x3d4,%edi
movzbl %al,%esi
call   1060 <outb@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    $0x3d5,%edi
call   1070 <inb@plt>
mov    -0x48(%rbp),%esi
mov    %eax,%edx
and    $0xff,%edx
lea    0xa5b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    15bc <main+0x44c>
mov    $0x3d4,%edi
movzbl -0x29(%rbp),%esi
call   1060 <outb@plt>
lea    0xa45(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3d0,%edi
call   1070 <inb@plt>
mov    %al,-0x29(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x7f,-0x8(%rbp)
jge    168e <main+0x51e>
mov    -0x8(%rbp),%eax
mov    $0x3d0,%edi
movzbl %al,%esi
call   1060 <outb@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    $0x3d1,%edi
call   1070 <inb@plt>
mov    -0x4c(%rbp),%esi
mov    %eax,%edx
and    $0xff,%edx
lea    0xa08(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    163d <main+0x4cd>
mov    $0x3d1,%edi
movzbl -0x29(%rbp),%esi
call   1060 <outb@plt>
lea    0x9f2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3d2,%edi
call   1070 <inb@plt>
mov    %al,-0x29(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x7f,-0x8(%rbp)
jge    170f <main+0x59f>
mov    -0x8(%rbp),%eax
mov    $0x3d2,%edi
movzbl %al,%esi
call   1060 <outb@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    $0x3d3,%edi
call   1070 <inb@plt>
mov    -0x50(%rbp),%esi
mov    %eax,%edx
and    $0xff,%edx
lea    0x9b5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    16be <main+0x54e>
mov    $0x3d3,%edi
movzbl -0x29(%rbp),%esi
call   1060 <outb@plt>
jmp    1788 <main+0x618>
movl   $0x0,-0x8(%rbp)
cmpl   $0x40,-0x8(%rbp)
jge    177a <main+0x60a>
mov    -0x8(%rbp),%eax
mov    $0x3d4,%edi
movzbl %al,%esi
call   1060 <outb@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    $0x3d5,%edi
call   1070 <inb@plt>
mov    -0x54(%rbp),%esi
mov    %eax,%edx
and    $0xff,%edx
lea    0x8ee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1729 <main+0x5b9>
mov    $0x3d4,%edi
movzbl -0x29(%rbp),%esi
call   1060 <outb@plt>
lea    0x934(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3ce,%edi
call   1070 <inb@plt>
mov    %al,-0x29(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jge    17fb <main+0x68b>
mov    -0x8(%rbp),%eax
mov    $0x3ce,%edi
movzbl %al,%esi
call   1060 <outb@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    $0x3cf,%edi
call   1070 <inb@plt>
mov    -0x58(%rbp),%esi
mov    %eax,%edx
and    $0xff,%edx
lea    0x8ee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    17aa <main+0x63a>
mov    $0x3ce,%edi
movzbl -0x29(%rbp),%esi
call   1060 <outb@plt>
lea    0x8d8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3c4,%edi
call   1070 <inb@plt>
mov    %al,-0x29(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jge    187c <main+0x70c>
mov    -0x8(%rbp),%eax
mov    $0x3c4,%edi
movzbl %al,%esi
call   1060 <outb@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    $0x3c5,%edi
call   1070 <inb@plt>
mov    -0x5c(%rbp),%esi
mov    %eax,%edx
and    $0xff,%edx
lea    0x899(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    182b <main+0x6bb>
mov    $0x3c4,%edi
movzbl -0x29(%rbp),%esi
call   1060 <outb@plt>
lea    0x883(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3da,%edi
call   1070 <inb@plt>
mov    $0x3c0,%edi
call   1070 <inb@plt>
mov    %al,-0x29(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jge    1914 <main+0x7a4>
mov    $0x3da,%edi
call   1070 <inb@plt>
mov    -0x8(%rbp),%eax
mov    $0x3c0,%edi
movzbl %al,%esi
call   1060 <outb@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    $0x3c1,%edi
call   1070 <inb@plt>
mov    -0x60(%rbp),%esi
mov    %eax,%edx
and    $0xff,%edx
lea    0x82d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    18b6 <main+0x746>
mov    $0x3da,%edi
call   1070 <inb@plt>
mov    $0x3c0,%edi
movzbl -0x29(%rbp),%esi
call   1060 <outb@plt>
mov    $0x3cc,%edi
call   1070 <inb@plt>
mov    %eax,%esi
and    $0xff,%esi
lea    0x7fb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3c2,%edi
call   1070 <inb@plt>
mov    %eax,%esi
and    $0xff,%esi
lea    0x7e7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3c2,%edi
call   1070 <inb@plt>
mov    %eax,%esi
and    $0xff,%esi
lea    0x7d3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3ca,%edi
call   1070 <inb@plt>
mov    %eax,%esi
and    $0xff,%esi
lea    0x7bf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3da,%edi
call   1070 <inb@plt>
mov    %eax,%esi
and    $0xff,%esi
lea    0x7ab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x7a9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movw   $0x83c6,-0x30(%rbp)
movzwl -0x30(%rbp),%eax
cmp    $0x83ca,%eax
jge    1a23 <main+0x8b3>
movzwl -0x30(%rbp),%eax
mov    %eax,-0x64(%rbp)
movzwl -0x30(%rbp),%edi
call   1030 <inw@plt>
mov    -0x64(%rbp),%esi
mov    %eax,%edx
lea    0x785(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x30(%rbp)
jmp    19e0 <main+0x870>
cmpl   $0x1,-0x34(%rbp)
je     1b70 <main+0xa00>
lea    0x769(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movw   $0x83d0,-0x30(%rbp)
movzwl -0x30(%rbp),%eax
cmp    $0x9fd0,%eax
jg     1a85 <main+0x915>
movzwl -0x30(%rbp),%eax
mov    %eax,-0x68(%rbp)
movzwl -0x30(%rbp),%edi
call   1030 <inw@plt>
mov    -0x68(%rbp),%esi
mov    %eax,%edx
lea    0x745(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzwl -0x30(%rbp),%eax
add    $0x400,%eax
mov    %ax,-0x30(%rbp)
jmp    1a41 <main+0x8d1>
lea    0x734(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movw   $0xa3d0,-0x30(%rbp)
movzwl -0x30(%rbp),%eax
cmp    $0xb3d0,%eax
jg     1add <main+0x96d>
movzwl -0x30(%rbp),%eax
mov    %eax,-0x6c(%rbp)
movzwl -0x30(%rbp),%edi
call   1030 <inw@plt>
mov    -0x6c(%rbp),%esi
mov    %eax,%edx
lea    0x6ed(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzwl -0x30(%rbp),%eax
add    $0x400,%eax
mov    %ax,-0x30(%rbp)
jmp    1a99 <main+0x929>
mov    $0x3d6,%edi
mov    $0x70,%esi
call   1060 <outb@plt>
mov    $0x3d6,%edi
call   1030 <inw@plt>
mov    %eax,%esi
or     $0x8070,%esi
mov    $0x3d6,%edi
call   1090 <outw@plt>
mov    $0x46e8,%edi
call   1080 <inl@plt>
mov    %eax,%esi
lea    0x6bd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x4ae8,%edi
call   1080 <inl@plt>
mov    %eax,%esi
lea    0x6b1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x102,%edi
call   1080 <inl@plt>
mov    %eax,%esi
lea    0x6a5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x103,%edi
call   1080 <inl@plt>
mov    %eax,%esi
lea    0x698(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3d4,%edi
call   1070 <inb@plt>
mov    %al,-0x29(%rbp)
mov    $0x3d4,%edi
xor    %esi,%esi
call   1060 <outb@plt>
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0xff,%eax
add    $0x5,%eax
movzbl -0x2b(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    $0x3d4,%edi
mov    $0x1,%esi
call   1060 <outb@plt>
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0xff,%eax
add    $0x1,%eax
movzbl -0x2b(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    $0x3d4,%edi
mov    $0x4,%esi
call   1060 <outb@plt>
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0xff,%eax
add    $0x1,%eax
movzbl -0x2b(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    $0x3d4,%edi
mov    $0x5,%esi
call   1060 <outb@plt>
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0x1f,%eax
mov    %eax,-0x18(%rbp)
mov    $0x3d4,%edi
mov    $0x5,%esi
call   1060 <outb@plt>
mov    -0x14(%rbp),%eax
movzbl -0x2b(%rbp),%ecx
sar    %cl,%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
movzbl -0x2b(%rbp),%ecx
mov    -0x18(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    $0x3d4,%edi
mov    $0x6,%esi
call   1060 <outb@plt>
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0xff,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x3d4,%edi
mov    $0x7,%esi
call   1060 <outb@plt>
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0x1,%eax
shl    $0x8,%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0x20,%eax
shl    $0x4,%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0x2,%eax
shl    $0x7,%eax
mov    %eax,-0x20(%rbp)
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0x40,%eax
shl    $0x3,%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0x4,%eax
shl    $0x6,%eax
mov    %eax,-0x24(%rbp)
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0x80,%eax
shl    $0x2,%eax
or     -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x3d4,%edi
mov    $0x12,%esi
call   1060 <outb@plt>
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0xff,%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    $0x3d4,%edi
mov    $0x10,%esi
call   1060 <outb@plt>
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0xff,%eax
or     -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x3d4,%edi
mov    $0x11,%esi
call   1060 <outb@plt>
mov    $0x3d5,%edi
call   1070 <inb@plt>
and    $0xf,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    $0x3d4,%edi
movzbl -0x29(%rbp),%esi
call   1060 <outb@plt>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    -0x24(%rbp),%r11d
mov    -0x28(%rbp),%r10d
mov    -0x1c(%rbp),%eax
lea    0x46a(%rip),%rdi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x1,-0x38(%rbp)
jne    1e79 <main+0xd09>
movzbl -0x2e(%rbp),%eax
cmp    $0x1,%eax
jne    1e18 <main+0xca8>
movb   $0x0,-0x2e(%rbp)
lea    0x46e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzbl -0x2c(%rbp),%eax
and    $0xe0,%eax
or     $0x1f,%eax
mov    $0x3cd,%edi
movzbl %al,%esi
call   1060 <outb@plt>
movzbl -0x2d(%rbp),%eax
and    $0xf0,%eax
or     $0xf,%eax
mov    $0x3cb,%edi
movzbl %al,%esi
call   1060 <outb@plt>
jmp    12e4 <main+0x174>
mov    $0x3cd,%edi
movzbl -0x2c(%rbp),%esi
call   1060 <outb@plt>
mov    $0x3cb,%edi
movzbl -0x2d(%rbp),%esi
call   1060 <outb@plt>
mov    $0x3cb,%edi
call   1070 <inb@plt>
mov    %eax,%esi
and    $0xff,%esi
lea    0x40a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3cd,%edi
call   1070 <inb@plt>
mov    %eax,%esi
and    $0xff,%esi
lea    0x3ff(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1e79 <main+0xd09>
xor    %edi,%edi
call   1050 <iopl@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    $0x3,%edi
call   1060 <iopl@plt>
mov    $0x3c6,%edi
call   1030 <inw@plt>
lea    0x1e57(%rip),%rdi
xor    %ebx,%ebx
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3d6,%edi
mov    $0x2,%esi
call   1070 <outb@plt>
mov    $0x3d7,%edi
call   1080 <inb@plt>
mov    %eax,%ecx
and    $0xfb,%ecx
mov    $0x1,%r14b
cmp    $0xe0,%ecx
jne    11ee <main+0x6e>
xor    %ebp,%ebp
xor    %ecx,%ecx
movl   $0x0,0x10(%rsp)
jmp    1225 <main+0xa5>
lea    0x40(%rax),%ecx
cmp    $0x34,%cl
ja     21c2 <main+0x1042>
xor    %ebx,%ebx
movzbl %cl,%ecx
movabs $0x10002000000001,%rdx
bt     %rcx,%rdx
mov    $0x0,%ebp
mov    $0x0,%ecx
movl   $0x0,0x10(%rsp)
jae    21c2 <main+0x1042>
mov    %ecx,0x14(%rsp)
mov    %ebx,0x1c(%rsp)
mov    %ebx,%eax
or     $0x1f,%al
mov    %al,0xf(%rsp)
mov    %ebp,0x18(%rsp)
mov    %ebp,%eax
or     $0xf,%al
mov    %al,0xe(%rsp)
lea    0x1dc4(%rip),%r12
lea    0x1dd1(%rip),%rbx
lea    0x1dde(%rip),%r13
mov    %r14d,0x20(%rsp)
nopl   0x0(%rax,%rax,1)
lea    0x1f22(%rip),%rdi
call   1040 <puts@plt>
mov    $0x3d6,%edi
call   1080 <inb@plt>
mov    %eax,%r15d
test   %r14b,%r14b
je     1310 <main+0x190>
mov    $0x102,%edi
mov    $0x1,%esi
call   10a0 <outw@plt>
mov    $0x3c3,%edi
call   1080 <inb@plt>
movzbl %al,%esi
xor    %ebp,%ebp
lea    0x1dc0(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c3,%edi
xor    %esi,%esi
call   1070 <outb@plt>
mov    $0x3c3,%edi
mov    $0x1,%esi
call   1070 <outb@plt>
nopl   0x0(%rax)
movzbl %bpl,%esi
mov    $0x3d6,%edi
call   1070 <outb@plt>
mov    $0x3d7,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %r12,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebp
cmp    $0xff,%ebp
jne    12d0 <main+0x150>
mov    $0xe2,%al
jmp    1404 <main+0x284>
nopl   0x0(%rax)
mov    $0x3d6,%edi
mov    $0x70,%esi
call   1070 <outb@plt>
mov    $0x3d6,%edi
call   1030 <inw@plt>
or     $0x8070,%eax
mov    $0x3d6,%edi
mov    %eax,%esi
call   10a0 <outw@plt>
mov    $0x46e8,%edi
mov    $0x16,%esi
call   10a0 <outw@plt>
mov    $0x102,%edi
mov    $0x1,%esi
call   10a0 <outw@plt>
mov    $0x46e8,%edi
mov    $0xe,%esi
call   10a0 <outw@plt>
mov    $0x3c3,%edi
call   1080 <inb@plt>
movzbl %al,%esi
xor    %ebp,%ebp
lea    0x1cea(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c3,%edi
xor    %esi,%esi
call   1070 <outb@plt>
mov    $0x46e8,%edi
xor    %esi,%esi
call   10a0 <outw@plt>
mov    $0x46e8,%edi
mov    $0xe,%esi
call   10a0 <outw@plt>
mov    $0x3c3,%edi
mov    $0x1,%esi
call   1070 <outb@plt>
mov    $0x46e8,%edi
xor    %esi,%esi
call   10a0 <outw@plt>
cs nopw 0x0(%rax,%rax,1)
movzbl %bpl,%esi
mov    $0x3d6,%edi
call   1070 <outb@plt>
mov    $0x3d7,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %r12,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebp
cmp    $0x80,%ebp
jne    13d0 <main+0x250>
mov    $0x2b,%al
movzbl %al,%esi
mov    $0x3d6,%edi
call   1070 <outb@plt>
mov    $0x3d7,%edi
call   1080 <inb@plt>
and    $0xf0,%eax
xor    %r12d,%r12d
cmp    $0x40,%eax
sete   %r12b
movzbl %r15b,%esi
mov    $0x3d6,%edi
call   1070 <outb@plt>
lea    0x1d5b(%rip),%rdi
call   1040 <puts@plt>
mov    $0x3d4,%edi
call   1080 <inb@plt>
movzbl %al,%r15d
xor    %ebp,%ebp
test   %r14b,%r14b
je     1560 <main+0x3e0>
nopl   (%rax)
movzbl %bpl,%esi
mov    $0x3d4,%edi
call   1070 <outb@plt>
mov    $0x3d5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebp
cmp    $0x7f,%ebp
jne    1460 <main+0x2e0>
mov    $0x3d4,%edi
mov    %r15d,%esi
call   1070 <outb@plt>
lea    0x1d93(%rip),%rdi
call   1040 <puts@plt>
mov    $0x3d0,%edi
call   1080 <inb@plt>
mov    %eax,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movzbl %bpl,%esi
mov    $0x3d0,%edi
call   1070 <outb@plt>
mov    $0x3d1,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %r13,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebp
cmp    $0x7f,%ebp
jne    14c0 <main+0x340>
movzbl %bl,%esi
mov    $0x3d1,%edi
call   1070 <outb@plt>
lea    0x1d4c(%rip),%rdi
call   1040 <puts@plt>
mov    $0x3d2,%edi
call   1080 <inb@plt>
mov    %eax,%r15d
xor    %ebp,%ebp
lea    0x1b2a(%rip),%rbx
xchg   %ax,%ax
movzbl %bpl,%esi
mov    $0x3d2,%edi
call   1070 <outb@plt>
mov    $0x3d3,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebp
cmp    $0x7f,%ebp
jne    1520 <main+0x3a0>
movzbl %r15b,%esi
mov    $0x3d3,%edi
jmp    1597 <main+0x417>
nopw   0x0(%rax,%rax,1)
movzbl %bpl,%esi
mov    $0x3d4,%edi
call   1070 <outb@plt>
mov    $0x3d5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebp
cmp    $0x40,%ebp
jne    1560 <main+0x3e0>
mov    $0x3d4,%edi
mov    %r15d,%esi
call   1070 <outb@plt>
xor    $0x3,%r12d
lea    0x1c06(%rip),%rdi
call   1040 <puts@plt>
mov    $0x3ce,%edi
call   1080 <inb@plt>
mov    %eax,%r15d
xor    %ebx,%ebx
mov    $0x3ce,%edi
xor    %esi,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
lea    0x1a81(%rip),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0x1,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0x2,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0x3,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0x4,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0x5,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0x6,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0x7,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0x8,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0x9,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0xa,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0xb,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0xc,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0xd,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0xe,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ce,%edi
mov    $0xf,%esi
call   1070 <outb@plt>
mov    $0x3cf,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl %r15b,%esi
mov    $0x3ce,%edi
call   1070 <outb@plt>
lea    0x193c(%rip),%rdi
call   1040 <puts@plt>
mov    $0x3c4,%edi
call   1080 <inb@plt>
mov    %eax,%r15d
mov    $0x3c4,%edi
xor    %esi,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
lea    0x17bd(%rip),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0x1,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0x2,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0x3,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0x4,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0x5,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0x6,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0x7,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0x8,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0x9,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0xa,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0xb,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0xc,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0xd,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0xe,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c4,%edi
mov    $0xf,%esi
call   1070 <outb@plt>
mov    $0x3c5,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movzbl %r15b,%esi
mov    $0x3c4,%edi
call   1070 <outb@plt>
lea    0x167b(%rip),%rdi
call   1040 <puts@plt>
mov    $0x3da,%edi
call   1080 <inb@plt>
mov    $0x3c0,%edi
call   1080 <inb@plt>
mov    %eax,%r15d
lea    0x1508(%rip),%rbp
nopl   0x0(%rax)
mov    $0x3da,%edi
call   1080 <inb@plt>
movzbl %bl,%esi
mov    $0x3c0,%edi
call   1070 <outb@plt>
mov    $0x3c1,%edi
call   1080 <inb@plt>
movzbl %al,%edx
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebx
cmp    $0xff,%ebx
jne    1b80 <main+0xa00>
mov    $0x3da,%edi
call   1080 <inb@plt>
movzbl %r15b,%esi
mov    $0x3c0,%edi
call   1070 <outb@plt>
mov    $0x3cc,%edi
call   1080 <inb@plt>
movzbl %al,%esi
lea    0x14b1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c2,%edi
call   1080 <inb@plt>
movzbl %al,%esi
lea    0x14a2(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3c2,%edi
call   1080 <inb@plt>
movzbl %al,%esi
lea    0x1493(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3ca,%edi
call   1080 <inb@plt>
movzbl %al,%esi
lea    0x1484(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3da,%edi
call   1080 <inb@plt>
movzbl %al,%esi
lea    0x1475(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x158a(%rip),%rdi
call   1040 <puts@plt>
mov    $0x83c6,%edi
call   1030 <inw@plt>
lea    0x145d(%rip),%rbx
mov    %rbx,%rdi
mov    $0x83c6,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x83c7,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0x83c7,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x83c8,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0x83c8,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x83c9,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0x83c9,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
test   %r14b,%r14b
jne    1ef2 <main+0xd72>
lea    0x1523(%rip),%rdi
call   1040 <puts@plt>
mov    $0x83d0,%edi
call   1030 <inw@plt>
lea    0x13e2(%rip),%rbx
mov    %rbx,%rdi
mov    $0x83d0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x87d0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0x87d0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x8bd0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0x8bd0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x8fd0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0x8fd0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x93d0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0x93d0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x97d0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0x97d0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x9bd0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0x9bd0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x9fd0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0x9fd0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x144b(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa3d0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0xa3d0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa7d0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0xa7d0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xabd0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0xabd0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xafd0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0xafd0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xb3d0,%edi
call   1030 <inw@plt>
mov    %rbx,%rdi
mov    $0xb3d0,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3d6,%edi
mov    $0x70,%esi
call   1070 <outb@plt>
mov    $0x3d6,%edi
call   1030 <inw@plt>
or     $0x8070,%eax
mov    $0x3d6,%edi
mov    %eax,%esi
call   10a0 <outw@plt>
mov    $0x46e8,%edi
call   1090 <inl@plt>
lea    0x1255(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x4ae8,%edi
call   1090 <inl@plt>
lea    0x1249(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x102,%edi
call   1090 <inl@plt>
lea    0x123d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x103,%edi
call   1090 <inl@plt>
lea    0x1230(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3d4,%edi
call   1080 <inb@plt>
mov    %eax,0x2c(%rsp)
mov    $0x3d4,%edi
xor    %esi,%esi
call   1070 <outb@plt>
mov    $0x3d5,%edi
call   1080 <inb@plt>
movzbl %al,%eax
add    $0x5,%eax
mov    %r12d,%ecx
shl    %cl,%eax
mov    %eax,0x28(%rsp)
mov    $0x3d4,%edi
mov    $0x1,%esi
call   1070 <outb@plt>
mov    $0x3d5,%edi
call   1080 <inb@plt>
mov    %r12d,%ebp
movzbl %al,%r12d
add    $0x1,%r12d
mov    %ebp,%ecx
shl    %cl,%r12d
mov    $0x3d4,%edi
mov    $0x4,%esi
call   1070 <outb@plt>
mov    $0x3d5,%edi
call   1080 <inb@plt>
movzbl %al,%r14d
add    $0x1,%r14d
mov    %ebp,%ecx
shl    %cl,%r14d
mov    $0x3d4,%edi
mov    $0x5,%esi
call   1070 <outb@plt>
mov    $0x3d5,%edi
call   1080 <inb@plt>
mov    %eax,%ebx
and    $0x1f,%ebx
mov    $0x3d4,%edi
mov    $0x5,%esi
call   1070 <outb@plt>
mov    %r14d,%r13d
mov    %ebp,%ecx
shr    %cl,%r13d
add    %ebx,%r13d
shl    %cl,%r13d
mov    $0x3d4,%edi
mov    $0x6,%esi
call   1070 <outb@plt>
mov    $0x3d5,%edi
call   1080 <inb@plt>
movzbl %al,%ebp
mov    $0x3d4,%edi
mov    $0x7,%esi
call   1070 <outb@plt>
mov    $0x3d5,%edi
call   1080 <inb@plt>
mov    %eax,%ebx
and    $0x1,%ebx
shl    $0x8,%ebx
or     %ebp,%ebx
mov    $0x3d5,%edi
call   1080 <inb@plt>
and    $0x20,%eax
shl    $0x4,%eax
add    %ebx,%eax
add    $0x2,%eax
mov    %rax,0x30(%rsp)
mov    $0x3d5,%edi
call   1080 <inb@plt>
mov    %eax,%ebx
and    $0x2,%ebx
shl    $0x7,%ebx
mov    $0x3d5,%edi
call   1080 <inb@plt>
and    $0x40,%eax
lea    (%rbx,%rax,8),%ebp
mov    $0x3d5,%edi
call   1080 <inb@plt>
mov    %eax,%ebx
and    $0x4,%ebx
shl    $0x6,%ebx
mov    $0x3d5,%edi
call   1080 <inb@plt>
and    $0x80,%eax
lea    (%rbx,%rax,4),%ebx
mov    $0x3d4,%edi
mov    $0x12,%esi
call   1070 <outb@plt>
mov    $0x3d5,%edi
call   1080 <inb@plt>
movzbl %al,%eax
add    %ebp,%eax
add    $0x1,%eax
mov    %eax,0x24(%rsp)
mov    $0x3d4,%edi
mov    $0x10,%esi
call   1070 <outb@plt>
mov    $0x3d5,%edi
call   1080 <inb@plt>
movzbl %al,%ebp
or     %ebx,%ebp
mov    $0x3d4,%edi
mov    $0x11,%esi
call   1070 <outb@plt>
mov    $0x3d5,%edi
call   1080 <inb@plt>
mov    %eax,%r15d
and    $0xf,%r15d
add    %ebp,%r15d
movzbl 0x2c(%rsp),%esi
mov    $0x3d4,%edi
call   1070 <outb@plt>
sub    $0x8,%rsp
lea    0x1058(%rip),%rdi
mov    %r12d,%esi
mov    %r14d,%edx
mov    %r13d,%ecx
mov    0x30(%rsp),%r8d
mov    0x2c(%rsp),%r9d
xor    %eax,%eax
push   0x38(%rsp)
push   %r15
push   %rbp
call   1050 <printf@plt>
add    $0x20,%rsp
cmpb   $0x0,0x10(%rsp)
je     21aa <main+0x102a>
cmpl   $0x1,0x14(%rsp)
jne    2156 <main+0xfd6>
lea    0x10f2(%rip),%rdi
call   1040 <puts@plt>
movzbl 0xf(%rsp),%esi
mov    $0x3cd,%edi
call   1070 <outb@plt>
movzbl 0xe(%rsp),%esi
mov    $0x3cb,%edi
call   1070 <outb@plt>
movl   $0x0,0x14(%rsp)
mov    0x20(%rsp),%r14d
lea    0xec9(%rip),%r12
lea    0xed6(%rip),%rbx
lea    0xee3(%rip),%r13
jmp    1260 <main+0xe0>
movzbl 0x1c(%rsp),%esi
mov    $0x3cd,%edi
call   1070 <outb@plt>
movzbl 0x18(%rsp),%esi
mov    $0x3cb,%edi
call   1070 <outb@plt>
mov    $0x3cb,%edi
call   1080 <inb@plt>
movzbl %al,%esi
lea    0xfd8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3cd,%edi
call   1080 <inb@plt>
movzbl %al,%esi
lea    0xfd2(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %edi,%edi
call   1060 <iopl@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    $0x30,%al
jne    2262 <main+0x10e2>
mov    $0x3d6,%edi
mov    $0x3,%esi
call   1070 <outb@plt>
mov    $0x3d7,%edi
call   1080 <inb@plt>
xor    %ebx,%ebx
mov    $0x0,%ebp
mov    $0x0,%ecx
mov    $0x0,%r14d
movl   $0x0,0x10(%rsp)
cmp    $0xc,%al
jne    1225 <main+0xa5>
mov    $0x3cd,%edi
call   1080 <inb@plt>
mov    %eax,%ebx
mov    $0x3cb,%edi
call   1080 <inb@plt>
mov    %eax,%ebp
mov    %ebx,%eax
and    $0xe0,%al
or     $0x11,%al
movzbl %al,%esi
mov    $0x3cd,%edi
call   1070 <outb@plt>
mov    %ebp,%eax
and    $0xf0,%al
or     $0x8,%al
movzbl %al,%esi
mov    $0x3cb,%edi
call   1070 <outb@plt>
lea    0x101e(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%r14b
mov    $0x1,%ecx
mov    $0x1,%al
mov    %eax,0x10(%rsp)
jmp    1225 <main+0xa5>
xor    %ebx,%ebx
xor    %ebp,%ebp
xor    %ecx,%ecx
xor    %r14d,%r14d
jmp    11e4 <main+0x64>

LLVM IR (-O0):
@.str = [12 x i8] c"0x3C6\090x%X\0A\00"
@.str.1 = [13 x i8] c"Pipeline A:\0A\00"
@.str.2 = [18 x i8] c"port 0x3D6 (C&T)\0A\00"
@.str.3 = [9 x i8] c"0x%2.2X\0A\00"
@.str.4 = [20 x i8] c"XR 0x%2.2X\090x%2.2X\0A\00"
@.str.5 = [20 x i8] c"\0Aport 0x3D4 (CRTC)\0A\00"
@.str.6 = [20 x i8] c"CR 0x%2.2X\090x%2.2X\0A\00"
@.str.7 = [26 x i8] c"\0Aport 0x3D0 (Flat Panel)\0A\00"
@.str.8 = [20 x i8] c"FR 0x%2.2X\090x%2.2X\0A\00"
@.str.9 = [26 x i8] c"\0Aport 0x3D2 (Multimedia)\0A\00"
@.str.10 = [20 x i8] c"MR 0x%2.2X\090x%2.2X\0A\00"
@.str.11 = [17 x i8] c"port 0x3CE (GC)\0A\00"
@.str.12 = [20 x i8] c"GC 0x%2.2X\090x%2.2X\0A\00"
@.str.13 = [24 x i8] c"port 0x3C4 (Sequencer)\0A\00"
@.str.14 = [20 x i8] c"SQ 0x%2.2X\090x%X2.2\0A\00"
@.str.15 = [24 x i8] c"port 0x3C0 (Attribute)\0A\00"
@.str.16 = [20 x i8] c"AT 0x%2.2X\090x%2.2X\0A\00"
@.str.17 = [12 x i8] c"0x3CC\090x%X\0A\00"
@.str.18 = [12 x i8] c"0x3C2\090x%X\0A\00"
@.str.19 = [12 x i8] c"0x3C3\090x%X\0A\00"
@.str.20 = [12 x i8] c"0x3CA\090x%X\0A\00"
@.str.21 = [12 x i8] c"0x3DA\090x%X\0A\00"
@.str.22 = [20 x i8] c"\0ARAMDAC\0Aport\09value\0A\00"
@.str.23 = [13 x i8] c"0x%4X\090x%4X\0A\00"
@.str.24 = [20 x i8] c"\0ABitBLT\0Aport\09value\0A\00"
@.str.25 = [15 x i8] c"0x%4.4X\090x%4X\0A\00"
@.str.26 = [24 x i8] c"\0AH/W cursor\0Aport\09value\0A\00"
@.str.27 = [14 x i8] c"0x46E8\090x%8X\0A\00"
@.str.28 = [14 x i8] c"0x4AE8\090x%8X\0A\00"
@.str.29 = [13 x i8] c"0x102\090x%8X\0A\00"
@.str.30 = [13 x i8] c"0x103\090x%8X\0A\00"
@.str.31 = [58 x i8] c"\0AModeLine with port 0x3D4 (CRTC) %d %d %d %d %d %d %d %d\0A\00"
@.str.32 = [15 x i8] c"\0A\0APipeline B:\0A\00"
@.str.33 = [21 x i8] c"\0A\0A0x3CB\090x%X (MSS)\0A\00"
@.str.34 = [20 x i8] c"0x3CD\090x%X (IOSS)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8
%12 = alloca i8
%13 = alloca i8
%14 = alloca i8
%15 = alloca i8
%16 = alloca i8
%17 = alloca i16
%18 = alloca i32
%19 = alloca i32
store i32 0, i32* %1
store i8 0, i8* %14
store i8 0, i8* %15
store i8 0, i8* %16
store i32 0, i32* %18
store i32 0, i32* %19
%20 = call i32 @iopl(i32 3)
%21 = call i32 @inw(i32 966)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = call i32 @outb(i32 982, i8 zeroext 2)
%24 = call i32 @inb(i32 983)
%25 = trunc i32 %24 to i8
store i8 %25, i8* %11
%26 = load i8, i8* %11
%27 = zext i8 %26 to i32
%28 = icmp eq i32 %27, 224
br i1 %28, label %45, label %29
29: ; preds = %0
%30 = load i8, i8* %11
%31 = zext i8 %30 to i32
%32 = icmp eq i32 %31, 228
br i1 %32, label %45, label %33
33: ; preds = %29
%34 = load i8, i8* %11
%35 = zext i8 %34 to i32
%36 = icmp eq i32 %35, 229
br i1 %36, label %45, label %37
37: ; preds = %33
%38 = load i8, i8* %11
%39 = zext i8 %38 to i32
%40 = icmp eq i32 %39, 244
br i1 %40, label %45, label %41
41: ; preds = %37
%42 = load i8, i8* %11
%43 = zext i8 %42 to i32
%44 = icmp eq i32 %43, 192
br i1 %44, label %45, label %46
45: ; preds = %41, %37, %33, %29, %0
store i32 1, i32* %18
br label %77
46: ; preds = %41
%47 = load i8, i8* %11
%48 = zext i8 %47 to i32
%49 = icmp eq i32 %48, 48
br i1 %49, label %50, label %76
50: ; preds = %46
%51 = call i32 @outb(i32 982, i8 zeroext 3)
%52 = call i32 @inb(i32 983)
%53 = trunc i32 %52 to i8
store i8 %53, i8* %11
%54 = load i8, i8* %11
%55 = zext i8 %54 to i32
%56 = icmp eq i32 %55, 12
br i1 %56, label %57, label %75
57: ; preds = %50
store i32 1, i32* %18
store i32 1, i32* %19
%58 = call i32 @inb(i32 973)
%59 = trunc i32 %58 to i8
store i8 %59, i8* %14
%60 = call i32 @inb(i32 971)
%61 = trunc i32 %60 to i8
store i8 %61, i8* %15
%62 = load i8, i8* %14
%63 = zext i8 %62 to i32
%64 = and i32 %63, 224
%65 = or i32 %64, 17
%66 = trunc i32 %65 to i8
%67 = call i32 @outb(i32 973, i8 zeroext %66)
%68 = load i8, i8* %15
%69 = zext i8 %68 to i32
%70 = and i32 %69, 240
%71 = or i32 %70, 8
%72 = trunc i32 %71 to i8
%73 = call i32 @outb(i32 971, i8 zeroext %72)
store i8 1, i8* %16
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %75
75: ; preds = %57, %50
br label %76
76: ; preds = %75, %46
br label %77
77: ; preds = %76, %45
br label %78
78: ; preds = %488, %77
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%80 = call i32 @inb(i32 982)
%81 = trunc i32 %80 to i8
store i8 %81, i8* %11
store i8 3, i8* %13
%82 = load i32, i32* %18
%83 = icmp eq i32 %82, 1
br i1 %83, label %84, label %110
84: ; preds = %78
%85 = call i32 @outw(i32 258, i32 1)
%86 = call i32 @inb(i32 963)
%87 = and i32 %86, 255
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %87)
%89 = call i32 @outb(i32 963, i8 zeroext 0)
%90 = call i32 @outb(i32 963, i8 zeroext 1)
store i32 0, i32* %2
br label %91
91: ; preds = %102, %84
%92 = load i32, i32* %2
%93 = icmp slt i32 %92, 255
br i1 %93, label %94, label %105
94: ; preds = %91
%95 = load i32, i32* %2
%96 = trunc i32 %95 to i8
%97 = call i32 @outb(i32 982, i8 zeroext %96)
%98 = load i32, i32* %2
%99 = call i32 @inb(i32 983)
%100 = and i32 %99, 255
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %98, i32 %100)
br label %102
102: ; preds = %94
%103 = load i32, i32* %2
%104 = add nsw i32 %103, 1
store i32 %104, i32* %2
br label %91
105: ; preds = %91
%106 = call i32 @outb(i32 982, i8 zeroext -30)
%107 = call i32 @inb(i32 983)
%108 = and i32 %107, 240
%109 = trunc i32 %108 to i8
store i8 %109, i8* %12
br label %145
110: ; preds = %78
%111 = call i32 @outb(i32 982, i8 zeroext 112)
%112 = call i32 @inw(i32 982)
%113 = or i32 %112, 32880
%114 = call i32 @outw(i32 982, i32 %113)
%115 = call i32 @outw(i32 18152, i32 22)
%116 = call i32 @outw(i32 258, i32 1)
%117 = call i32 @outw(i32 18152, i32 14)
%118 = call i32 @inb(i32 963)
%119 = and i32 %118, 255
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %119)
%121 = call i32 @outb(i32 963, i8 zeroext 0)
%122 = call i32 @outw(i32 18152, i32 0)
%123 = call i32 @outw(i32 18152, i32 14)
%124 = call i32 @outb(i32 963, i8 zeroext 1)
%125 = call i32 @outw(i32 18152, i32 0)
store i32 0, i32* %2
br label %126
126: ; preds = %137, %110
%127 = load i32, i32* %2
%128 = icmp slt i32 %127, 128
br i1 %128, label %129, label %140
129: ; preds = %126
%130 = load i32, i32* %2
%131 = trunc i32 %130 to i8
%132 = call i32 @outb(i32 982, i8 zeroext %131)
%133 = load i32, i32* %2
%134 = call i32 @inb(i32 983)
%135 = and i32 %134, 255
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %133, i32 %135)
br label %137
137: ; preds = %129
%138 = load i32, i32* %2
%139 = add nsw i32 %138, 1
store i32 %139, i32* %2
br label %126
140: ; preds = %126
%141 = call i32 @outb(i32 982, i8 zeroext 43)
%142 = call i32 @inb(i32 983)
%143 = and i32 %142, 240
%144 = trunc i32 %143 to i8
store i8 %144, i8* %12
br label %145
145: ; preds = %140, %105
%146 = load i8, i8* %12
%147 = zext i8 %146 to i32
switch i32 %147, label %152 [
i32 32, label %148
i32 48, label %149
i32 64, label %150
i32 80, label %151
]
148: ; preds = %145
store i8 4, i8* %12
br label %153
149: ; preds = %145
store i8 8, i8* %12
br label %153
150: ; preds = %145
store i8 16, i8* %12
store i8 2, i8* %13
br label %153
151: ; preds = %145
store i8 24, i8* %12
br label %153
152: ; preds = %145
store i8 0, i8* %12
br label %153
153: ; preds = %152, %151, %150, %149, %148
%154 = load i8, i8* %11
%155 = call i32 @outb(i32 982, i8 zeroext %154)
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%157 = call i32 @inb(i32 980)
%158 = trunc i32 %157 to i8
store i8 %158, i8* %11
%159 = load i32, i32* %18
%160 = icmp eq i32 %159, 1
br i1 %160, label %161, label %219
161: ; preds = %153
store i32 0, i32* %2
br label %162
162: ; preds = %173, %161
%163 = load i32, i32* %2
%164 = icmp slt i32 %163, 127
br i1 %164, label %165, label %176
165: ; preds = %162
%166 = load i32, i32* %2
%167 = trunc i32 %166 to i8
%168 = call i32 @outb(i32 980, i8 zeroext %167)
%169 = load i32, i32* %2
%170 = call i32 @inb(i32 981)
%171 = and i32 %170, 255
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %169, i32 %171)
br label %173
173: ; preds = %165
%174 = load i32, i32* %2
%175 = add nsw i32 %174, 1
store i32 %175, i32* %2
br label %162
176: ; preds = %162
%177 = load i8, i8* %11
%178 = call i32 @outb(i32 980, i8 zeroext %177)
%179 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%180 = call i32 @inb(i32 976)
%181 = trunc i32 %180 to i8
store i8 %181, i8* %11
store i32 0, i32* %2
br label %182
182: ; preds = %193, %176
%183 = load i32, i32* %2
%184 = icmp slt i32 %183, 127
br i1 %184, label %185, label %196
185: ; preds = %182
%186 = load i32, i32* %2
%187 = trunc i32 %186 to i8
%188 = call i32 @outb(i32 976, i8 zeroext %187)
%189 = load i32, i32* %2
%190 = call i32 @inb(i32 977)
%191 = and i32 %190, 255
%192 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i32 %189, i32 %191)
br label %193
193: ; preds = %185
%194 = load i32, i32* %2
%195 = add nsw i32 %194, 1
store i32 %195, i32* %2
br label %182
196: ; preds = %182
%197 = load i8, i8* %11
%198 = call i32 @outb(i32 977, i8 zeroext %197)
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0))
%200 = call i32 @inb(i32 978)
%201 = trunc i32 %200 to i8
store i8 %201, i8* %11
store i32 0, i32* %2
br label %202
202: ; preds = %213, %196
%203 = load i32, i32* %2
%204 = icmp slt i32 %203, 127
br i1 %204, label %205, label %216
205: ; preds = %202
%206 = load i32, i32* %2
%207 = trunc i32 %206 to i8
%208 = call i32 @outb(i32 978, i8 zeroext %207)
%209 = load i32, i32* %2
%210 = call i32 @inb(i32 979)
%211 = and i32 %210, 255
%212 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i32 %209, i32 %211)
br label %213
213: ; preds = %205
%214 = load i32, i32* %2
%215 = add nsw i32 %214, 1
store i32 %215, i32* %2
br label %202
216: ; preds = %202
%217 = load i8, i8* %11
%218 = call i32 @outb(i32 979, i8 zeroext %217)
br label %237
219: ; preds = %153
store i32 0, i32* %2
br label %220
220: ; preds = %231, %219
%221 = load i32, i32* %2
%222 = icmp slt i32 %221, 64
br i1 %222, label %223, label %234
223: ; preds = %220
%224 = load i32, i32* %2
%225 = trunc i32 %224 to i8
%226 = call i32 @outb(i32 980, i8 zeroext %225)
%227 = load i32, i32* %2
%228 = call i32 @inb(i32 981)
%229 = and i32 %228, 255
%230 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %227, i32 %229)
br label %231
231: ; preds = %223
%232 = load i32, i32* %2
%233 = add nsw i32 %232, 1
store i32 %233, i32* %2
br label %220
234: ; preds = %220
%235 = load i8, i8* %11
%236 = call i32 @outb(i32 980, i8 zeroext %235)
br label %237
237: ; preds = %234, %216
%238 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%239 = call i32 @inb(i32 974)
%240 = trunc i32 %239 to i8
store i8 %240, i8* %11
store i32 0, i32* %2
br label %241
241: ; preds = %252, %237
%242 = load i32, i32* %2
%243 = icmp slt i32 %242, 16
br i1 %243, label %244, label %255
244: ; preds = %241
%245 = load i32, i32* %2
%246 = trunc i32 %245 to i8
%247 = call i32 @outb(i32 974, i8 zeroext %246)
%248 = load i32, i32* %2
%249 = call i32 @inb(i32 975)
%250 = and i32 %249, 255
%251 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %248, i32 %250)
br label %252
252: ; preds = %244
%253 = load i32, i32* %2
%254 = add nsw i32 %253, 1
store i32 %254, i32* %2
br label %241
255: ; preds = %241
%256 = load i8, i8* %11
%257 = call i32 @outb(i32 974, i8 zeroext %256)
%258 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%259 = call i32 @inb(i32 964)
%260 = trunc i32 %259 to i8
store i8 %260, i8* %11
store i32 0, i32* %2
br label %261
261: ; preds = %272, %255
%262 = load i32, i32* %2
%263 = icmp slt i32 %262, 16
br i1 %263, label %264, label %275
264: ; preds = %261
%265 = load i32, i32* %2
%266 = trunc i32 %265 to i8
%267 = call i32 @outb(i32 964, i8 zeroext %266)
%268 = load i32, i32* %2
%269 = call i32 @inb(i32 965)
%270 = and i32 %269, 255
%271 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 %268, i32 %270)
br label %272
272: ; preds = %264
%273 = load i32, i32* %2
%274 = add nsw i32 %273, 1
store i32 %274, i32* %2
br label %261
275: ; preds = %261
%276 = load i8, i8* %11
%277 = call i32 @outb(i32 964, i8 zeroext %276)
%278 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.15, i64 0, i64 0))
%279 = call i32 @inb(i32 986)
%280 = call i32 @inb(i32 960)
%281 = trunc i32 %280 to i8
store i8 %281, i8* %11
store i32 0, i32* %2
br label %282
282: ; preds = %294, %275
%283 = load i32, i32* %2
%284 = icmp slt i32 %283, 255
br i1 %284, label %285, label %297
285: ; preds = %282
%286 = call i32 @inb(i32 986)
%287 = load i32, i32* %2
%288 = trunc i32 %287 to i8
%289 = call i32 @outb(i32 960, i8 zeroext %288)
%290 = load i32, i32* %2
%291 = call i32 @inb(i32 961)
%292 = and i32 %291, 255
%293 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0), i32 %290, i32 %292)
br label %294
294: ; preds = %285
%295 = load i32, i32* %2
%296 = add nsw i32 %295, 1
store i32 %296, i32* %2
br label %282
297: ; preds = %282
%298 = call i32 @inb(i32 986)
%299 = load i8, i8* %11
%300 = call i32 @outb(i32 960, i8 zeroext %299)
%301 = call i32 @inb(i32 972)
%302 = and i32 %301, 255
%303 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 %302)
%304 = call i32 @inb(i32 962)
%305 = and i32 %304, 255
%306 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 %305)
%307 = call i32 @inb(i32 962)
%308 = and i32 %307, 255
%309 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), i32 %308)
%310 = call i32 @inb(i32 970)
%311 = and i32 %310, 255
%312 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0), i32 %311)
%313 = call i32 @inb(i32 986)
%314 = and i32 %313, 255
%315 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i64 0, i64 0), i32 %314)
%316 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0))
store i16 -31802, i16* %17
br label %317
317: ; preds = %328, %297
%318 = load i16, i16* %17
%319 = zext i16 %318 to i32
%320 = icmp slt i32 %319, 33738
br i1 %320, label %321, label %331
321: ; preds = %317
%322 = load i16, i16* %17
%323 = zext i16 %322 to i32
%324 = load i16, i16* %17
%325 = zext i16 %324 to i32
%326 = call i32 @inw(i32 %325)
%327 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0), i32 %323, i32 %326)
br label %328
328: ; preds = %321
%329 = load i16, i16* %17
%330 = add i16 %329, 1
store i16 %330, i16* %17
br label %317
331: ; preds = %317
%332 = load i32, i32* %18
%333 = icmp ne i32 %332, 1
br i1 %333, label %334, label %383
334: ; preds = %331
%335 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.24, i64 0, i64 0))
store i16 -31792, i16* %17
br label %336
336: ; preds = %347, %334
%337 = load i16, i16* %17
%338 = zext i16 %337 to i32
%339 = icmp sle i32 %338, 40912
br i1 %339, label %340, label %352
340: ; preds = %336
%341 = load i16, i16* %17
%342 = zext i16 %341 to i32
%343 = load i16, i16* %17
%344 = zext i16 %343 to i32
%345 = call i32 @inw(i32 %344)
%346 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 %342, i32 %345)
br label %347
347: ; preds = %340
%348 = load i16, i16* %17
%349 = zext i16 %348 to i32
%350 = add nsw i32 %349, 1024
%351 = trunc i32 %350 to i16
store i16 %351, i16* %17
br label %336
352: ; preds = %336
%353 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.26, i64 0, i64 0))
store i16 -23600, i16* %17
br label %354
354: ; preds = %365, %352
%355 = load i16, i16* %17
%356 = zext i16 %355 to i32
%357 = icmp sle i32 %356, 46032
br i1 %357, label %358, label %370
358: ; preds = %354
%359 = load i16, i16* %17
%360 = zext i16 %359 to i32
%361 = load i16, i16* %17
%362 = zext i16 %361 to i32
%363 = call i32 @inw(i32 %362)
%364 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 %360, i32 %363)
br label %365
365: ; preds = %358
%366 = load i16, i16* %17
%367 = zext i16 %366 to i32
%368 = add nsw i32 %367, 1024
%369 = trunc i32 %368 to i16
store i16 %369, i16* %17
br label %354
370: ; preds = %354
%371 = call i32 @outb(i32 982, i8 zeroext 112)
%372 = call i32 @inw(i32 982)
%373 = or i32 %372, 32880
%374 = call i32 @outw(i32 982, i32 %373)
%375 = call i32 @inl(i32 18152)
%376 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.27, i64 0, i64 0), i32 %375)
%377 = call i32 @inl(i32 19176)
%378 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.28, i64 0, i64 0), i32 %377)
%379 = call i32 @inl(i32 258)
%380 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.29, i64 0, i64 0), i32 %379)
%381 = call i32 @inl(i32 259)
%382 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.30, i64 0, i64 0), i32 %381)
br label %383
383: ; preds = %370, %331
%384 = call i32 @inb(i32 980)
%385 = trunc i32 %384 to i8
store i8 %385, i8* %11
%386 = call i32 @outb(i32 980, i8 zeroext 0)
%387 = call i32 @inb(i32 981)
%388 = and i32 %387, 255
%389 = add nsw i32 %388, 5
%390 = load i8, i8* %13
%391 = zext i8 %390 to i32
%392 = shl i32 %389, %391
store i32 %392, i32* %3
%393 = call i32 @outb(i32 980, i8 zeroext 1)
%394 = call i32 @inb(i32 981)
%395 = and i32 %394, 255
%396 = add nsw i32 %395, 1
%397 = load i8, i8* %13
%398 = zext i8 %397 to i32
%399 = shl i32 %396, %398
store i32 %399, i32* %4
%400 = call i32 @outb(i32 980, i8 zeroext 4)
%401 = call i32 @inb(i32 981)
%402 = and i32 %401, 255
%403 = add nsw i32 %402, 1
%404 = load i8, i8* %13
%405 = zext i8 %404 to i32
%406 = shl i32 %403, %405
store i32 %406, i32* %5
%407 = call i32 @outb(i32 980, i8 zeroext 5)
%408 = call i32 @inb(i32 981)
%409 = and i32 %408, 31
store i32 %409, i32* %6
%410 = call i32 @outb(i32 980, i8 zeroext 5)
%411 = load i32, i32* %5
%412 = load i8, i8* %13
%413 = zext i8 %412 to i32
%414 = ashr i32 %411, %413
%415 = load i32, i32* %6
%416 = add nsw i32 %415, %414
store i32 %416, i32* %6
%417 = load i8, i8* %13
%418 = zext i8 %417 to i32
%419 = load i32, i32* %6
%420 = shl i32 %419, %418
store i32 %420, i32* %6
%421 = call i32 @outb(i32 980, i8 zeroext 6)
%422 = call i32 @inb(i32 981)
%423 = and i32 %422, 255
store i32 %423, i32* %7
%424 = call i32 @outb(i32 980, i8 zeroext 7)
%425 = call i32 @inb(i32 981)
%426 = and i32 %425, 1
%427 = shl i32 %426, 8
%428 = load i32, i32* %7
%429 = or i32 %428, %427
store i32 %429, i32* %7
%430 = call i32 @inb(i32 981)
%431 = and i32 %430, 32
%432 = shl i32 %431, 4
%433 = load i32, i32* %7
%434 = or i32 %433, %432
store i32 %434, i32* %7
%435 = load i32, i32* %7
%436 = add nsw i32 %435, 2
store i32 %436, i32* %7
%437 = call i32 @inb(i32 981)
%438 = and i32 %437, 2
%439 = shl i32 %438, 7
store i32 %439, i32* %8
%440 = call i32 @inb(i32 981)
%441 = and i32 %440, 64
%442 = shl i32 %441, 3
%443 = load i32, i32* %8
%444 = or i32 %443, %442
store i32 %444, i32* %8
%445 = call i32 @inb(i32 981)
%446 = and i32 %445, 4
%447 = shl i32 %446, 6
store i32 %447, i32* %9
%448 = call i32 @inb(i32 981)
%449 = and i32 %448, 128
%450 = shl i32 %449, 2
%451 = load i32, i32* %9
%452 = or i32 %451, %450
store i32 %452, i32* %9
%453 = call i32 @outb(i32 980, i8 zeroext 18)
%454 = call i32 @inb(i32 981)
%455 = and i32 %454, 255
%456 = load i32, i32* %8
%457 = or i32 %456, %455
store i32 %457, i32* %8
%458 = load i32, i32* %8
%459 = add nsw i32 %458, 1
store i32 %459, i32* %8
%460 = call i32 @outb(i32 980, i8 zeroext 16)
%461 = call i32 @inb(i32 981)
%462 = and i32 %461, 255
%463 = load i32, i32* %9
%464 = or i32 %463, %462
store i32 %464, i32* %9
%465 = call i32 @outb(i32 980, i8 zeroext 17)
%466 = call i32 @inb(i32 981)
%467 = and i32 %466, 15
store i32 %467, i32* %10
%468 = load i32, i32* %9
%469 = load i32, i32* %10
%470 = add nsw i32 %469, %468
store i32 %470, i32* %10
%471 = load i8, i8* %11
%472 = call i32 @outb(i32 980, i8 zeroext %471)
%473 = load i32, i32* %4
%474 = load i32, i32* %5
%475 = load i32, i32* %6
%476 = load i32, i32* %3
%477 = load i32, i32* %8
%478 = load i32, i32* %9
%479 = load i32, i32* %10
%480 = load i32, i32* %7
%481 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.31, i64 0, i64 0), i32 %473, i32 %474, i32 %475, i32 %476, i32 %477, i32 %478, i32 %479, i32 %480)
%482 = load i32, i32* %19
%483 = icmp eq i32 %482, 1
br i1 %483, label %484, label %514
484: ; preds = %383
%485 = load i8, i8* %16
%486 = zext i8 %485 to i32
%487 = icmp eq i32 %486, 1
br i1 %487, label %488, label %502
488: ; preds = %484
store i8 0, i8* %16
%489 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.32, i64 0, i64 0))
%490 = load i8, i8* %14
%491 = zext i8 %490 to i32
%492 = and i32 %491, 224
%493 = or i32 %492, 31
%494 = trunc i32 %493 to i8
%495 = call i32 @outb(i32 973, i8 zeroext %494)
%496 = load i8, i8* %15
%497 = zext i8 %496 to i32
%498 = and i32 %497, 240
%499 = or i32 %498, 15
%500 = trunc i32 %499 to i8
%501 = call i32 @outb(i32 971, i8 zeroext %500)
br label %78
502: ; preds = %484
%503 = load i8, i8* %14
%504 = call i32 @outb(i32 973, i8 zeroext %503)
%505 = load i8, i8* %15
%506 = call i32 @outb(i32 971, i8 zeroext %505)
%507 = call i32 @inb(i32 971)
%508 = and i32 %507, 255
%509 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.33, i64 0, i64 0), i32 %508)
%510 = call i32 @inb(i32 973)
%511 = and i32 %510, 255
%512 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.34, i64 0, i64 0), i32 %511)
br label %513
513: ; preds = %502
br label %514
514: ; preds = %513, %383
%515 = call i32 @iopl(i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"0x3C6\090x%X\0A\00"
@.str.3 = [9 x i8] c"0x%2.2X\0A\00"
@.str.4 = [20 x i8] c"XR 0x%2.2X\090x%2.2X\0A\00"
@.str.6 = [20 x i8] c"CR 0x%2.2X\090x%2.2X\0A\00"
@.str.8 = [20 x i8] c"FR 0x%2.2X\090x%2.2X\0A\00"
@.str.10 = [20 x i8] c"MR 0x%2.2X\090x%2.2X\0A\00"
@.str.12 = [20 x i8] c"GC 0x%2.2X\090x%2.2X\0A\00"
@.str.14 = [20 x i8] c"SQ 0x%2.2X\090x%X2.2\0A\00"
@.str.16 = [20 x i8] c"AT 0x%2.2X\090x%2.2X\0A\00"
@.str.17 = [12 x i8] c"0x3CC\090x%X\0A\00"
@.str.18 = [12 x i8] c"0x3C2\090x%X\0A\00"
@.str.19 = [12 x i8] c"0x3C3\090x%X\0A\00"
@.str.20 = [12 x i8] c"0x3CA\090x%X\0A\00"
@.str.21 = [12 x i8] c"0x3DA\090x%X\0A\00"
@.str.23 = [13 x i8] c"0x%4X\090x%4X\0A\00"
@.str.25 = [15 x i8] c"0x%4.4X\090x%4X\0A\00"
@.str.27 = [14 x i8] c"0x46E8\090x%8X\0A\00"
@.str.28 = [14 x i8] c"0x4AE8\090x%8X\0A\00"
@.str.29 = [13 x i8] c"0x102\090x%8X\0A\00"
@.str.30 = [13 x i8] c"0x103\090x%8X\0A\00"
@.str.31 = [58 x i8] c"\0AModeLine with port 0x3D4 (CRTC) %d %d %d %d %d %d %d %d\0A\00"
@.str.33 = [21 x i8] c"\0A\0A0x3CB\090x%X (MSS)\0A\00"
@.str.34 = [20 x i8] c"0x3CD\090x%X (IOSS)\0A\00"
@str = [17 x i8] c"port 0x3D6 (C&T)\00"
@str.35 = [19 x i8] c"\0Aport 0x3D4 (CRTC)\00"
@str.36 = [16 x i8] c"port 0x3CE (GC)\00"
@str.37 = [23 x i8] c"port 0x3C4 (Sequencer)\00"
@str.38 = [23 x i8] c"port 0x3C0 (Attribute)\00"
@str.39 = [19 x i8] c"\0ARAMDAC\0Aport\09value\00"
@str.40 = [14 x i8] c"\0A\0APipeline B:\00"
@str.41 = [19 x i8] c"\0ABitBLT\0Aport\09value\00"
@str.42 = [23 x i8] c"\0AH/W cursor\0Aport\09value\00"
@str.43 = [25 x i8] c"\0Aport 0x3D0 (Flat Panel)\00"
@str.44 = [25 x i8] c"\0Aport 0x3D2 (Multimedia)\00"
@str.45 = [12 x i8] c"Pipeline A:\00"
define i32 @main() {
%1 = tail call i32 @iopl(i32 3)
%2 = tail call i32 @inw(i32 966)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @outb(i32 982, i8 zeroext 2)
%5 = tail call i32 @inb(i32 983)
%6 = freeze i32 %5
%7 = and i32 %6, 251
%8 = icmp eq i32 %7, 224
br i1 %8, label %29, label %9
9: ; preds = %0
%10 = trunc i32 %6 to i8
switch i8 %10, label %28 [
i8 -12, label %29
i8 -27, label %29
i8 -64, label %29
i8 48, label %11
]
11: ; preds = %9
%12 = tail call i32 @outb(i32 982, i8 zeroext 3)
%13 = tail call i32 @inb(i32 983)
%14 = and i32 %13, 255
%15 = icmp eq i32 %14, 12
br i1 %15, label %16, label %29
16: ; preds = %11
%17 = tail call i32 @inb(i32 973)
%18 = trunc i32 %17 to i8
%19 = tail call i32 @inb(i32 971)
%20 = trunc i32 %19 to i8
%21 = and i8 %18, -32
%22 = or i8 %21, 17
%23 = tail call i32 @outb(i32 973, i8 zeroext %22)
%24 = and i8 %20, -16
%25 = or i8 %24, 8
%26 = tail call i32 @outb(i32 971, i8 zeroext %25)
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.45, i64 0, i64 0))
br label %29
28: ; preds = %9
br label %29
29: ; preds = %9, %9, %9, %28, %0, %16, %11
%30 = phi i8 [ %18, %16 ], [ 0, %11 ], [ 0, %9 ], [ 0, %0 ], [ 0, %9 ], [ 0, %9 ], [ 0, %28 ]
%31 = phi i8 [ %20, %16 ], [ 0, %11 ], [ 0, %9 ], [ 0, %0 ], [ 0, %9 ], [ 0, %9 ], [ 0, %28 ]
%32 = phi i32 [ 1, %16 ], [ 0, %11 ], [ 0, %9 ], [ 0, %0 ], [ 0, %9 ], [ 0, %9 ], [ 0, %28 ]
%33 = phi i1 [ true, %16 ], [ false, %11 ], [ true, %9 ], [ true, %0 ], [ true, %9 ], [ true, %9 ], [ false, %28 ]
%34 = phi i1 [ true, %16 ], [ false, %11 ], [ false, %9 ], [ false, %0 ], [ false, %9 ], [ false, %9 ], [ false, %28 ]
%35 = or i8 %30, 31
%36 = or i8 %31, 15
br label %37
37: ; preds = %432, %29
%38 = phi i32 [ %32, %29 ], [ 0, %432 ]
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%40 = tail call i32 @inb(i32 982)
%41 = trunc i32 %40 to i8
br i1 %33, label %42, label %58
42: ; preds = %37
%43 = tail call i32 @outw(i32 258, i32 1)
%44 = tail call i32 @inb(i32 963)
%45 = and i32 %44, 255
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %45)
%47 = tail call i32 @outb(i32 963, i8 zeroext 0)
%48 = tail call i32 @outb(i32 963, i8 zeroext 1)
br label %49
49: ; preds = %42, %49
%50 = phi i32 [ 0, %42 ], [ %56, %49 ]
%51 = trunc i32 %50 to i8
%52 = tail call i32 @outb(i32 982, i8 zeroext %51)
%53 = tail call i32 @inb(i32 983)
%54 = and i32 %53, 255
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %50, i32 %54)
%56 = add nuw nsw i32 %50, 1
%57 = icmp eq i32 %56, 255
br i1 %57, label %83, label %49
58: ; preds = %37
%59 = tail call i32 @outb(i32 982, i8 zeroext 112)
%60 = tail call i32 @inw(i32 982)
%61 = or i32 %60, 32880
%62 = tail call i32 @outw(i32 982, i32 %61)
%63 = tail call i32 @outw(i32 18152, i32 22)
%64 = tail call i32 @outw(i32 258, i32 1)
%65 = tail call i32 @outw(i32 18152, i32 14)
%66 = tail call i32 @inb(i32 963)
%67 = and i32 %66, 255
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %67)
%69 = tail call i32 @outb(i32 963, i8 zeroext 0)
%70 = tail call i32 @outw(i32 18152, i32 0)
%71 = tail call i32 @outw(i32 18152, i32 14)
%72 = tail call i32 @outb(i32 963, i8 zeroext 1)
%73 = tail call i32 @outw(i32 18152, i32 0)
br label %74
74: ; preds = %58, %74
%75 = phi i32 [ 0, %58 ], [ %81, %74 ]
%76 = trunc i32 %75 to i8
%77 = tail call i32 @outb(i32 982, i8 zeroext %76)
%78 = tail call i32 @inb(i32 983)
%79 = and i32 %78, 255
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %75, i32 %79)
%81 = add nuw nsw i32 %75, 1
%82 = icmp eq i32 %81, 128
br i1 %82, label %83, label %74
83: ; preds = %74, %49
%84 = phi i8 [ -30, %49 ], [ 43, %74 ]
%85 = tail call i32 @outb(i32 982, i8 zeroext %84)
%86 = tail call i32 @inb(i32 983)
%87 = and i32 %86, 240
%88 = icmp eq i32 %87, 64
%89 = select i1 %88, i32 2, i32 3
%90 = tail call i32 @outb(i32 982, i8 zeroext %41)
%91 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.35, i64 0, i64 0))
%92 = tail call i32 @inb(i32 980)
%93 = trunc i32 %92 to i8
br i1 %33, label %94, label %133
94: ; preds = %83, %94
%95 = phi i32 [ %101, %94 ], [ 0, %83 ]
%96 = trunc i32 %95 to i8
%97 = tail call i32 @outb(i32 980, i8 zeroext %96)
%98 = tail call i32 @inb(i32 981)
%99 = and i32 %98, 255
%100 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %95, i32 %99)
%101 = add nuw nsw i32 %95, 1
%102 = icmp eq i32 %101, 127
br i1 %102, label %103, label %94
103: ; preds = %94
%104 = tail call i32 @outb(i32 980, i8 zeroext %93)
%105 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.43, i64 0, i64 0))
%106 = tail call i32 @inb(i32 976)
br label %107
107: ; preds = %103, %107
%108 = phi i32 [ 0, %103 ], [ %114, %107 ]
%109 = trunc i32 %108 to i8
%110 = tail call i32 @outb(i32 976, i8 zeroext %109)
%111 = tail call i32 @inb(i32 977)
%112 = and i32 %111, 255
%113 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i32 %108, i32 %112)
%114 = add nuw nsw i32 %108, 1
%115 = icmp eq i32 %114, 127
br i1 %115, label %116, label %107
116: ; preds = %107
%117 = trunc i32 %106 to i8
%118 = tail call i32 @outb(i32 977, i8 zeroext %117)
%119 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.44, i64 0, i64 0))
%120 = tail call i32 @inb(i32 978)
br label %121
121: ; preds = %116, %121
%122 = phi i32 [ 0, %116 ], [ %128, %121 ]
%123 = trunc i32 %122 to i8
%124 = tail call i32 @outb(i32 978, i8 zeroext %123)
%125 = tail call i32 @inb(i32 979)
%126 = and i32 %125, 255
%127 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i32 %122, i32 %126)
%128 = add nuw nsw i32 %122, 1
%129 = icmp eq i32 %128, 127
br i1 %129, label %130, label %121
130: ; preds = %121
%131 = trunc i32 %120 to i8
%132 = tail call i32 @outb(i32 979, i8 zeroext %131)
br label %144
133: ; preds = %83, %133
%134 = phi i32 [ %140, %133 ], [ 0, %83 ]
%135 = trunc i32 %134 to i8
%136 = tail call i32 @outb(i32 980, i8 zeroext %135)
%137 = tail call i32 @inb(i32 981)
%138 = and i32 %137, 255
%139 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %134, i32 %138)
%140 = add nuw nsw i32 %134, 1
%141 = icmp eq i32 %140, 64
br i1 %141, label %142, label %133
142: ; preds = %133
%143 = tail call i32 @outb(i32 980, i8 zeroext %93)
br label %144
144: ; preds = %142, %130
%145 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.36, i64 0, i64 0))
%146 = tail call i32 @inb(i32 974)
%147 = tail call i32 @outb(i32 974, i8 zeroext 0)
%148 = tail call i32 @inb(i32 975)
%149 = and i32 %148, 255
%150 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 0, i32 %149)
%151 = tail call i32 @outb(i32 974, i8 zeroext 1)
%152 = tail call i32 @inb(i32 975)
%153 = and i32 %152, 255
%154 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 1, i32 %153)
%155 = tail call i32 @outb(i32 974, i8 zeroext 2)
%156 = tail call i32 @inb(i32 975)
%157 = and i32 %156, 255
%158 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 2, i32 %157)
%159 = tail call i32 @outb(i32 974, i8 zeroext 3)
%160 = tail call i32 @inb(i32 975)
%161 = and i32 %160, 255
%162 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 3, i32 %161)
%163 = tail call i32 @outb(i32 974, i8 zeroext 4)
%164 = tail call i32 @inb(i32 975)
%165 = and i32 %164, 255
%166 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 4, i32 %165)
%167 = tail call i32 @outb(i32 974, i8 zeroext 5)
%168 = tail call i32 @inb(i32 975)
%169 = and i32 %168, 255
%170 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 5, i32 %169)
%171 = tail call i32 @outb(i32 974, i8 zeroext 6)
%172 = tail call i32 @inb(i32 975)
%173 = and i32 %172, 255
%174 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 6, i32 %173)
%175 = tail call i32 @outb(i32 974, i8 zeroext 7)
%176 = tail call i32 @inb(i32 975)
%177 = and i32 %176, 255
%178 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 7, i32 %177)
%179 = tail call i32 @outb(i32 974, i8 zeroext 8)
%180 = tail call i32 @inb(i32 975)
%181 = and i32 %180, 255
%182 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 8, i32 %181)
%183 = tail call i32 @outb(i32 974, i8 zeroext 9)
%184 = tail call i32 @inb(i32 975)
%185 = and i32 %184, 255
%186 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 9, i32 %185)
%187 = tail call i32 @outb(i32 974, i8 zeroext 10)
%188 = tail call i32 @inb(i32 975)
%189 = and i32 %188, 255
%190 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 10, i32 %189)
%191 = tail call i32 @outb(i32 974, i8 zeroext 11)
%192 = tail call i32 @inb(i32 975)
%193 = and i32 %192, 255
%194 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 11, i32 %193)
%195 = tail call i32 @outb(i32 974, i8 zeroext 12)
%196 = tail call i32 @inb(i32 975)
%197 = and i32 %196, 255
%198 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 12, i32 %197)
%199 = tail call i32 @outb(i32 974, i8 zeroext 13)
%200 = tail call i32 @inb(i32 975)
%201 = and i32 %200, 255
%202 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 13, i32 %201)
%203 = tail call i32 @outb(i32 974, i8 zeroext 14)
%204 = tail call i32 @inb(i32 975)
%205 = and i32 %204, 255
%206 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 14, i32 %205)
%207 = tail call i32 @outb(i32 974, i8 zeroext 15)
%208 = tail call i32 @inb(i32 975)
%209 = and i32 %208, 255
%210 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 15, i32 %209)
%211 = trunc i32 %146 to i8
%212 = tail call i32 @outb(i32 974, i8 zeroext %211)
%213 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.37, i64 0, i64 0))
%214 = tail call i32 @inb(i32 964)
%215 = tail call i32 @outb(i32 964, i8 zeroext 0)
%216 = tail call i32 @inb(i32 965)
%217 = and i32 %216, 255
%218 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 0, i32 %217)
%219 = tail call i32 @outb(i32 964, i8 zeroext 1)
%220 = tail call i32 @inb(i32 965)
%221 = and i32 %220, 255
%222 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 1, i32 %221)
%223 = tail call i32 @outb(i32 964, i8 zeroext 2)
%224 = tail call i32 @inb(i32 965)
%225 = and i32 %224, 255
%226 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 2, i32 %225)
%227 = tail call i32 @outb(i32 964, i8 zeroext 3)
%228 = tail call i32 @inb(i32 965)
%229 = and i32 %228, 255
%230 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 3, i32 %229)
%231 = tail call i32 @outb(i32 964, i8 zeroext 4)
%232 = tail call i32 @inb(i32 965)
%233 = and i32 %232, 255
%234 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 4, i32 %233)
%235 = tail call i32 @outb(i32 964, i8 zeroext 5)
%236 = tail call i32 @inb(i32 965)
%237 = and i32 %236, 255
%238 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 5, i32 %237)
%239 = tail call i32 @outb(i32 964, i8 zeroext 6)
%240 = tail call i32 @inb(i32 965)
%241 = and i32 %240, 255
%242 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 6, i32 %241)
%243 = tail call i32 @outb(i32 964, i8 zeroext 7)
%244 = tail call i32 @inb(i32 965)
%245 = and i32 %244, 255
%246 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 7, i32 %245)
%247 = tail call i32 @outb(i32 964, i8 zeroext 8)
%248 = tail call i32 @inb(i32 965)
%249 = and i32 %248, 255
%250 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 8, i32 %249)
%251 = tail call i32 @outb(i32 964, i8 zeroext 9)
%252 = tail call i32 @inb(i32 965)
%253 = and i32 %252, 255
%254 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 9, i32 %253)
%255 = tail call i32 @outb(i32 964, i8 zeroext 10)
%256 = tail call i32 @inb(i32 965)
%257 = and i32 %256, 255
%258 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 10, i32 %257)
%259 = tail call i32 @outb(i32 964, i8 zeroext 11)
%260 = tail call i32 @inb(i32 965)
%261 = and i32 %260, 255
%262 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 11, i32 %261)
%263 = tail call i32 @outb(i32 964, i8 zeroext 12)
%264 = tail call i32 @inb(i32 965)
%265 = and i32 %264, 255
%266 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 12, i32 %265)
%267 = tail call i32 @outb(i32 964, i8 zeroext 13)
%268 = tail call i32 @inb(i32 965)
%269 = and i32 %268, 255
%270 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 13, i32 %269)
%271 = tail call i32 @outb(i32 964, i8 zeroext 14)
%272 = tail call i32 @inb(i32 965)
%273 = and i32 %272, 255
%274 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 14, i32 %273)
%275 = tail call i32 @outb(i32 964, i8 zeroext 15)
%276 = tail call i32 @inb(i32 965)
%277 = and i32 %276, 255
%278 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i32 15, i32 %277)
%279 = trunc i32 %214 to i8
%280 = tail call i32 @outb(i32 964, i8 zeroext %279)
%281 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.38, i64 0, i64 0))
%282 = tail call i32 @inb(i32 986)
%283 = tail call i32 @inb(i32 960)
br label %284
284: ; preds = %144, %284
%285 = phi i32 [ 0, %144 ], [ %292, %284 ]
%286 = tail call i32 @inb(i32 986)
%287 = trunc i32 %285 to i8
%288 = tail call i32 @outb(i32 960, i8 zeroext %287)
%289 = tail call i32 @inb(i32 961)
%290 = and i32 %289, 255
%291 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0), i32 %285, i32 %290)
%292 = add nuw nsw i32 %285, 1
%293 = icmp eq i32 %292, 255
br i1 %293, label %294, label %284
294: ; preds = %284
%295 = trunc i32 %283 to i8
%296 = tail call i32 @inb(i32 986)
%297 = tail call i32 @outb(i32 960, i8 zeroext %295)
%298 = tail call i32 @inb(i32 972)
%299 = and i32 %298, 255
%300 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 %299)
%301 = tail call i32 @inb(i32 962)
%302 = and i32 %301, 255
%303 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.18, i64 0, i64 0), i32 %302)
%304 = tail call i32 @inb(i32 962)
%305 = and i32 %304, 255
%306 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), i32 %305)
%307 = tail call i32 @inb(i32 970)
%308 = and i32 %307, 255
%309 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0), i32 %308)
%310 = tail call i32 @inb(i32 986)
%311 = and i32 %310, 255
%312 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i64 0, i64 0), i32 %311)
%313 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.39, i64 0, i64 0))
%314 = tail call i32 @inw(i32 33734)
%315 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0), i32 33734, i32 %314)
%316 = tail call i32 @inw(i32 33735)
%317 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0), i32 33735, i32 %316)
%318 = tail call i32 @inw(i32 33736)
%319 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0), i32 33736, i32 %318)
%320 = tail call i32 @inw(i32 33737)
%321 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0), i32 33737, i32 %320)
br i1 %33, label %363, label %322
322: ; preds = %294
%323 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.41, i64 0, i64 0))
%324 = tail call i32 @inw(i32 33744)
%325 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 33744, i32 %324)
%326 = tail call i32 @inw(i32 34768)
%327 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 34768, i32 %326)
%328 = tail call i32 @inw(i32 35792)
%329 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 35792, i32 %328)
%330 = tail call i32 @inw(i32 36816)
%331 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 36816, i32 %330)
%332 = tail call i32 @inw(i32 37840)
%333 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 37840, i32 %332)
%334 = tail call i32 @inw(i32 38864)
%335 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 38864, i32 %334)
%336 = tail call i32 @inw(i32 39888)
%337 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 39888, i32 %336)
%338 = tail call i32 @inw(i32 40912)
%339 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 40912, i32 %338)
%340 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.42, i64 0, i64 0))
%341 = tail call i32 @inw(i32 41936)
%342 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 41936, i32 %341)
%343 = tail call i32 @inw(i32 42960)
%344 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 42960, i32 %343)
%345 = tail call i32 @inw(i32 43984)
%346 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 43984, i32 %345)
%347 = tail call i32 @inw(i32 45008)
%348 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 45008, i32 %347)
%349 = tail call i32 @inw(i32 46032)
%350 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.25, i64 0, i64 0), i32 46032, i32 %349)
%351 = tail call i32 @outb(i32 982, i8 zeroext 112)
%352 = tail call i32 @inw(i32 982)
%353 = or i32 %352, 32880
%354 = tail call i32 @outw(i32 982, i32 %353)
%355 = tail call i32 @inl(i32 18152)
%356 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.27, i64 0, i64 0), i32 %355)
%357 = tail call i32 @inl(i32 19176)
%358 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.28, i64 0, i64 0), i32 %357)
%359 = tail call i32 @inl(i32 258)
%360 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.29, i64 0, i64 0), i32 %359)
%361 = tail call i32 @inl(i32 259)
%362 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.30, i64 0, i64 0), i32 %361)
br label %363
363: ; preds = %322, %294
%364 = tail call i32 @inb(i32 980)
%365 = trunc i32 %364 to i8
%366 = tail call i32 @outb(i32 980, i8 zeroext 0)
%367 = tail call i32 @inb(i32 981)
%368 = and i32 %367, 255
%369 = add nuw nsw i32 %368, 5
%370 = shl i32 %369, %89
%371 = tail call i32 @outb(i32 980, i8 zeroext 1)
%372 = tail call i32 @inb(i32 981)
%373 = and i32 %372, 255
%374 = add nuw nsw i32 %373, 1
%375 = shl i32 %374, %89
%376 = tail call i32 @outb(i32 980, i8 zeroext 4)
%377 = tail call i32 @inb(i32 981)
%378 = and i32 %377, 255
%379 = add nuw nsw i32 %378, 1
%380 = shl i32 %379, %89
%381 = tail call i32 @outb(i32 980, i8 zeroext 5)
%382 = tail call i32 @inb(i32 981)
%383 = and i32 %382, 31
%384 = tail call i32 @outb(i32 980, i8 zeroext 5)
%385 = lshr i32 %380, %89
%386 = add nuw nsw i32 %385, %383
%387 = shl i32 %386, %89
%388 = tail call i32 @outb(i32 980, i8 zeroext 6)
%389 = tail call i32 @inb(i32 981)
%390 = and i32 %389, 255
%391 = tail call i32 @outb(i32 980, i8 zeroext 7)
%392 = tail call i32 @inb(i32 981)
%393 = shl i32 %392, 8
%394 = and i32 %393, 256
%395 = or i32 %390, %394
%396 = tail call i32 @inb(i32 981)
%397 = shl i32 %396, 4
%398 = and i32 %397, 512
%399 = or i32 %398, 2
%400 = add nuw nsw i32 %399, %395
%401 = tail call i32 @inb(i32 981)
%402 = shl i32 %401, 7
%403 = and i32 %402, 256
%404 = tail call i32 @inb(i32 981)
%405 = shl i32 %404, 3
%406 = and i32 %405, 512
%407 = or i32 %403, %406
%408 = tail call i32 @inb(i32 981)
%409 = shl i32 %408, 6
%410 = and i32 %409, 256
%411 = tail call i32 @inb(i32 981)
%412 = shl i32 %411, 2
%413 = and i32 %412, 512
%414 = or i32 %413, %410
%415 = tail call i32 @outb(i32 980, i8 zeroext 18)
%416 = tail call i32 @inb(i32 981)
%417 = and i32 %416, 255
%418 = or i32 %407, 1
%419 = add nuw nsw i32 %418, %417
%420 = tail call i32 @outb(i32 980, i8 zeroext 16)
%421 = tail call i32 @inb(i32 981)
%422 = and i32 %421, 255
%423 = or i32 %414, %422
%424 = tail call i32 @outb(i32 980, i8 zeroext 17)
%425 = tail call i32 @inb(i32 981)
%426 = and i32 %425, 15
%427 = add nuw nsw i32 %426, %423
%428 = tail call i32 @outb(i32 980, i8 zeroext %365)
%429 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.31, i64 0, i64 0), i32 %375, i32 %380, i32 %387, i32 %370, i32 %419, i32 %423, i32 %427, i32 %400)
br i1 %34, label %430, label %445
430: ; preds = %363
%431 = icmp eq i32 %38, 1
br i1 %431, label %432, label %436
432: ; preds = %430
%433 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.40, i64 0, i64 0))
%434 = tail call i32 @outb(i32 973, i8 zeroext %35)
%435 = tail call i32 @outb(i32 971, i8 zeroext %36)
br label %37
436: ; preds = %430
%437 = tail call i32 @outb(i32 973, i8 zeroext %30)
%438 = tail call i32 @outb(i32 971, i8 zeroext %31)
%439 = tail call i32 @inb(i32 971)
%440 = and i32 %439, 255
%441 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.33, i64 0, i64 0), i32 %440)
%442 = tail call i32 @inb(i32 973)
%443 = and i32 %442, 255
%444 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.34, i64 0, i64 0), i32 %443)
br label %445
445: ; preds = %363, %436
%446 = tail call i32 @iopl(i32 0)
ret i32 0
}