#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 /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int confirm(const char *filename, int address, int size, int daddress,
            int pec) {
  char s[2];
  int dont = 0;
  fprintf(stderr, "WARNING! This program can confuse your I2C "
                  "bus, cause data loss and worse!\n");
  if (address >= 0x50 && address <= 0x57 && pec) {
    fprintf(stderr, "STOP! EEPROMs are I2C devices, not "
                    "SMBus devices. Using PEC\non I2C devices may "
                    "result in unexpected results, such as\n"
                    "trashing the contents of EEPROMs. We can't "
                    "let you do that, sorry.\n");
    return 0;
  }
  if (size == 1 && daddress >= 0 && pec) {
    fprintf(stderr, "WARNING! All I2C chips and some SMBus chips "
                    "will interpret a write\nbyte command with PEC as a"
                    "write byte data command, effectively writing a\n"
                    "value into a register!\n");
    dont++;
  }
  fprintf(stderr,
          "I will read from device file %s, chip "
          "address 0x%02x, ",
          filename, address);
  if (daddress < 0)
    fprintf(stderr, "current data\naddress");
  else
    fprintf(stderr, "data address\n0x%02x", daddress);
  fprintf(stderr, ", using %s.\n",
          size == 1   ? (daddress < 0 ? "read byte" : "write byte/read byte")
          : size == 2 ? "read byte data"
                      : "read word data");
  if (pec)
    fprintf(stderr, "PEC checking enabled.\n");
  fprintf(stderr, "Continue? [%s] ", dont ? "y/N" : "Y/n");
  fflush(stderr);
  fgets(s, 2, stdin);
  if ((s[0] != '\n' || dont) && s[0] != 'y' && s[0] != 'Y') {
    fprintf(stderr, "Aborting on user request.\n");
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<confirm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmpl   $0x50,-0x14(%rbp)
jl     11a8 <confirm+0x78>
cmpl   $0x57,-0x14(%rbp)
jg     11a8 <confirm+0x78>
cmpl   $0x0,-0x20(%rbp)
je     11a8 <confirm+0x78>
mov    0x2e4c(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    137c <confirm+0x24c>
cmpl   $0x1,-0x18(%rbp)
jne    11e6 <confirm+0xb6>
cmpl   $0x0,-0x1c(%rbp)
jl     11e6 <confirm+0xb6>
cmpl   $0x0,-0x20(%rbp)
je     11e6 <confirm+0xb6>
mov    0x2e0b(%rip),%rax
mov    (%rax),%edi
lea    0xf2f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    0x2deb(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xfac(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmpl   $0x0,-0x1c(%rbp)
jge    122a <confirm+0xfa>
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
lea    0xfc2(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1244 <confirm+0x114>
mov    0x2da7(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
lea    0xfb8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d8d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x1,-0x18(%rbp)
jne    127b <confirm+0x14b>
mov    -0x1c(%rbp),%edx
lea    0xfb2(%rip),%rax
lea    0xfb6(%rip),%rcx
cmp    $0x0,%edx
cmovl  %rcx,%rax
mov    %rax,-0x38(%rbp)
jmp    1297 <confirm+0x167>
mov    -0x18(%rbp),%edx
lea    0xfb5(%rip),%rax
lea    0xf9f(%rip),%rcx
cmp    $0x2,%edx
cmove  %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x38(%rbp),%rdx
lea    0xf64(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
cmpl   $0x0,-0x20(%rbp)
je     12cd <confirm+0x19d>
mov    0x2d1b(%rip),%rax
mov    (%rax),%edi
lea    0xf83(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%ecx
lea    0xf94(%rip),%rdx
lea    0xf89(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xf6b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2cd5(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
lea    -0x22(%rbp),%rdi
mov    0x2cd3(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%esi
call   1030 <fgets@plt>
movsbl -0x22(%rbp),%eax
cmp    $0xa,%eax
jne    1338 <confirm+0x208>
cmpl   $0x0,-0x28(%rbp)
je     1375 <confirm+0x245>
movsbl -0x22(%rbp),%eax
cmp    $0x79,%eax
je     1375 <confirm+0x245>
movsbl -0x22(%rbp),%eax
cmp    $0x59,%eax
je     1375 <confirm+0x245>
mov    0x2c7f(%rip),%rax
mov    (%rax),%edi
lea    0xf16(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    137c <confirm+0x24c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<confirm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %ecx,%ebx
mov    %edx,%r15d
mov    %esi,%ebp
mov    %rdi,%r12
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %ebp,%eax
and    $0xfffffff8,%eax
cmp    $0x50,%eax
jne    1183 <confirm+0x53>
test   %r14d,%r14d
je     1183 <confirm+0x53>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
lea    0xece(%rip),%rsi
jmp    12e1 <confirm+0x1b1>
test   %r14d,%r14d
setne  %al
cmp    $0x1,%r15d
sete   %cl
test   %ebx,%ebx
setns  %r13b
and    %cl,%r13b
and    %al,%r13b
mov    0x2e35(%rip),%rax
mov    (%rax),%edi
cmp    $0x1,%r13b
jne    11d7 <confirm+0xa7>
lea    0xf53(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x2e18(%rip),%rax
mov    (%rax),%edi
lea    0xfe0(%rip),%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    11ee <confirm+0xbe>
lea    0xfcb(%rip),%rsi
mov    %r12,%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %ebx,%ebx
js     1211 <confirm+0xe1>
mov    0x2de3(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xff6(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0x1007(%rip),%rax
jmp    1230 <confirm+0x100>
mov    0x2dc0(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xfbe(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xff1(%rip),%rax
cmp    $0x2,%r15d
lea    0xff0(%rip),%rcx
lea    0xff8(%rip),%rdx
cmove  %rcx,%rdx
cmp    $0x1,%r15d
mov    0x0(%rbp),%edi
cmove  %rax,%rdx
lea    0xfb1(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %r14d,%r14d
je     1275 <confirm+0x145>
mov    0x0(%rbp),%edi
lea    0xfdb(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
lea    0xff1(%rip),%rax
lea    0xfee(%rip),%rdx
test   %r13b,%r13b
cmovne %rax,%rdx
lea    0xfcc(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    0x0(%rbp),%edi
call   1050 <fflush@plt>
mov    0x2d3e(%rip),%rax
mov    (%rax),%edx
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
call   1030 <fgets@plt>
mov    0x6(%rsp),%cl
cmp    $0xa,%cl
setne  %al
and    $0xdf,%cl
mov    $0x1,%ebx
cmp    $0x59,%cl
je     12ea <confirm+0x1ba>
or     %al,%r13b
je     12ea <confirm+0x1ba>
mov    0x0(%rbp),%edi
lea    0xf97(%rip),%rsi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [76 x i8] c"WARNING! This program can confuse your I2C bus, cause data loss and worse!\0A\00"
@.str.1 = [185 x i8] c"STOP! EEPROMs are I2C devices, not SMBus devices. Using PEC\0Aon I2C devices may result in unexpected results, such as\0Atrashing the contents of EEPROMs. We can't let you do that, sorry.\0A\00"
@.str.2 = [164 x i8] c"WARNING! All I2C chips and some SMBus chips will interpret a write\0Abyte command with PEC as awrite byte data command, effectively writing a\0Avalue into a register!\0A\00"
@.str.3 = [55 x i8] c"I will read from device file %s, chip address 0x%02x, \00"
@.str.4 = [21 x i8] c"current data\0Aaddress\00"
@.str.5 = [20 x i8] c"data address\0A0x%02x\00"
@.str.6 = [13 x i8] c", using %s.\0A\00"
@.str.7 = [10 x i8] c"read byte\00"
@.str.8 = [21 x i8] c"write byte/read byte\00"
@.str.9 = [15 x i8] c"read byte data\00"
@.str.10 = [15 x i8] c"read word data\00"
@.str.11 = [23 x i8] c"PEC checking enabled.\0A\00"
@.str.12 = [16 x i8] c"Continue? [%s] \00"
@.str.13 = [4 x i8] c"y/N\00"
@.str.14 = [4 x i8] c"Y/n\00"
@stdin = global i32 0
@.str.15 = [27 x i8] c"Aborting on user request.\0A\00"
define i32 @confirm(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [2 x i8]
%13 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 0, i32* %13
%14 = load i32, i32* @stderr
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* %8
%17 = icmp sge i32 %16, 80
br i1 %17, label %18, label %27
18: ; preds = %5
%19 = load i32, i32* %8
%20 = icmp sle i32 %19, 87
br i1 %20, label %21, label %27
21: ; preds = %18
%22 = load i32, i32* %11
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load i32, i32* @stderr
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %6
br label %110
27: ; preds = %21, %18, %5
%28 = load i32, i32* %9
%29 = icmp eq i32 %28, 1
br i1 %29, label %30, label %41
30: ; preds = %27
%31 = load i32, i32* %10
%32 = icmp sge i32 %31, 0
br i1 %32, label %33, label %41
33: ; preds = %30
%34 = load i32, i32* %11
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %41
36: ; preds = %33
%37 = load i32, i32* @stderr
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.2, i64 0, i64 0))
%39 = load i32, i32* %13
%40 = add nsw i32 %39, 1
store i32 %40, i32* %13
br label %41
41: ; preds = %36, %33, %30, %27
%42 = load i32, i32* @stderr
%43 = load i8*, i8** %7
%44 = load i32, i32* %8
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i8* %43, i32 %44)
%46 = load i32, i32* %10
%47 = icmp slt i32 %46, 0
br i1 %47, label %48, label %51
48: ; preds = %41
%49 = load i32, i32* @stderr
%50 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %55
51: ; preds = %41
%52 = load i32, i32* @stderr
%53 = load i32, i32* %10
%54 = call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %53)
br label %55
55: ; preds = %51, %48
%56 = load i32, i32* @stderr
%57 = load i32, i32* %9
%58 = icmp eq i32 %57, 1
br i1 %58, label %59, label %64
59: ; preds = %55
%60 = load i32, i32* %10
%61 = icmp slt i32 %60, 0
%62 = zext i1 %61 to i64
%63 = select i1 %61, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0)
br label %69
64: ; preds = %55
%65 = load i32, i32* %9
%66 = icmp eq i32 %65, 2
%67 = zext i1 %66 to i64
%68 = select i1 %66, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0)
br label %69
69: ; preds = %64, %59
%70 = phi i8* [ %63, %59 ], [ %68, %64 ]
%71 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* %70)
%72 = load i32, i32* %11
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %77
74: ; preds = %69
%75 = load i32, i32* @stderr
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0))
br label %77
77: ; preds = %74, %69
%78 = load i32, i32* @stderr
%79 = load i32, i32* %13
%80 = icmp ne i32 %79, 0
%81 = zext i1 %80 to i64
%82 = select i1 %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0)
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %78, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i8* %82)
%84 = load i32, i32* @stderr
%85 = call i32 @fflush(i32 %84)
%86 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 0
%87 = load i32, i32* @stdin
%88 = call i32 @fgets(i8* %86, i32 2, i32 %87)
%89 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 0
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = icmp ne i32 %91, 10
br i1 %92, label %96, label %93
93: ; preds = %77
%94 = load i32, i32* %13
%95 = icmp ne i32 %94, 0
br i1 %95, label %96, label %109
96: ; preds = %93, %77
%97 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 0
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
%100 = icmp ne i32 %99, 121
br i1 %100, label %101, label %109
101: ; preds = %96
%102 = getelementptr inbounds [2 x i8], [2 x i8]* %12, i64 0, i64 0
%103 = load i8, i8* %102
%104 = sext i8 %103 to i32
%105 = icmp ne i32 %104, 89
br i1 %105, label %106, label %109
106: ; preds = %101
%107 = load i32, i32* @stderr
%108 = call i32 (i32, i8*, ...) @fprintf(i32 %107, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0))
store i32 0, i32* %6
br label %110
109: ; preds = %101, %96, %93
store i32 1, i32* %6
br label %110
110: ; preds = %109, %106, %24
%111 = load i32, i32* %6
ret i32 %111
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [76 x i8] c"WARNING! This program can confuse your I2C bus, cause data loss and worse!\0A\00"
@.str.1 = [185 x i8] c"STOP! EEPROMs are I2C devices, not SMBus devices. Using PEC\0Aon I2C devices may result in unexpected results, such as\0Atrashing the contents of EEPROMs. We can't let you do that, sorry.\0A\00"
@.str.2 = [164 x i8] c"WARNING! All I2C chips and some SMBus chips will interpret a write\0Abyte command with PEC as awrite byte data command, effectively writing a\0Avalue into a register!\0A\00"
@.str.3 = [55 x i8] c"I will read from device file %s, chip address 0x%02x, \00"
@.str.4 = [21 x i8] c"current data\0Aaddress\00"
@.str.5 = [20 x i8] c"data address\0A0x%02x\00"
@.str.6 = [13 x i8] c", using %s.\0A\00"
@.str.7 = [10 x i8] c"read byte\00"
@.str.8 = [21 x i8] c"write byte/read byte\00"
@.str.9 = [15 x i8] c"read byte data\00"
@.str.10 = [15 x i8] c"read word data\00"
@.str.11 = [23 x i8] c"PEC checking enabled.\0A\00"
@.str.12 = [16 x i8] c"Continue? [%s] \00"
@.str.13 = [4 x i8] c"y/N\00"
@.str.14 = [4 x i8] c"Y/n\00"
@stdin = global i32 0
@.str.15 = [27 x i8] c"Aborting on user request.\0A\00"
define i32 @confirm(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca [2 x i8]
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%10 = and i32 %1, -8
%11 = icmp eq i32 %10, 80
%12 = icmp ne i32 %4, 0
%13 = and i1 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %5
%15 = load i32, i32* @stderr
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
br label %63
17: ; preds = %5
%18 = icmp eq i32 %2, 1
%19 = icmp sgt i32 %3, -1
%20 = and i1 %18, %19
%21 = and i1 %20, %12
%22 = load i32, i32* @stderr
br i1 %21, label %23, label %27
23: ; preds = %17
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.2, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = tail call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i8* %0, i32 %1)
br label %33
27: ; preds = %17
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i8* %0, i32 %1)
%29 = icmp slt i32 %3, 0
br i1 %29, label %30, label %33
30: ; preds = %27
%31 = load i32, i32* @stderr
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %36
33: ; preds = %23, %27
%34 = load i32, i32* @stderr
%35 = tail call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 %3)
br label %36
36: ; preds = %33, %30
%37 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0), %33 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), %30 ]
%38 = load i32, i32* @stderr
%39 = icmp eq i32 %2, 2
%40 = select i1 %39, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0)
%41 = select i1 %18, i8* %37, i8* %40
%42 = tail call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* %41)
br i1 %12, label %43, label %46
43: ; preds = %36
%44 = load i32, i32* @stderr
%45 = tail call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0))
br label %46
46: ; preds = %43, %36
%47 = load i32, i32* @stderr
%48 = select i1 %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0)
%49 = tail call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i8* %48)
%50 = load i32, i32* @stderr
%51 = tail call i32 @fflush(i32 %50)
%52 = load i32, i32* @stdin
%53 = call i32 @fgets(i8* %7, i32 2, i32 %52)
%54 = load i8, i8* %7
%55 = icmp ne i8 %54, 10
%56 = or i1 %21, %55
%57 = and i8 %54, -33
%58 = icmp ne i8 %57, 89
%59 = and i1 %58, %56
br i1 %59, label %60, label %63
60: ; preds = %46
%61 = load i32, i32* @stderr
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0))
br label %63
63: ; preds = %46, %60, %14
%64 = phi i32 [ 0, %14 ], [ 0, %60 ], [ 1, %46 ]
ret i32 %64
}