int main(void) {
  double force = 0.0, mass = 0.0, acceleration = 0.0;
  double volume_cylinder = 0.0, radius = 0.0, height = 0.0;
  char plaintext_character = '\0', encoded_character = '\0';
  double phosphate_atomic_mass = 0.0, hydrogen_mass = 1.008,
         oxygen_mass = 16.00, phosphorous_mass = 30.97;
  double projectile_height = 0.0, time = 0.0, initial_velocity = 0.0,
         initial_height = 0.0;
  double current = 0.0, power = 0.0, resistance = 0.0;
  double var_X = 0.0, var_Y = 0.0, var_Z = 0.0;
  int var_A = 0;
  printf("*******************Equation 1: Newton's Second Law of "
         "Motion********************");
  printf("Please enter the mass: ");
  scanf("%lf", &mass);
  printf("Please enter the acceleration: ");
  scanf("%lf", &acceleration);
  force = mass * acceleration;
  printf("Force = mass * acceleration = %lf * %lf = %lf\n\n", mass,
         acceleration, force);
  printf("************************Equation 2: Volume of a "
         "Cylinder************************");
  printf("Please enter the radius: ");
  scanf("%lf", &radius);
  printf("Please enter the height: ");
  scanf("%lf", &height);
  volume_cylinder = 3.14159265 * radius * radius * height;
  printf("Volume of a Cylinder = PI * radius^2 * height = 3.14 * %.2lf^2 * "
         "%.2lf = 3.14159265 * %.2lf * %.2lf * %.2lf = %lf\n\n",
         radius, height, radius, radius, height, volume_cylinder);
  printf("************************Equation 3: Encoding a "
         "Character************************");
  printf("Please enter a character: ");
  scanf(" %c", &plaintext_character);
  encoded_character = plaintext_character + 4;
  printf("Encoded Character = Original Character + 4 = %c + 4 = %c\n\n",
         plaintext_character, encoded_character);
  printf("*********************Equation 4: Atomic Mass of "
         "Phosphate***********************");
  phosphate_atomic_mass = 3 * 1.008 + 4 * 16.00 + 30.97;
  printf("Atomic Mass of Phosphate = 3 * Mass of Hydrogen + 4 * Mass of Oxygen "
         "+ Mass of Phosphorous = 3 * %.3lf + 4 * %.3lf + %.3lf = %.3lf\n\n",
         hydrogen_mass, oxygen_mass, phosphorous_mass, phosphate_atomic_mass);
  printf("**********************Equation 5: Height of a "
         "Projectile************************");
  printf("Please enter time: ");
  scanf("%lf", &time);
  printf("Please enter initial velocity: ");
  scanf("%lf", &initial_velocity);
  printf("Please enter initial height: ");
  scanf("%lf", &initial_height);
  projectile_height =
      -16 * time * time + initial_velocity * time + initial_height;
  printf("Projectile Height = -16 * Time^2 + Initial Velocity * Time + Initial "
         "Height = -16 * %lf^2 + %lf * %lf + %lf = %lf\n\n",
         time, initial_velocity, time, initial_height, projectile_height);
  printf("****************Equation 6: Current through Circuit in "
         "Amperes******************");
  printf("Please enter power: ");
  scanf("%lf", &power);
  printf("Please enter resistance: ");
  scanf("%lf", &resistance);
  current = sqrt(power / resistance);
  printf("Current = sqrt(power / resistance) = sqrt(%lf / %lf ) = %lf", power,
         resistance, current);
  printf("\n\n");
  printf("*************************Equation 7: General "
         "Equation***************************");
  printf("Please enter x: ");
  scanf("%lf", &var_X);
  printf("Please enter z: ");
  scanf("%lf", &var_Z);
  printf("Please enter A: ");
  scanf("%d", &var_A);
  var_Y = (3.0 / 4) * var_X - var_Z / (var_A % 2) + 3.14159265;
  printf("Y = (3 / 4) * x - z / (A %% 2) + PI = (3 / 4) * %lf - %lf / (%d %% "
         "2) + 3.14159265 = %lf\n",
         var_X, var_Z, var_A, var_Y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%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)
movb   $0x0,-0x39(%rbp)
movb   $0x0,-0x3a(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xea6(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe91(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe7c(%rip),%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
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x0,-0xb4(%rbp)
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1302(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x12e2(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
lea    0xe39(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1288(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1268(%rip),%rdi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  0xd1b(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
movsd  -0x28(%rbp),%xmm5
lea    0xe58(%rip),%rdi
mov    $0x6,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0e(%rip),%rdi
lea    -0x39(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x39(%rbp),%eax
add    $0x4,%eax
mov    %al,-0x3a(%rbp)
movsbl -0x39(%rbp),%esi
movsbl -0x3a(%rbp),%edx
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  0xc8f(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm3
lea    0xf3d(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
lea    0xfb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1167(%rip),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xfeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1147(%rip),%rdi
lea    -0x78(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xfeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1127(%rip),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  0xbea(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm3
movsd  -0x68(%rbp),%xmm4
lea    0xfa2(%rip),%rdi
mov    $0x5,%al
call   1030 <printf@plt>
lea    0x1008(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x104b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10a4(%rip),%rdi
lea    -0x90(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0x103d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1081(%rip),%rdi
lea    -0x98(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x90(%rbp),%xmm0
ff
divsd  -0x98(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0x88(%rbp),%xmm2
ff
lea    0xfff(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xd81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x101f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1062(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfff(%rip),%rdi
lea    -0xa0(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0x1050(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfdc(%rip),%rdi
lea    -0xb0(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0x103e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1041(%rip),%rdi
lea    -0xb4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
mov    -0xb4(%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  0xa34(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xa1c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
mov    -0xb4(%rbp),%esi
movsd  -0xa8(%rbp),%xmm2
ff
lea    0xfb0(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
movq   $0x0,0x58(%rsp)
movq   $0x0,0x50(%rsp)
movq   $0x0,0x48(%rsp)
movq   $0x0,0x40(%rsp)
movb   $0x0,0x3(%rsp)
movq   $0x0,0x38(%rsp)
movq   $0x0,0x30(%rsp)
movq   $0x0,0x28(%rsp)
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x20(%rsp)
movq   $0x0,0x18(%rsp)
movl   $0x0,0x4(%rsp)
lea    0xe7c(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1362(%rip),%rbx
lea    0x58(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xeb3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x50(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x58(%rsp),%xmm0
movsd  0x50(%rsp),%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
lea    0xea2(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf07(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x48(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xf04(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x40(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x48(%rsp),%xmm0
movsd  0xd84(%rip),%xmm5
mulsd  %xmm0,%xmm5
mulsd  %xmm0,%xmm5
movsd  0x40(%rsp),%xmm1
mulsd  %xmm1,%xmm5
lea    0xee1(%rip),%rdi
movapd %xmm0,%xmm2
movapd %xmm0,%xmm3
movapd %xmm1,%xmm4
mov    $0x6,%al
call   1040 <printf@plt>
lea    0xf3b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf7e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf8b(%rip),%rdi
lea    0x3(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsbl 0x3(%rsp),%esi
lea    0x4(%rsi),%eax
movsbl %al,%edx
lea    0xf71(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf9e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfe1(%rip),%rdi
movsd  0xcfb(%rip),%xmm0
movsd  0xcfb(%rip),%xmm1
movsd  0xcfb(%rip),%xmm2
movsd  0xcfb(%rip),%xmm3
mov    $0x4,%al
call   1040 <printf@plt>
lea    0x1038(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x107b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x38(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x1072(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x1075(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x38(%rsp),%xmm0
movsd  0xc89(%rip),%xmm4
mulsd  %xmm0,%xmm4
movsd  0x30(%rsp),%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm4
addsd  %xmm2,%xmm4
movsd  0x28(%rsp),%xmm3
addsd  %xmm3,%xmm4
lea    0x1044(%rip),%rdi
movapd %xmm0,%xmm2
mov    $0x5,%al
call   1040 <printf@plt>
lea    0x10a6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10e9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x10e1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     143c <main+0x2fc>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    1445 <main+0x305>
call   1060 <sqrt@plt>
movapd %xmm0,%xmm2
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0x10aa(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
lea    0xe2d(%rip),%rdi
call   1030 <puts@plt>
lea    0x10cc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x110f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10ac(%rip),%rbx
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x10fc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x10f0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10f3(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    0x4(%rsp),%esi
mov    %esi,%eax
shr    $0x1f,%eax
add    %esi,%eax
and    $0xfffffffe,%eax
mov    %esi,%ecx
sub    %eax,%ecx
xorps  %xmm2,%xmm2
cvtsi2sd %ecx,%xmm2
movapd %xmm1,%xmm3
divsd  %xmm2,%xmm3
movsd  0xb20(%rip),%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm3,%xmm2
addsd  0xae0(%rip),%xmm2
lea    0x109e(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [81 x i8] c"*******************Equation 1: Newton's Second Law of Motion********************\00"
@.str.1 = [24 x i8] c"Please enter the mass: \00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [32 x i8] c"Please enter the acceleration: \00"
@.str.4 = [48 x i8] c"Force = mass * acceleration = %lf * %lf = %lf\0A\0A\00"
@.str.5 = [81 x i8] c"************************Equation 2: Volume of a Cylinder************************\00"
@.str.6 = [26 x i8] c"Please enter the radius: \00"
@.str.7 = [26 x i8] c"Please enter the height: \00"
@.str.8 = [116 x i8] c"Volume of a Cylinder = PI * radius^2 * height = 3.14 * %.2lf^2 * %.2lf = 3.14159265 * %.2lf * %.2lf * %.2lf = %lf\0A\0A\00"
@.str.9 = [81 x i8] c"************************Equation 3: Encoding a Character************************\00"
@.str.10 = [27 x i8] c"Please enter a character: \00"
@.str.11 = [4 x i8] c" %c\00"
@.str.12 = [59 x i8] c"Encoded Character = Original Character + 4 = %c + 4 = %c\0A\0A\00"
@.str.13 = [81 x i8] c"*********************Equation 4: Atomic Mass of Phosphate***********************\00"
@.str.14 = [133 x i8] c"Atomic Mass of Phosphate = 3 * Mass of Hydrogen + 4 * Mass of Oxygen + Mass of Phosphorous = 3 * %.3lf + 4 * %.3lf + %.3lf = %.3lf\0A\0A\00"
@.str.15 = [81 x i8] c"**********************Equation 5: Height of a Projectile************************\00"
@.str.16 = [20 x i8] c"Please enter time: \00"
@.str.17 = [32 x i8] c"Please enter initial velocity: \00"
@.str.18 = [30 x i8] c"Please enter initial height: \00"
@.str.19 = [116 x i8] c"Projectile Height = -16 * Time^2 + Initial Velocity * Time + Initial Height = -16 * %lf^2 + %lf * %lf + %lf = %lf\0A\0A\00"
@.str.20 = [81 x i8] c"****************Equation 6: Current through Circuit in Amperes******************\00"
@.str.21 = [21 x i8] c"Please enter power: \00"
@.str.22 = [26 x i8] c"Please enter resistance: \00"
@.str.23 = [60 x i8] c"Current = sqrt(power / resistance) = sqrt(%lf / %lf ) = %lf\00"
@.str.24 = [3 x i8] c"\0A\0A\00"
@.str.25 = [81 x i8] c"*************************Equation 7: General Equation***************************\00"
@.str.26 = [17 x i8] c"Please enter x: \00"
@.str.27 = [17 x i8] c"Please enter z: \00"
@.str.28 = [17 x i8] c"Please enter A: \00"
@.str.29 = [3 x i8] c"%d\00"
@.str.30 = [90 x i8] c"Y = (3 / 4) * x - z / (A %% 2) + PI = (3 / 4) * %lf - %lf / (%d %% 2) + 3.14159265 = %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i8
%9 = alloca i8
%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
%22 = alloca double
%23 = alloca double
%24 = alloca i32
store i32 0, i32* %1
store double 0.000000e+00, double* %2
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
store double 0.000000e+00, double* %5
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
store i8 0, i8* %8
store i8 0, i8* %9
store double 0.000000e+00, double* %10
store double 1.008000e+00, double* %11
store double 1.600000e+01, double* %12
store double 3.097000e+01, 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
store double 0.000000e+00, double* %22
store double 0.000000e+00, double* %23
store i32 0, i32* %24
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %3)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%29 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %4)
%30 = load double, double* %3
%31 = load double, double* %4
%32 = fmul double %30, %31
store double %32, double* %2
%33 = load double, double* %3
%34 = load double, double* %4
%35 = load double, double* %2
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), double %33, double %34, double %35)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.5, i64 0, i64 0))
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%39 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %6)
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%41 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %7)
%42 = load double, double* %6
%43 = fmul double 0x400921FB53C8D4F1, %42
%44 = load double, double* %6
%45 = fmul double %43, %44
%46 = load double, double* %7
%47 = fmul double %45, %46
store double %47, double* %5
%48 = load double, double* %6
%49 = load double, double* %7
%50 = load double, double* %6
%51 = load double, double* %6
%52 = load double, double* %7
%53 = load double, double* %5
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str.8, i64 0, i64 0), double %48, double %49, double %50, double %51, double %52, double %53)
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.9, i64 0, i64 0))
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%57 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* %8)
%58 = load i8, i8* %8
%59 = sext i8 %58 to i32
%60 = add nsw i32 %59, 4
%61 = trunc i32 %60 to i8
store i8 %61, i8* %9
%62 = load i8, i8* %8
%63 = sext i8 %62 to i32
%64 = load i8, i8* %9
%65 = sext i8 %64 to i32
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.12, i64 0, i64 0), i32 %63, i32 %65)
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.13, i64 0, i64 0))
store double 0x40587F9DB22D0E56, double* %10
%68 = load double, double* %11
%69 = load double, double* %12
%70 = load double, double* %13
%71 = load double, double* %10
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.14, i64 0, i64 0), double %68, double %69, double %70, double %71)
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.15, i64 0, i64 0))
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0))
%75 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %15)
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.17, i64 0, i64 0))
%77 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %16)
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.18, i64 0, i64 0))
%79 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %17)
%80 = load double, double* %15
%81 = fmul double -1.600000e+01, %80
%82 = load double, double* %15
%83 = load double, double* %16
%84 = load double, double* %15
%85 = fmul double %83, %84
%86 = call double @llvm.fmuladd.f64(double %81, double %82, double %85)
%87 = load double, double* %17
%88 = fadd double %86, %87
store double %88, double* %14
%89 = load double, double* %15
%90 = load double, double* %16
%91 = load double, double* %15
%92 = load double, double* %17
%93 = load double, double* %14
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str.19, i64 0, i64 0), double %89, double %90, double %91, double %92, double %93)
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.20, i64 0, i64 0))
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0))
%97 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %19)
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.22, i64 0, i64 0))
%99 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %20)
%100 = load double, double* %19
%101 = load double, double* %20
%102 = fdiv double %100, %101
%103 = call double @sqrt(double %102)
store double %103, double* %18
%104 = load double, double* %19
%105 = load double, double* %20
%106 = load double, double* %18
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.23, i64 0, i64 0), double %104, double %105, double %106)
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0))
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.25, i64 0, i64 0))
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.26, i64 0, i64 0))
%111 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %21)
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.27, i64 0, i64 0))
%113 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %23)
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.28, i64 0, i64 0))
%115 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), i32* %24)
%116 = load double, double* %21
%117 = load double, double* %23
%118 = load i32, i32* %24
%119 = srem i32 %118, 2
%120 = sitofp i32 %119 to double
%121 = fdiv double %117, %120
%122 = fneg double %121
%123 = call double @llvm.fmuladd.f64(double 7.500000e-01, double %116, double %122)
%124 = fadd double %123, 0x400921FB53C8D4F1
store double %124, double* %22
%125 = load double, double* %21
%126 = load double, double* %23
%127 = load i32, i32* %24
%128 = load double, double* %22
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.30, i64 0, i64 0), double %125, double %126, i32 %127, double %128)
ret i32 0
}

LLVM IR (-O2):
@.str = [81 x i8] c"*******************Equation 1: Newton's Second Law of Motion********************\00"
@.str.1 = [24 x i8] c"Please enter the mass: \00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [32 x i8] c"Please enter the acceleration: \00"
@.str.4 = [48 x i8] c"Force = mass * acceleration = %lf * %lf = %lf\0A\0A\00"
@.str.5 = [81 x i8] c"************************Equation 2: Volume of a Cylinder************************\00"
@.str.6 = [26 x i8] c"Please enter the radius: \00"
@.str.7 = [26 x i8] c"Please enter the height: \00"
@.str.8 = [116 x i8] c"Volume of a Cylinder = PI * radius^2 * height = 3.14 * %.2lf^2 * %.2lf = 3.14159265 * %.2lf * %.2lf * %.2lf = %lf\0A\0A\00"
@.str.9 = [81 x i8] c"************************Equation 3: Encoding a Character************************\00"
@.str.10 = [27 x i8] c"Please enter a character: \00"
@.str.11 = [4 x i8] c" %c\00"
@.str.12 = [59 x i8] c"Encoded Character = Original Character + 4 = %c + 4 = %c\0A\0A\00"
@.str.13 = [81 x i8] c"*********************Equation 4: Atomic Mass of Phosphate***********************\00"
@.str.14 = [133 x i8] c"Atomic Mass of Phosphate = 3 * Mass of Hydrogen + 4 * Mass of Oxygen + Mass of Phosphorous = 3 * %.3lf + 4 * %.3lf + %.3lf = %.3lf\0A\0A\00"
@.str.15 = [81 x i8] c"**********************Equation 5: Height of a Projectile************************\00"
@.str.16 = [20 x i8] c"Please enter time: \00"
@.str.17 = [32 x i8] c"Please enter initial velocity: \00"
@.str.18 = [30 x i8] c"Please enter initial height: \00"
@.str.19 = [116 x i8] c"Projectile Height = -16 * Time^2 + Initial Velocity * Time + Initial Height = -16 * %lf^2 + %lf * %lf + %lf = %lf\0A\0A\00"
@.str.20 = [81 x i8] c"****************Equation 6: Current through Circuit in Amperes******************\00"
@.str.21 = [21 x i8] c"Please enter power: \00"
@.str.22 = [26 x i8] c"Please enter resistance: \00"
@.str.23 = [60 x i8] c"Current = sqrt(power / resistance) = sqrt(%lf / %lf ) = %lf\00"
@.str.25 = [81 x i8] c"*************************Equation 7: General Equation***************************\00"
@.str.26 = [17 x i8] c"Please enter x: \00"
@.str.27 = [17 x i8] c"Please enter z: \00"
@.str.28 = [17 x i8] c"Please enter A: \00"
@.str.29 = [3 x i8] c"%d\00"
@.str.30 = [90 x i8] c"Y = (3 / 4) * x - z / (A %% 2) + PI = (3 / 4) * %lf - %lf / (%d %% 2) + 3.14159265 = %lf\0A\00"
@str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i8
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca i32
%14 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%15 = bitcast double* %2 to i8*
store double 0.000000e+00, double* %2
%16 = bitcast double* %3 to i8*
store double 0.000000e+00, double* %3
%17 = bitcast double* %4 to i8*
store double 0.000000e+00, double* %4
store i8 0, i8* %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 i32* %13 to i8*
store i32 0, i32* %13
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %1)
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0))
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %2)
%31 = load double, double* %1
%32 = load double, double* %2
%33 = fmul double %31, %32
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), double %31, double %32, double %33)
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.5, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%37 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %3)
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%39 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %4)
%40 = load double, double* %3
%41 = fmul double %40, 0x400921FB53C8D4F1
%42 = fmul double %40, %41
%43 = load double, double* %4
%44 = fmul double %43, %42
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([116 x i8], [116 x i8]* @.str.8, i64 0, i64 0), double %40, double %43, double %40, double %40, double %43, double %44)
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.9, i64 0, i64 0))
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%48 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* %5)
%49 = load i8, i8* %5
%50 = sext i8 %49 to i32
%51 = add i8 %49, 4
%52 = sext i8 %51 to i32
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.12, i64 0, i64 0), i32 %50, i32 %52)
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.13, i64 0, i64 0))
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([133 x i8], [133 x i8]* @.str.14, i64 0, i64 0), double 1.008000e+00, double 1.600000e+01, double 3.097000e+01, double 0x40587F9DB22D0E56)
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.15, i64 0, i64 0))
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0))
%58 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %6)
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.17, i64 0, i64 0))
%60 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %7)
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.18, i64 0, i64 0))
%62 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %8)
%63 = load double, double* %6
%64 = fmul double %63, -1.600000e+01
%65 = load double, double* %7
%66 = fmul double %63, %65
%67 = call double @llvm.fmuladd.f64(double %64, double %63, double %66)
%68 = load double, double* %8
%69 = fadd double %68, %67
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([116 x i8], [116 x i8]* @.str.19, i64 0, i64 0), double %63, double %65, double %63, double %68, double %69)
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.20, i64 0, i64 0))
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0))
%73 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %9)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.22, i64 0, i64 0))
%75 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %10)
%76 = load double, double* %9
%77 = load double, double* %10
%78 = fdiv double %76, %77
%79 = call double @sqrt(double %78)
%80 = load double, double* %9
%81 = load double, double* %10
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.23, i64 0, i64 0), double %80, double %81, double %79)
%83 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.25, i64 0, i64 0))
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.26, i64 0, i64 0))
%86 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %11)
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.27, i64 0, i64 0))
%88 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %12)
%89 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.28, i64 0, i64 0))
%90 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i64 0, i64 0), i32* %13)
%91 = load double, double* %11
%92 = load double, double* %12
%93 = load i32, i32* %13
%94 = srem i32 %93, 2
%95 = sitofp i32 %94 to double
%96 = fneg double %92
%97 = fdiv double %96, %95
%98 = call double @llvm.fmuladd.f64(double %91, double 7.500000e-01, double %97)
%99 = fadd double %98, 0x400921FB53C8D4F1
%100 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @.str.30, i64 0, i64 0), double %91, double %92, i32 %93, double %99)
ret i32 0
}