#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 /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float a1, a2, intSum, intDiff, intProd, intQuot, intMod;
  a1 = a2 = intSum = intDiff = intProd = intQuot = intMod = -999.99;
  printf("Please provide a number for the first float: \n");
  scanf(" %f", &a1);
  printf("Please provide a number for the second float: \n");
  scanf(" %f", &a2);
  intSum = a1 + a2;
  printf("The number for the sum of the two floats is %.2f\n\n", intSum);
  if (a1 > a2) {
    intDiff = a1 - a2;
  } else {
    intDiff = a2 - a1;
  }
  printf("The number for the difference of the two float is %.2f\n\n", intDiff);
  intProd = a1 * a2;
  printf("The number for the product of the two float is %.2f\n\n", intProd);
  if (a1 == 0 || a2 == 0) {
    printf(
        "\nYou cannot any number divide by zero because it produces a non-real "
        "result. Any zero dived by any integer is equal to zero.\n\n");
  } else if (a1 > a2) {
    intQuot = a1 / a2;
    printf("The number for the quotient of the two float is %.2f\n\n", intQuot);
  } else {
    intQuot = a2 / a1;
    printf("The number for the quotient of the two float is %.2f\n\n", intQuot);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xebc(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xeaf(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xea2(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe95(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe88(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe7b(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe76(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe82(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    120f <main+0xef>
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    121e <main+0xfe>
movss  -0xc(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe6c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe7f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1277 <main+0x157>
jp     1277 <main+0x157>
jmp    128e <main+0x16e>
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    12a1 <main+0x181>
jp     12a1 <main+0x181>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1306 <main+0x1e6>
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    12db <main+0x1bb>
movss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1301 <main+0x1e1>
movss  -0xc(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1306 <main+0x1e6>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0xc479ff5c,0x8(%rsp)
c4
movl   $0xc479ff5c,0xc(%rsp)
c4
lea    0xf91(%rip),%rdi
call   1030 <puts@plt>
lea    0xea8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf9f(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
addss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe6f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movaps %xmm0,%xmm2
subss  %xmm1,%xmm2
movaps %xmm1,%xmm3
subss  %xmm0,%xmm3
cmpltss %xmm0,%xmm1
andps  %xmm1,%xmm2
andnps %xmm3,%xmm1
orps   %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe65(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
mulss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe80(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
jne    1207 <main+0xd7>
jnp    1223 <main+0xf3>
movss  0x8(%rsp),%xmm1
ucomiss %xmm2,%xmm1
jne    1214 <main+0xe4>
jnp    1223 <main+0xf3>
ucomiss %xmm1,%xmm0
jbe    1231 <main+0x101>
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
jmp    123c <main+0x10c>
lea    0xf10(%rip),%rdi
call   1030 <puts@plt>
jmp    124a <main+0x11a>
divss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe63(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"Please provide a number for the first float: \0A\00"
@.str.1 = [4 x i8] c" %f\00"
@.str.2 = [48 x i8] c"Please provide a number for the second float: \0A\00"
@.str.3 = [51 x i8] c"The number for the sum of the two floats is %.2f\0A\0A\00"
@.str.4 = [57 x i8] c"The number for the difference of the two float is %.2f\0A\0A\00"
@.str.5 = [54 x i8] c"The number for the product of the two float is %.2f\0A\0A\00"
@.str.6 = [127 x i8] c"\0AYou cannot any number divide by zero because it produces a non-real result. Any zero dived by any integer is equal to zero.\0A\0A\00"
@.str.7 = [55 x i8] c"The number for the quotient of the two float is %.2f\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %1
store float 0xC08F3FEB80000000, float* %8
store float 0xC08F3FEB80000000, float* %7
store float 0xC08F3FEB80000000, float* %6
store float 0xC08F3FEB80000000, float* %5
store float 0xC08F3FEB80000000, float* %4
store float 0xC08F3FEB80000000, float* %3
store float 0xC08F3FEB80000000, float* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float* %2)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float* %3)
%13 = load float, float* %2
%14 = load float, float* %3
%15 = fadd float %13, %14
store float %15, float* %4
%16 = load float, float* %4
%17 = fpext float %16 to double
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), double %17)
%19 = load float, float* %2
%20 = load float, float* %3
%21 = fcmp ogt float %19, %20
br i1 %21, label %22, label %26
22: ; preds = %0
%23 = load float, float* %2
%24 = load float, float* %3
%25 = fsub float %23, %24
store float %25, float* %5
br label %30
26: ; preds = %0
%27 = load float, float* %3
%28 = load float, float* %2
%29 = fsub float %27, %28
store float %29, float* %5
br label %30
30: ; preds = %26, %22
%31 = load float, float* %5
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0), double %32)
%34 = load float, float* %2
%35 = load float, float* %3
%36 = fmul float %34, %35
store float %36, float* %6
%37 = load float, float* %6
%38 = fpext float %37 to double
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0), double %38)
%40 = load float, float* %2
%41 = fcmp oeq float %40, 0.000000e+00
br i1 %41, label %45, label %42
42: ; preds = %30
%43 = load float, float* %3
%44 = fcmp oeq float %43, 0.000000e+00
br i1 %44, label %45, label %47
45: ; preds = %42, %30
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.6, i64 0, i64 0))
br label %66
47: ; preds = %42
%48 = load float, float* %2
%49 = load float, float* %3
%50 = fcmp ogt float %48, %49
br i1 %50, label %51, label %58
51: ; preds = %47
%52 = load float, float* %2
%53 = load float, float* %3
%54 = fdiv float %52, %53
store float %54, float* %7
%55 = load float, float* %7
%56 = fpext float %55 to double
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0), double %56)
br label %65
58: ; preds = %47
%59 = load float, float* %3
%60 = load float, float* %2
%61 = fdiv float %59, %60
store float %61, float* %7
%62 = load float, float* %7
%63 = fpext float %62 to double
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0), double %63)
br label %65
65: ; preds = %58, %51
br label %66
66: ; preds = %65, %45
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c" %f\00"
@.str.3 = [51 x i8] c"The number for the sum of the two floats is %.2f\0A\0A\00"
@.str.4 = [57 x i8] c"The number for the difference of the two float is %.2f\0A\0A\00"
@.str.5 = [54 x i8] c"The number for the product of the two float is %.2f\0A\0A\00"
@.str.7 = [55 x i8] c"The number for the quotient of the two float is %.2f\0A\0A\00"
@str = [46 x i8] c"Please provide a number for the first float: \00"
@str.8 = [47 x i8] c"Please provide a number for the second float: \00"
@str.9 = [126 x i8] c"\0AYou cannot any number divide by zero because it produces a non-real result. Any zero dived by any integer is equal to zero.\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
store float 0xC08F3FEB80000000, float* %2
store float 0xC08F3FEB80000000, float* %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.8, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float* %2)
%9 = load float, float* %1
%10 = load float, float* %2
%11 = fadd float %9, %10
%12 = fpext float %11 to double
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), double %12)
%14 = load float, float* %1
%15 = load float, float* %2
%16 = fcmp ogt float %14, %15
%17 = fsub float %14, %15
%18 = fsub float %15, %14
%19 = select i1 %16, float %17, float %18
%20 = fpext float %19 to double
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0), double %20)
%22 = load float, float* %1
%23 = load float, float* %2
%24 = fmul float %22, %23
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0), double %25)
%27 = load float, float* %1
%28 = fcmp oeq float %27, 0.000000e+00
%29 = load float, float* %2
%30 = fcmp oeq float %29, 0.000000e+00
%31 = select i1 %28, i1 true, i1 %30
br i1 %31, label %32, label %34
32: ; preds = %0
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([126 x i8], [126 x i8]* @str.9, i64 0, i64 0))
br label %44
34: ; preds = %0
%35 = fcmp ogt float %27, %29
br i1 %35, label %36, label %40
36: ; preds = %34
%37 = fdiv float %27, %29
%38 = fpext float %37 to double
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0), double %38)
br label %44
40: ; preds = %34
%41 = fdiv float %29, %27
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0), double %42)
br label %44
44: ; preds = %36, %40, %32
ret i32 0
}