#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 */
scalar_t__ atoi(char *);
int bs(int *, int, int);
int /*<<< orphan*/ gen_array(int *, int, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  srand(time(NULL));
  int x;
  if (argc != 2)
    x = rand() % 0x100;
  else
    x = ((unsigned int)atoi(argv[1])) % 30;
  printf("x=%02x\n", x);
  int array[30];
  gen_array(array, 30, 0, 0x100);
  for (int i = 0; i < 30; i++)
    printf("%02x ", array[i]);
  printf("\n");
  int k = bs(array, 30, x);
  for (int i = 0; i < k; i++)
    printf("   ");
  printf("^\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
cmpl   $0x2,-0x8(%rbp)
je     11ba <main+0x4a>
mov    $0x0,%al
call   1090 <rand@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
jmp    11d3 <main+0x63>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    $0x1e,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0x1e,%esi
xor    %edx,%edx
mov    $0x100,%ecx
call   1070 <gen_array@plt>
movl   $0x0,-0x94(%rbp)
cmpl   $0x1e,-0x94(%rbp)
jge    1243 <main+0xd3>
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%esi
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1206 <main+0x96>
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x1e,%esi
call   1030 <bs@plt>
mov    %eax,-0x98(%rbp)
movl   $0x0,-0x9c(%rbp)
mov    -0x9c(%rbp),%eax
cmp    -0x98(%rbp),%eax
jge    12a9 <main+0x139>
lea    0xd80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c(%rbp)
jmp    1275 <main+0x105>
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x78,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
cmp    $0x2,%ebp
jne    11dd <main+0x4d>
mov    0x8(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %eax,%ecx
mov    $0x88888889,%edx
imul   %rcx,%rdx
shr    $0x24,%rdx
mov    %edx,%ecx
shl    $0x5,%ecx
mov    %edx,%r15d
sub    %ecx,%r15d
add    %edx,%r15d
add    %eax,%r15d
jmp    11fd <main+0x6d>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %eax,%r15d
lea    0xff(%r15),%eax
test   %r15d,%r15d
cmovns %r15d,%eax
and    $0xffffff00,%eax
sub    %eax,%r15d
lea    0xdfc(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x1e,%esi
xor    %edx,%edx
mov    $0x100,%ecx
call   1090 <gen_array@plt>
mov    (%rsp),%esi
lea    0xdd9(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x24(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x28(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x30(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x34(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x38(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x3c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x40(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x44(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x48(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x4c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x50(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x54(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x58(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x5c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x60(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x64(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x68(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x6c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x70(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x74(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    $0x1e,%esi
mov    %r15d,%edx
call   1050 <bs@plt>
test   %eax,%eax
jle    140f <main+0x27f>
mov    %eax,%ebx
lea    0xc18(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0xffffffff,%ebx
jne    1400 <main+0x270>
lea    0xbfc(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"x=%02x\0A\00"
@.str.1 = [6 x i8] c"%02x \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [4 x i8] c" \00"
@.str.4 = [3 x i8] c"^\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [30 x i32]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32 @time(i32* null)
%12 = call i32 @srand(i32 %11)
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 2
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = call i32 (...) @rand()
%17 = srem i32 %16, 256
store i32 %17, i32* %6
br label %25
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i64 @atoi(i8* %21)
%23 = trunc i64 %22 to i32
%24 = urem i32 %23, 30
store i32 %24, i32* %6
br label %25
25: ; preds = %18, %15
%26 = load i32, i32* %6
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %26)
%28 = getelementptr inbounds [30 x i32], [30 x i32]* %7, i64 0, i64 0
%29 = call i32 @gen_array(i32* %28, i32 30, i32 0, i32 256)
store i32 0, i32* %8
br label %30
30: ; preds = %39, %25
%31 = load i32, i32* %8
%32 = icmp slt i32 %31, 30
br i1 %32, label %33, label %42
33: ; preds = %30
%34 = load i32, i32* %8
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [30 x i32], [30 x i32]* %7, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %37)
br label %39
39: ; preds = %33
%40 = load i32, i32* %8
%41 = add nsw i32 %40, 1
store i32 %41, i32* %8
br label %30
42: ; preds = %30
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%44 = getelementptr inbounds [30 x i32], [30 x i32]* %7, i64 0, i64 0
%45 = load i32, i32* %6
%46 = call i32 @bs(i32* %44, i32 30, i32 %45)
store i32 %46, i32* %9
store i32 0, i32* %10
br label %47
47: ; preds = %53, %42
%48 = load i32, i32* %10
%49 = load i32, i32* %9
%50 = icmp slt i32 %48, %49
br i1 %50, label %51, label %56
51: ; preds = %47
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %53
53: ; preds = %51
%54 = load i32, i32* %10
%55 = add nsw i32 %54, 1
store i32 %55, i32* %10
br label %47
56: ; preds = %47
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%58 = load i32, i32* %3
ret i32 %58
}

LLVM IR (-O2):
@.str = [8 x i8] c"x=%02x\0A\00"
@.str.1 = [6 x i8] c"%02x \00"
@.str.3 = [4 x i8] c" \00"
@str = [2 x i8] c"^\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [30 x i32]
%4 = tail call i32 @time(i32* null)
%5 = tail call i32 @srand(i32 %4)
%6 = icmp eq i32 %0, 2
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = tail call i32 (...) @rand()
%9 = srem i32 %8, 256
br label %16
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i64 @atoi(i8* %12)
%14 = trunc i64 %13 to i32
%15 = urem i32 %14, 30
br label %16
16: ; preds = %10, %7
%17 = phi i32 [ %9, %7 ], [ %15, %10 ]
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = bitcast [30 x i32]* %3 to i8*
%20 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 0
%21 = call i32 @gen_array(i32* %20, i32 30, i32 0, i32 256)
%22 = load i32, i32* %20
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 1
%25 = load i32, i32* %24
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 2
%28 = load i32, i32* %27
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 3
%31 = load i32, i32* %30
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 4
%34 = load i32, i32* %33
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 5
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 6
%40 = load i32, i32* %39
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %40)
%42 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 7
%43 = load i32, i32* %42
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %43)
%45 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 8
%46 = load i32, i32* %45
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %46)
%48 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 9
%49 = load i32, i32* %48
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %49)
%51 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 10
%52 = load i32, i32* %51
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %52)
%54 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 11
%55 = load i32, i32* %54
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %55)
%57 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 12
%58 = load i32, i32* %57
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %58)
%60 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 13
%61 = load i32, i32* %60
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %61)
%63 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 14
%64 = load i32, i32* %63
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %64)
%66 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 15
%67 = load i32, i32* %66
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %67)
%69 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 16
%70 = load i32, i32* %69
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %70)
%72 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 17
%73 = load i32, i32* %72
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %73)
%75 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 18
%76 = load i32, i32* %75
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %76)
%78 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 19
%79 = load i32, i32* %78
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %79)
%81 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 20
%82 = load i32, i32* %81
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %82)
%84 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 21
%85 = load i32, i32* %84
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %85)
%87 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 22
%88 = load i32, i32* %87
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %88)
%90 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 23
%91 = load i32, i32* %90
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %91)
%93 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 24
%94 = load i32, i32* %93
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %94)
%96 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 25
%97 = load i32, i32* %96
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %97)
%99 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 26
%100 = load i32, i32* %99
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %100)
%102 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 27
%103 = load i32, i32* %102
%104 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %103)
%105 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 28
%106 = load i32, i32* %105
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %106)
%108 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 29
%109 = load i32, i32* %108
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %109)
%111 = call i32 @putchar(i32 10)
%112 = call i32 @bs(i32* %20, i32 30, i32 %17)
%113 = icmp sgt i32 %112, 0
br i1 %113, label %116, label %114
114: ; preds = %116, %16
%115 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
116: ; preds = %16, %116
%117 = phi i32 [ %119, %116 ], [ 0, %16 ]
%118 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%119 = add nuw nsw i32 %117, 1
%120 = icmp eq i32 %119, %112
br i1 %120, label %114, label %116
}