#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 */
unsigned char inb(unsigned int);
unsigned int inl(unsigned int);
int /*<<< orphan*/ msleep(int);
int /*<<< orphan*/ outb(int, unsigned int);
int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
                              unsigned int dw_PCIBoardEepromAddress,
                              unsigned short w_EepromStartAddress,
                              unsigned short *pw_DataRead) {
  unsigned int dw_eeprom_busy = 0;
  int i_Counter = 0;
  int i_WordCounter;
  int i;
  unsigned char pb_ReadByte[1];
  unsigned char b_ReadLowByte = 0;
  unsigned char b_ReadHighByte = 0;
  unsigned char b_SelectedAddressLow = 0;
  unsigned char b_SelectedAddressHigh = 0;
  unsigned short w_ReadWord = 0;
  for (i_WordCounter = 0; i_WordCounter < i_NbOfWordsToRead; i_WordCounter++) {
    do {
      dw_eeprom_busy = inl(dw_PCIBoardEepromAddress + 0x3c);
      dw_eeprom_busy = dw_eeprom_busy & 0x80000000;
    } while (dw_eeprom_busy == 0x80000000);
    for (i_Counter = 0; i_Counter < 2; i_Counter++) {
      b_SelectedAddressLow = (w_EepromStartAddress + i_Counter) % 256;
      b_SelectedAddressHigh = (w_EepromStartAddress + i_Counter) / 256;
      outb((0x4 << 5), dw_PCIBoardEepromAddress + 0x3c + 3);
      do {
        dw_eeprom_busy = inl(dw_PCIBoardEepromAddress + 0x3c);
        dw_eeprom_busy = dw_eeprom_busy & 0x80000000;
      } while (dw_eeprom_busy == 0x80000000);
      outb(b_SelectedAddressLow, dw_PCIBoardEepromAddress + 0x3c + 2);
      do {
        dw_eeprom_busy = inl(dw_PCIBoardEepromAddress + 0x3c);
        dw_eeprom_busy = dw_eeprom_busy & 0x80000000;
      } while (dw_eeprom_busy == 0x80000000);
      outb((0x5 << 5), dw_PCIBoardEepromAddress + 0x3c + 3);
      do {
        dw_eeprom_busy = inl(dw_PCIBoardEepromAddress + 0x3c);
        dw_eeprom_busy = dw_eeprom_busy & 0x80000000;
      } while (dw_eeprom_busy == 0x80000000);
      outb(b_SelectedAddressHigh, dw_PCIBoardEepromAddress + 0x3c + 2);
      do {
        dw_eeprom_busy = inl(dw_PCIBoardEepromAddress + 0x3c);
        dw_eeprom_busy = dw_eeprom_busy & 0x80000000;
      } while (dw_eeprom_busy == 0x80000000);
      outb((0x7 << 5), dw_PCIBoardEepromAddress + 0x3c + 3);
      do {
        dw_eeprom_busy = inl(dw_PCIBoardEepromAddress + 0x3c);
        dw_eeprom_busy = dw_eeprom_busy & 0x80000000;
      } while (dw_eeprom_busy == 0x80000000);
      *pb_ReadByte = inb(dw_PCIBoardEepromAddress + 0x3c + 2);
      do {
        dw_eeprom_busy = inl(dw_PCIBoardEepromAddress + 0x3c);
        dw_eeprom_busy = dw_eeprom_busy & 0x80000000;
      } while (dw_eeprom_busy == 0x80000000);
      if (i_Counter == 0) {
        b_ReadLowByte = pb_ReadByte[0];
      } else {
        b_ReadHighByte = pb_ReadByte[0];
      }
      msleep(1);
    }
    w_ReadWord = (b_ReadLowByte | (((unsigned short)b_ReadHighByte) * 256));
    pw_DataRead[i_WordCounter] = w_ReadWord;
    w_EepromStartAddress += 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<i_AddiHeaderRW_ReadEeprom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dx,%ax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movb   $0x0,-0x2a(%rbp)
movb   $0x0,-0x2b(%rbp)
movb   $0x0,-0x2c(%rbp)
movb   $0x0,-0x2d(%rbp)
movw   $0x0,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    13b4 <i_AddiHeaderRW_ReadEeprom+0x274>
jmp    1195 <i_AddiHeaderRW_ReadEeprom+0x55>
mov    -0x8(%rbp),%edi
add    $0x3c,%edi
call   1060 <inl@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
and    $0x80000000,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x80000000,-0x1c(%rbp)
je     1195 <i_AddiHeaderRW_ReadEeprom+0x55>
movl   $0x0,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jge    1377 <i_AddiHeaderRW_ReadEeprom+0x237>
movzwl -0xa(%rbp),%eax
add    -0x20(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %dl,%al
mov    %al,-0x2c(%rbp)
movzwl -0xa(%rbp),%eax
add    -0x20(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %al,-0x2d(%rbp)
mov    -0x8(%rbp),%esi
add    $0x3c,%esi
add    $0x3,%esi
mov    $0x80,%edi
call   1040 <outb@plt>
mov    -0x8(%rbp),%edi
add    $0x3c,%edi
call   1060 <inl@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
and    $0x80000000,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x80000000,-0x1c(%rbp)
je     1205 <i_AddiHeaderRW_ReadEeprom+0xc5>
movzbl -0x2c(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x3c,%esi
add    $0x2,%esi
call   1040 <outb@plt>
mov    -0x8(%rbp),%edi
add    $0x3c,%edi
call   1060 <inl@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
and    $0x80000000,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x80000000,-0x1c(%rbp)
je     123d <i_AddiHeaderRW_ReadEeprom+0xfd>
mov    -0x8(%rbp),%esi
add    $0x3c,%esi
add    $0x3,%esi
mov    $0xa0,%edi
call   1040 <outb@plt>
mov    -0x8(%rbp),%edi
add    $0x3c,%edi
call   1060 <inl@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
and    $0x80000000,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x80000000,-0x1c(%rbp)
je     1276 <i_AddiHeaderRW_ReadEeprom+0x136>
movzbl -0x2d(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x3c,%esi
add    $0x2,%esi
call   1040 <outb@plt>
mov    -0x8(%rbp),%edi
add    $0x3c,%edi
call   1060 <inl@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
and    $0x80000000,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x80000000,-0x1c(%rbp)
je     12ae <i_AddiHeaderRW_ReadEeprom+0x16e>
mov    -0x8(%rbp),%esi
add    $0x3c,%esi
add    $0x3,%esi
mov    $0xe0,%edi
call   1040 <outb@plt>
mov    -0x8(%rbp),%edi
add    $0x3c,%edi
call   1060 <inl@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
and    $0x80000000,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x80000000,-0x1c(%rbp)
je     12e7 <i_AddiHeaderRW_ReadEeprom+0x1a7>
mov    -0x8(%rbp),%edi
add    $0x3c,%edi
add    $0x2,%edi
call   1050 <inb@plt>
mov    %al,-0x29(%rbp)
mov    -0x8(%rbp),%edi
add    $0x3c,%edi
call   1060 <inl@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
and    $0x80000000,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x80000000,-0x1c(%rbp)
je     131e <i_AddiHeaderRW_ReadEeprom+0x1de>
cmpl   $0x0,-0x20(%rbp)
jne    1359 <i_AddiHeaderRW_ReadEeprom+0x219>
mov    -0x29(%rbp),%al
mov    %al,-0x2a(%rbp)
jmp    135f <i_AddiHeaderRW_ReadEeprom+0x21f>
mov    -0x29(%rbp),%al
mov    %al,-0x2b(%rbp)
mov    $0x1,%edi
call   1030 <msleep@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11c2 <i_AddiHeaderRW_ReadEeprom+0x82>
movzbl -0x2a(%rbp),%eax
movzbl -0x2b(%rbp),%ecx
movzwl %cx,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %ax,-0x30(%rbp)
mov    -0x30(%rbp),%dx
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
movzwl -0xa(%rbp),%eax
add    $0x2,%eax
mov    %ax,-0xa(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1184 <i_AddiHeaderRW_ReadEeprom+0x44>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_AddiHeaderRW_ReadEeprom>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,0x10(%rsp)
test   %edi,%edi
jle    1353 <i_AddiHeaderRW_ReadEeprom+0x213>
mov    %edx,%r15d
mov    %esi,%r14d
lea    0x3c(%r14),%ebx
lea    0x3f(%r14),%r12d
add    $0x3e,%r14d
mov    %edi,%eax
mov    %rax,0x8(%rsp)
xor    %r13d,%r13d
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     1180 <i_AddiHeaderRW_ReadEeprom+0x40>
movzwl %r15w,%ebp
mov    $0x80,%edi
mov    %r12d,%esi
call   1040 <outb@plt>
nopl   0x0(%rax)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     11a0 <i_AddiHeaderRW_ReadEeprom+0x60>
mov    %ebp,%eax
movzbl %al,%edi
mov    %r14d,%esi
call   1040 <outb@plt>
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     11c0 <i_AddiHeaderRW_ReadEeprom+0x80>
mov    $0xa0,%edi
mov    %r12d,%esi
call   1040 <outb@plt>
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     11e0 <i_AddiHeaderRW_ReadEeprom+0xa0>
mov    %ebp,%edi
shr    $0x8,%edi
mov    %r14d,%esi
call   1040 <outb@plt>
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     1200 <i_AddiHeaderRW_ReadEeprom+0xc0>
mov    $0xe0,%edi
mov    %r12d,%esi
call   1040 <outb@plt>
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     1220 <i_AddiHeaderRW_ReadEeprom+0xe0>
mov    %r14d,%edi
call   1050 <inb@plt>
mov    %al,0x7(%rsp)
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     1240 <i_AddiHeaderRW_ReadEeprom+0x100>
mov    $0x1,%edi
call   1030 <msleep@plt>
mov    $0x80,%edi
mov    %r12d,%esi
call   1040 <outb@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     1270 <i_AddiHeaderRW_ReadEeprom+0x130>
mov    %ebp,%eax
add    $0x1,%eax
mov    %eax,%ebp
movzbl %al,%edi
mov    %r14d,%esi
call   1040 <outb@plt>
nopl   (%rax)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     1290 <i_AddiHeaderRW_ReadEeprom+0x150>
mov    $0xa0,%edi
mov    %r12d,%esi
call   1040 <outb@plt>
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     12b0 <i_AddiHeaderRW_ReadEeprom+0x170>
mov    %ebp,%eax
movzbl %ah,%edi
mov    %r14d,%esi
call   1040 <outb@plt>
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     12d0 <i_AddiHeaderRW_ReadEeprom+0x190>
mov    $0xe0,%edi
mov    %r12d,%esi
call   1040 <outb@plt>
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     12f0 <i_AddiHeaderRW_ReadEeprom+0x1b0>
mov    %r14,%rbp
mov    %r14d,%edi
call   1050 <inb@plt>
mov    %eax,%r14d
nopl   0x0(%rax)
mov    %ebx,%edi
call   1060 <inl@plt>
test   %eax,%eax
js     1310 <i_AddiHeaderRW_ReadEeprom+0x1d0>
mov    $0x1,%edi
call   1030 <msleep@plt>
movzbl 0x7(%rsp),%eax
movzbl %r14b,%ecx
shl    $0x8,%ecx
or     %eax,%ecx
mov    0x10(%rsp),%rax
mov    %cx,(%rax,%r13,2)
add    $0x2,%r15d
add    $0x1,%r13
cmp    0x8(%rsp),%r13
mov    %rbp,%r14
jne    1180 <i_AddiHeaderRW_ReadEeprom+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @i_AddiHeaderRW_ReadEeprom(i32 %0, i32 %1, i16 zeroext %2, i16* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i16
%8 = alloca i16*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [1 x i8]
%14 = alloca i8
%15 = alloca i8
%16 = alloca i8
%17 = alloca i8
%18 = alloca i16
store i32 %0, i32* %5
store i32 %1, i32* %6
store i16 %2, i16* %7
store i16* %3, i16** %8
store i32 0, i32* %9
store i32 0, i32* %10
store i8 0, i8* %14
store i8 0, i8* %15
store i8 0, i8* %16
store i8 0, i8* %17
store i16 0, i16* %18
store i32 0, i32* %11
br label %19
19: ; preds = %170, %4
%20 = load i32, i32* %11
%21 = load i32, i32* %5
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %173
23: ; preds = %19
br label %24
24: ; preds = %30, %23
%25 = load i32, i32* %6
%26 = add i32 %25, 60
%27 = call i32 @inl(i32 %26)
store i32 %27, i32* %9
%28 = load i32, i32* %9
%29 = and i32 %28, -2147483648
store i32 %29, i32* %9
br label %30
30: ; preds = %24
%31 = load i32, i32* %9
%32 = icmp eq i32 %31, -2147483648
br i1 %32, label %24, label %33
33: ; preds = %30
store i32 0, i32* %10
br label %34
34: ; preds = %149, %33
%35 = load i32, i32* %10
%36 = icmp slt i32 %35, 2
br i1 %36, label %37, label %152
37: ; preds = %34
%38 = load i16, i16* %7
%39 = zext i16 %38 to i32
%40 = load i32, i32* %10
%41 = add nsw i32 %39, %40
%42 = srem i32 %41, 256
%43 = trunc i32 %42 to i8
store i8 %43, i8* %16
%44 = load i16, i16* %7
%45 = zext i16 %44 to i32
%46 = load i32, i32* %10
%47 = add nsw i32 %45, %46
%48 = sdiv i32 %47, 256
%49 = trunc i32 %48 to i8
store i8 %49, i8* %17
%50 = load i32, i32* %6
%51 = add i32 %50, 60
%52 = add i32 %51, 3
%53 = call i32 @outb(i32 128, i32 %52)
br label %54
54: ; preds = %60, %37
%55 = load i32, i32* %6
%56 = add i32 %55, 60
%57 = call i32 @inl(i32 %56)
store i32 %57, i32* %9
%58 = load i32, i32* %9
%59 = and i32 %58, -2147483648
store i32 %59, i32* %9
br label %60
60: ; preds = %54
%61 = load i32, i32* %9
%62 = icmp eq i32 %61, -2147483648
br i1 %62, label %54, label %63
63: ; preds = %60
%64 = load i8, i8* %16
%65 = zext i8 %64 to i32
%66 = load i32, i32* %6
%67 = add i32 %66, 60
%68 = add i32 %67, 2
%69 = call i32 @outb(i32 %65, i32 %68)
br label %70
70: ; preds = %76, %63
%71 = load i32, i32* %6
%72 = add i32 %71, 60
%73 = call i32 @inl(i32 %72)
store i32 %73, i32* %9
%74 = load i32, i32* %9
%75 = and i32 %74, -2147483648
store i32 %75, i32* %9
br label %76
76: ; preds = %70
%77 = load i32, i32* %9
%78 = icmp eq i32 %77, -2147483648
br i1 %78, label %70, label %79
79: ; preds = %76
%80 = load i32, i32* %6
%81 = add i32 %80, 60
%82 = add i32 %81, 3
%83 = call i32 @outb(i32 160, i32 %82)
br label %84
84: ; preds = %90, %79
%85 = load i32, i32* %6
%86 = add i32 %85, 60
%87 = call i32 @inl(i32 %86)
store i32 %87, i32* %9
%88 = load i32, i32* %9
%89 = and i32 %88, -2147483648
store i32 %89, i32* %9
br label %90
90: ; preds = %84
%91 = load i32, i32* %9
%92 = icmp eq i32 %91, -2147483648
br i1 %92, label %84, label %93
93: ; preds = %90
%94 = load i8, i8* %17
%95 = zext i8 %94 to i32
%96 = load i32, i32* %6
%97 = add i32 %96, 60
%98 = add i32 %97, 2
%99 = call i32 @outb(i32 %95, i32 %98)
br label %100
100: ; preds = %106, %93
%101 = load i32, i32* %6
%102 = add i32 %101, 60
%103 = call i32 @inl(i32 %102)
store i32 %103, i32* %9
%104 = load i32, i32* %9
%105 = and i32 %104, -2147483648
store i32 %105, i32* %9
br label %106
106: ; preds = %100
%107 = load i32, i32* %9
%108 = icmp eq i32 %107, -2147483648
br i1 %108, label %100, label %109
109: ; preds = %106
%110 = load i32, i32* %6
%111 = add i32 %110, 60
%112 = add i32 %111, 3
%113 = call i32 @outb(i32 224, i32 %112)
br label %114
114: ; preds = %120, %109
%115 = load i32, i32* %6
%116 = add i32 %115, 60
%117 = call i32 @inl(i32 %116)
store i32 %117, i32* %9
%118 = load i32, i32* %9
%119 = and i32 %118, -2147483648
store i32 %119, i32* %9
br label %120
120: ; preds = %114
%121 = load i32, i32* %9
%122 = icmp eq i32 %121, -2147483648
br i1 %122, label %114, label %123
123: ; preds = %120
%124 = load i32, i32* %6
%125 = add i32 %124, 60
%126 = add i32 %125, 2
%127 = call zeroext i8 @inb(i32 %126)
%128 = getelementptr inbounds [1 x i8], [1 x i8]* %13, i64 0, i64 0
store i8 %127, i8* %128
br label %129
129: ; preds = %135, %123
%130 = load i32, i32* %6
%131 = add i32 %130, 60
%132 = call i32 @inl(i32 %131)
store i32 %132, i32* %9
%133 = load i32, i32* %9
%134 = and i32 %133, -2147483648
store i32 %134, i32* %9
br label %135
135: ; preds = %129
%136 = load i32, i32* %9
%137 = icmp eq i32 %136, -2147483648
br i1 %137, label %129, label %138
138: ; preds = %135
%139 = load i32, i32* %10
%140 = icmp eq i32 %139, 0
br i1 %140, label %141, label %144
141: ; preds = %138
%142 = getelementptr inbounds [1 x i8], [1 x i8]* %13, i64 0, i64 0
%143 = load i8, i8* %142
store i8 %143, i8* %14
br label %147
144: ; preds = %138
%145 = getelementptr inbounds [1 x i8], [1 x i8]* %13, i64 0, i64 0
%146 = load i8, i8* %145
store i8 %146, i8* %15
br label %147
147: ; preds = %144, %141
%148 = call i32 @msleep(i32 1)
br label %149
149: ; preds = %147
%150 = load i32, i32* %10
%151 = add nsw i32 %150, 1
store i32 %151, i32* %10
br label %34
152: ; preds = %34
%153 = load i8, i8* %14
%154 = zext i8 %153 to i32
%155 = load i8, i8* %15
%156 = zext i8 %155 to i16
%157 = zext i16 %156 to i32
%158 = mul nsw i32 %157, 256
%159 = or i32 %154, %158
%160 = trunc i32 %159 to i16
store i16 %160, i16* %18
%161 = load i16, i16* %18
%162 = load i16*, i16** %8
%163 = load i32, i32* %11
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds i16, i16* %162, i64 %164
store i16 %161, i16* %165
%166 = load i16, i16* %7
%167 = zext i16 %166 to i32
%168 = add nsw i32 %167, 2
%169 = trunc i32 %168 to i16
store i16 %169, i16* %7
br label %170
170: ; preds = %152
%171 = load i32, i32* %11
%172 = add nsw i32 %171, 1
store i32 %172, i32* %11
br label %19
173: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
define i32 @i_AddiHeaderRW_ReadEeprom(i32 %0, i32 %1, i16 zeroext %2, i16* nocapture writeonly %3) {
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %95
6: ; preds = %4
%7 = add i32 %1, 60
%8 = add i32 %1, 63
%9 = add i32 %1, 62
%10 = zext i32 %0 to i64
br label %11
11: ; preds = %6, %85
%12 = phi i64 [ 0, %6 ], [ %93, %85 ]
%13 = phi i16 [ %2, %6 ], [ %92, %85 ]
br label %14
14: ; preds = %11, %14
%15 = tail call i32 @inl(i32 %7)
%16 = icmp slt i32 %15, 0
br i1 %16, label %14, label %17
17: ; preds = %14
%18 = zext i16 %13 to i32
%19 = tail call i32 @outb(i32 128, i32 %8)
br label %20
20: ; preds = %20, %17
%21 = tail call i32 @inl(i32 %7)
%22 = icmp slt i32 %21, 0
br i1 %22, label %20, label %23
23: ; preds = %20
%24 = and i32 %18, 255
%25 = tail call i32 @outb(i32 %24, i32 %9)
br label %26
26: ; preds = %26, %23
%27 = tail call i32 @inl(i32 %7)
%28 = icmp slt i32 %27, 0
br i1 %28, label %26, label %29
29: ; preds = %26
%30 = tail call i32 @outb(i32 160, i32 %8)
br label %31
31: ; preds = %31, %29
%32 = tail call i32 @inl(i32 %7)
%33 = icmp slt i32 %32, 0
br i1 %33, label %31, label %34
34: ; preds = %31
%35 = lshr i32 %18, 8
%36 = tail call i32 @outb(i32 %35, i32 %9)
br label %37
37: ; preds = %37, %34
%38 = tail call i32 @inl(i32 %7)
%39 = icmp slt i32 %38, 0
br i1 %39, label %37, label %40
40: ; preds = %37
%41 = tail call i32 @outb(i32 224, i32 %8)
br label %42
42: ; preds = %42, %40
%43 = tail call i32 @inl(i32 %7)
%44 = icmp slt i32 %43, 0
br i1 %44, label %42, label %45
45: ; preds = %42
%46 = tail call zeroext i8 @inb(i32 %9)
br label %47
47: ; preds = %47, %45
%48 = tail call i32 @inl(i32 %7)
%49 = icmp slt i32 %48, 0
br i1 %49, label %47, label %50
50: ; preds = %47
%51 = tail call i32 @msleep(i32 1)
%52 = tail call i32 @outb(i32 128, i32 %8)
br label %53
53: ; preds = %53, %50
%54 = tail call i32 @inl(i32 %7)
%55 = icmp slt i32 %54, 0
br i1 %55, label %53, label %56
56: ; preds = %53
%57 = add nuw nsw i32 %18, 1
%58 = and i32 %57, 255
%59 = tail call i32 @outb(i32 %58, i32 %9)
br label %60
60: ; preds = %60, %56
%61 = tail call i32 @inl(i32 %7)
%62 = icmp slt i32 %61, 0
br i1 %62, label %60, label %63
63: ; preds = %60
%64 = tail call i32 @outb(i32 160, i32 %8)
br label %65
65: ; preds = %65, %63
%66 = tail call i32 @inl(i32 %7)
%67 = icmp slt i32 %66, 0
br i1 %67, label %65, label %68
68: ; preds = %65
%69 = lshr i32 %57, 8
%70 = and i32 %69, 255
%71 = tail call i32 @outb(i32 %70, i32 %9)
br label %72
72: ; preds = %72, %68
%73 = tail call i32 @inl(i32 %7)
%74 = icmp slt i32 %73, 0
br i1 %74, label %72, label %75
75: ; preds = %72
%76 = tail call i32 @outb(i32 224, i32 %8)
br label %77
77: ; preds = %77, %75
%78 = tail call i32 @inl(i32 %7)
%79 = icmp slt i32 %78, 0
br i1 %79, label %77, label %80
80: ; preds = %77
%81 = tail call zeroext i8 @inb(i32 %9)
br label %82
82: ; preds = %82, %80
%83 = tail call i32 @inl(i32 %7)
%84 = icmp slt i32 %83, 0
br i1 %84, label %82, label %85
85: ; preds = %82
%86 = tail call i32 @msleep(i32 1)
%87 = zext i8 %46 to i16
%88 = zext i8 %81 to i16
%89 = shl nuw i16 %88, 8
%90 = or i16 %89, %87
%91 = getelementptr inbounds i16, i16* %3, i64 %12
store i16 %90, i16* %91
%92 = add i16 %13, 2
%93 = add nuw nsw i64 %12, 1
%94 = icmp eq i64 %93, %10
br i1 %94, label %95, label %11
95: ; preds = %85, %4
ret i32 0
}