#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 generaterandomfunc(int);
int greater(char, char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int playerscore = 0, compscore = 0, temp;
  char playerchar, compchar;
  char dict[45] = {'r', 'p', 's'};
  printf("welcome to the rock paper scissor game\n");
  for (int i = 0; i < 3; i++) {
    printf("choose 1 for rock choose 2 for paper choose 3 for scissor \n");
    printf("player no.1 turn \n");
    scanf("%d", &temp);
    playerchar = dict[temp - 1];
    printf("you choose  %c\n", playerchar);
    printf("choose 1 for rock choose 2 for paper choose 3 for scissor \n");
    printf("player no.1 turn \n");
    temp = generaterandomfunc(3) + 1;
    compchar = dict[temp - 1];
    printf("cpu choose  %c\n", compchar);
    if (greater(compchar, playerchar) == 1) {
      compscore += 1;
      printf("cpu got it hurray\n");
    } else if (greater(compchar, playerchar) == -1) {
      compscore += 1;
      playerscore += 1;
      printf("its a draw \n");
    } else {
      playerscore += 1;
      printf("you got it hurray\n");
    }
    printf("you : %d \ncpu : %d \n", playerscore, compscore);
  }
  if (playerscore > compscore) {
    printf("you win \n");
  } else if (compscore > playerscore) {
    printf("cpu win \n");
  } else {
    printf("match is draw");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x2d,%edx
call   1050 <memset@plt>
movb   $0x72,-0x40(%rbp)
movb   $0x70,-0x3f(%rbp)
movb   $0x73,-0x3e(%rbp)
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    12f1 <main+0x1a1>
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%esi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%edi
call   1070 <generaterandomfunc@plt>
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x12(%rbp)
movsbl -0x12(%rbp),%esi
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x12(%rbp),%al
movsbl %al,%edi
movsbl -0x11(%rbp),%esi
call   1040 <greater@plt>
cmp    $0x1,%eax
jne    1276 <main+0x126>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12cf <main+0x17f>
mov    -0x12(%rbp),%al
movsbl %al,%edi
movsbl -0x11(%rbp),%esi
call   1040 <greater@plt>
cmp    $0xffffffff,%eax
jne    12b3 <main+0x163>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12ca <main+0x17a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12cf <main+0x17f>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    119e <main+0x4e>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1310 <main+0x1c0>
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1342 <main+0x1f2>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    132f <main+0x1df>
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    133d <main+0x1ed>
lea    0xdc0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1342 <main+0x1f2>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movups %xmm0,0x2d(%rsp)
movaps %xmm0,0x20(%rsp)
movw   $0x7072,0x10(%rsp)
movb   $0x73,0x12(%rsp)
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
lea    0xef0(%rip),%r15
mov    %r15,%rdi
call   1030 <puts@plt>
lea    0xf1c(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xe53(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
movslq 0xc(%rsp),%rax
lea    0x10(%rsp),%r13
movsbl -0x1(%rax,%r13,1),%ebp
lea    0xe35(%rip),%rdi
xor    %r14d,%r14d
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1070 <generaterandomfunc@plt>
lea    0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
cltq
movsbl 0x10(%rsp,%rax,1),%ebx
lea    0xe0a(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%edi
mov    %ebp,%esi
call   1050 <greater@plt>
cmp    $0x1,%eax
jne    122f <main+0xdf>
mov    $0x1,%r15d
lea    0xebd(%rip),%rdi
jmp    125a <main+0x10a>
mov    %ebx,%edi
mov    %ebp,%esi
call   1050 <greater@plt>
xor    %r15d,%r15d
cmp    $0xffffffff,%eax
sete   %r15b
lea    0xe95(%rip),%rax
lea    0xe7c(%rip),%rdi
cmove  %rax,%rdi
mov    $0x1,%r14d
call   1030 <puts@plt>
lea    0xdbd(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe05(%rip),%r12
mov    %r12,%rdi
call   1030 <puts@plt>
lea    0xe31(%rip),%rbp
mov    %rbp,%rdi
call   1030 <puts@plt>
lea    0xd68(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
movslq 0xc(%rsp),%rax
movsbl -0x1(%rax,%r13,1),%ebx
lea    0xd4f(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1070 <generaterandomfunc@plt>
lea    0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
cltq
movsbl 0x10(%rsp,%rax,1),%ebp
lea    0xd27(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <greater@plt>
cmp    $0x1,%eax
jne    1310 <main+0x1c0>
add    $0x1,%r15d
lea    0xddc(%rip),%rdi
jmp    133a <main+0x1ea>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <greater@plt>
cmp    $0xffffffff,%eax
je     132b <main+0x1db>
add    $0x1,%r14d
lea    0xda3(%rip),%rdi
jmp    133a <main+0x1ea>
add    $0x1,%r15d
add    $0x1,%r14d
lea    0xda4(%rip),%rdi
call   1030 <puts@plt>
lea    0xcdd(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd25(%rip),%r12
mov    %r12,%rdi
call   1030 <puts@plt>
lea    0xd51(%rip),%rbp
mov    %rbp,%rdi
call   1030 <puts@plt>
lea    0xc88(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
movslq 0xc(%rsp),%rax
movsbl -0x1(%rax,%r13,1),%ebx
lea    0xc6f(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
call   1070 <generaterandomfunc@plt>
lea    0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
cltq
movsbl 0x10(%rsp,%rax,1),%ebp
lea    0xc47(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <greater@plt>
cmp    $0x1,%eax
jne    13f0 <main+0x2a0>
add    $0x1,%r15d
lea    0xcfc(%rip),%rdi
jmp    141a <main+0x2ca>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <greater@plt>
cmp    $0xffffffff,%eax
je     140b <main+0x2bb>
add    $0x1,%r14d
lea    0xcc3(%rip),%rdi
jmp    141a <main+0x2ca>
add    $0x1,%r15d
add    $0x1,%r14d
lea    0xcc4(%rip),%rdi
call   1030 <puts@plt>
lea    0xbfd(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    %r15d,%r14d
jle    1446 <main+0x2f6>
lea    0xc37(%rip),%rdi
call   1030 <puts@plt>
jmp    1464 <main+0x314>
jge    1456 <main+0x306>
lea    0xc1e(%rip),%rdi
call   1030 <puts@plt>
jmp    1464 <main+0x314>
lea    0xbdb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [40 x i8] c"welcome to the rock paper scissor game\0A\00"
@.str.1 = [60 x i8] c"choose 1 for rock choose 2 for paper choose 3 for scissor \0A\00"
@.str.2 = [19 x i8] c"player no.1 turn \0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [16 x i8] c"you choose %c\0A\00"
@.str.5 = [16 x i8] c"cpu choose %c\0A\00"
@.str.6 = [19 x i8] c"cpu got it hurray\0A\00"
@.str.7 = [13 x i8] c"its a draw \0A\00"
@.str.8 = [19 x i8] c"you got it hurray\0A\00"
@.str.9 = [21 x i8] c"you : %d \0Acpu : %d \0A\00"
@.str.10 = [10 x i8] c"you win \0A\00"
@.str.11 = [10 x i8] c"cpu win \0A\00"
@.str.12 = [14 x i8] c"match is draw\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
%7 = alloca [45 x i8]
%8 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%9 = bitcast [45 x i8]* %7 to i8*
%10 = bitcast i8* %9 to <{ i8, i8, i8, [42 x i8] }>*
%11 = getelementptr inbounds <{ i8, i8, i8, [42 x i8] }>, <{ i8, i8, i8, [42 x i8] }>* %10, i32 0, i32 0
store i8 114, i8* %11
%12 = getelementptr inbounds <{ i8, i8, i8, [42 x i8] }>, <{ i8, i8, i8, [42 x i8] }>* %10, i32 0, i32 1
store i8 112, i8* %12
%13 = getelementptr inbounds <{ i8, i8, i8, [42 x i8] }>, <{ i8, i8, i8, [42 x i8] }>* %10, i32 0, i32 2
store i8 115, i8* %13
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %8
br label %15
15: ; preds = %70, %0
%16 = load i32, i32* %8
%17 = icmp slt i32 %16, 3
br i1 %17, label %18, label %73
18: ; preds = %15
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%22 = load i32, i32* %4
%23 = sub nsw i32 %22, 1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [45 x i8], [45 x i8]* %7, i64 0, i64 %24
%26 = load i8, i8* %25
store i8 %26, i8* %5
%27 = load i8, i8* %5
%28 = sext i8 %27 to i32
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %28)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%32 = call i32 @generaterandomfunc(i32 3)
%33 = add nsw i32 %32, 1
store i32 %33, i32* %4
%34 = load i32, i32* %4
%35 = sub nsw i32 %34, 1
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [45 x i8], [45 x i8]* %7, i64 0, i64 %36
%38 = load i8, i8* %37
store i8 %38, i8* %6
%39 = load i8, i8* %6
%40 = sext i8 %39 to i32
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %40)
%42 = load i8, i8* %6
%43 = load i8, i8* %5
%44 = call i32 @greater(i8 signext %42, i8 signext %43)
%45 = icmp eq i32 %44, 1
br i1 %45, label %46, label %50
46: ; preds = %18
%47 = load i32, i32* %3
%48 = add nsw i32 %47, 1
store i32 %48, i32* %3
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %66
50: ; preds = %18
%51 = load i8, i8* %6
%52 = load i8, i8* %5
%53 = call i32 @greater(i8 signext %51, i8 signext %52)
%54 = icmp eq i32 %53, -1
br i1 %54, label %55, label %61
55: ; preds = %50
%56 = load i32, i32* %3
%57 = add nsw i32 %56, 1
store i32 %57, i32* %3
%58 = load i32, i32* %2
%59 = add nsw i32 %58, 1
store i32 %59, i32* %2
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
br label %65
61: ; preds = %50
%62 = load i32, i32* %2
%63 = add nsw i32 %62, 1
store i32 %63, i32* %2
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0))
br label %65
65: ; preds = %61, %55
br label %66
66: ; preds = %65, %46
%67 = load i32, i32* %2
%68 = load i32, i32* %3
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i32 %67, i32 %68)
br label %70
70: ; preds = %66
%71 = load i32, i32* %8
%72 = add nsw i32 %71, 1
store i32 %72, i32* %8
br label %15
73: ; preds = %15
%74 = load i32, i32* %2
%75 = load i32, i32* %3
%76 = icmp sgt i32 %74, %75
br i1 %76, label %77, label %79
77: ; preds = %73
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
br label %88
79: ; preds = %73
%80 = load i32, i32* %3
%81 = load i32, i32* %2
%82 = icmp sgt i32 %80, %81
br i1 %82, label %83, label %85
83: ; preds = %79
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
br label %87
85: ; preds = %79
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
br label %87
87: ; preds = %85, %83
br label %88
88: ; preds = %87, %77
ret i32 0
}

LLVM IR (-O2):
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [16 x i8] c"you choose %c\0A\00"
@.str.5 = [16 x i8] c"cpu choose %c\0A\00"
@.str.9 = [21 x i8] c"you : %d \0Acpu : %d \0A\00"
@.str.12 = [14 x i8] c"match is draw\00"
@str = [39 x i8] c"welcome to the rock paper scissor game\00"
@str.13 = [9 x i8] c"cpu win \00"
@str.14 = [9 x i8] c"you win \00"
@str.17 = [59 x i8] c"choose 1 for rock choose 2 for paper choose 3 for scissor \00"
@str.18 = [18 x i8] c"player no.1 turn \00"
@str.19 = [18 x i8] c"you got it hurray\00"
@str.20 = [12 x i8] c"its a draw \00"
@str.21 = [18 x i8] c"cpu got it hurray\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [45 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [45 x i8], [45 x i8]* %2, i64 0, i64 0
store i8 114, i8* %4
%5 = getelementptr inbounds [45 x i8], [45 x i8]* %2, i64 0, i64 1
store i8 112, i8* %5
%6 = getelementptr inbounds [45 x i8], [45 x i8]* %2, i64 0, i64 2
store i8 115, i8* %6
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.17, i64 0, i64 0))
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%11 = load i32, i32* %1
%12 = add nsw i32 %11, -1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [45 x i8], [45 x i8]* %2, i64 0, i64 %13
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %16)
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.17, i64 0, i64 0))
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
%20 = call i32 @generaterandomfunc(i32 3)
%21 = add nsw i32 %20, 1
store i32 %21, i32* %1
%22 = sext i32 %20 to i64
%23 = getelementptr inbounds [45 x i8], [45 x i8]* %2, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %25)
%27 = call i32 @greater(i8 signext %24, i8 signext %15)
%28 = icmp eq i32 %27, 1
br i1 %28, label %34, label %29
29: ; preds = %0
%30 = call i32 @greater(i8 signext %24, i8 signext %15)
%31 = icmp eq i32 %30, -1
%32 = select i1 %31, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.20, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str.19, i64 0, i64 0)
%33 = select i1 %31, i32 1, i32 0
br label %34
34: ; preds = %29, %0
%35 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.21, i64 0, i64 0), %0 ], [ %32, %29 ]
%36 = phi i32 [ 1, %0 ], [ %33, %29 ]
%37 = phi i32 [ 0, %0 ], [ 1, %29 ]
%38 = call i32 @puts(i8* dereferenceable(1) %35)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i32 %37, i32 %36)
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.17, i64 0, i64 0))
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
%42 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%43 = load i32, i32* %1
%44 = add nsw i32 %43, -1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [45 x i8], [45 x i8]* %2, i64 0, i64 %45
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %48)
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.17, i64 0, i64 0))
%51 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
%52 = call i32 @generaterandomfunc(i32 3)
%53 = add nsw i32 %52, 1
store i32 %53, i32* %1
%54 = sext i32 %52 to i64
%55 = getelementptr inbounds [45 x i8], [45 x i8]* %2, i64 0, i64 %54
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %57)
%59 = call i32 @greater(i8 signext %56, i8 signext %47)
%60 = icmp eq i32 %59, 1
br i1 %60, label %69, label %61
61: ; preds = %34
%62 = call i32 @greater(i8 signext %56, i8 signext %47)
%63 = icmp eq i32 %62, -1
br i1 %63, label %66, label %64
64: ; preds = %61
%65 = add nuw nsw i32 %37, 1
br label %71
66: ; preds = %61
%67 = add nuw nsw i32 %36, 1
%68 = add nuw nsw i32 %37, 1
br label %71
69: ; preds = %34
%70 = add nuw nsw i32 %36, 1
br label %71
71: ; preds = %69, %66, %64
%72 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.20, i64 0, i64 0), %66 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.19, i64 0, i64 0), %64 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.21, i64 0, i64 0), %69 ]
%73 = phi i32 [ %67, %66 ], [ %36, %64 ], [ %70, %69 ]
%74 = phi i32 [ %68, %66 ], [ %65, %64 ], [ %37, %69 ]
%75 = call i32 @puts(i8* dereferenceable(1) %72)
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i32 %74, i32 %73)
%77 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.17, i64 0, i64 0))
%78 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
%79 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%80 = load i32, i32* %1
%81 = add nsw i32 %80, -1
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [45 x i8], [45 x i8]* %2, i64 0, i64 %82
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %85)
%87 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.17, i64 0, i64 0))
%88 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
%89 = call i32 @generaterandomfunc(i32 3)
%90 = add nsw i32 %89, 1
store i32 %90, i32* %1
%91 = sext i32 %89 to i64
%92 = getelementptr inbounds [45 x i8], [45 x i8]* %2, i64 0, i64 %91
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %94)
%96 = call i32 @greater(i8 signext %93, i8 signext %84)
%97 = icmp eq i32 %96, 1
br i1 %97, label %106, label %98
98: ; preds = %71
%99 = call i32 @greater(i8 signext %93, i8 signext %84)
%100 = icmp eq i32 %99, -1
br i1 %100, label %103, label %101
101: ; preds = %98
%102 = add nsw i32 %74, 1
br label %108
103: ; preds = %98
%104 = add nsw i32 %73, 1
%105 = add nsw i32 %74, 1
br label %108
106: ; preds = %71
%107 = add nsw i32 %73, 1
br label %108
108: ; preds = %106, %103, %101
%109 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.20, i64 0, i64 0), %103 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.19, i64 0, i64 0), %101 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.21, i64 0, i64 0), %106 ]
%110 = phi i32 [ %104, %103 ], [ %73, %101 ], [ %107, %106 ]
%111 = phi i32 [ %105, %103 ], [ %102, %101 ], [ %74, %106 ]
%112 = call i32 @puts(i8* dereferenceable(1) %109)
%113 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i32 %111, i32 %110)
%114 = icmp sgt i32 %111, %110
br i1 %114, label %115, label %117
115: ; preds = %108
%116 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.14, i64 0, i64 0))
br label %123
117: ; preds = %108
%118 = icmp sgt i32 %110, %111
br i1 %118, label %119, label %121
119: ; preds = %117
%120 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.13, i64 0, i64 0))
br label %123
121: ; preds = %117
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
br label %123
123: ; preds = %119, %121, %115
ret i32 0
}