#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 */
float add(float, float);
float devide(float, float);
float modulus(float, float);
float multiply(float, float);
int operator_decode(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, ...);
float subtract(float, float);
int main() {
  char buffer[1024];
  while (1) {
    float first = 0;
    float second = 0;
    char m_operator[2];
    int dec_operator = 0;
    float sum = 0;
    float devision = 0;
    char syntax_error[1024];
    printf("Please type a mathmatical expression in the following "
           "format\n<Number><Operator(+-*/%%)><number>\n");
    printf("Or type any other charecter as an operator to quit.\n");
    printf("Formula: ");
    if (!scanf("%f%c%f", &first, &m_operator, &second)) {
      return 1;
    }
    dec_operator = operator_decode(m_operator);
    if (dec_operator == 1) {
      sum = add(first, second);
      sprintf(buffer, "%f + %f = %f\n", first, second, sum);
    }
    if (dec_operator == 2) {
      sum = subtract(first, second);
      sprintf(buffer, "%f - %f = %f\n", first, second, sum);
    }
    if (dec_operator == 3) {
      sum = multiply(first, second);
      sprintf(buffer, "%f * %f = %f\n", first, second, sum);
    }
    if (dec_operator == 4) {
      sum = devide(first, second);
      sprintf(buffer, "%f / %f = %f\n", first, second, sum);
    }
    if (dec_operator == 5) {
      sum = modulus(first, second);
      sprintf(buffer, "%f mod %f == %f\n", first, second, sum);
    }
    if (dec_operator == 0) {
      sprintf(
          buffer,
          "You entered an invalid operator, valid options are: +,-,*,/,%%\n");
      break;
    }
    printf("%s", buffer);
    printf("\n\n");
  }
  printf("\nPress enter to continue...");
  if (!scanf("%c%c", buffer, buffer)) {
    return 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x830,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x414(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x418(%rbp)
ff
movl   $0x0,-0x420(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x424(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x428(%rbp)
ff
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe97(%rip),%rdi
lea    -0x414(%rbp),%rsi
lea    -0x41a(%rbp),%rdx
lea    -0x418(%rbp),%rcx
mov    $0x0,%al
call   1080 <scanf@plt>
cmp    $0x0,%eax
jne    123a <main+0xaa>
movl   $0x1,-0x4(%rbp)
jmp    14c4 <main+0x334>
lea    -0x41a(%rbp),%rdi
call   10a0 <operator_decode@plt>
mov    %eax,-0x420(%rbp)
cmpl   $0x1,-0x420(%rbp)
jne    12af <main+0x11f>
movss  -0x414(%rbp),%xmm0
ff
movss  -0x418(%rbp),%xmm1
ff
call   1030 <add@plt>
movss  %xmm0,-0x424(%rbp)
ff
lea    -0x410(%rbp),%rdi
movss  -0x414(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0x418(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movss  -0x424(%rbp),%xmm2
ff
cvtss2sd %xmm2,%xmm2
lea    0xdff(%rip),%rsi
mov    $0x3,%al
call   10b0 <sprintf@plt>
cmpl   $0x2,-0x420(%rbp)
jne    1312 <main+0x182>
movss  -0x414(%rbp),%xmm0
ff
movss  -0x418(%rbp),%xmm1
ff
call   1090 <subtract@plt>
movss  %xmm0,-0x424(%rbp)
ff
lea    -0x410(%rbp),%rdi
movss  -0x414(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0x418(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movss  -0x424(%rbp),%xmm2
ff
cvtss2sd %xmm2,%xmm2
lea    0xdaa(%rip),%rsi
mov    $0x3,%al
call   10b0 <sprintf@plt>
cmpl   $0x3,-0x420(%rbp)
jne    1375 <main+0x1e5>
movss  -0x414(%rbp),%xmm0
ff
movss  -0x418(%rbp),%xmm1
ff
call   1040 <multiply@plt>
movss  %xmm0,-0x424(%rbp)
ff
lea    -0x410(%rbp),%rdi
movss  -0x414(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0x418(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movss  -0x424(%rbp),%xmm2
ff
cvtss2sd %xmm2,%xmm2
lea    0xd55(%rip),%rsi
mov    $0x3,%al
call   10b0 <sprintf@plt>
cmpl   $0x4,-0x420(%rbp)
jne    13d8 <main+0x248>
movss  -0x414(%rbp),%xmm0
ff
movss  -0x418(%rbp),%xmm1
ff
call   1050 <devide@plt>
movss  %xmm0,-0x424(%rbp)
ff
lea    -0x410(%rbp),%rdi
movss  -0x414(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0x418(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movss  -0x424(%rbp),%xmm2
ff
cvtss2sd %xmm2,%xmm2
lea    0xd00(%rip),%rsi
mov    $0x3,%al
call   10b0 <sprintf@plt>
cmpl   $0x5,-0x420(%rbp)
jne    143b <main+0x2ab>
movss  -0x414(%rbp),%xmm0
ff
movss  -0x418(%rbp),%xmm1
ff
call   1070 <modulus@plt>
movss  %xmm0,-0x424(%rbp)
ff
lea    -0x410(%rbp),%rdi
movss  -0x414(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0x418(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movss  -0x424(%rbp),%xmm2
ff
cvtss2sd %xmm2,%xmm2
lea    0xcab(%rip),%rsi
mov    $0x3,%al
call   10b0 <sprintf@plt>
cmpl   $0x0,-0x420(%rbp)
jne    1462 <main+0x2d2>
lea    -0x410(%rbp),%rdi
lea    0xc9a(%rip),%rsi
mov    $0x0,%al
call   10b0 <sprintf@plt>
jmp    148a <main+0x2fa>
lea    -0x410(%rbp),%rsi
lea    0xcc0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xcb5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    11a2 <main+0x12>
lea    0xca5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x410(%rbp),%rsi
lea    -0x410(%rbp),%rdx
lea    0xca5(%rip),%rdi
mov    $0x0,%al
call   1080 <scanf@plt>
cmp    $0x0,%eax
jne    14c4 <main+0x334>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x830,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x418,%rsp
movl   $0x0,0x8(%rsp)
movl   $0x0,0x4(%rsp)
lea    0xe50(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xf61(%rip),%rdi
call   1050 <puts@plt>
lea    0xe97(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe93(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xe(%rsp),%rdx
lea    0x4(%rsp),%rcx
xor    %eax,%eax
call   1090 <scanf@plt>
test   %eax,%eax
je     13fa <main+0x25a>
lea    0xe(%rsp),%rbx
lea    0x10(%rsp),%r15
lea    0xe64(%rip),%r12
lea    0x8(%rsp),%r13
lea    0x4(%rsp),%rbp
lea    0xdd0(%rip),%r14
jmp    12ea <main+0x14a>
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
call   1080 <modulus@plt>
movss  0x8(%rsp),%xmm1
xorps  %xmm3,%xmm3
cvtss2sd %xmm1,%xmm3
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
mov    %r15,%rdi
lea    0xe54(%rip),%rsi
xchg   %ax,%ax
movaps %xmm3,%xmm0
mov    $0x3,%al
call   10c0 <sprintf@plt>
lea    0xe92(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe7f(%rip),%rdi
call   1050 <puts@plt>
movl   $0x0,0x8(%rsp)
movl   $0x0,0x4(%rsp)
lea    0xd6a(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe7b(%rip),%rdi
call   1050 <puts@plt>
lea    0xdb1(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1090 <scanf@plt>
test   %eax,%eax
je     13fa <main+0x25a>
mov    %rbx,%rdi
call   10b0 <operator_decode@plt>
cmp    $0x5,%eax
ja     127a <main+0xda>
mov    %eax,%eax
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
call   1030 <add@plt>
movss  0x8(%rsp),%xmm1
xorps  %xmm3,%xmm3
cvtss2sd %xmm1,%xmm3
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
mov    %r15,%rdi
lea    0xd4f(%rip),%rsi
jmp    1270 <main+0xd0>
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
call   10a0 <subtract@plt>
movss  0x8(%rsp),%xmm1
xorps  %xmm3,%xmm3
cvtss2sd %xmm1,%xmm3
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
mov    %r15,%rdi
lea    0xd1f(%rip),%rsi
jmp    1270 <main+0xd0>
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
call   1040 <multiply@plt>
movss  0x8(%rsp),%xmm1
xorps  %xmm3,%xmm3
cvtss2sd %xmm1,%xmm3
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
mov    %r15,%rdi
lea    0xcef(%rip),%rsi
jmp    1270 <main+0xd0>
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
call   1060 <devide@plt>
movss  0x8(%rsp),%xmm1
xorps  %xmm3,%xmm3
cvtss2sd %xmm1,%xmm3
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
mov    %r15,%rdi
lea    0xcbf(%rip),%rsi
jmp    1270 <main+0xd0>
mov    $0x1,%eax
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xcbb(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0xce8(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xcf6(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <scanf@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
jmp    13ff <main+0x25f>

LLVM IR (-O0):
@.str = [97 x i8] c"Please type a mathmatical expression in the following format\0A<Number><Operator(+-*/%%)><number>\0A\00"
@.str.1 = [53 x i8] c"Or type any other charecter as an operator to quit.\0A\00"
@.str.2 = [10 x i8] c"Formula: \00"
@.str.3 = [7 x i8] c"%f%c%f\00"
@.str.4 = [14 x i8] c"%f + %f = %f\0A\00"
@.str.5 = [14 x i8] c"%f - %f = %f\0A\00"
@.str.6 = [14 x i8] c"%f * %f = %f\0A\00"
@.str.7 = [14 x i8] c"%f / %f = %f\0A\00"
@.str.8 = [17 x i8] c"%f mod %f == %f\0A\00"
@.str.9 = [64 x i8] c"You entered an invalid operator, valid options are: +,-,*,/,%%\0A\00"
@.str.10 = [3 x i8] c"%s\00"
@.str.11 = [3 x i8] c"\0A\0A\00"
@.str.12 = [28 x i8] c"\0APress enter to continue...\00"
@.str.13 = [5 x i8] c"%c%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
%3 = alloca float
%4 = alloca float
%5 = alloca [2 x i8]
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca [1024 x i8]
store i32 0, i32* %1
br label %10
10: ; preds = %0, %100
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
store i32 0, i32* %6
store float 0.000000e+00, float* %7
store float 0.000000e+00, float* %8
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), float* %3, [2 x i8]* %5, float* %4)
%15 = icmp ne i32 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %10
store i32 1, i32* %1
br label %111
17: ; preds = %10
%18 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%19 = call i32 @operator_decode(i8* %18)
store i32 %19, i32* %6
%20 = load i32, i32* %6
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %34
22: ; preds = %17
%23 = load float, float* %3
%24 = load float, float* %4
%25 = call float @add(float %23, float %24)
store float %25, float* %7
%26 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%27 = load float, float* %3
%28 = fpext float %27 to double
%29 = load float, float* %4
%30 = fpext float %29 to double
%31 = load float, float* %7
%32 = fpext float %31 to double
%33 = call i32 (i8*, i8*, ...) @sprintf(i8* %26, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), double %28, double %30, double %32)
br label %34
34: ; preds = %22, %17
%35 = load i32, i32* %6
%36 = icmp eq i32 %35, 2
br i1 %36, label %37, label %49
37: ; preds = %34
%38 = load float, float* %3
%39 = load float, float* %4
%40 = call float @subtract(float %38, float %39)
store float %40, float* %7
%41 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%42 = load float, float* %3
%43 = fpext float %42 to double
%44 = load float, float* %4
%45 = fpext float %44 to double
%46 = load float, float* %7
%47 = fpext float %46 to double
%48 = call i32 (i8*, i8*, ...) @sprintf(i8* %41, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double %43, double %45, double %47)
br label %49
49: ; preds = %37, %34
%50 = load i32, i32* %6
%51 = icmp eq i32 %50, 3
br i1 %51, label %52, label %64
52: ; preds = %49
%53 = load float, float* %3
%54 = load float, float* %4
%55 = call float @multiply(float %53, float %54)
store float %55, float* %7
%56 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%57 = load float, float* %3
%58 = fpext float %57 to double
%59 = load float, float* %4
%60 = fpext float %59 to double
%61 = load float, float* %7
%62 = fpext float %61 to double
%63 = call i32 (i8*, i8*, ...) @sprintf(i8* %56, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), double %58, double %60, double %62)
br label %64
64: ; preds = %52, %49
%65 = load i32, i32* %6
%66 = icmp eq i32 %65, 4
br i1 %66, label %67, label %79
67: ; preds = %64
%68 = load float, float* %3
%69 = load float, float* %4
%70 = call float @devide(float %68, float %69)
store float %70, float* %7
%71 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%72 = load float, float* %3
%73 = fpext float %72 to double
%74 = load float, float* %4
%75 = fpext float %74 to double
%76 = load float, float* %7
%77 = fpext float %76 to double
%78 = call i32 (i8*, i8*, ...) @sprintf(i8* %71, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), double %73, double %75, double %77)
br label %79
79: ; preds = %67, %64
%80 = load i32, i32* %6
%81 = icmp eq i32 %80, 5
br i1 %81, label %82, label %94
82: ; preds = %79
%83 = load float, float* %3
%84 = load float, float* %4
%85 = call float @modulus(float %83, float %84)
store float %85, float* %7
%86 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%87 = load float, float* %3
%88 = fpext float %87 to double
%89 = load float, float* %4
%90 = fpext float %89 to double
%91 = load float, float* %7
%92 = fpext float %91 to double
%93 = call i32 (i8*, i8*, ...) @sprintf(i8* %86, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), double %88, double %90, double %92)
br label %94
94: ; preds = %82, %79
%95 = load i32, i32* %6
%96 = icmp eq i32 %95, 0
br i1 %96, label %97, label %100
97: ; preds = %94
%98 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%99 = call i32 (i8*, i8*, ...) @sprintf(i8* %98, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.9, i64 0, i64 0))
br label %104
100: ; preds = %94
%101 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* %101)
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0))
br label %10
104: ; preds = %97
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
%106 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%107 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%108 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* %106, i8* %107)
%109 = icmp ne i32 %108, 0
br i1 %109, label %111, label %110
110: ; preds = %104
store i32 1, i32* %1
br label %111
111: ; preds = %16, %110, %104
%112 = load i32, i32* %1
ret i32 %112
}

LLVM IR (-O2):
@.str = [97 x i8] c"Please type a mathmatical expression in the following format\0A<Number><Operator(+-*/%%)><number>\0A\00"
@.str.2 = [10 x i8] c"Formula: \00"
@.str.3 = [7 x i8] c"%f%c%f\00"
@.str.4 = [14 x i8] c"%f + %f = %f\0A\00"
@.str.5 = [14 x i8] c"%f - %f = %f\0A\00"
@.str.6 = [14 x i8] c"%f * %f = %f\0A\00"
@.str.7 = [14 x i8] c"%f / %f = %f\0A\00"
@.str.8 = [17 x i8] c"%f mod %f == %f\0A\00"
@.str.9 = [64 x i8] c"You entered an invalid operator, valid options are: +,-,*,/,%%\0A\00"
@.str.10 = [3 x i8] c"%s\00"
@.str.12 = [28 x i8] c"\0APress enter to continue...\00"
@.str.13 = [5 x i8] c"%c%c\00"
@str = [52 x i8] c"Or type any other charecter as an operator to quit.\00"
@str.14 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = alloca float
%3 = alloca float
%4 = alloca [2 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%6 = bitcast float* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), float* %2, [2 x i8]* %4, float* %3)
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %67, %0
br label %81
15: ; preds = %0, %67
%16 = call i32 @operator_decode(i8* %8)
switch i32 %16, label %67 [
i32 1, label %17
i32 2, label %27
i32 3, label %37
i32 4, label %47
i32 5, label %57
i32 0, label %75
]
17: ; preds = %15
%18 = load float, float* %2
%19 = load float, float* %3
%20 = call float @add(float %18, float %19)
%21 = load float, float* %2
%22 = fpext float %21 to double
%23 = load float, float* %3
%24 = fpext float %23 to double
%25 = fpext float %20 to double
%26 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), double %22, double %24, double %25)
br label %67
27: ; preds = %15
%28 = load float, float* %2
%29 = load float, float* %3
%30 = call float @subtract(float %28, float %29)
%31 = load float, float* %2
%32 = fpext float %31 to double
%33 = load float, float* %3
%34 = fpext float %33 to double
%35 = fpext float %30 to double
%36 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), double %32, double %34, double %35)
br label %67
37: ; preds = %15
%38 = load float, float* %2
%39 = load float, float* %3
%40 = call float @multiply(float %38, float %39)
%41 = load float, float* %2
%42 = fpext float %41 to double
%43 = load float, float* %3
%44 = fpext float %43 to double
%45 = fpext float %40 to double
%46 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), double %42, double %44, double %45)
br label %67
47: ; preds = %15
%48 = load float, float* %2
%49 = load float, float* %3
%50 = call float @devide(float %48, float %49)
%51 = load float, float* %2
%52 = fpext float %51 to double
%53 = load float, float* %3
%54 = fpext float %53 to double
%55 = fpext float %50 to double
%56 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), double %52, double %54, double %55)
br label %67
57: ; preds = %15
%58 = load float, float* %2
%59 = load float, float* %3
%60 = call float @modulus(float %58, float %59)
%61 = load float, float* %2
%62 = fpext float %61 to double
%63 = load float, float* %3
%64 = fpext float %63 to double
%65 = fpext float %60 to double
%66 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), double %62, double %64, double %65)
br label %67
67: ; preds = %15, %17, %27, %37, %47, %57
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* %5)
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.14, i64 0, i64 0))
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0))
%71 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%73 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), float* %2, [2 x i8]* %4, float* %3)
%74 = icmp eq i32 %73, 0
br i1 %74, label %14, label %15
75: ; preds = %15
%76 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.9, i64 0, i64 0))
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
%78 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* %5, i8* %5)
%79 = icmp eq i32 %78, 0
%80 = zext i1 %79 to i32
br label %81
81: ; preds = %14, %75
%82 = phi i32 [ %80, %75 ], [ 1, %14 ]
ret i32 %82
}