#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(void) {
  float QtyBox = 0;
  float QtySideline = 0;
  float QtyPremium = 0;
  float QtyGenAdmission = 0;
  float TotalTix = 0;
  float GrossSales = 0;
  printf("\nEnter Number of Box Tickets Sold: ");
  scanf("%f", &QtyBox);
  printf("Enter Number of Sideline Tickets Sold: ");
  scanf("%f", &QtySideline);
  printf("Enter Number of Premium Tickets Sold: ");
  scanf("%f", &QtyPremium);
  printf("Enter Number of General Admission Tickets Sold: ");
  scanf("%f", &QtyGenAdmission);
  printf(
      "\n\n%1.0f Box tickets at $%1.0f each were sold for a total of: $%1.2f",
      QtyBox, 250.00, QtyBox * 250.00);
  printf("\n%1.0f Sideline tickets at $%1.0f each were sold for a total of: "
         "$%1.2f",
         QtySideline, 100.00, QtySideline * 100.00);
  printf(
      "\n%1.0f Premium tickets at $%1.0f each were sold for a total of: $%1.2f",
      QtyPremium, 50.00, QtyPremium * 50.00);
  printf("\n%1.0f General Admission tickets at $%1.0f each were sold for a "
         "total of: $%1.2f",
         QtyGenAdmission, 25.00, QtyGenAdmission * 25.00);
  TotalTix = QtyBox + QtySideline + QtyPremium + QtyGenAdmission;
  GrossSales = (QtyBox * 250.00) + (QtySideline * 100.00) +
               (QtyPremium * 50.00) + (QtyGenAdmission * 25.00);
  printf("\n\nTotal number of tickets sold:\t\t%1.0f", TotalTix);
  printf("\nTotal Sale Amount:\t\t\t$%1.2f\n\n", GrossSales);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe76(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xe1f(%rip),%xmm1
mulsd  %xmm1,%xmm2
lea    0xecb(%rip),%rdi
movsd  0xe0c(%rip),%xmm1
mov    $0x3,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xdf3(%rip),%xmm1
mulsd  %xmm1,%xmm2
lea    0xedb(%rip),%rdi
movsd  0xde0(%rip),%xmm1
mov    $0x3,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xdaf(%rip),%xmm1
mulsd  %xmm1,%xmm2
lea    0xeef(%rip),%rdi
movsd  0xd9c(%rip),%xmm1
mov    $0x3,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xd73(%rip),%xmm1
mulsd  %xmm1,%xmm2
lea    0xf02(%rip),%rdi
movsd  0xd60(%rip),%xmm1
mov    $0x3,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xd3e(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd2a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xd09(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xce8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movl   $0x0,0x18(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeea(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xee6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xef2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x18(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe36(%rip),%xmm1
movaps %xmm0,%xmm2
mulsd  %xmm1,%xmm2
lea    0xeef(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe17(%rip),%xmm1
movaps %xmm0,%xmm2
mulsd  %xmm1,%xmm2
lea    0xf0c(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdf8(%rip),%xmm1
movaps %xmm0,%xmm2
mulsd  %xmm1,%xmm2
lea    0xf2d(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdd9(%rip),%xmm1
movaps %xmm0,%xmm2
mulsd  %xmm1,%xmm2
lea    0xf4d(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movss  0x18(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
addss  %xmm1,%xmm0
movss  0x10(%rsp),%xmm3
addss  %xmm3,%xmm0
movss  0xc(%rsp),%xmm4
addss  %xmm4,%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  0xd7d(%rip),%xmm1
mulsd  0xd6d(%rip),%xmm2
addsd  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
mulsd  0xd6a(%rip),%xmm1
addsd  %xmm2,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm4,%xmm2
mulsd  0xd5f(%rip),%xmm2
addsd  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtsd2ss %xmm2,%xmm1
movss  %xmm1,0x1c(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xf16(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x1c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf25(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"\0AEnter Number of Box Tickets Sold: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [40 x i8] c"Enter Number of Sideline Tickets Sold: \00"
@.str.3 = [39 x i8] c"Enter Number of Premium Tickets Sold: \00"
@.str.4 = [49 x i8] c"Enter Number of General Admission Tickets Sold: \00"
@.str.5 = [68 x i8] c"\0A\0A%1.0f Box tickets at $%1.0f each were sold for a total of: $%1.2f\00"
@.str.6 = [72 x i8] c"\0A%1.0f Sideline tickets at $%1.0f each were sold for a total of: $%1.2f\00"
@.str.7 = [71 x i8] c"\0A%1.0f Premium tickets at $%1.0f each were sold for a total of: $%1.2f\00"
@.str.8 = [81 x i8] c"\0A%1.0f General Admission tickets at $%1.0f each were sold for a total of: $%1.2f\00"
@.str.9 = [39 x i8] c"\0A\0ATotal number of tickets sold:\09\09%1.0f\00"
@.str.10 = [31 x i8] c"\0ATotal Sale Amount:\09\09\09$%1.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
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
store float 0.000000e+00, float* %4
store float 0.000000e+00, float* %5
store float 0.000000e+00, float* %6
store float 0.000000e+00, float* %7
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%16 = load float, float* %2
%17 = fpext float %16 to double
%18 = load float, float* %2
%19 = fpext float %18 to double
%20 = fmul double %19, 2.500000e+02
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.5, i64 0, i64 0), double %17, double 2.500000e+02, double %20)
%22 = load float, float* %3
%23 = fpext float %22 to double
%24 = load float, float* %3
%25 = fpext float %24 to double
%26 = fmul double %25, 1.000000e+02
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.6, i64 0, i64 0), double %23, double 1.000000e+02, double %26)
%28 = load float, float* %4
%29 = fpext float %28 to double
%30 = load float, float* %4
%31 = fpext float %30 to double
%32 = fmul double %31, 5.000000e+01
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.7, i64 0, i64 0), double %29, double 5.000000e+01, double %32)
%34 = load float, float* %5
%35 = fpext float %34 to double
%36 = load float, float* %5
%37 = fpext float %36 to double
%38 = fmul double %37, 2.500000e+01
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.8, i64 0, i64 0), double %35, double 2.500000e+01, double %38)
%40 = load float, float* %2
%41 = load float, float* %3
%42 = fadd float %40, %41
%43 = load float, float* %4
%44 = fadd float %42, %43
%45 = load float, float* %5
%46 = fadd float %44, %45
store float %46, float* %6
%47 = load float, float* %2
%48 = fpext float %47 to double
%49 = load float, float* %3
%50 = fpext float %49 to double
%51 = fmul double %50, 1.000000e+02
%52 = call double @llvm.fmuladd.f64(double %48, double 2.500000e+02, double %51)
%53 = load float, float* %4
%54 = fpext float %53 to double
%55 = call double @llvm.fmuladd.f64(double %54, double 5.000000e+01, double %52)
%56 = load float, float* %5
%57 = fpext float %56 to double
%58 = call double @llvm.fmuladd.f64(double %57, double 2.500000e+01, double %55)
%59 = fptrunc double %58 to float
store float %59, float* %7
%60 = load float, float* %6
%61 = fpext float %60 to double
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), double %61)
%63 = load float, float* %7
%64 = fpext float %63 to double
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), double %64)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"\0AEnter Number of Box Tickets Sold: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [40 x i8] c"Enter Number of Sideline Tickets Sold: \00"
@.str.3 = [39 x i8] c"Enter Number of Premium Tickets Sold: \00"
@.str.4 = [49 x i8] c"Enter Number of General Admission Tickets Sold: \00"
@.str.5 = [68 x i8] c"\0A\0A%1.0f Box tickets at $%1.0f each were sold for a total of: $%1.2f\00"
@.str.6 = [72 x i8] c"\0A%1.0f Sideline tickets at $%1.0f each were sold for a total of: $%1.2f\00"
@.str.7 = [71 x i8] c"\0A%1.0f Premium tickets at $%1.0f each were sold for a total of: $%1.2f\00"
@.str.8 = [81 x i8] c"\0A%1.0f General Admission tickets at $%1.0f each were sold for a total of: $%1.2f\00"
@.str.9 = [39 x i8] c"\0A\0ATotal number of tickets sold:\09\09%1.0f\00"
@.str.10 = [31 x i8] c"\0ATotal Sale Amount:\09\09\09$%1.2f\0A\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %1 to i8*
store float 0.000000e+00, float* %1
%6 = bitcast float* %2 to i8*
store float 0.000000e+00, float* %2
%7 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%8 = bitcast float* %4 to i8*
store float 0.000000e+00, float* %4
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%17 = load float, float* %1
%18 = fpext float %17 to double
%19 = fmul double %18, 2.500000e+02
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.5, i64 0, i64 0), double %18, double 2.500000e+02, double %19)
%21 = load float, float* %2
%22 = fpext float %21 to double
%23 = fmul double %22, 1.000000e+02
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str.6, i64 0, i64 0), double %22, double 1.000000e+02, double %23)
%25 = load float, float* %3
%26 = fpext float %25 to double
%27 = fmul double %26, 5.000000e+01
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str.7, i64 0, i64 0), double %26, double 5.000000e+01, double %27)
%29 = load float, float* %4
%30 = fpext float %29 to double
%31 = fmul double %30, 2.500000e+01
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.8, i64 0, i64 0), double %30, double 2.500000e+01, double %31)
%33 = load float, float* %1
%34 = load float, float* %2
%35 = fadd float %33, %34
%36 = load float, float* %3
%37 = fadd float %35, %36
%38 = load float, float* %4
%39 = fadd float %37, %38
%40 = fpext float %33 to double
%41 = fpext float %34 to double
%42 = fmul double %41, 1.000000e+02
%43 = call double @llvm.fmuladd.f64(double %40, double 2.500000e+02, double %42)
%44 = fpext float %36 to double
%45 = call double @llvm.fmuladd.f64(double %44, double 5.000000e+01, double %43)
%46 = fpext float %38 to double
%47 = call double @llvm.fmuladd.f64(double %46, double 2.500000e+01, double %45)
%48 = fptrunc double %47 to float
%49 = fpext float %39 to double
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0), double %49)
%51 = fpext float %48 to double
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), double %51)
ret i32 0
}