#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 */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
int checkDevice(int, int, int);
int inb(int);
int inl(int);
int inw(scalar_t__);
int /*<<< orphan*/ outb(int, int);
int /*<<< orphan*/ outl(int, int);
int /*<<< orphan*/ printf(char *, ...);
int checkAllBusesWright() {
  int bus;
  int device;
  int function;
  uint32_t got, bar2, base;
  uint16_t ven, dev;
  for (bus = 0; bus < 256; bus++) {
    for (device = 0; device < 32; device++) {
      for (function = 0; function < 8; function++) {
        got = checkDevice(bus, device, function);
        if (got != 0xFFFFFFFF) {
          dev = (uint16_t)((got >> 16) & 0xffff);
          ven = (uint16_t)((got >> 0) & 0xffff);
          if (ven == 0x8086 && (dev == 0x1e00)) {
            printf("@ %d %d %d\n", bus, device, function);
            outl(0x80000000 | (bus << 16) | (device << 11) | (function << 8) |
                     0x18 & 0xfc,
                 0xCF8);
            bar2 = inl(0xCFC);
            printf("%X\n", bar2);
            base = bar2 & 0xFFFC;
            printf("%X\n", base);
            outb(0x5A, base + 2);
            printf("%X\n", inb(base + 2));
            if (inb(base + 2) == 0x5A) {
              printf("register pritomen\n");
            }
            outb(0xE0, base + 6);
            printf("%X\n", inb(base + 7));
            while ((inb(base + 7) & 0x80) != 0)
              ;
            outb(0xE0, base + 6);
            outb(0x01, base + 2);
            outb(0x00, base + 3);
            outb(0x00, base + 4);
            outb(0x00, base + 5);
            outb(0xE0, base + 6);
            outb(0x20, base + 7);
            while ((inb(base + 7) & 0x80) != 0)
              ;
            if ((inb(base + 7) & 0x80) == 0) {
              int i;
              for (i = 0; i < 256; i++) {
                printf("0x%X\n", inw(base + 0));
              }
            }
          }
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<checkAllBusesWright>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1435 <checkAllBusesWright+0x2c5>
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    1422 <checkAllBusesWright+0x2b2>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    140f <checkAllBusesWright+0x29f>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1090 <checkDevice@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
je     13fc <checkAllBusesWright+0x28c>
mov    -0x10(%rbp),%eax
sar    $0x10,%eax
and    $0xffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x0,%eax
and    $0xffff,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x8086,-0x1c(%rbp)
jne    13f7 <checkAllBusesWright+0x287>
cmpl   $0x1e00,-0x20(%rbp)
jne    13f7 <checkAllBusesWright+0x287>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
shl    $0x10,%edi
or     $0x80000000,%edi
mov    -0x8(%rbp),%eax
shl    $0xb,%eax
or     %eax,%edi
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
or     %eax,%edi
or     $0x18,%edi
mov    $0xcf8,%esi
call   1060 <outl@plt>
mov    $0xcfc,%edi
call   1080 <inl@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xdcb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
and    $0xfffc,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xdaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%esi
add    $0x2,%esi
mov    $0x5a,%edi
call   1050 <outb@plt>
mov    -0x18(%rbp),%edi
add    $0x2,%edi
call   1070 <inb@plt>
mov    %eax,%esi
lea    0xd84(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%edi
add    $0x2,%edi
call   1070 <inb@plt>
cmp    $0x5a,%eax
jne    12c6 <checkAllBusesWright+0x156>
lea    0xd4d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%esi
add    $0x6,%esi
mov    $0xe0,%edi
call   1050 <outb@plt>
mov    -0x18(%rbp),%edi
add    $0x7,%edi
call   1070 <inb@plt>
mov    %eax,%esi
lea    0xd37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%edi
add    $0x7,%edi
call   1070 <inb@plt>
and    $0x80,%eax
cmp    $0x0,%eax
je     130f <checkAllBusesWright+0x19f>
jmp    12f1 <checkAllBusesWright+0x181>
mov    -0x18(%rbp),%esi
add    $0x6,%esi
mov    $0xe0,%edi
call   1050 <outb@plt>
mov    -0x18(%rbp),%esi
add    $0x2,%esi
mov    $0x1,%edi
call   1050 <outb@plt>
mov    -0x18(%rbp),%esi
add    $0x3,%esi
xor    %edi,%edi
call   1050 <outb@plt>
mov    -0x18(%rbp),%esi
add    $0x4,%esi
xor    %edi,%edi
call   1050 <outb@plt>
mov    -0x18(%rbp),%esi
add    $0x5,%esi
xor    %edi,%edi
call   1050 <outb@plt>
mov    -0x18(%rbp),%esi
add    $0x6,%esi
mov    $0xe0,%edi
call   1050 <outb@plt>
mov    -0x18(%rbp),%esi
add    $0x7,%esi
mov    $0x20,%edi
call   1050 <outb@plt>
mov    -0x18(%rbp),%edi
add    $0x7,%edi
call   1070 <inb@plt>
and    $0x80,%eax
cmp    $0x0,%eax
je     1394 <checkAllBusesWright+0x224>
jmp    1376 <checkAllBusesWright+0x206>
mov    -0x18(%rbp),%edi
add    $0x7,%edi
call   1070 <inb@plt>
and    $0x80,%eax
cmp    $0x0,%eax
jne    13f2 <checkAllBusesWright+0x282>
movl   $0x0,-0x24(%rbp)
cmpl   $0x100,-0x24(%rbp)
jge    13ed <checkAllBusesWright+0x27d>
mov    -0x18(%rbp),%eax
add    $0x0,%eax
movslq %eax,%rdi
call   1030 <inw@plt>
mov    %eax,%esi
lea    0xc47(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    13b4 <checkAllBusesWright+0x244>
jmp    13f2 <checkAllBusesWright+0x282>
jmp    13f7 <checkAllBusesWright+0x287>
jmp    13fc <checkAllBusesWright+0x28c>
jmp    1401 <checkAllBusesWright+0x291>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a4 <checkAllBusesWright+0x34>
jmp    1414 <checkAllBusesWright+0x2a4>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1193 <checkAllBusesWright+0x23>
jmp    1427 <checkAllBusesWright+0x2b7>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    117f <checkAllBusesWright+0xf>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkAllBusesWright>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
xor    %r13d,%r13d
jmp    11b1 <checkAllBusesWright+0x31>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r13d
cmp    $0x100,%r13d
je     139e <checkAllBusesWright+0x21e>
mov    %r13d,%eax
shl    $0x10,%eax
mov    %eax,0xc(%rsp)
xor    %esi,%esi
mov    %r13d,0x10(%rsp)
jmp    11d8 <checkAllBusesWright+0x58>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%esi
cmp    $0x20,%esi
je     11a0 <checkAllBusesWright+0x20>
mov    %esi,%eax
shl    $0xb,%eax
or     0xc(%rsp),%eax
mov    %eax,0x14(%rsp)
xor    %r15d,%r15d
mov    %esi,0x8(%rsp)
jmp    11fe <checkAllBusesWright+0x7e>
xchg   %ax,%ax
add    $0x1,%r15d
cmp    $0x8,%r15d
mov    0x8(%rsp),%esi
je     11d0 <checkAllBusesWright+0x50>
mov    %r13d,%edi
mov    %r15d,%edx
call   10a0 <checkDevice@plt>
cmp    $0x1e008086,%eax
jne    11f0 <checkAllBusesWright+0x70>
lea    0xde9(%rip),%rdi
mov    %r13d,%esi
mov    0x8(%rsp),%edx
mov    %r15d,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15d,%edi
shl    $0x8,%edi
or     0x14(%rsp),%edi
or     $0x80000018,%edi
mov    $0xcf8,%esi
call   1070 <outl@plt>
mov    $0xcfc,%edi
call   1090 <inl@plt>
mov    %eax,%r14d
lea    0xdb8(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
and    $0xfffc,%r14d
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x2(%r14),%r13d
mov    $0x5a,%edi
mov    %r13d,%esi
call   1060 <outb@plt>
mov    %r13d,%edi
call   1080 <inb@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13d,%edi
call   1080 <inb@plt>
cmp    $0x5a,%eax
jne    12b4 <checkAllBusesWright+0x134>
lea    0xd63(%rip),%rdi
call   1040 <puts@plt>
lea    0x6(%r14),%ebp
mov    $0xe0,%edi
mov    %ebp,%esi
call   1060 <outb@plt>
lea    0x7(%r14),%r12d
mov    %r12d,%edi
call   1080 <inb@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
nopl   0x0(%rax)
mov    %r12d,%edi
call   1080 <inb@plt>
test   $0x80,%al
jne    12e0 <checkAllBusesWright+0x160>
mov    $0xe0,%edi
mov    %ebp,%esi
call   1060 <outb@plt>
mov    $0x1,%edi
mov    %r13d,%esi
call   1060 <outb@plt>
mov    %r14d,%esi
or     $0x3,%esi
xor    %edi,%edi
call   1060 <outb@plt>
lea    0x4(%r14),%esi
xor    %edi,%edi
call   1060 <outb@plt>
lea    0x5(%r14),%esi
xor    %edi,%edi
call   1060 <outb@plt>
mov    $0xe0,%edi
mov    %ebp,%esi
call   1060 <outb@plt>
mov    $0x20,%edi
mov    %r12d,%esi
call   1060 <outb@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12d,%edi
call   1080 <inb@plt>
test   $0x80,%al
jne    1350 <checkAllBusesWright+0x1d0>
mov    %r12d,%edi
call   1080 <inb@plt>
test   $0x80,%al
lea    0xc9f(%rip),%r12
mov    0x10(%rsp),%r13d
jne    11f0 <checkAllBusesWright+0x70>
mov    %r14d,%ebp
mov    $0x100,%ebx
mov    %rbp,%rdi
call   1030 <inw@plt>
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0xffffffff,%ebx
jne    1380 <checkAllBusesWright+0x200>
jmp    11f0 <checkAllBusesWright+0x70>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"@ %d %d %d\0A\00"
@.str.1 = [4 x i8] c"%X\0A\00"
@.str.2 = [19 x i8] c"register pritomen\0A\00"
@.str.3 = [6 x i8] c"0x%X\0A\00"
define i32 @checkAllBusesWright() {
%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
store i32 0, i32* %1
br label %10
10: ; preds = %151, %0
%11 = load i32, i32* %1
%12 = icmp slt i32 %11, 256
br i1 %12, label %13, label %154
13: ; preds = %10
store i32 0, i32* %2
br label %14
14: ; preds = %147, %13
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 32
br i1 %16, label %17, label %150
17: ; preds = %14
store i32 0, i32* %3
br label %18
18: ; preds = %143, %17
%19 = load i32, i32* %3
%20 = icmp slt i32 %19, 8
br i1 %20, label %21, label %146
21: ; preds = %18
%22 = load i32, i32* %1
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = call i32 @checkDevice(i32 %22, i32 %23, i32 %24)
store i32 %25, i32* %4
%26 = load i32, i32* %4
%27 = icmp ne i32 %26, -1
br i1 %27, label %28, label %142
28: ; preds = %21
%29 = load i32, i32* %4
%30 = ashr i32 %29, 16
%31 = and i32 %30, 65535
store i32 %31, i32* %8
%32 = load i32, i32* %4
%33 = ashr i32 %32, 0
%34 = and i32 %33, 65535
store i32 %34, i32* %7
%35 = load i32, i32* %7
%36 = icmp eq i32 %35, 32902
br i1 %36, label %37, label %141
37: ; preds = %28
%38 = load i32, i32* %8
%39 = icmp eq i32 %38, 7680
br i1 %39, label %40, label %141
40: ; preds = %37
%41 = load i32, i32* %1
%42 = load i32, i32* %2
%43 = load i32, i32* %3
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %41, i32 %42, i32 %43)
%45 = load i32, i32* %1
%46 = shl i32 %45, 16
%47 = or i32 -2147483648, %46
%48 = load i32, i32* %2
%49 = shl i32 %48, 11
%50 = or i32 %47, %49
%51 = load i32, i32* %3
%52 = shl i32 %51, 8
%53 = or i32 %50, %52
%54 = or i32 %53, 24
%55 = call i32 @outl(i32 %54, i32 3320)
%56 = call i32 @inl(i32 3324)
store i32 %56, i32* %5
%57 = load i32, i32* %5
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %57)
%59 = load i32, i32* %5
%60 = and i32 %59, 65532
store i32 %60, i32* %6
%61 = load i32, i32* %6
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %61)
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 2
%65 = call i32 @outb(i32 90, i32 %64)
%66 = load i32, i32* %6
%67 = add nsw i32 %66, 2
%68 = call i32 @inb(i32 %67)
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %68)
%70 = load i32, i32* %6
%71 = add nsw i32 %70, 2
%72 = call i32 @inb(i32 %71)
%73 = icmp eq i32 %72, 90
br i1 %73, label %74, label %76
74: ; preds = %40
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %76
76: ; preds = %74, %40
%77 = load i32, i32* %6
%78 = add nsw i32 %77, 6
%79 = call i32 @outb(i32 224, i32 %78)
%80 = load i32, i32* %6
%81 = add nsw i32 %80, 7
%82 = call i32 @inb(i32 %81)
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %82)
br label %84
84: ; preds = %90, %76
%85 = load i32, i32* %6
%86 = add nsw i32 %85, 7
%87 = call i32 @inb(i32 %86)
%88 = and i32 %87, 128
%89 = icmp ne i32 %88, 0
br i1 %89, label %90, label %91
90: ; preds = %84
br label %84
91: ; preds = %84
%92 = load i32, i32* %6
%93 = add nsw i32 %92, 6
%94 = call i32 @outb(i32 224, i32 %93)
%95 = load i32, i32* %6
%96 = add nsw i32 %95, 2
%97 = call i32 @outb(i32 1, i32 %96)
%98 = load i32, i32* %6
%99 = add nsw i32 %98, 3
%100 = call i32 @outb(i32 0, i32 %99)
%101 = load i32, i32* %6
%102 = add nsw i32 %101, 4
%103 = call i32 @outb(i32 0, i32 %102)
%104 = load i32, i32* %6
%105 = add nsw i32 %104, 5
%106 = call i32 @outb(i32 0, i32 %105)
%107 = load i32, i32* %6
%108 = add nsw i32 %107, 6
%109 = call i32 @outb(i32 224, i32 %108)
%110 = load i32, i32* %6
%111 = add nsw i32 %110, 7
%112 = call i32 @outb(i32 32, i32 %111)
br label %113
113: ; preds = %119, %91
%114 = load i32, i32* %6
%115 = add nsw i32 %114, 7
%116 = call i32 @inb(i32 %115)
%117 = and i32 %116, 128
%118 = icmp ne i32 %117, 0
br i1 %118, label %119, label %120
119: ; preds = %113
br label %113
120: ; preds = %113
%121 = load i32, i32* %6
%122 = add nsw i32 %121, 7
%123 = call i32 @inb(i32 %122)
%124 = and i32 %123, 128
%125 = icmp eq i32 %124, 0
br i1 %125, label %126, label %140
126: ; preds = %120
store i32 0, i32* %9
br label %127
127: ; preds = %136, %126
%128 = load i32, i32* %9
%129 = icmp slt i32 %128, 256
br i1 %129, label %130, label %139
130: ; preds = %127
%131 = load i32, i32* %6
%132 = add nsw i32 %131, 0
%133 = sext i32 %132 to i64
%134 = call i32 @inw(i64 %133)
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %134)
br label %136
136: ; preds = %130
%137 = load i32, i32* %9
%138 = add nsw i32 %137, 1
store i32 %138, i32* %9
br label %127
139: ; preds = %127
br label %140
140: ; preds = %139, %120
br label %141
141: ; preds = %140, %37, %28
br label %142
142: ; preds = %141, %21
br label %143
143: ; preds = %142
%144 = load i32, i32* %3
%145 = add nsw i32 %144, 1
store i32 %145, i32* %3
br label %18
146: ; preds = %18
br label %147
147: ; preds = %146
%148 = load i32, i32* %2
%149 = add nsw i32 %148, 1
store i32 %149, i32* %2
br label %14
150: ; preds = %14
br label %151
151: ; preds = %150
%152 = load i32, i32* %1
%153 = add nsw i32 %152, 1
store i32 %153, i32* %1
br label %10
154: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"@ %d %d %d\0A\00"
@.str.1 = [4 x i8] c"%X\0A\00"
@.str.3 = [6 x i8] c"0x%X\0A\00"
@str = [18 x i8] c"register pritomen\00"
define i32 @checkAllBusesWright() {
br label %1
1: ; preds = %0, %73
%2 = phi i32 [ 0, %0 ], [ %74, %73 ]
%3 = shl i32 %2, 16
br label %4
4: ; preds = %1, %70
%5 = phi i32 [ 0, %1 ], [ %71, %70 ]
%6 = shl i32 %5, 11
%7 = or i32 %3, %6
br label %8
8: ; preds = %4, %67
%9 = phi i32 [ 0, %4 ], [ %68, %67 ]
%10 = tail call i32 @checkDevice(i32 %2, i32 %5, i32 %9)
%11 = icmp eq i32 %10, 503349382
br i1 %11, label %12, label %67
12: ; preds = %8
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %5, i32 %9)
%14 = shl nuw nsw i32 %9, 8
%15 = or i32 %7, %14
%16 = or i32 %15, -2147483624
%17 = tail call i32 @outl(i32 %16, i32 3320)
%18 = tail call i32 @inl(i32 3324)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = and i32 %18, 65532
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = or i32 %20, 2
%23 = tail call i32 @outb(i32 90, i32 %22)
%24 = tail call i32 @inb(i32 %22)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = tail call i32 @inb(i32 %22)
%27 = icmp eq i32 %26, 90
br i1 %27, label %28, label %30
28: ; preds = %12
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %30
30: ; preds = %28, %12
%31 = add nuw nsw i32 %20, 6
%32 = tail call i32 @outb(i32 224, i32 %31)
%33 = add nuw nsw i32 %20, 7
%34 = tail call i32 @inb(i32 %33)
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %34)
br label %36
36: ; preds = %36, %30
%37 = tail call i32 @inb(i32 %33)
%38 = and i32 %37, 128
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %36
40: ; preds = %36
%41 = tail call i32 @outb(i32 224, i32 %31)
%42 = tail call i32 @outb(i32 1, i32 %22)
%43 = or i32 %20, 3
%44 = tail call i32 @outb(i32 0, i32 %43)
%45 = add nuw nsw i32 %20, 4
%46 = tail call i32 @outb(i32 0, i32 %45)
%47 = add nuw nsw i32 %20, 5
%48 = tail call i32 @outb(i32 0, i32 %47)
%49 = tail call i32 @outb(i32 224, i32 %31)
%50 = tail call i32 @outb(i32 32, i32 %33)
br label %51
51: ; preds = %51, %40
%52 = tail call i32 @inb(i32 %33)
%53 = and i32 %52, 128
%54 = icmp eq i32 %53, 0
br i1 %54, label %55, label %51
55: ; preds = %51
%56 = tail call i32 @inb(i32 %33)
%57 = and i32 %56, 128
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %67
59: ; preds = %55
%60 = zext i32 %20 to i64
br label %61
61: ; preds = %59, %61
%62 = phi i32 [ 0, %59 ], [ %65, %61 ]
%63 = tail call i32 @inw(i64 %60)
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %63)
%65 = add nuw nsw i32 %62, 1
%66 = icmp eq i32 %65, 256
br i1 %66, label %67, label %61
67: ; preds = %61, %8, %55
%68 = add nuw nsw i32 %9, 1
%69 = icmp eq i32 %68, 8
br i1 %69, label %70, label %8
70: ; preds = %67
%71 = add nuw nsw i32 %5, 1
%72 = icmp eq i32 %71, 32
br i1 %72, label %73, label %4
73: ; preds = %70
%74 = add nuw nsw i32 %2, 1
%75 = icmp eq i32 %74, 256
br i1 %75, label %76, label %1
76: ; preds = %73
ret i32 0
}