#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 *);
int main(void) {
  int QtyBox = 0;
  int QtySideline = 0;
  int QtyPremium = 0;
  int QtyGenAdmission = 0;
  int TotalTix = 0;
  float GrossSales = 0;
  printf("\nEnter Number of Box Tickets Sold: ");
  scanf("%d", &QtyBox);
  printf("Enter Number of Sideline Tickets Sold: ");
  scanf("%d", &QtySideline);
  printf("Enter Number of Premium Tickets Sold: ");
  scanf("%d", &QtyPremium);
  printf("Enter Number of General Admission Tickets Sold: ");
  scanf("%d", &QtyGenAdmission);
  printf(
      "\n\n%d Box tickets at $%1.0f each were sold for a total of: \t\t$%15.2f",
      QtyBox, 250.00, ((float)QtyBox * 250.00));
  printf("\n%d Sideline tickets at $%1.0f each were sold for a total of: "
         "\t\t$%15.2f",
         QtySideline, 100.00, ((float)QtySideline * 100.00));
  printf("\n%d Premium tickets at $%1.0f each were sold for a total of: "
         "\t\t$%15.2f",
         QtyPremium, 50.00, ((float)QtyPremium * 50.00));
  printf("\n%d General Admission tickets at $%1.0f each were sold for a total "
         "of: \t$%15.2f",
         QtyGenAdmission, 25.00, ((float)QtyGenAdmission * 25.00));
  TotalTix = QtyBox + QtySideline + QtyPremium + QtyGenAdmission;
  GrossSales = ((float)QtyBox * 250.00) + ((float)QtySideline * 100.00) +
               ((float)QtyPremium * 50.00) + ((float)QtyGenAdmission * 25.00);
  printf("\n\nTotal number of tickets sold:\t\t%d", 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)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1099(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x107b(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x105d(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x103f(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
cvtsi2ssl -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe2a(%rip),%xmm0
mulsd  %xmm0,%xmm1
lea    0xed3(%rip),%rdi
movsd  0xe17(%rip),%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
cvtsi2ssl -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe04(%rip),%xmm0
mulsd  %xmm0,%xmm1
lea    0xee9(%rip),%rdi
movsd  0xdf1(%rip),%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
cvtsi2ssl -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdc6(%rip),%xmm0
mulsd  %xmm0,%xmm1
lea    0xf03(%rip),%rdi
movsd  0xdb3(%rip),%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
cvtsi2ssl -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd90(%rip),%xmm0
mulsd  %xmm0,%xmm1
lea    0xf1c(%rip),%rdi
movsd  0xd7d(%rip),%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xd65(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd51(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xd30(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
cvtsi2ssl -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd0f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x18(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xee8(%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    0x10ae(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xee3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xeef(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x18(%rsp),%esi
cvtsi2ss %esi,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe34(%rip),%xmm0
mulsd  %xmm0,%xmm1
lea    0xeed(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    0x14(%rsp),%esi
xorps  %xmm0,%xmm0
cvtsi2ss %esi,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xe10(%rip),%xmm0
mulsd  %xmm0,%xmm1
lea    0xf05(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    0x10(%rsp),%esi
xorps  %xmm0,%xmm0
cvtsi2ss %esi,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xdec(%rip),%xmm0
mulsd  %xmm0,%xmm1
lea    0xf21(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
xorps  %xmm0,%xmm0
cvtsi2ss %esi,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xdc8(%rip),%xmm0
mulsd  %xmm0,%xmm1
lea    0xf3c(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    0x18(%rsp),%eax
mov    0x14(%rsp),%ecx
lea    (%rcx,%rax,1),%esi
mov    0x10(%rsp),%edx
add    %edx,%esi
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    0xc(%rsp),%eax
xorps  %xmm1,%xmm1
cvtsi2ss %ecx,%xmm1
add    %eax,%esi
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  0xd71(%rip),%xmm1
mulsd  0xd61(%rip),%xmm0
cvtsi2ss %edx,%xmm2
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
mulsd  0xd5a(%rip),%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xd4b(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x1c(%rsp)
lea    0xf05(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0x1c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf11(%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"%d\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%d Box tickets at $%1.0f each were sold for a total of: \09\09$%15.2f\00"
@.str.6 = [72 x i8] c"\0A%d Sideline tickets at $%1.0f each were sold for a total of: \09\09$%15.2f\00"
@.str.7 = [71 x i8] c"\0A%d Premium tickets at $%1.0f each were sold for a total of: \09\09$%15.2f\00"
@.str.8 = [80 x i8] c"\0A%d General Admission tickets at $%1.0f each were sold for a total of: \09$%15.2f\00"
@.str.9 = [36 x i8] c"\0A\0ATotal number of tickets sold:\09\09%d\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 i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %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), i32* %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), i32* %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), i32* %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), i32* %5)
%16 = load i32, i32* %2
%17 = load i32, i32* %2
%18 = sitofp i32 %17 to float
%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), i32 %16, double 2.500000e+02, double %20)
%22 = load i32, i32* %3
%23 = load i32, i32* %3
%24 = sitofp i32 %23 to float
%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), i32 %22, double 1.000000e+02, double %26)
%28 = load i32, i32* %4
%29 = load i32, i32* %4
%30 = sitofp i32 %29 to float
%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), i32 %28, double 5.000000e+01, double %32)
%34 = load i32, i32* %5
%35 = load i32, i32* %5
%36 = sitofp i32 %35 to float
%37 = fpext float %36 to double
%38 = fmul double %37, 2.500000e+01
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.8, i64 0, i64 0), i32 %34, double 2.500000e+01, double %38)
%40 = load i32, i32* %2
%41 = load i32, i32* %3
%42 = add nsw i32 %40, %41
%43 = load i32, i32* %4
%44 = add nsw i32 %42, %43
%45 = load i32, i32* %5
%46 = add nsw i32 %44, %45
store i32 %46, i32* %6
%47 = load i32, i32* %2
%48 = sitofp i32 %47 to float
%49 = fpext float %48 to double
%50 = load i32, i32* %3
%51 = sitofp i32 %50 to float
%52 = fpext float %51 to double
%53 = fmul double %52, 1.000000e+02
%54 = call double @llvm.fmuladd.f64(double %49, double 2.500000e+02, double %53)
%55 = load i32, i32* %4
%56 = sitofp i32 %55 to float
%57 = fpext float %56 to double
%58 = call double @llvm.fmuladd.f64(double %57, double 5.000000e+01, double %54)
%59 = load i32, i32* %5
%60 = sitofp i32 %59 to float
%61 = fpext float %60 to double
%62 = call double @llvm.fmuladd.f64(double %61, double 2.500000e+01, double %58)
%63 = fptrunc double %62 to float
store float %63, float* %7
%64 = load i32, i32* %6
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i32 %64)
%66 = load float, float* %7
%67 = fpext float %66 to double
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), double %67)
ret i32 0
}

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