#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*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  int guess_count = 0, upper_threshold = 0, lower_threshold = 0, high_score = 0,
      answer = 0;
  int location = 1, active = 1;
  while (active != 0) {
    switch (location) {
    case 1:
      printf("GUESS A VALUE BETWEEN 0 AND 255\n");
      int play_again = 1;
      int guess = 0;
      guess_count = 0;
      upper_threshold = 0;
      lower_threshold = 0;
      srand(time(NULL));
      answer = rand() % 256;
      location = 2;
      break;
    case 2:
      scanf("%d", &guess);
      if (guess == answer) {
        printf("CORRECT. IT TOOK YOU %d ATTEMPTS\n", guess_count);
        if (high_score == 0) {
          high_score = guess_count;
        } else if (high_score > guess_count) {
          printf("< < NEW HIGH SCORE > >\n");
          high_score = guess_count;
        }
        printf("HIGH SCORE :: %d\n", high_score);
        printf("PLAY AGAIN? (0 = N/1 = Y)\n");
        scanf("%d", &play_again);
        if (play_again == 1) {
          location = 1;
          break;
        } else if (play_again == 0) {
          active = 0;
          return 1;
        } else {
          printf("INVALID RESPONSE.\n");
          active = 0;
          return 1;
        }
      } else {
        if (guess > answer) {
          if ((guess - answer) >= upper_threshold) {
            if (upper_threshold != 0) {
              printf("ANSWER IS NOT HIGHER THAN %d\n",
                     (answer + upper_threshold));
            } else {
              upper_threshold = (guess - answer);
            }
          } else {
            upper_threshold = (guess - answer);
          }
          printf("TOO HIGH. GUESS AGAIN.\n");
          guess_count++;
        } else if (guess < answer) {
          if ((answer - guess) >= lower_threshold) {
            if (lower_threshold != 0) {
              printf("ANSWER IS NOT LOWER THAN %d\n",
                     (answer - lower_threshold));
            } else {
              lower_threshold = (answer - guess);
            }
          } else {
            lower_threshold = (answer - guess);
          }
          printf("TOO LOW. GUESS AGAIN.\n");
          guess_count++;
        }
      }
    default:
      break;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x1,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1405 <main+0x2b5>
mov    -0x28(%rbp),%eax
mov    %eax,-0x38(%rbp)
sub    $0x1,%eax
je     11c6 <main+0x76>
jmp    11b5 <main+0x65>
mov    -0x38(%rbp),%eax
sub    $0x2,%eax
je     1225 <main+0xd5>
jmp    13fb <main+0x2ab>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1070 <rand@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %edx,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
jmp    1400 <main+0x2b0>
lea    0xdf5(%rip),%rdi
lea    -0x34(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    130f <main+0x1bf>
mov    -0x14(%rbp),%esi
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x20(%rbp)
jne    1267 <main+0x117>
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    128c <main+0x13c>
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1287 <main+0x137>
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    128c <main+0x13c>
mov    -0x20(%rbp),%esi
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd6f(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1060 <scanf@plt>
cmpl   $0x1,-0x30(%rbp)
jne    12d1 <main+0x181>
movl   $0x1,-0x28(%rbp)
jmp    1400 <main+0x2b0>
cmpl   $0x0,-0x30(%rbp)
jne    12ee <main+0x19e>
movl   $0x0,-0x2c(%rbp)
movl   $0x1,-0x4(%rbp)
jmp    1405 <main+0x2b5>
lea    0xd96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x2c(%rbp)
movl   $0x1,-0x4(%rbp)
jmp    1405 <main+0x2b5>
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jle    1380 <main+0x230>
mov    -0x34(%rbp),%eax
sub    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
jl     135b <main+0x20b>
cmpl   $0x0,-0x18(%rbp)
je     134d <main+0x1fd>
mov    -0x24(%rbp),%esi
add    -0x18(%rbp),%esi
lea    0xd5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1356 <main+0x206>
mov    -0x34(%rbp),%eax
sub    -0x24(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1364 <main+0x214>
mov    -0x34(%rbp),%eax
sub    -0x24(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    0xd51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13f1 <main+0x2a1>
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    13ec <main+0x29c>
mov    -0x24(%rbp),%eax
sub    -0x34(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jl     13cc <main+0x27c>
cmpl   $0x0,-0x1c(%rbp)
je     13be <main+0x26e>
mov    -0x24(%rbp),%esi
sub    -0x1c(%rbp),%esi
lea    0xd22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13c7 <main+0x277>
mov    -0x24(%rbp),%eax
sub    -0x34(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    13d5 <main+0x285>
mov    -0x24(%rbp),%eax
sub    -0x34(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    0xd15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13f1 <main+0x2a1>
jmp    13f6 <main+0x2a6>
jmp    13fb <main+0x2ab>
jmp    1400 <main+0x2b0>
jmp    1197 <main+0x47>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    $0x1,%eax
lea    0xe86(%rip),%rbx
xor    %r14d,%r14d
xor    %r12d,%r12d
jmp    11e0 <main+0x80>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xf4b(%rip),%rdi
call   1030 <puts@plt>
movl   $0x1,0xc(%rsp)
movl   $0x0,0x8(%rsp)
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1080 <rand@plt>
mov    %eax,%r12d
lea    0xff(%r12),%eax
test   %r12d,%r12d
cmovns %r12d,%eax
and    $0xffffff00,%eax
sub    %eax,%r12d
mov    $0x2,%eax
xor    %ebp,%ebp
xor    %ecx,%ecx
mov    %rcx,0x10(%rsp)
movl   $0x0,0x4(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0x2,%eax
je     120c <main+0xac>
cmp    $0x1,%eax
jne    1200 <main+0xa0>
jmp    1190 <main+0x30>
mov    %rbx,%r15
mov    %rbx,%rdi
lea    0x8(%rsp),%rsi
call   1070 <scanf@plt>
mov    0x8(%rsp),%eax
mov    %eax,%ebx
sub    %r12d,%ebx
jne    1298 <main+0x138>
lea    0xdd5(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%r13d
test   %r14d,%r14d
je     1256 <main+0xf6>
mov    %r14d,%r13d
cmp    %ebp,%r14d
jle    1256 <main+0xf6>
lea    0xe7d(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%r13d
lea    0xdc8(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe31(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rbx
mov    %r15,%rdi
lea    0xc(%rsp),%rsi
call   1070 <scanf@plt>
mov    0xc(%rsp),%eax
mov    %r13d,%r14d
cmp    $0x1,%eax
je     1200 <main+0xa0>
jmp    132e <main+0x1ce>
mov    %r12d,%r13d
sub    %eax,%r13d
jl     12e9 <main+0x189>
mov    0x4(%rsp),%eax
test   %eax,%eax
je     12c8 <main+0x168>
cmp    %eax,%r13d
mov    %r15,%rbx
jl     12cb <main+0x16b>
mov    %r12d,%esi
sub    %eax,%esi
lea    0xd99(%rip),%rdi
mov    %eax,%r13d
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12cb <main+0x16b>
mov    %r15,%rbx
lea    0xda0(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebp
mov    $0x2,%eax
mov    %r13d,0x4(%rsp)
jmp    1200 <main+0xa0>
mov    0x10(%rsp),%rax
test   %eax,%eax
je     130b <main+0x1ab>
cmp    %eax,%ebx
jl     130b <main+0x1ab>
lea    (%r12,%rax,1),%esi
lea    0xd36(%rip),%rdi
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd76(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebp
mov    $0x2,%eax
mov    %ebx,%ecx
mov    %rcx,0x10(%rsp)
mov    %r15,%rbx
jmp    1200 <main+0xa0>
test   %eax,%eax
je     133e <main+0x1de>
lea    0xd80(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"GUESS A VALUE BETWEEN 0 AND 255\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [34 x i8] c"CORRECT. IT TOOK YOU %d ATTEMPTS\0A\00"
@.str.3 = [24 x i8] c"< < NEW HIGH SCORE > >\0A\00"
@.str.4 = [18 x i8] c"HIGH SCORE :: %d\0A\00"
@.str.5 = [27 x i8] c"PLAY AGAIN? (0 = N/1 = Y)\0A\00"
@.str.6 = [19 x i8] c"INVALID RESPONSE.\0A\00"
@.str.7 = [30 x i8] c"ANSWER IS NOT HIGHER THAN %d\0A\00"
@.str.8 = [24 x i8] c"TOO HIGH. GUESS AGAIN.\0A\00"
@.str.9 = [29 x i8] c"ANSWER IS NOT LOWER THAN %d\0A\00"
@.str.10 = [23 x i8] c"TOO LOW. GUESS AGAIN.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 1, i32* %11
store i32 1, i32* %12
br label %15
15: ; preds = %126, %2
%16 = load i32, i32* %12
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %127
18: ; preds = %15
%19 = load i32, i32* %11
switch i32 %19, label %125 [
i32 1, label %20
i32 2, label %26
]
20: ; preds = %18
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %13
store i32 0, i32* %14
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
%22 = call i32 @time(i32* null)
%23 = call i32 @srand(i32 %22)
%24 = call i32 (...) @rand()
%25 = srem i32 %24, 256
store i32 %25, i32* %10
store i32 2, i32* %11
br label %126
26: ; preds = %18
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %14)
%28 = load i32, i32* %14
%29 = load i32, i32* %10
%30 = icmp eq i32 %28, %29
br i1 %30, label %31, label %60
31: ; preds = %26
%32 = load i32, i32* %6
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %32)
%34 = load i32, i32* %9
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %31
%37 = load i32, i32* %6
store i32 %37, i32* %9
br label %46
38: ; preds = %31
%39 = load i32, i32* %9
%40 = load i32, i32* %6
%41 = icmp sgt i32 %39, %40
br i1 %41, label %42, label %45
42: ; preds = %38
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%44 = load i32, i32* %6
store i32 %44, i32* %9
br label %45
45: ; preds = %42, %38
br label %46
46: ; preds = %45, %36
%47 = load i32, i32* %9
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %47)
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%50 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %13)
%51 = load i32, i32* %13
%52 = icmp eq i32 %51, 1
br i1 %52, label %53, label %54
53: ; preds = %46
store i32 1, i32* %11
br label %126
54: ; preds = %46
%55 = load i32, i32* %13
%56 = icmp eq i32 %55, 0
br i1 %56, label %57, label %58
57: ; preds = %54
store i32 0, i32* %12
store i32 1, i32* %3
br label %127
58: ; preds = %54
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %12
store i32 1, i32* %3
br label %127
60: ; preds = %26
%61 = load i32, i32* %14
%62 = load i32, i32* %10
%63 = icmp sgt i32 %61, %62
br i1 %63, label %64, label %91
64: ; preds = %60
%65 = load i32, i32* %14
%66 = load i32, i32* %10
%67 = sub nsw i32 %65, %66
%68 = load i32, i32* %7
%69 = icmp sge i32 %67, %68
br i1 %69, label %70, label %83
70: ; preds = %64
%71 = load i32, i32* %7
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %78
73: ; preds = %70
%74 = load i32, i32* %10
%75 = load i32, i32* %7
%76 = add nsw i32 %74, %75
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %76)
br label %82
78: ; preds = %70
%79 = load i32, i32* %14
%80 = load i32, i32* %10
%81 = sub nsw i32 %79, %80
store i32 %81, i32* %7
br label %82
82: ; preds = %78, %73
br label %87
83: ; preds = %64
%84 = load i32, i32* %14
%85 = load i32, i32* %10
%86 = sub nsw i32 %84, %85
store i32 %86, i32* %7
br label %87
87: ; preds = %83, %82
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%89 = load i32, i32* %6
%90 = add nsw i32 %89, 1
store i32 %90, i32* %6
br label %123
91: ; preds = %60
%92 = load i32, i32* %14
%93 = load i32, i32* %10
%94 = icmp slt i32 %92, %93
br i1 %94, label %95, label %122
95: ; preds = %91
%96 = load i32, i32* %10
%97 = load i32, i32* %14
%98 = sub nsw i32 %96, %97
%99 = load i32, i32* %8
%100 = icmp sge i32 %98, %99
br i1 %100, label %101, label %114
101: ; preds = %95
%102 = load i32, i32* %8
%103 = icmp ne i32 %102, 0
br i1 %103, label %104, label %109
104: ; preds = %101
%105 = load i32, i32* %10
%106 = load i32, i32* %8
%107 = sub nsw i32 %105, %106
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i32 %107)
br label %113
109: ; preds = %101
%110 = load i32, i32* %10
%111 = load i32, i32* %14
%112 = sub nsw i32 %110, %111
store i32 %112, i32* %8
br label %113
113: ; preds = %109, %104
br label %118
114: ; preds = %95
%115 = load i32, i32* %10
%116 = load i32, i32* %14
%117 = sub nsw i32 %115, %116
store i32 %117, i32* %8
br label %118
118: ; preds = %114, %113
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
%120 = load i32, i32* %6
%121 = add nsw i32 %120, 1
store i32 %121, i32* %6
br label %122
122: ; preds = %118, %91
br label %123
123: ; preds = %122, %87
br label %124
124: ; preds = %123
br label %125
125: ; preds = %18, %124
br label %126
126: ; preds = %125, %53, %20
br label %15
127: ; preds = %57, %58, %15
%128 = load i32, i32* %3
ret i32 %128
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [34 x i8] c"CORRECT. IT TOOK YOU %d ATTEMPTS\0A\00"
@.str.4 = [18 x i8] c"HIGH SCORE :: %d\0A\00"
@.str.7 = [30 x i8] c"ANSWER IS NOT HIGHER THAN %d\0A\00"
@.str.9 = [29 x i8] c"ANSWER IS NOT LOWER THAN %d\0A\00"
@str = [22 x i8] c"TOO LOW. GUESS AGAIN.\00"
@str.11 = [23 x i8] c"TOO HIGH. GUESS AGAIN.\00"
@str.12 = [26 x i8] c"PLAY AGAIN? (0 = N/1 = Y)\00"
@str.13 = [18 x i8] c"INVALID RESPONSE.\00"
@str.14 = [23 x i8] c"< < NEW HIGH SCORE > >\00"
@str.15 = [32 x i8] c"GUESS A VALUE BETWEEN 0 AND 255\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
br label %5
5: ; preds = %24, %2
%6 = phi i32 [ %21, %24 ], [ 0, %2 ]
%7 = phi i32 [ %29, %24 ], [ 0, %2 ]
%8 = phi i32 [ 2, %24 ], [ 1, %2 ]
br label %9
9: ; preds = %5, %59
%10 = phi i32 [ %62, %59 ], [ 0, %5 ]
%11 = phi i32 [ %60, %59 ], [ 0, %5 ]
%12 = phi i32 [ %17, %59 ], [ 0, %5 ]
%13 = phi i32 [ %21, %59 ], [ %6, %5 ]
%14 = phi i32 [ 2, %59 ], [ %8, %5 ]
br label %15
15: ; preds = %9, %71
%16 = phi i32 [ %74, %71 ], [ %10, %9 ]
%17 = phi i32 [ %72, %71 ], [ %12, %9 ]
%18 = phi i32 [ %21, %71 ], [ %13, %9 ]
%19 = phi i32 [ 2, %71 ], [ %14, %9 ]
br label %20
20: ; preds = %15, %41
%21 = phi i32 [ %18, %15 ], [ %42, %41 ]
%22 = phi i32 [ %19, %15 ], [ %46, %41 ]
br label %23
23: ; preds = %20, %23
switch i32 %22, label %23 [
i32 1, label %24
i32 2, label %30
]
24: ; preds = %23
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.15, i64 0, i64 0))
store i32 1, i32* %3
store i32 0, i32* %4
%26 = call i32 @time(i32* null)
%27 = call i32 @srand(i32 %26)
%28 = call i32 (...) @rand()
%29 = srem i32 %28, 256
br label %5
30: ; preds = %23
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%32 = load i32, i32* %4
%33 = icmp eq i32 %32, %7
br i1 %33, label %34, label %49
34: ; preds = %30
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%36 = icmp eq i32 %21, 0
br i1 %36, label %41, label %37
37: ; preds = %34
%38 = icmp sgt i32 %21, %16
br i1 %38, label %39, label %41
39: ; preds = %37
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.14, i64 0, i64 0))
br label %41
41: ; preds = %34, %37, %39
%42 = phi i32 [ %16, %39 ], [ %21, %37 ], [ %16, %34 ]
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 %42)
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.12, i64 0, i64 0))
%45 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%46 = load i32, i32* %3
switch i32 %46, label %47 [
i32 1, label %20
i32 0, label %75
]
47: ; preds = %41
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.13, i64 0, i64 0))
br label %75
49: ; preds = %30
%50 = icmp slt i32 %7, %32
br i1 %50, label %51, label %63
51: ; preds = %49
%52 = sub nsw i32 %32, %7
%53 = icmp slt i32 %52, %11
%54 = icmp eq i32 %11, 0
%55 = or i1 %54, %53
br i1 %55, label %59, label %56
56: ; preds = %51
%57 = add nsw i32 %7, %11
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %57)
br label %59
59: ; preds = %51, %56
%60 = phi i32 [ %11, %56 ], [ %52, %51 ]
%61 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.11, i64 0, i64 0))
%62 = add nsw i32 %16, 1
br label %9
63: ; preds = %49
%64 = sub nsw i32 %7, %32
%65 = icmp slt i32 %64, %17
%66 = icmp eq i32 %17, 0
%67 = or i1 %66, %65
br i1 %67, label %71, label %68
68: ; preds = %63
%69 = sub nsw i32 %7, %17
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i32 %69)
br label %71
71: ; preds = %63, %68
%72 = phi i32 [ %17, %68 ], [ %64, %63 ]
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%74 = add nsw i32 %16, 1
br label %15
75: ; preds = %41, %47
ret i32 1
}