#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 *, ...);
int main() {
  int pizza, taco;
  float tax, pizpr, tapr;
  printf("How much pizza is there?\n");
  scanf(" %d", &pizza);
  printf("How much does the pizza cost?\n");
  scanf(" %f", &pizpr);
  printf("How many tacos are in your inventory?\n");
  scanf(" %d", &taco);
  printf("What do I pay for tacos?\n");
  scanf(" %f", &tapr);
  printf("What is the tax rate in percent?\n");
  scanf(" %f", &tax);
  float taxrate, tacotax, piztax, pizcst, tacocst;
  taxrate = (tax / 100);
  piztax = taxrate * pizpr;
  tacotax = taxrate * tapr;
  tacocst = tacotax + tapr;
  pizcst = piztax + pizpr;
  float totalcost;
  totalcost = pizcst + tacocst;
  printf("Crazy Taco\n");
  printf("001395\n");
  printf("There are  %d slices of pizza\n", pizza);
  printf("There are %d tacos\n", taco);
  printf("The tax rate is %2.2f\n", taxrate);
  printf("The price of pizza is $%2.2f\n", pizpr);
  printf("The price of tacos are $%2.2f\n", tapr);
  printf("The tax on pizza is $%2.2f\n", piztax);
  printf("The tax on tacos is $%2.2f\n", tacotax);
  printf("The cost of of pizza is $%2.2f\n", pizcst);
  printf("The cost of tacos are $%2.2f\n", tacocst);
  printf("The cost of pizza is $%2.2f\n", pizcst);
  printf("The total cost is $%2.2f\n", totalcost);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9a(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9d(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7d(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm0
movss  0xe24(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x24(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x28(%rbp),%xmm0
addss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe71(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe71(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe78(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe80(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe85(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe93(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x30(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0x1002(%rip),%rdi
call   1030 <puts@plt>
lea    0xeba(%rip),%r14
lea    0x34(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xff9(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9c(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xff5(%rip),%rdi
call   1030 <puts@plt>
lea    0x30(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x1000(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xffe(%rip),%rdi
call   1030 <puts@plt>
lea    0x2c(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x2c(%rsp),%xmm2
divss  0xe26(%rip),%xmm2
movss  %xmm2,0x18(%rsp)
movss  0xc(%rsp),%xmm0
movaps %xmm2,%xmm3
mulss  %xmm0,%xmm3
movss  %xmm3,0x1c(%rsp)
movss  0x8(%rsp),%xmm1
mulss  %xmm1,%xmm2
movss  %xmm2,0x20(%rsp)
addss  %xmm2,%xmm1
movss  %xmm1,0x24(%rsp)
addss  %xmm3,%xmm0
movss  %xmm0,0x10(%rsp)
addss  %xmm1,%xmm0
movss  %xmm0,0x28(%rsp)
lea    0xfaf(%rip),%rdi
call   1030 <puts@plt>
lea    0xfae(%rip),%rdi
call   1030 <puts@plt>
mov    0x34(%rsp),%esi
lea    0xdc8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rsp),%esi
lea    0xdd5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movss  0x18(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdd1(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdd0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdd6(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x1c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xddd(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xde1(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
lea    0xddf(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xde7(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xdf7(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x28(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdf6(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"How much pizza is there?\0A\00"
@.str.1 = [4 x i8] c" %d\00"
@.str.2 = [31 x i8] c"How much does the pizza cost?\0A\00"
@.str.3 = [4 x i8] c" %f\00"
@.str.4 = [39 x i8] c"How many tacos are in your inventory?\0A\00"
@.str.5 = [26 x i8] c"What do I pay for tacos?\0A\00"
@.str.6 = [34 x i8] c"What is the tax rate in percent?\0A\00"
@.str.7 = [12 x i8] c"Crazy Taco\0A\00"
@.str.8 = [8 x i8] c"001395\0A\00"
@.str.9 = [31 x i8] c"There are %d slices of pizza\0A\00"
@.str.10 = [20 x i8] c"There are %d tacos\0A\00"
@.str.11 = [23 x i8] c"The tax rate is %2.2f\0A\00"
@.str.12 = [30 x i8] c"The price of pizza is $%2.2f\0A\00"
@.str.13 = [31 x i8] c"The price of tacos are $%2.2f\0A\00"
@.str.14 = [28 x i8] c"The tax on pizza is $%2.2f\0A\00"
@.str.15 = [28 x i8] c"The tax on tacos is $%2.2f\0A\00"
@.str.16 = [32 x i8] c"The cost of of pizza is $%2.2f\0A\00"
@.str.17 = [30 x i8] c"The cost of tacos are $%2.2f\0A\00"
@.str.18 = [29 x i8] c"The cost of pizza is $%2.2f\0A\00"
@.str.19 = [26 x i8] c"The total cost is $%2.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store i32 0, i32* %1
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), float* %5)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), float* %6)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), float* %4)
%23 = load float, float* %4
%24 = fdiv float %23, 1.000000e+02
store float %24, float* %7
%25 = load float, float* %7
%26 = load float, float* %5
%27 = fmul float %25, %26
store float %27, float* %9
%28 = load float, float* %7
%29 = load float, float* %6
%30 = fmul float %28, %29
store float %30, float* %8
%31 = load float, float* %8
%32 = load float, float* %6
%33 = fadd float %31, %32
store float %33, float* %11
%34 = load float, float* %9
%35 = load float, float* %5
%36 = fadd float %34, %35
store float %36, float* %10
%37 = load float, float* %10
%38 = load float, float* %11
%39 = fadd float %37, %38
store float %39, float* %12
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%42 = load i32, i32* %2
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i32 %42)
%44 = load i32, i32* %3
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i32 %44)
%46 = load float, float* %7
%47 = fpext float %46 to double
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), double %47)
%49 = load float, float* %5
%50 = fpext float %49 to double
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), double %50)
%52 = load float, float* %6
%53 = fpext float %52 to double
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0), double %53)
%55 = load float, float* %9
%56 = fpext float %55 to double
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), double %56)
%58 = load float, float* %8
%59 = fpext float %58 to double
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.15, i64 0, i64 0), double %59)
%61 = load float, float* %10
%62 = fpext float %61 to double
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0), double %62)
%64 = load float, float* %11
%65 = fpext float %64 to double
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0), double %65)
%67 = load float, float* %10
%68 = fpext float %67 to double
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.18, i64 0, i64 0), double %68)
%70 = load float, float* %12
%71 = fpext float %70 to double
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.19, i64 0, i64 0), double %71)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c" %d\00"
@.str.3 = [4 x i8] c" %f\00"
@.str.9 = [31 x i8] c"There are %d slices of pizza\0A\00"
@.str.10 = [20 x i8] c"There are %d tacos\0A\00"
@.str.11 = [23 x i8] c"The tax rate is %2.2f\0A\00"
@.str.12 = [30 x i8] c"The price of pizza is $%2.2f\0A\00"
@.str.13 = [31 x i8] c"The price of tacos are $%2.2f\0A\00"
@.str.14 = [28 x i8] c"The tax on pizza is $%2.2f\0A\00"
@.str.15 = [28 x i8] c"The tax on tacos is $%2.2f\0A\00"
@.str.16 = [32 x i8] c"The cost of of pizza is $%2.2f\0A\00"
@.str.17 = [30 x i8] c"The cost of tacos are $%2.2f\0A\00"
@.str.18 = [29 x i8] c"The cost of pizza is $%2.2f\0A\00"
@.str.19 = [26 x i8] c"The total cost is $%2.2f\0A\00"
@str = [25 x i8] c"How much pizza is there?\00"
@str.20 = [30 x i8] c"How much does the pizza cost?\00"
@str.21 = [38 x i8] c"How many tacos are in your inventory?\00"
@str.22 = [25 x i8] c"What do I pay for tacos?\00"
@str.23 = [33 x i8] c"What is the tax rate in percent?\00"
@str.24 = [11 x i8] c"Crazy Taco\00"
@str.25 = [7 x i8] c"001395\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast float* %3 to i8*
%9 = bitcast float* %4 to i8*
%10 = bitcast float* %5 to i8*
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.20, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), float* %4)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.21, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.22, i64 0, i64 0))
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), float* %5)
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.23, i64 0, i64 0))
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), float* %3)
%21 = load float, float* %3
%22 = fdiv float %21, 1.000000e+02
%23 = load float, float* %4
%24 = fmul float %22, %23
%25 = load float, float* %5
%26 = fmul float %22, %25
%27 = fadd float %25, %26
%28 = fadd float %23, %24
%29 = fadd float %28, %27
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.24, i64 0, i64 0))
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.25, i64 0, i64 0))
%32 = load i32, i32* %1
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i32 %32)
%34 = load i32, i32* %2
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i32 %34)
%36 = fpext float %22 to double
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), double %36)
%38 = load float, float* %4
%39 = fpext float %38 to double
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), double %39)
%41 = load float, float* %5
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0), double %42)
%44 = fpext float %24 to double
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), double %44)
%46 = fpext float %26 to double
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.15, i64 0, i64 0), double %46)
%48 = fpext float %28 to double
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.16, i64 0, i64 0), double %48)
%50 = fpext float %27 to double
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0), double %50)
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.18, i64 0, i64 0), double %48)
%53 = fpext float %29 to double
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.19, i64 0, i64 0), double %53)
ret i32 0
}