#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 *, ...);
double sqrt(double);
int main(void) {
  int a = 0;
  char plaintext_character = '\0', encoded_character = '\0';
  double mass = 0.0, acceleration = 0.0, force = 0.0, radius = 0.0,
         cylinder_height = 0.0, volume_cylinder = 0.0,
         phosphate_atomic_mass = 0.0, time = 0.0, initial_velocity = 0.0,
         initial_height = 0.0, projectile_height = 0.0, power = 0.0,
         resistance = 0.0, current = 0.0, x = 0.0, z = 0.0, y = 0.0;
  printf(
      "*************** WELCOME TO THE EQUATION EVALUATOR **************\n\n");
  printf("Please enter the mass and acceleration (both floating-point values) "
         "for use in Newton's Second Law: ");
  scanf("%lf%lf", &mass, &acceleration);
  force = mass * acceleration;
  printf("Newton's Second Law: force = mass * acceleration = %lf * %lf = %lf\n",
         mass, acceleration, force);
  printf("\nPlease enter the radius and height (both floating_point values) "
         "for use in a volume of cylinder equation: ");
  scanf("%lf%lf", &radius, &cylinder_height);
  volume_cylinder = 3.141592 * radius * radius * cylinder_height;
  printf("Volume of a cylinder: volume_cylinder = PI * radius^2 * height = %lf "
         "* %lf^2 * %lf = %lf\n",
         3.141592, radius, cylinder_height, volume_cylinder);
  printf("\nPlease enter the plaintext character for use in a character "
         "encoding equation: ");
  scanf(" %c", &plaintext_character);
  encoded_character = (plaintext_character + 4);
  printf("Character encoding: encoded_character = (plaintext_character + 4) = "
         "%c + 4 = %c\n",
         plaintext_character, encoded_character);
  phosphate_atomic_mass = 3 * 1.008 + 4 * 16.0 + 30.97;
  printf("\nAtomic mass of phosphate: phosphate_atomic_mass = 3 * "
         "hydrogen_mass + 4 * oxygen_mass + phosphorous_mass\n");
  printf(" = 3 * %lf + 4 * %lf + %lf = %lf\n", 1.008, 16.0, 30.97,
         phosphate_atomic_mass);
  printf("\nPlease enter the time, initial velocity, and initial height (all "
         "floating-point values) for use in\n");
  printf(" the height of projectile equation: ");
  scanf("%lf%lf%lf", &time, &initial_velocity, &initial_height);
  projectile_height =
      -16 * time * time + initial_velocity * time + initial_height;
  printf("Height of projectile: height = -16 * time^2 + initial_velocity * "
         "time + initial_height\n");
  printf(" = -16 * %lf^2 + %lf * %lf + %lf = %lf\n", time, initial_velocity,
         time, initial_height, projectile_height);
  printf("\nPlease enter the power and resistance (both floating-point values) "
         "for use in the current\n");
  printf(" through circuit equation: ");
  scanf("%lf%lf", &power, &resistance);
  current = sqrt(power / resistance);
  printf("Curent through circuit: current = square root of (power / "
         "resistance) = sqrt (%lf / %lf) = %lf\n",
         power, resistance, current);
  printf("\nPlease enter x and z (both floating_point values) and a (an "
         "integer value)\n");
  printf(" for use in a general equation: ");
  scanf("%lf%lf%d", &x, &z, &a);
  y = ((double)3 / 4) * x - z / (a % 2) + 3.141592;
  printf("general equation: y = 3/4 * x - z / (a %% 2) + PI\n = %lf * %lf - "
         "%lf / (%d %% 2) + %lf = %lf\n\n",
         ((double)3 / 4), x, z, a, 3.141592, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
movb   $0x0,-0xa(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11a5(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
lea    0xea7(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1155(%rip),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  0xd9c(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
lea    0xefa(%rip),%rdi
movsd  0xd6a(%rip),%xmm0
mov    $0x4,%al
call   1030 <printf@plt>
lea    0xf3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf81(%rip),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x9(%rbp),%eax
add    $0x4,%eax
mov    %al,-0xa(%rbp)
movsbl -0x9(%rbp),%esi
movsbl -0xa(%rbp),%edx
lea    0xf61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  0xd43(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
lea    0xf97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x48(%rbp),%xmm3
lea    0xfef(%rip),%rdi
movsd  0xd04(%rip),%xmm0
movsd  0xd04(%rip),%xmm1
movsd  0xd04(%rip),%xmm2
mov    $0x4,%al
call   1030 <printf@plt>
lea    0xfeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1042(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1059(%rip),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x58(%rbp),%rdx
lea    -0x60(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  0xca7(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
lea    0x101b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm3
movsd  -0x68(%rbp),%xmm4
lea    0x104c(%rip),%rdi
mov    $0x5,%al
call   1030 <printf@plt>
lea    0x1066(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10b4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc3(%rip),%rdi
lea    -0x70(%rbp),%rsi
lea    -0x78(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x70(%rbp),%xmm0
divsd  -0x78(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm2
lea    0x1089(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
lea    0x10db(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x111a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x112d(%rip),%rdi
lea    -0x88(%rbp),%rsi
lea    -0x90(%rbp),%rdx
lea    -0x8(%rbp),%rcx
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm1
ff
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm2
divsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xb5b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xb53(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm2
ff
mov    -0x8(%rbp),%esi
movsd  -0x98(%rbp),%xmm4
ff
lea    0x109d(%rip),%rdi
movsd  0xb15(%rip),%xmm0
movsd  0xb15(%rip),%xmm3
mov    $0x5,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
movl   $0x0,0xc(%rsp)
movb   $0x0,0xb(%rsp)
movq   $0x0,0x60(%rsp)
movq   $0x0,0x58(%rsp)
movq   $0x0,0x50(%rsp)
movq   $0x0,0x48(%rsp)
movq   $0x0,0x30(%rsp)
movq   $0x0,0x28(%rsp)
movq   $0x0,0x20(%rsp)
movq   $0x0,0x18(%rsp)
movq   $0x0,0x10(%rsp)
movq   $0x0,0x40(%rsp)
movq   $0x0,0x38(%rsp)
lea    0x120f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe70(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10c1(%rip),%rbx
lea    0x60(%rsp),%rsi
lea    0x58(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x60(%rsp),%xmm0
movsd  0x58(%rsp),%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
lea    0xe98(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x50(%rsp),%rsi
lea    0x48(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x50(%rsp),%xmm1
movsd  0xdc4(%rip),%xmm0
movapd %xmm1,%xmm3
mulsd  %xmm0,%xmm3
mulsd  %xmm1,%xmm3
movsd  0x48(%rsp),%xmm2
mulsd  %xmm2,%xmm3
lea    0xef4(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
lea    0xf40(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf83(%rip),%rdi
lea    0xb(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsbl 0xb(%rsp),%esi
lea    0x4(%rsi),%eax
movsbl %al,%edx
lea    0xf69(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x116c(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa0(%rip),%rdi
movsd  0xd53(%rip),%xmm0
movsd  0xd53(%rip),%xmm1
movsd  0xd53(%rip),%xmm2
movsd  0xd53(%rip),%xmm3
mov    $0x4,%al
call   1040 <printf@plt>
lea    0x119c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf88(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf9f(%rip),%rdi
lea    0x30(%rsp),%rsi
lea    0x28(%rsp),%rdx
lea    0x20(%rsp),%rcx
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x30(%rsp),%xmm1
movsd  0xd0f(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x28(%rsp),%xmm1
addsd  %xmm0,%xmm1
addsd  0x20(%rsp),%xmm1
movsd  %xmm1,0x68(%rsp)
lea    0x119d(%rip),%rdi
call   1030 <puts@plt>
movsd  0x30(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x20(%rsp),%xmm3
lea    0xf42(%rip),%rdi
movaps %xmm0,%xmm2
movsd  0x68(%rsp),%xmm4
mov    $0x5,%al
call   1040 <printf@plt>
lea    0x11bf(%rip),%rdi
call   1030 <puts@plt>
lea    0xf47(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x18(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x18(%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     13b9 <main+0x279>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    13c2 <main+0x282>
call   1060 <sqrt@plt>
movapd %xmm0,%xmm2
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
lea    0xf0d(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
lea    0x11aa(%rip),%rdi
call   1030 <puts@plt>
lea    0xf53(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf66(%rip),%rdi
lea    0x40(%rsp),%rsi
lea    0x38(%rsp),%rdx
lea    0xc(%rsp),%rcx
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x40(%rsp),%xmm1
movsd  0x38(%rsp),%xmm2
mov    0xc(%rsp),%esi
mov    %esi,%eax
shr    $0x1f,%eax
add    %esi,%eax
and    $0xfffffffe,%eax
mov    %esi,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movapd %xmm2,%xmm3
divsd  %xmm0,%xmm3
movsd  0xbe8(%rip),%xmm0
movapd %xmm1,%xmm4
mulsd  %xmm0,%xmm4
subsd  %xmm3,%xmm4
movsd  0xba4(%rip),%xmm3
addsd  %xmm3,%xmm4
lea    0xf05(%rip),%rdi
mov    $0x5,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [67 x i8] c"*************** WELCOME TO THE EQUATION EVALUATOR **************\0A\0A\00"
@.str.1 = [101 x i8] c"Please enter the mass and acceleration (both floating-point values) for use in Newton's Second Law: \00"
@.str.2 = [7 x i8] c"%lf%lf\00"
@.str.3 = [68 x i8] c"Newton's Second Law: force = mass * acceleration = %lf * %lf = %lf\0A\00"
@.str.4 = [108 x i8] c"\0APlease enter the radius and height (both floating_point values) for use in a volume of cylinder equation: \00"
@.str.5 = [90 x i8] c"Volume of a cylinder: volume_cylinder = PI * radius^2 * height = %lf * %lf^2 * %lf = %lf\0A\00"
@.str.6 = [81 x i8] c"\0APlease enter the plaintext character for use in a character encoding equation: \00"
@.str.7 = [4 x i8] c" %c\00"
@.str.8 = [81 x i8] c"Character encoding: encoded_character = (plaintext_character + 4) = %c + 4 = %c\0A\00"
@.str.9 = [107 x i8] c"\0AAtomic mass of phosphate: phosphate_atomic_mass = 3 * hydrogen_mass + 4 * oxygen_mass + phosphorous_mass\0A\00"
@.str.10 = [34 x i8] c" = 3 * %lf + 4 * %lf + %lf = %lf\0A\00"
@.str.11 = [101 x i8] c"\0APlease enter the time, initial velocity, and initial height (all floating-point values) for use in\0A\00"
@.str.12 = [37 x i8] c" the height of projectile equation: \00"
@.str.13 = [10 x i8] c"%lf%lf%lf\00"
@.str.14 = [88 x i8] c"Height of projectile: height = -16 * time^2 + initial_velocity * time + initial_height\0A\00"
@.str.15 = [40 x i8] c" = -16 * %lf^2 + %lf * %lf + %lf = %lf\0A\00"
@.str.16 = [92 x i8] c"\0APlease enter the power and resistance (both floating-point values) for use in the current\0A\00"
@.str.17 = [28 x i8] c" through circuit equation: \00"
@.str.18 = [96 x i8] c"Curent through circuit: current = square root of (power / resistance) = sqrt (%lf / %lf) = %lf\0A\00"
@.str.19 = [77 x i8] c"\0APlease enter x and z (both floating_point values) and a (an integer value)\0A\00"
@.str.20 = [33 x i8] c" for use in a general equation: \00"
@.str.21 = [9 x i8] c"%lf%lf%d\00"
@.str.22 = [95 x i8] c"general equation: y = 3/4 * x - z / (a %% 2) + PI\0A = %lf * %lf - %lf / (%d %% 2) + %lf = %lf\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
store i32 0, i32* %1
store i32 0, i32* %2
store i8 0, i8* %3
store i8 0, i8* %4
store double 0.000000e+00, double* %5
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
store double 0.000000e+00, double* %8
store double 0.000000e+00, double* %9
store double 0.000000e+00, double* %10
store double 0.000000e+00, double* %11
store double 0.000000e+00, double* %12
store double 0.000000e+00, double* %13
store double 0.000000e+00, double* %14
store double 0.000000e+00, double* %15
store double 0.000000e+00, double* %16
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %19
store double 0.000000e+00, double* %20
store double 0.000000e+00, double* %21
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.1, i64 0, i64 0))
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double* %5, double* %6)
%25 = load double, double* %5
%26 = load double, double* %6
%27 = fmul double %25, %26
store double %27, double* %7
%28 = load double, double* %5
%29 = load double, double* %6
%30 = load double, double* %7
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0), double %28, double %29, double %30)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.4, i64 0, i64 0))
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double* %8, double* %9)
%34 = load double, double* %8
%35 = fmul double 0x400921FAFC8B007A, %34
%36 = load double, double* %8
%37 = fmul double %35, %36
%38 = load double, double* %9
%39 = fmul double %37, %38
store double %39, double* %10
%40 = load double, double* %8
%41 = load double, double* %9
%42 = load double, double* %10
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.5, i64 0, i64 0), double 0x400921FAFC8B007A, double %40, double %41, double %42)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.6, i64 0, i64 0))
%45 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %3)
%46 = load i8, i8* %3
%47 = sext i8 %46 to i32
%48 = add nsw i32 %47, 4
%49 = trunc i32 %48 to i8
store i8 %49, i8* %4
%50 = load i8, i8* %3
%51 = sext i8 %50 to i32
%52 = load i8, i8* %4
%53 = sext i8 %52 to i32
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.8, i64 0, i64 0), i32 %51, i32 %53)
store double 0x40587F9DB22D0E56, double* %11
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.9, i64 0, i64 0))
%56 = load double, double* %11
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), double 1.008000e+00, double 1.600000e+01, double 3.097000e+01, double %56)
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.11, i64 0, i64 0))
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0))
%60 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), double* %12, double* %13, double* %14)
%61 = load double, double* %12
%62 = fmul double -1.600000e+01, %61
%63 = load double, double* %12
%64 = load double, double* %13
%65 = load double, double* %12
%66 = fmul double %64, %65
%67 = call double @llvm.fmuladd.f64(double %62, double %63, double %66)
%68 = load double, double* %14
%69 = fadd double %67, %68
store double %69, double* %15
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.14, i64 0, i64 0))
%71 = load double, double* %12
%72 = load double, double* %13
%73 = load double, double* %12
%74 = load double, double* %14
%75 = load double, double* %15
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0), double %71, double %72, double %73, double %74, double %75)
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.16, i64 0, i64 0))
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.17, i64 0, i64 0))
%79 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double* %16, double* %17)
%80 = load double, double* %16
%81 = load double, double* %17
%82 = fdiv double %80, %81
%83 = call double @sqrt(double %82)
store double %83, double* %18
%84 = load double, double* %16
%85 = load double, double* %17
%86 = load double, double* %18
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str.18, i64 0, i64 0), double %84, double %85, double %86)
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.19, i64 0, i64 0))
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.20, i64 0, i64 0))
%90 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0), double* %19, double* %20, i32* %2)
%91 = load double, double* %19
%92 = load double, double* %20
%93 = load i32, i32* %2
%94 = srem i32 %93, 2
%95 = sitofp i32 %94 to double
%96 = fdiv double %92, %95
%97 = fneg double %96
%98 = call double @llvm.fmuladd.f64(double 7.500000e-01, double %91, double %97)
%99 = fadd double %98, 0x400921FAFC8B007A
store double %99, double* %21
%100 = load double, double* %19
%101 = load double, double* %20
%102 = load i32, i32* %2
%103 = load double, double* %21
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.22, i64 0, i64 0), double 7.500000e-01, double %100, double %101, i32 %102, double 0x400921FAFC8B007A, double %103)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [101 x i8] c"Please enter the mass and acceleration (both floating-point values) for use in Newton's Second Law: \00"
@.str.2 = [7 x i8] c"%lf%lf\00"
@.str.3 = [68 x i8] c"Newton's Second Law: force = mass * acceleration = %lf * %lf = %lf\0A\00"
@.str.4 = [108 x i8] c"\0APlease enter the radius and height (both floating_point values) for use in a volume of cylinder equation: \00"
@.str.5 = [90 x i8] c"Volume of a cylinder: volume_cylinder = PI * radius^2 * height = %lf * %lf^2 * %lf = %lf\0A\00"
@.str.6 = [81 x i8] c"\0APlease enter the plaintext character for use in a character encoding equation: \00"
@.str.7 = [4 x i8] c" %c\00"
@.str.8 = [81 x i8] c"Character encoding: encoded_character = (plaintext_character + 4) = %c + 4 = %c\0A\00"
@.str.10 = [34 x i8] c" = 3 * %lf + 4 * %lf + %lf = %lf\0A\00"
@.str.12 = [37 x i8] c" the height of projectile equation: \00"
@.str.13 = [10 x i8] c"%lf%lf%lf\00"
@.str.15 = [40 x i8] c" = -16 * %lf^2 + %lf * %lf + %lf = %lf\0A\00"
@.str.17 = [28 x i8] c" through circuit equation: \00"
@.str.18 = [96 x i8] c"Curent through circuit: current = square root of (power / resistance) = sqrt (%lf / %lf) = %lf\0A\00"
@.str.20 = [33 x i8] c" for use in a general equation: \00"
@.str.21 = [9 x i8] c"%lf%lf%d\00"
@.str.22 = [95 x i8] c"general equation: y = 3/4 * x - z / (a %% 2) + PI\0A = %lf * %lf - %lf / (%d %% 2) + %lf = %lf\0A\0A\00"
@str = [66 x i8] c"*************** WELCOME TO THE EQUATION EVALUATOR **************\0A\00"
@str.23 = [106 x i8] c"\0AAtomic mass of phosphate: phosphate_atomic_mass = 3 * hydrogen_mass + 4 * oxygen_mass + phosphorous_mass\00"
@str.24 = [100 x i8] c"\0APlease enter the time, initial velocity, and initial height (all floating-point values) for use in\00"
@str.25 = [87 x i8] c"Height of projectile: height = -16 * time^2 + initial_velocity * time + initial_height\00"
@str.26 = [91 x i8] c"\0APlease enter the power and resistance (both floating-point values) for use in the current\00"
@str.27 = [76 x i8] c"\0APlease enter x and z (both floating_point values) and a (an integer value)\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = bitcast i32* %1 to i8*
store i32 0, i32* %1
store i8 0, i8* %2
%15 = bitcast double* %3 to i8*
store double 0.000000e+00, double* %3
%16 = bitcast double* %4 to i8*
store double 0.000000e+00, double* %4
%17 = bitcast double* %5 to i8*
store double 0.000000e+00, double* %5
%18 = bitcast double* %6 to i8*
store double 0.000000e+00, double* %6
%19 = bitcast double* %7 to i8*
store double 0.000000e+00, double* %7
%20 = bitcast double* %8 to i8*
store double 0.000000e+00, double* %8
%21 = bitcast double* %9 to i8*
store double 0.000000e+00, double* %9
%22 = bitcast double* %10 to i8*
store double 0.000000e+00, double* %10
%23 = bitcast double* %11 to i8*
store double 0.000000e+00, double* %11
%24 = bitcast double* %12 to i8*
store double 0.000000e+00, double* %12
%25 = bitcast double* %13 to i8*
store double 0.000000e+00, double* %13
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str, i64 0, i64 0))
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([101 x i8], [101 x i8]* @.str.1, i64 0, i64 0))
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double* %3, double* %4)
%29 = load double, double* %3
%30 = load double, double* %4
%31 = fmul double %29, %30
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.3, i64 0, i64 0), double %29, double %30, double %31)
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([108 x i8], [108 x i8]* @.str.4, i64 0, i64 0))
%34 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double* %5, double* %6)
%35 = load double, double* %5
%36 = fmul double %35, 0x400921FAFC8B007A
%37 = fmul double %35, %36
%38 = load double, double* %6
%39 = fmul double %38, %37
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @.str.5, i64 0, i64 0), double 0x400921FAFC8B007A, double %35, double %38, double %39)
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.6, i64 0, i64 0))
%42 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %2)
%43 = load i8, i8* %2
%44 = sext i8 %43 to i32
%45 = add i8 %43, 4
%46 = sext i8 %45 to i32
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.8, i64 0, i64 0), i32 %44, i32 %46)
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.23, i64 0, i64 0))
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), double 1.008000e+00, double 1.600000e+01, double 3.097000e+01, double 0x40587F9DB22D0E56)
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @str.24, i64 0, i64 0))
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0))
%52 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), double* %7, double* %8, double* %9)
%53 = load double, double* %7
%54 = fmul double %53, -1.600000e+01
%55 = load double, double* %8
%56 = fmul double %53, %55
%57 = call double @llvm.fmuladd.f64(double %54, double %53, double %56)
%58 = load double, double* %9
%59 = fadd double %58, %57
%60 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.25, i64 0, i64 0))
%61 = load double, double* %7
%62 = load double, double* %8
%63 = load double, double* %9
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0), double %61, double %62, double %61, double %63, double %59)
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([91 x i8], [91 x i8]* @str.26, i64 0, i64 0))
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.17, i64 0, i64 0))
%67 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double* %10, double* %11)
%68 = load double, double* %10
%69 = load double, double* %11
%70 = fdiv double %68, %69
%71 = call double @sqrt(double %70)
%72 = load double, double* %10
%73 = load double, double* %11
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @.str.18, i64 0, i64 0), double %72, double %73, double %71)
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.27, i64 0, i64 0))
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.20, i64 0, i64 0))
%77 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0), double* %12, double* %13, i32* %1)
%78 = load double, double* %12
%79 = load double, double* %13
%80 = load i32, i32* %1
%81 = srem i32 %80, 2
%82 = sitofp i32 %81 to double
%83 = fneg double %79
%84 = fdiv double %83, %82
%85 = call double @llvm.fmuladd.f64(double %78, double 7.500000e-01, double %84)
%86 = fadd double %85, 0x400921FAFC8B007A
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @.str.22, i64 0, i64 0), double 7.500000e-01, double %78, double %79, i32 %80, double 0x400921FAFC8B007A, double %86)
ret i32 0
}