#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 docrc8(unsigned char, unsigned char);
int /*<<< orphan*/ owBlock(int /*<<< orphan*/, unsigned char *, int);
int /*<<< orphan*/ owFirst(int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ owNext(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ owSerialNum(unsigned char *, int);
scalar_t__ owTouchReset();
int /*<<< orphan*/ printf(char *, ...);
void main(void) {
  unsigned char serial[32];
  unsigned char mac[6];
  unsigned char myCRC;
  unsigned char rc = 0;
  unsigned char i;
  printf("Probing internal one-wire bus...\n");
  if (owTouchReset()) {
    printf("No presence pulse.\n");
    rc = 1;
  }
  if (!rc && !owFirst(0, 0)) {
    printf("Nothing on internal 1-wire bus.\n");
    rc = 1;
  }
  if (!rc) {
    { owSerialNum(serial, 1); }
    while (serial[0] != 0x89 && owNext(0, 0))
      ;
    owTouchReset();
    if (serial[0] != 0x89) {
      printf("No DS2502 found on internal 1-wire bus.\n");
      rc = 1;
    }
  }
  if (!rc) {
    printf("DS2502 located (ID %02x%02x%02x%02x%02x%02x%02x%02x).\n", serial[0],
           serial[1], serial[2], serial[3], serial[4], serial[5], serial[6],
           serial[7]);
    serial[0] = 0xCC;
    serial[1] = 0xF0;
    serial[2] = 0x00;
    serial[3] = 0x00;
    serial[4] = 0xFF;
    owBlock(0, serial, 5);
    myCRC = docrc8(0, serial[1]);
    myCRC = docrc8(myCRC, serial[2]);
    myCRC = docrc8(myCRC, serial[3]);
    if (myCRC != serial[4]) {
      printf("read failed: bogus CRC: %x != %x\n", myCRC, serial[4]);
      rc = 1;
    }
  }
  if (!rc) {
    for (i = 0; i < 32; i++) {
      serial[i] = 0xFF;
    }
    owBlock(0, serial, 32);
    {
      unsigned char *mptr = mac;
      unsigned char *sptr = &(serial[10]);
      for (i = 0; i < 6; i++) {
        *mptr++ = *sptr--;
      }
    }
    printf("MAC address: %02x%02x%02x%02x%02x%02x\n", mac[0], mac[1], mac[2],
           mac[3], mac[4], mac[5]);
    owTouchReset();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movb   $0x0,-0x28(%rbp)
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <owTouchReset@plt>
cmp    $0x0,%rax
je     11ad <main+0x3d>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movb   $0x1,-0x28(%rbp)
cmpb   $0x0,-0x28(%rbp)
jne    11db <main+0x6b>
xor    %esi,%esi
mov    %esi,%edi
call   1050 <owFirst@plt>
cmp    $0x0,%eax
jne    11db <main+0x6b>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movb   $0x1,-0x28(%rbp)
cmpb   $0x0,-0x28(%rbp)
jne    125d <main+0xed>
lea    -0x20(%rbp),%rdi
mov    $0x1,%esi
call   1030 <owSerialNum@plt>
movzbl -0x20(%rbp),%ecx
xor    %eax,%eax
cmp    $0x89,%ecx
mov    %al,-0x41(%rbp)
je     121b <main+0xab>
xor    %esi,%esi
mov    %esi,%edi
call   1070 <owNext@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x41(%rbp)
mov    -0x41(%rbp),%al
test   $0x1,%al
jne    122b <main+0xbb>
jmp    1230 <main+0xc0>
jmp    11f3 <main+0x83>
mov    $0x0,%al
call   1090 <owTouchReset@plt>
movzbl -0x20(%rbp),%eax
cmp    $0x89,%eax
je     1258 <main+0xe8>
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movb   $0x1,-0x28(%rbp)
jmp    125d <main+0xed>
cmpb   $0x0,-0x28(%rbp)
jne    132b <main+0x1bb>
movzbl -0x20(%rbp),%esi
movzbl -0x1f(%rbp),%edx
movzbl -0x1e(%rbp),%ecx
movzbl -0x1d(%rbp),%r8d
movzbl -0x1c(%rbp),%r9d
movzbl -0x1b(%rbp),%r11d
movzbl -0x1a(%rbp),%r10d
movzbl -0x19(%rbp),%eax
lea    0xdee(%rip),%rdi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1060 <printf@plt>
movb   $0xcc,-0x20(%rbp)
movb   $0xf0,-0x1f(%rbp)
movb   $0x0,-0x1e(%rbp)
movb   $0x0,-0x1d(%rbp)
movb   $0xff,-0x1c(%rbp)
lea    -0x20(%rbp),%rsi
xor    %edi,%edi
mov    $0x5,%edx
call   1080 <owBlock@plt>
xor    %edi,%edi
movzbl -0x1f(%rbp),%esi
call   1040 <docrc8@plt>
mov    %al,-0x27(%rbp)
mov    -0x27(%rbp),%al
movzbl %al,%edi
movzbl -0x1e(%rbp),%esi
call   1040 <docrc8@plt>
mov    %al,-0x27(%rbp)
mov    -0x27(%rbp),%al
movzbl %al,%edi
movzbl -0x1d(%rbp),%esi
call   1040 <docrc8@plt>
mov    %al,-0x27(%rbp)
movzbl -0x27(%rbp),%eax
movzbl -0x1c(%rbp),%ecx
cmp    %ecx,%eax
je     1326 <main+0x1b6>
movzbl -0x27(%rbp),%esi
movzbl -0x1c(%rbp),%edx
lea    0xd9c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movb   $0x1,-0x28(%rbp)
jmp    132b <main+0x1bb>
cmpb   $0x0,-0x28(%rbp)
jne    13f2 <main+0x282>
movb   $0x0,-0x29(%rbp)
movzbl -0x29(%rbp),%eax
cmp    $0x20,%eax
jge    135c <main+0x1ec>
movzbl -0x29(%rbp),%eax
movb   $0xff,-0x20(%rbp,%rax,1)
mov    -0x29(%rbp),%al
add    $0x1,%al
mov    %al,-0x29(%rbp)
jmp    1339 <main+0x1c9>
lea    -0x20(%rbp),%rsi
xor    %edi,%edi
mov    $0x20,%edx
call   1080 <owBlock@plt>
lea    -0x26(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x20(%rbp),%rax
add    $0xa,%rax
mov    %rax,-0x40(%rbp)
movb   $0x0,-0x29(%rbp)
movzbl -0x29(%rbp),%eax
cmp    $0x6,%eax
jge    13c0 <main+0x250>
mov    -0x40(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x40(%rbp)
mov    (%rax),%cl
mov    -0x38(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x38(%rbp)
mov    %cl,(%rax)
mov    -0x29(%rbp),%al
add    $0x1,%al
mov    %al,-0x29(%rbp)
jmp    1384 <main+0x214>
movzbl -0x26(%rbp),%esi
movzbl -0x25(%rbp),%edx
movzbl -0x24(%rbp),%ecx
movzbl -0x23(%rbp),%r8d
movzbl -0x22(%rbp),%r9d
movzbl -0x21(%rbp),%eax
lea    0xcf8(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <owTouchReset@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xef4(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
call   10a0 <owTouchReset@plt>
test   %rax,%rax
je     11ae <main+0x2e>
lea    0xf45(%rip),%rdi
add    $0x20,%rsp
pop    %rbx
jmp    1060 <puts@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1050 <owFirst@plt>
test   %eax,%eax
je     12e4 <main+0x164>
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <owSerialNum@plt>
nopl   0x0(%rax)
cmpb   $0x89,(%rsp)
je     11e4 <main+0x64>
xor    %edi,%edi
xor    %esi,%esi
call   1080 <owNext@plt>
test   %rax,%rax
jne    11d0 <main+0x50>
xor    %eax,%eax
call   10a0 <owTouchReset@plt>
cmpb   $0x89,(%rsp)
jne    12f0 <main+0x170>
movzbl 0x1(%rsp),%edx
movzbl 0x2(%rsp),%ecx
movzbl 0x3(%rsp),%r8d
movzbl 0x4(%rsp),%r9d
movzbl 0x5(%rsp),%r10d
movzbl 0x6(%rsp),%r11d
movzbl 0x7(%rsp),%ebx
sub    $0x8,%rsp
lea    0xdd9(%rip),%rdi
mov    $0x89,%esi
xor    %eax,%eax
push   %rbx
push   %r11
push   %r10
call   1070 <printf@plt>
add    $0x20,%rsp
movl   $0xf0cc,(%rsp)
movb   $0xff,0x4(%rsp)
mov    %rsp,%rsi
xor    %edi,%edi
mov    $0x5,%edx
call   1090 <owBlock@plt>
movzbl 0x1(%rsp),%esi
xor    %edi,%edi
call   1040 <docrc8@plt>
movzbl 0x2(%rsp),%esi
movzbl %al,%edi
call   1040 <docrc8@plt>
movzbl 0x3(%rsp),%esi
movzbl %al,%edi
call   1040 <docrc8@plt>
movzbl 0x4(%rsp),%edx
cmp    %dl,%al
jne    12fe <main+0x17e>
pcmpeqd %xmm0,%xmm0
movdqa %xmm0,0x10(%rsp)
movdqa %xmm0,(%rsp)
mov    %rsp,%rsi
xor    %edi,%edi
mov    $0x20,%edx
call   1090 <owBlock@plt>
movzbl 0xa(%rsp),%esi
movzbl 0x9(%rsp),%edx
movzbl 0x8(%rsp),%ecx
movzbl 0x7(%rsp),%r8d
movzbl 0x6(%rsp),%r9d
movzbl 0x5(%rsp),%ebx
sub    $0x8,%rsp
lea    0xd8a(%rip),%rdi
xor    %eax,%eax
push   %rbx
call   1070 <printf@plt>
add    $0x10,%rsp
xor    %eax,%eax
call   10a0 <owTouchReset@plt>
jmp    130f <main+0x18f>
lea    0xdb6(%rip),%rdi
jmp    11a4 <main+0x24>
lea    0xdca(%rip),%rdi
call   1060 <puts@plt>
jmp    130f <main+0x18f>
movzbl %al,%esi
lea    0xd2f(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Probing internal one-wire bus...\0A\00"
@.str.1 = [20 x i8] c"No presence pulse.\0A\00"
@.str.2 = [33 x i8] c"Nothing on internal 1-wire bus.\0A\00"
@.str.3 = [41 x i8] c"No DS2502 found on internal 1-wire bus.\0A\00"
@.str.4 = [55 x i8] c"DS2502 located (ID %02x%02x%02x%02x%02x%02x%02x%02x).\0A\00"
@.str.5 = [34 x i8] c"read failed: bogus CRC: %x != %x\0A\00"
@.str.6 = [39 x i8] c"MAC address: %02x%02x%02x%02x%02x%02x\0A\00"
define void @main() {
%1 = alloca [32 x i8]
%2 = alloca [6 x i8]
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i8*
store i8 0, i8* %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%9 = call i64 (...) @owTouchReset()
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
store i8 1, i8* %4
br label %13
13: ; preds = %11, %0
%14 = load i8, i8* %4
%15 = icmp ne i8 %14, 0
br i1 %15, label %21, label %16
16: ; preds = %13
%17 = call i32 @owFirst(i32 0, i32 0)
%18 = icmp ne i32 %17, 0
br i1 %18, label %21, label %19
19: ; preds = %16
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
store i8 1, i8* %4
br label %21
21: ; preds = %19, %16, %13
%22 = load i8, i8* %4
%23 = icmp ne i8 %22, 0
br i1 %23, label %47, label %24
24: ; preds = %21
%25 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%26 = call i32 @owSerialNum(i8* %25, i32 1)
br label %27
27: ; preds = %37, %24
%28 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = icmp ne i32 %30, 137
br i1 %31, label %32, label %35
32: ; preds = %27
%33 = call i64 @owNext(i32 0, i32 0)
%34 = icmp ne i64 %33, 0
br label %35
35: ; preds = %32, %27
%36 = phi i1 [ false, %27 ], [ %34, %32 ]
br i1 %36, label %37, label %38
37: ; preds = %35
br label %27
38: ; preds = %35
%39 = call i64 (...) @owTouchReset()
%40 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = icmp ne i32 %42, 137
br i1 %43, label %44, label %46
44: ; preds = %38
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
store i8 1, i8* %4
br label %46
46: ; preds = %44, %38
br label %47
47: ; preds = %46, %21
%48 = load i8, i8* %4
%49 = icmp ne i8 %48, 0
br i1 %49, label %108, label %50
50: ; preds = %47
%51 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%52 = load i8, i8* %51
%53 = zext i8 %52 to i32
%54 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 1
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 2
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
%60 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 3
%61 = load i8, i8* %60
%62 = zext i8 %61 to i32
%63 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 4
%64 = load i8, i8* %63
%65 = zext i8 %64 to i32
%66 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 5
%67 = load i8, i8* %66
%68 = zext i8 %67 to i32
%69 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 6
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 7
%73 = load i8, i8* %72
%74 = zext i8 %73 to i32
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %53, i32 %56, i32 %59, i32 %62, i32 %65, i32 %68, i32 %71, i32 %74)
%76 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
store i8 -52, i8* %76
%77 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 1
store i8 -16, i8* %77
%78 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 2
store i8 0, i8* %78
%79 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 3
store i8 0, i8* %79
%80 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 4
store i8 -1, i8* %80
%81 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%82 = call i32 @owBlock(i32 0, i8* %81, i32 5)
%83 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 1
%84 = load i8, i8* %83
%85 = call zeroext i8 @docrc8(i8 zeroext 0, i8 zeroext %84)
store i8 %85, i8* %3
%86 = load i8, i8* %3
%87 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 2
%88 = load i8, i8* %87
%89 = call zeroext i8 @docrc8(i8 zeroext %86, i8 zeroext %88)
store i8 %89, i8* %3
%90 = load i8, i8* %3
%91 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 3
%92 = load i8, i8* %91
%93 = call zeroext i8 @docrc8(i8 zeroext %90, i8 zeroext %92)
store i8 %93, i8* %3
%94 = load i8, i8* %3
%95 = zext i8 %94 to i32
%96 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 4
%97 = load i8, i8* %96
%98 = zext i8 %97 to i32
%99 = icmp ne i32 %95, %98
br i1 %99, label %100, label %107
100: ; preds = %50
%101 = load i8, i8* %3
%102 = zext i8 %101 to i32
%103 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 4
%104 = load i8, i8* %103
%105 = zext i8 %104 to i32
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i32 %102, i32 %105)
store i8 1, i8* %4
br label %107
107: ; preds = %100, %50
br label %108
108: ; preds = %107, %47
%109 = load i8, i8* %4
%110 = icmp ne i8 %109, 0
br i1 %110, label %162, label %111
111: ; preds = %108
store i8 0, i8* %5
br label %112
112: ; preds = %120, %111
%113 = load i8, i8* %5
%114 = zext i8 %113 to i32
%115 = icmp slt i32 %114, 32
br i1 %115, label %116, label %123
116: ; preds = %112
%117 = load i8, i8* %5
%118 = zext i8 %117 to i64
%119 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 %118
store i8 -1, i8* %119
br label %120
120: ; preds = %116
%121 = load i8, i8* %5
%122 = add i8 %121, 1
store i8 %122, i8* %5
br label %112
123: ; preds = %112
%124 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%125 = call i32 @owBlock(i32 0, i8* %124, i32 32)
%126 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
store i8* %126, i8** %6
%127 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 10
store i8* %127, i8** %7
store i8 0, i8* %5
br label %128
128: ; preds = %138, %123
%129 = load i8, i8* %5
%130 = zext i8 %129 to i32
%131 = icmp slt i32 %130, 6
br i1 %131, label %132, label %141
132: ; preds = %128
%133 = load i8*, i8** %7
%134 = getelementptr inbounds i8, i8* %133, i32 -1
store i8* %134, i8** %7
%135 = load i8, i8* %133
%136 = load i8*, i8** %6
%137 = getelementptr inbounds i8, i8* %136, i32 1
store i8* %137, i8** %6
store i8 %135, i8* %136
br label %138
138: ; preds = %132
%139 = load i8, i8* %5
%140 = add i8 %139, 1
store i8 %140, i8* %5
br label %128
141: ; preds = %128
%142 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%143 = load i8, i8* %142
%144 = zext i8 %143 to i32
%145 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 1
%146 = load i8, i8* %145
%147 = zext i8 %146 to i32
%148 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 2
%149 = load i8, i8* %148
%150 = zext i8 %149 to i32
%151 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 3
%152 = load i8, i8* %151
%153 = zext i8 %152 to i32
%154 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 4
%155 = load i8, i8* %154
%156 = zext i8 %155 to i32
%157 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 5
%158 = load i8, i8* %157
%159 = zext i8 %158 to i32
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), i32 %144, i32 %147, i32 %150, i32 %153, i32 %156, i32 %159)
%161 = call i64 (...) @owTouchReset()
br label %162
162: ; preds = %141, %108
ret void
}

LLVM IR (-O2):
@.str.4 = [55 x i8] c"DS2502 located (ID %02x%02x%02x%02x%02x%02x%02x%02x).\0A\00"
@.str.5 = [34 x i8] c"read failed: bogus CRC: %x != %x\0A\00"
@.str.6 = [39 x i8] c"MAC address: %02x%02x%02x%02x%02x%02x\0A\00"
@str = [33 x i8] c"Probing internal one-wire bus...\00"
@str.7 = [32 x i8] c"Nothing on internal 1-wire bus.\00"
@str.8 = [40 x i8] c"No DS2502 found on internal 1-wire bus.\00"
@str.9 = [19 x i8] c"No presence pulse.\00"
define void @main() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%5 = tail call i64 (...) @owTouchReset()
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.9, i64 0, i64 0))
br label %88
9: ; preds = %0
%10 = tail call i32 @owFirst(i32 0, i32 0)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.7, i64 0, i64 0))
br label %88
14: ; preds = %9
%15 = call i32 @owSerialNum(i8* %3, i32 1)
%16 = load i8, i8* %3
%17 = icmp eq i8 %16, -119
br i1 %17, label %24, label %18
18: ; preds = %14, %18
%19 = call i64 @owNext(i32 0, i32 0)
%20 = icmp ne i64 %19, 0
%21 = load i8, i8* %3
%22 = icmp ne i8 %21, -119
%23 = select i1 %20, i1 %22, i1 false
br i1 %23, label %18, label %24
24: ; preds = %18, %14
%25 = call i64 (...) @owTouchReset()
%26 = load i8, i8* %3
%27 = icmp eq i8 %26, -119
br i1 %27, label %30, label %28
28: ; preds = %24
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.8, i64 0, i64 0))
br label %88
30: ; preds = %24
%31 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 1
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 2
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 3
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 4
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 5
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 6
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 7
%50 = load i8, i8* %49
%51 = zext i8 %50 to i32
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 137, i32 %33, i32 %36, i32 %39, i32 %42, i32 %45, i32 %48, i32 %51)
store i8 -52, i8* %3
store i8 -16, i8* %31
store i8 0, i8* %34
store i8 0, i8* %37
store i8 -1, i8* %40
%53 = call i32 @owBlock(i32 0, i8* %3, i32 5)
%54 = load i8, i8* %31
%55 = call zeroext i8 @docrc8(i8 zeroext 0, i8 zeroext %54)
%56 = load i8, i8* %34
%57 = call zeroext i8 @docrc8(i8 zeroext %55, i8 zeroext %56)
%58 = load i8, i8* %37
%59 = call zeroext i8 @docrc8(i8 zeroext %57, i8 zeroext %58)
%60 = load i8, i8* %40
%61 = icmp eq i8 %59, %60
br i1 %61, label %62, label %84
62: ; preds = %30
%63 = call i32 @owBlock(i32 0, i8* %3, i32 32)
%64 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 10
%65 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 9
%66 = load i8, i8* %64
%67 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 8
%68 = load i8, i8* %65
%69 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 7
%70 = load i8, i8* %67
%71 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 6
%72 = load i8, i8* %69
%73 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 5
%74 = load i8, i8* %71
%75 = load i8, i8* %73
%76 = zext i8 %66 to i32
%77 = zext i8 %68 to i32
%78 = zext i8 %70 to i32
%79 = zext i8 %72 to i32
%80 = zext i8 %74 to i32
%81 = zext i8 %75 to i32
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0), i32 %76, i32 %77, i32 %78, i32 %79, i32 %80, i32 %81)
%83 = call i64 (...) @owTouchReset()
br label %88
84: ; preds = %30
%85 = zext i8 %60 to i32
%86 = zext i8 %59 to i32
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i32 %86, i32 %85)
br label %88
88: ; preds = %7, %84, %12, %28, %62
ret void
}