#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 */
char getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int numbers[3];
  char operator;
  int operation;
  printf("Would you like to add, subtract, multiply or divide?\n Enter +, -, "
         "*, /:");
  do {
    operator= getchar();
  } while (operator== '\n');
  if (operator== '\n')
    printf("warning: char c contains a newline\n");
  if (operator== '+')
    printf("you said you would like to add\n");
  if (operator== '-')
    printf("you said you would like to subtract\n");
  if (operator== '*')
    printf("you said you would like to multiply\n");
  if (operator== '/')
    printf("you said you would like to divide\n");
  printf("enter first number:");
  scanf("%9d", &numbers[1]);
  printf("enter second number:");
  scanf("%9d", &numbers[2]);
  if (operator== '+') {
    operation = (numbers[1] + numbers[2]);
    printf("The total of %d and %d is: %d\n", numbers[1], numbers[2],
           operation);
  } else if (operator== '-') {
    operation = (numbers[1] - numbers[2]);
    printf("%d minus %d is: %d\n", numbers[1], numbers[2], operation);
  } else if (operator== '*') {
    operation = (numbers[1] * numbers[2]);
    printf("%d multiplied by %d is: %d\n", numbers[1], numbers[2], operation);
  } else if (operator== '/') {
    while (numbers[2] == 0) {
      printf("Cannot divide by 0. Please enter new number to divide by:");
      scanf("%9d", &numbers[2]);
    }
    operation = (numbers[1] / numbers[2]);
    printf("%d divided by %d is: %d\n", numbers[1], numbers[2], operation);
  } else {
    printf("Sorry, you seem to have entered an invalid parameter\nplease try "
           "running program again");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0xa,%eax
je     114d <main+0x1d>
movsbl -0x11(%rbp),%eax
cmp    $0xa,%eax
jne    117f <main+0x4f>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x2b,%eax
jne    119a <main+0x6a>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x2d,%eax
jne    11b5 <main+0x85>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x2a,%eax
jne    11d0 <main+0xa0>
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x2f,%eax
jne    11eb <main+0xbb>
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
add    $0x4,%rsi
lea    0xf05(%rip),%rdi
call   1050 <scanf@plt>
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
add    $0x8,%rsi
lea    0xee3(%rip),%rdi
call   1050 <scanf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x2b,%eax
jne    1261 <main+0x131>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    134c <main+0x21c>
movsbl -0x11(%rbp),%eax
cmp    $0x2d,%eax
jne    1293 <main+0x163>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1347 <main+0x217>
movsbl -0x11(%rbp),%eax
cmp    $0x2a,%eax
jne    12c6 <main+0x196>
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1342 <main+0x212>
movsbl -0x11(%rbp),%eax
cmp    $0x2f,%eax
jne    132f <main+0x1ff>
jmp    12d8 <main+0x1a8>
cmpl   $0x0,-0x8(%rbp)
jne    1309 <main+0x1d9>
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
add    $0x8,%rsi
lea    0xe0e(%rip),%rdi
call   1050 <scanf@plt>
jmp    12d8 <main+0x1a8>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    133d <main+0x20d>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1342 <main+0x212>
jmp    1347 <main+0x217>
jmp    134c <main+0x21c>
xor    %eax,%eax
add    $0x20,%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    0xeab(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
nopl   0x0(%rax)
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0xa,%al
je     1160 <main+0x20>
mov    %eax,%ebx
cmp    $0x2b,%al
jne    11e1 <main+0xa1>
lea    0x105f(%rip),%rdi
xor    %r12d,%r12d
xor    %ebp,%ebp
xor    %r13d,%r13d
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
lea    0xebd(%rip),%r15
mov    %r15,%rdi
call   1060 <scanf@plt>
lea    0xeb2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x14(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
cmp    $0x2b,%bl
jne    1212 <main+0xd2>
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edx
lea    (%rdx,%rsi,1),%ecx
lea    0xe99(%rip),%rdi
jmp    12c1 <main+0x181>
cmp    $0x2f,%bl
je     124a <main+0x10a>
xor    %r12d,%r12d
cmp    $0x2d,%bl
je     1259 <main+0x119>
mov    $0x0,%ebp
mov    $0x0,%r13d
cmp    $0x2a,%bl
jne    1185 <main+0x45>
mov    $0x1,%r13b
lea    0xf87(%rip),%rdi
xor    %r12d,%r12d
xor    %ebp,%ebp
jmp    1180 <main+0x40>
test   %bpl,%bpl
je     122f <main+0xef>
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edx
mov    %esi,%ecx
sub    %edx,%ecx
lea    0xe6a(%rip),%rdi
jmp    12c1 <main+0x181>
test   %r13b,%r13b
je     1268 <main+0x128>
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edx
mov    %edx,%ecx
imul   %esi,%ecx
lea    0xe60(%rip),%rdi
jmp    12c1 <main+0x181>
mov    $0x1,%r12b
lea    0xf19(%rip),%rdi
jmp    117b <main+0x3b>
mov    $0x1,%bpl
lea    0xf50(%rip),%rdi
jmp    117d <main+0x3d>
test   %r12b,%r12b
je     12d9 <main+0x199>
mov    0x14(%rsp),%ecx
test   %ecx,%ecx
jne    12ad <main+0x16d>
lea    0xe48(%rip),%r15
lea    0xdd9(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
mov    0x14(%rsp),%ecx
test   %ecx,%ecx
je     1290 <main+0x150>
mov    0x10(%rsp),%esi
mov    %esi,%eax
cltd
idiv   %ecx
lea    0xe41(%rip),%rdi
mov    %ecx,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe37(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12c8 <main+0x188>

LLVM IR (-O0):
@.str = [72 x i8] c"Would you like to add, subtract, multiply or divide?\0A Enter +, -, *, /:\00"
@.str.1 = [36 x i8] c"warning: char c contains a newline\0A\00"
@.str.2 = [32 x i8] c"you said you would like to add\0A\00"
@.str.3 = [37 x i8] c"you said you would like to subtract\0A\00"
@.str.4 = [37 x i8] c"you said you would like to multiply\0A\00"
@.str.5 = [35 x i8] c"you said you would like to divide\0A\00"
@.str.6 = [20 x i8] c"enter first number:\00"
@.str.7 = [4 x i8] c"%9d\00"
@.str.8 = [21 x i8] c"enter second number:\00"
@.str.9 = [31 x i8] c"The total of %d and %d is: %d\0A\00"
@.str.10 = [20 x i8] c"%d minus %d is: %d\0A\00"
@.str.11 = [28 x i8] c"%d multiplied by %d is: %d\0A\00"
@.str.12 = [58 x i8] c"Cannot divide by 0. Please enter new number to divide by:\00"
@.str.13 = [25 x i8] c"%d divided by %d is: %d\0A\00"
@.str.14 = [86 x i8] c"Sorry, you seem to have entered an invalid parameter\0Aplease try running program again\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca i8
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %8, %0
%7 = call signext i8 (...) @getchar()
store i8 %7, i8* %3
br label %8
8: ; preds = %6
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 10
br i1 %11, label %6, label %12
12: ; preds = %8
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 10
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16, %12
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 43
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
br label %24
24: ; preds = %22, %18
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 45
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
br label %30
30: ; preds = %28, %24
%31 = load i8, i8* %3
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 42
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
br label %36
36: ; preds = %34, %30
%37 = load i8, i8* %3
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 47
br i1 %39, label %40, label %42
40: ; preds = %36
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
br label %42
42: ; preds = %40, %36
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%44 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%45 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32* %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%47 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%48 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32* %47)
%49 = load i8, i8* %3
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 43
br i1 %51, label %52, label %64
52: ; preds = %42
%53 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%54 = load i32, i32* %53
%55 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%56 = load i32, i32* %55
%57 = add nsw i32 %54, %56
store i32 %57, i32* %4
%58 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%59 = load i32, i32* %58
%60 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%61 = load i32, i32* %60
%62 = load i32, i32* %4
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i32 %59, i32 %61, i32 %62)
br label %126
64: ; preds = %42
%65 = load i8, i8* %3
%66 = sext i8 %65 to i32
%67 = icmp eq i32 %66, 45
br i1 %67, label %68, label %80
68: ; preds = %64
%69 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%70 = load i32, i32* %69
%71 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%72 = load i32, i32* %71
%73 = sub nsw i32 %70, %72
store i32 %73, i32* %4
%74 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%75 = load i32, i32* %74
%76 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%77 = load i32, i32* %76
%78 = load i32, i32* %4
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i32 %75, i32 %77, i32 %78)
br label %125
80: ; preds = %64
%81 = load i8, i8* %3
%82 = sext i8 %81 to i32
%83 = icmp eq i32 %82, 42
br i1 %83, label %84, label %96
84: ; preds = %80
%85 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%86 = load i32, i32* %85
%87 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%88 = load i32, i32* %87
%89 = mul nsw i32 %86, %88
store i32 %89, i32* %4
%90 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%91 = load i32, i32* %90
%92 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%93 = load i32, i32* %92
%94 = load i32, i32* %4
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i32 %91, i32 %93, i32 %94)
br label %124
96: ; preds = %80
%97 = load i8, i8* %3
%98 = sext i8 %97 to i32
%99 = icmp eq i32 %98, 47
br i1 %99, label %100, label %121
100: ; preds = %96
br label %101
101: ; preds = %105, %100
%102 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%103 = load i32, i32* %102
%104 = icmp eq i32 %103, 0
br i1 %104, label %105, label %109
105: ; preds = %101
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.12, i64 0, i64 0))
%107 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%108 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32* %107)
br label %101
109: ; preds = %101
%110 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%111 = load i32, i32* %110
%112 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%113 = load i32, i32* %112
%114 = sdiv i32 %111, %113
store i32 %114, i32* %4
%115 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%116 = load i32, i32* %115
%117 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%118 = load i32, i32* %117
%119 = load i32, i32* %4
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i32 %116, i32 %118, i32 %119)
br label %123
121: ; preds = %96
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.14, i64 0, i64 0))
br label %123
123: ; preds = %121, %109
br label %124
124: ; preds = %123, %84
br label %125
125: ; preds = %124, %68
br label %126
126: ; preds = %125, %52
ret i32 0
}

LLVM IR (-O2):
@.str = [72 x i8] c"Would you like to add, subtract, multiply or divide?\0A Enter +, -, *, /:\00"
@.str.6 = [20 x i8] c"enter first number:\00"
@.str.7 = [4 x i8] c"%9d\00"
@.str.8 = [21 x i8] c"enter second number:\00"
@.str.9 = [31 x i8] c"The total of %d and %d is: %d\0A\00"
@.str.10 = [20 x i8] c"%d minus %d is: %d\0A\00"
@.str.11 = [28 x i8] c"%d multiplied by %d is: %d\0A\00"
@.str.12 = [58 x i8] c"Cannot divide by 0. Please enter new number to divide by:\00"
@.str.13 = [25 x i8] c"%d divided by %d is: %d\0A\00"
@.str.14 = [86 x i8] c"Sorry, you seem to have entered an invalid parameter\0Aplease try running program again\00"
@str = [34 x i8] c"you said you would like to divide\00"
@str.15 = [36 x i8] c"you said you would like to multiply\00"
@str.16 = [36 x i8] c"you said you would like to subtract\00"
@str.17 = [31 x i8] c"you said you would like to add\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %4, %0
%5 = tail call signext i8 (...) @getchar()
%6 = icmp eq i8 %5, 10
br i1 %6, label %4, label %7
7: ; preds = %4
%8 = icmp eq i8 %5, 43
br i1 %8, label %12, label %9
9: ; preds = %7
switch i8 %5, label %18 [
i8 45, label %12
i8 42, label %10
i8 47, label %11
]
10: ; preds = %9
br label %12
11: ; preds = %9
br label %12
12: ; preds = %9, %7, %11, %10
%13 = phi i8* [ getelementptr inbounds ([36 x i8], [36 x i8]* @str.15, i64 0, i64 0), %10 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0), %11 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @str.17, i64 0, i64 0), %7 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @str.16, i64 0, i64 0), %9 ]
%14 = phi i1 [ false, %10 ], [ true, %11 ], [ false, %7 ], [ false, %9 ]
%15 = phi i1 [ false, %10 ], [ false, %11 ], [ false, %7 ], [ true, %9 ]
%16 = phi i1 [ true, %10 ], [ false, %11 ], [ false, %7 ], [ false, %9 ]
%17 = tail call i32 @puts(i8* dereferenceable(1) %13)
br label %18
18: ; preds = %12, %9
%19 = phi i1 [ false, %9 ], [ %14, %12 ]
%20 = phi i1 [ false, %9 ], [ %15, %12 ]
%21 = phi i1 [ false, %9 ], [ %16, %12 ]
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%23 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%24 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32* %23)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%26 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%27 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32* %26)
br i1 %8, label %28, label %33
28: ; preds = %18
%29 = load i32, i32* %23
%30 = load i32, i32* %26
%31 = add nsw i32 %30, %29
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i32 %29, i32 %30, i32 %31)
br label %61
33: ; preds = %18
br i1 %20, label %34, label %39
34: ; preds = %33
%35 = load i32, i32* %23
%36 = load i32, i32* %26
%37 = sub nsw i32 %35, %36
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i32 %35, i32 %36, i32 %37)
br label %61
39: ; preds = %33
br i1 %21, label %40, label %45
40: ; preds = %39
%41 = load i32, i32* %23
%42 = load i32, i32* %26
%43 = mul nsw i32 %42, %41
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i32 %41, i32 %42, i32 %43)
br label %61
45: ; preds = %39
br i1 %19, label %46, label %59
46: ; preds = %45
%47 = load i32, i32* %26
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %54
49: ; preds = %46, %49
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.12, i64 0, i64 0))
%51 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32* %26)
%52 = load i32, i32* %26
%53 = icmp eq i32 %52, 0
br i1 %53, label %49, label %54
54: ; preds = %49, %46
%55 = phi i32 [ %47, %46 ], [ %52, %49 ]
%56 = load i32, i32* %23
%57 = sdiv i32 %56, %55
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i32 %56, i32 %55, i32 %57)
br label %61
59: ; preds = %45
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @.str.14, i64 0, i64 0))
br label %61
61: ; preds = %34, %54, %59, %40, %28
ret i32 0
}