#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 cos(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, ...);
int main() {
  static int arr[12];
  char ch;
  int num, ret;
  int flag = 1;
  unsigned int i, in_num, out_num, cos_param, write_index;
  printf("Please fill the array:\n");
  for (i = 0; i < 12; i++) {
    if (scanf("%d", &in_num) == 1) {
      arr[i] = in_num;
    } else {
      printf("Please enter a number\n");
      return 0;
    }
  }
  while (flag) {
    printf("Select the index of the element that you want to read: \n");
    if (scanf("%d", &num) != 1) {
      printf("Please enter a number\n");
      return 0;
    }
    printf("At position %d the value is %d\n", num, arr[num]);
    printf("Do you want read another number? [y/n]\n");
    scanf(" %c", &ch);
    if (ch != 'y') {
      flag = 0;
    }
  }
  printf("How many value do you want to modify?\n");
  if (scanf("%d", &cos_param) != 1) {
    printf("Please enter a number:\n");
    return 0;
  }
  ret = cos(cos_param * 3.14159265 / 180.0);
  if (ret < 0) {
    write_index = 12;
  } else {
    write_index = 1;
  }
  while (write_index) {
    if (flag != 0) {
      printf("Do you want to edit some value in the array? [y/n]\n");
      scanf(" %c", &ch);
    }
    if (ch == 'y' || flag == 0) {
      printf("Select the index of the element that you want to modify\n");
      scanf("%d", &num);
      printf("Enter the new value\n");
      scanf("%d", &out_num);
      arr[num] = out_num;
      write_index--;
      flag = 1;
    } else {
      break;
    }
  }
  printf("Good done!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x14(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0xc,-0x18(%rbp)
jae    11c4 <main+0x94>
lea    0xebc(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1197 <main+0x67>
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
lea    0x2ec1(%rip),%rax
mov    %edx,(%rax,%rcx,4)
jmp    11b1 <main+0x81>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13d2 <main+0x2a2>
jmp    11b6 <main+0x86>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115b <main+0x2b>
jmp    11c9 <main+0x99>
cmpl   $0x0,-0x14(%rbp)
je     126e <main+0x13e>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe40(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmp    $0x1,%eax
je     1216 <main+0xe6>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13d2 <main+0x2a2>
mov    -0xc(%rbp),%esi
movslq -0xc(%rbp),%rcx
lea    0x2e2c(%rip),%rax
mov    (%rax,%rcx,4),%edx
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe79(%rip),%rdi
lea    -0x5(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
je     1269 <main+0x139>
movl   $0x0,-0x14(%rbp)
jmp    11c9 <main+0x99>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xda5(%rip),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmp    $0x1,%eax
je     12b1 <main+0x181>
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13d2 <main+0x2a2>
mov    -0x24(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  0xd3f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd3b(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,%edi
call   1050 <cos@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    12f6 <main+0x1c6>
movl   $0xc,-0x28(%rbp)
jmp    12fd <main+0x1cd>
movl   $0x1,-0x28(%rbp)
jmp    1302 <main+0x1d2>
cmpl   $0x0,-0x28(%rbp)
je     13bd <main+0x28d>
cmpl   $0x0,-0x14(%rbp)
je     1336 <main+0x206>
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd98(%rip),%rdi
lea    -0x5(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
je     134d <main+0x21d>
cmpl   $0x0,-0x14(%rbp)
jne    13b3 <main+0x283>
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcc6(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xca6(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x20(%rbp),%edx
movslq -0xc(%rbp),%rcx
lea    0x2cb5(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
movl   $0x1,-0x14(%rbp)
jmp    13b8 <main+0x288>
jmp    13bd <main+0x28d>
jmp    1302 <main+0x1d2>
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaf(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x1000(%rip),%rbx
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2ec9(%rip)
lea    0xe82(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2ea7(%rip)
lea    0xe5c(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2e85(%rip)
lea    0xe36(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2e63(%rip)
lea    0xe10(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2e41(%rip)
lea    0xdea(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2e1f(%rip)
lea    0xdc4(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2dfd(%rip)
lea    0xd9e(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2ddb(%rip)
lea    0xd78(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2db9(%rip)
lea    0xd52(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2d97(%rip)
lea    0xd2c(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2d75(%rip)
lea    0xd06(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
mov    0x4(%rsp),%eax
mov    %eax,0x2d53(%rip)
lea    0xc(%rsp),%r13
lea    0xcde(%rip),%r12
lea    0xe11(%rip),%rbp
lea    0xcf0(%rip),%r14
lea    0xb(%rsp),%r15
lea    0xdc6(%rip),%rdi
call   1030 <puts@plt>
lea    0xcb5(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    149f <main+0x35f>
movslq 0xc(%rsp),%rsi
lea    0x2cd6(%rip),%rax
mov    (%rax,%rsi,4),%edx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpb   $0x79,0xb(%rsp)
je     1348 <main+0x208>
lea    0xca4(%rip),%rdi
call   1030 <puts@plt>
lea    0xc5a(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    1498 <main+0x358>
mov    0x10(%rsp),%eax
cvtsi2sd %rax,%xmm0
mulsd  0xc24(%rip),%xmm0
divsd  0xc24(%rip),%xmm0
cvttsd2si %xmm0,%rdi
call   1060 <cos@plt>
test   %eax,%eax
mov    $0xc,%eax
mov    $0x1,%r14d
cmovs  %eax,%r14d
mov    $0x1,%r12b
lea    0xc07(%rip),%r15
lea    0xca7(%rip),%r13
lea    0x14(%rsp),%rbp
lea    0xc58(%rip),%rbx
jmp    146a <main+0x32a>
lea    0xc5a(%rip),%rdi
call   1030 <puts@plt>
xor    %r12d,%r12d
mov    %r15,%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x14(%rsp),%eax
movslq 0xc(%rsp),%rcx
lea    0x2bef(%rip),%rdx
mov    %eax,(%rdx,%rcx,4)
add    $0xffffffff,%r14d
je     149f <main+0x35f>
test   $0x1,%r12b
jne    141e <main+0x2de>
lea    0xc54(%rip),%rdi
call   1030 <puts@plt>
lea    0xbb0(%rip),%rdi
lea    0xb(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpb   $0x79,0xb(%rsp)
je     141e <main+0x2de>
jmp    149f <main+0x35f>
lea    0xc5f(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@main.arr = internal global [12 x i32] zeroinitializer
@.str = [24 x i8] c"Please fill the array:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"Please enter a number\0A\00"
@.str.3 = [57 x i8] c"Select the index of the element that you want to read: \0A\00"
@.str.4 = [32 x i8] c"At position %d the value is %d\0A\00"
@.str.5 = [40 x i8] c"Do you want read another number? [y/n]\0A\00"
@.str.6 = [4 x i8] c" %c\00"
@.str.7 = [39 x i8] c"How many value do you want to modify?\0A\00"
@.str.8 = [24 x i8] c"Please enter a number:\0A\00"
@.str.9 = [52 x i8] c"Do you want to edit some value in the array? [y/n]\0A\00"
@.str.10 = [57 x i8] c"Select the index of the element that you want to modify\0A\00"
@.str.11 = [21 x i8] c"Enter the new value\0A\00"
@.str.12 = [12 x i8] c"Good done!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %12
12: ; preds = %26, %0
%13 = load i32, i32* %6
%14 = icmp ult i32 %13, 12
br i1 %14, label %15, label %29
15: ; preds = %12
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %23
18: ; preds = %15
%19 = load i32, i32* %7
%20 = load i32, i32* %6
%21 = zext i32 %20 to i64
%22 = getelementptr inbounds [12 x i32], [12 x i32]* @main.arr, i64 0, i64 %21
store i32 %19, i32* %22
br label %25
23: ; preds = %15
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %102
25: ; preds = %18
br label %26
26: ; preds = %25
%27 = load i32, i32* %6
%28 = add i32 %27, 1
store i32 %28, i32* %6
br label %12
29: ; preds = %12
br label %30
30: ; preds = %52, %29
%31 = load i32, i32* %5
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %53
33: ; preds = %30
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0))
%35 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%36 = icmp ne i32 %35, 1
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %102
39: ; preds = %33
%40 = load i32, i32* %3
%41 = load i32, i32* %3
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [12 x i32], [12 x i32]* @main.arr, i64 0, i64 %42
%44 = load i32, i32* %43
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %40, i32 %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0))
%47 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %2)
%48 = load i8, i8* %2
%49 = sext i8 %48 to i32
%50 = icmp ne i32 %49, 121
br i1 %50, label %51, label %52
51: ; preds = %39
store i32 0, i32* %5
br label %52
52: ; preds = %51, %39
br label %30
53: ; preds = %30
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0))
%55 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
%56 = icmp ne i32 %55, 1
br i1 %56, label %57, label %59
57: ; preds = %53
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %1
br label %102
59: ; preds = %53
%60 = load i32, i32* %9
%61 = uitofp i32 %60 to double
%62 = fmul double %61, 0x400921FB53C8D4F1
%63 = fdiv double %62, 1.800000e+02
%64 = fptoui double %63 to i32
%65 = call i32 @cos(i32 %64)
store i32 %65, i32* %4
%66 = load i32, i32* %4
%67 = icmp slt i32 %66, 0
br i1 %67, label %68, label %69
68: ; preds = %59
store i32 12, i32* %10
br label %70
69: ; preds = %59
store i32 1, i32* %10
br label %70
70: ; preds = %69, %68
br label %71
71: ; preds = %99, %70
%72 = load i32, i32* %10
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %100
74: ; preds = %71
%75 = load i32, i32* %5
%76 = icmp ne i32 %75, 0
br i1 %76, label %77, label %80
77: ; preds = %74
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.9, i64 0, i64 0))
%79 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %2)
br label %80
80: ; preds = %77, %74
%81 = load i8, i8* %2
%82 = sext i8 %81 to i32
%83 = icmp eq i32 %82, 121
br i1 %83, label %87, label %84
84: ; preds = %80
%85 = load i32, i32* %5
%86 = icmp eq i32 %85, 0
br i1 %86, label %87, label %98
87: ; preds = %84, %80
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0))
%89 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
%91 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%92 = load i32, i32* %8
%93 = load i32, i32* %3
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [12 x i32], [12 x i32]* @main.arr, i64 0, i64 %94
store i32 %92, i32* %95
%96 = load i32, i32* %10
%97 = add i32 %96, -1
store i32 %97, i32* %10
store i32 1, i32* %5
br label %99
98: ; preds = %84
br label %100
99: ; preds = %87
br label %71
100: ; preds = %98, %71
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0))
store i32 0, i32* %1
br label %102
102: ; preds = %100, %57, %37, %23
%103 = load i32, i32* %1
ret i32 %103
}

LLVM IR (-O2):
@main.arr = internal unnamed_addr global [12 x i32] zeroinitializer
@.str.1 = [3 x i8] c"%d\00"
@.str.4 = [32 x i8] c"At position %d the value is %d\0A\00"
@.str.6 = [4 x i8] c" %c\00"
@str = [23 x i8] c"Please fill the array:\00"
@str.13 = [38 x i8] c"How many value do you want to modify?\00"
@str.14 = [11 x i8] c"Good done!\00"
@str.15 = [56 x i8] c"Select the index of the element that you want to modify\00"
@str.16 = [20 x i8] c"Enter the new value\00"
@str.17 = [51 x i8] c"Do you want to edit some value in the array? [y/n]\00"
@str.18 = [23 x i8] c"Please enter a number:\00"
@str.19 = [56 x i8] c"Select the index of the element that you want to read: \00"
@str.20 = [39 x i8] c"Do you want read another number? [y/n]\00"
@str.22 = [22 x i8] c"Please enter a number\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %105
13: ; preds = %0
%14 = load i32, i32* %3
store i32 %14, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 0)
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %105
17: ; preds = %13
%18 = load i32, i32* %3
store i32 %18, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 1)
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %105
21: ; preds = %17
%22 = load i32, i32* %3
store i32 %22, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 2)
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%24 = icmp eq i32 %23, 1
br i1 %24, label %25, label %105
25: ; preds = %21
%26 = load i32, i32* %3
store i32 %26, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 3)
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %105
29: ; preds = %25
%30 = load i32, i32* %3
store i32 %30, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 4)
%31 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%32 = icmp eq i32 %31, 1
br i1 %32, label %33, label %105
33: ; preds = %29
%34 = load i32, i32* %3
store i32 %34, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 5)
%35 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%36 = icmp eq i32 %35, 1
br i1 %36, label %37, label %105
37: ; preds = %33
%38 = load i32, i32* %3
store i32 %38, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 6)
%39 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%40 = icmp eq i32 %39, 1
br i1 %40, label %41, label %105
41: ; preds = %37
%42 = load i32, i32* %3
store i32 %42, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 7)
%43 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%44 = icmp eq i32 %43, 1
br i1 %44, label %45, label %105
45: ; preds = %41
%46 = load i32, i32* %3
store i32 %46, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 8)
%47 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%48 = icmp eq i32 %47, 1
br i1 %48, label %49, label %105
49: ; preds = %45
%50 = load i32, i32* %3
store i32 %50, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 9)
%51 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%52 = icmp eq i32 %51, 1
br i1 %52, label %53, label %105
53: ; preds = %49
%54 = load i32, i32* %3
store i32 %54, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 10)
%55 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %105
57: ; preds = %53
%58 = load i32, i32* %3
store i32 %58, i32* getelementptr inbounds ([12 x i32], [12 x i32]* @main.arr, i64 0, i64 11)
br label %59
59: ; preds = %57, %63
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.19, i64 0, i64 0))
%61 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%62 = icmp eq i32 %61, 1
br i1 %62, label %63, label %105
63: ; preds = %59
%64 = load i32, i32* %2
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [12 x i32], [12 x i32]* @main.arr, i64 0, i64 %65
%67 = load i32, i32* %66
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %64, i32 %67)
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.20, i64 0, i64 0))
%70 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %1)
%71 = load i8, i8* %1
%72 = icmp eq i8 %71, 121
br i1 %72, label %59, label %73
73: ; preds = %63
%74 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.13, i64 0, i64 0))
%75 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%76 = icmp eq i32 %75, 1
br i1 %76, label %77, label %105
77: ; preds = %73
%78 = load i32, i32* %5
%79 = uitofp i32 %78 to double
%80 = fmul double %79, 0x400921FB53C8D4F1
%81 = fdiv double %80, 1.800000e+02
%82 = fptoui double %81 to i32
%83 = call i32 @cos(i32 %82)
%84 = icmp slt i32 %83, 0
%85 = select i1 %84, i32 12, i32 1
br label %86
86: ; preds = %77, %94
%87 = phi i32 [ %85, %77 ], [ %103, %94 ]
%88 = phi i1 [ true, %77 ], [ false, %94 ]
br i1 %88, label %94, label %89
89: ; preds = %86
%90 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.17, i64 0, i64 0))
%91 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %1)
%92 = load i8, i8* %1
%93 = icmp eq i8 %92, 121
br i1 %93, label %94, label %105
94: ; preds = %86, %89
%95 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.15, i64 0, i64 0))
%96 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%97 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.16, i64 0, i64 0))
%98 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%99 = load i32, i32* %4
%100 = load i32, i32* %2
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [12 x i32], [12 x i32]* @main.arr, i64 0, i64 %101
store i32 %99, i32* %102
%103 = add i32 %87, -1
%104 = icmp eq i32 %103, 0
br i1 %104, label %105, label %86
105: ; preds = %59, %94, %89, %73, %0, %13, %17, %21, %25, %29, %33, %37, %41, %45, %49, %53
%106 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %53 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %49 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %45 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %41 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %37 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %33 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %29 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %25 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %21 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %17 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %13 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %0 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.18, i64 0, i64 0), %73 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @str.14, i64 0, i64 0), %89 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @str.14, i64 0, i64 0), %94 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str.22, i64 0, i64 0), %59 ]
%107 = call i32 @puts(i8* dereferenceable(1) %106)
ret i32 0
}