#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 argc, char const *argv[]) {
  const double paper_weight_per_m2 = 0.018;
  const double ink_per_m2 = 0.004;
  const double package_money = 0.003;
  const double hq_per_paper = 0.003;
  const double man_money = 0.01;
  double paper_money_per_ton = 7600;
  double paper_money = 0;
  double ink_money_per_kilogram = 25;
  double ink_money = 0;
  int paper_per_bag = 480;
  double bag_money = 2.5;
  double bag_money_per_paper = 0;
  int paper_layer = 2;
  double a = 0.33;
  double transport_money = 0;
  double tax_rate = 1.09;
  double money_total = 0;
  printf("Paper per bag?(480):");
  scanf("%d", &paper_per_bag);
  printf("Paper Money?(7600):");
  scanf("%lf", &paper_money_per_ton);
  printf("Paper layer?(2):");
  scanf("%d", &paper_layer);
  printf("Paper length?(0.33):");
  scanf("%lf", &a);
  paper_money = (a * a) * paper_weight_per_m2 * paper_layer *
                (paper_money_per_ton / 1000);
  printf("Ink money (/kg)?(25):");
  scanf("%lf", &ink_money_per_kilogram);
  ink_money = (a * a) * ink_per_m2 * ink_money_per_kilogram;
  printf("Bag Money?(2.5):");
  scanf("%lf", &bag_money);
  bag_money_per_paper = bag_money / paper_per_bag;
  printf("Transport: ");
  scanf("%lf", &transport_money);
  printf("Tax rate: ");
  scanf("%lf", &tax_rate);
  money_total = (package_money + hq_per_paper + paper_money + ink_money +
                 transport_money + man_money + bag_money_per_paper) *
                tax_rate;
  printf(" Total Money is %.4f Yuan.\n", money_total);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xedf(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xef5(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xec6(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xea9(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x1e0,-0x5c(%rbp)
movsd  0xe85(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x2,-0x74(%rbp)
movsd  0xe61(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xe41(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5e(%rip),%rdi
lea    -0x5c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe55(%rip),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe1e(%rip),%rdi
lea    -0x74(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe15(%rip),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x80(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  0xd94(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x74(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  0xd72(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdbc(%rip),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x80(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  0xd2b(%rip),%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
lea    0xdca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd7c(%rip),%rdi
lea    -0x68(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x68(%rbp),%xmm0
cvtsi2sdl -0x5c(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
lea    0xda8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd49(%rip),%rdi
lea    -0x88(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xd91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd26(%rip),%rdi
lea    -0x90(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  0xc94(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
addsd  -0x88(%rbp),%xmm0
ff
movsd  0xc72(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x70(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
lea    0xd36(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x58,%rsp
movabs $0x40bdb00000000000,%rax
b0 bd 40
mov    %rax,0x38(%rsp)
movabs $0x4039000000000000,%rax
mov    %rax,0x30(%rsp)
movl   $0x1e0,0xc(%rsp)
movabs $0x4004000000000000,%rax
mov    %rax,0x28(%rsp)
movl   $0x2,0x8(%rsp)
movabs $0x3fd51eb851eb851f,%rax
1e d5 3f
mov    %rax,0x10(%rsp)
movq   $0x0,0x20(%rsp)
movabs $0x3ff170a3d70a3d71,%rax
70 f1 3f
mov    %rax,0x18(%rsp)
lea    0xe96(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe9d(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xe8a(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe90(%rip),%r14
lea    0x38(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xe7e(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xe72(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
mulsd  %xmm0,%xmm0
mulsd  0xde1(%rip),%xmm0
cvtsi2sdl 0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x38(%rsp),%xmm0
divsd  0xdd1(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x50(%rsp)
lea    0xe36(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x30(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
mulsd  %xmm0,%xmm0
mulsd  0xda0(%rip),%xmm0
mulsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x48(%rsp)
lea    0xe11(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
movsd  0x28(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdl 0xc(%rsp),%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rsp)
lea    0xdec(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x20(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xddb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
movsd  0x50(%rsp),%xmm0
addsd  0xd1e(%rip),%xmm0
addsd  0x48(%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
addsd  0xd12(%rip),%xmm0
addsd  0x40(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
lea    0xd9b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Paper per bag?(480):\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"Paper Money?(7600):\00"
@.str.3 = [4 x i8] c"%lf\00"
@.str.4 = [17 x i8] c"Paper layer?(2):\00"
@.str.5 = [21 x i8] c"Paper length?(0.33):\00"
@.str.6 = [22 x i8] c"Ink money (/kg)?(25):\00"
@.str.7 = [17 x i8] c"Bag Money?(2.5):\00"
@.str.8 = [12 x i8] c"Transport: \00"
@.str.9 = [11 x i8] c"Tax rate: \00"
@.str.10 = [28 x i8] c" Total Money is %.4f Yuan.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%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 double
%14 = alloca double
%15 = alloca i32
%16 = alloca double
%17 = alloca double
%18 = alloca i32
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.800000e-02, double* %6
store double 4.000000e-03, double* %7
store double 3.000000e-03, double* %8
store double 3.000000e-03, double* %9
store double 1.000000e-02, double* %10
store double 7.600000e+03, double* %11
store double 0.000000e+00, double* %12
store double 2.500000e+01, double* %13
store double 0.000000e+00, double* %14
store i32 480, i32* %15
store double 2.500000e+00, double* %16
store double 0.000000e+00, double* %17
store i32 2, i32* %18
store double 3.300000e-01, double* %19
store double 0.000000e+00, double* %20
store double 1.090000e+00, double* %21
store double 0.000000e+00, double* %22
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %15)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %11)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %18)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %19)
%31 = load double, double* %19
%32 = load double, double* %19
%33 = fmul double %31, %32
%34 = fmul double %33, 1.800000e-02
%35 = load i32, i32* %18
%36 = sitofp i32 %35 to double
%37 = fmul double %34, %36
%38 = load double, double* %11
%39 = fdiv double %38, 1.000000e+03
%40 = fmul double %37, %39
store double %40, double* %12
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%42 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %13)
%43 = load double, double* %19
%44 = load double, double* %19
%45 = fmul double %43, %44
%46 = fmul double %45, 4.000000e-03
%47 = load double, double* %13
%48 = fmul double %46, %47
store double %48, double* %14
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%50 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %16)
%51 = load double, double* %16
%52 = load i32, i32* %15
%53 = sitofp i32 %52 to double
%54 = fdiv double %51, %53
store double %54, double* %17
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%56 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %20)
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%58 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %21)
%59 = load double, double* %12
%60 = fadd double 6.000000e-03, %59
%61 = load double, double* %14
%62 = fadd double %60, %61
%63 = load double, double* %20
%64 = fadd double %62, %63
%65 = fadd double %64, 1.000000e-02
%66 = load double, double* %17
%67 = fadd double %65, %66
%68 = load double, double* %21
%69 = fmul double %67, %68
store double %69, double* %22
%70 = load double, double* %22
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), double %70)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Paper per bag?(480):\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"Paper Money?(7600):\00"
@.str.3 = [4 x i8] c"%lf\00"
@.str.4 = [17 x i8] c"Paper layer?(2):\00"
@.str.5 = [21 x i8] c"Paper length?(0.33):\00"
@.str.6 = [22 x i8] c"Ink money (/kg)?(25):\00"
@.str.7 = [17 x i8] c"Bag Money?(2.5):\00"
@.str.8 = [12 x i8] c"Transport: \00"
@.str.9 = [11 x i8] c"Tax rate: \00"
@.str.10 = [28 x i8] c" Total Money is %.4f Yuan.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca double
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = bitcast double* %3 to i8*
store double 7.600000e+03, double* %3
%12 = bitcast double* %4 to i8*
store double 2.500000e+01, double* %4
%13 = bitcast i32* %5 to i8*
store i32 480, i32* %5
%14 = bitcast double* %6 to i8*
store double 2.500000e+00, double* %6
%15 = bitcast i32* %7 to i8*
store i32 2, i32* %7
%16 = bitcast double* %8 to i8*
store double 3.300000e-01, double* %8
%17 = bitcast double* %9 to i8*
store double 0.000000e+00, double* %9
%18 = bitcast double* %10 to i8*
store double 1.090000e+00, double* %10
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %3)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %8)
%27 = load double, double* %8
%28 = fmul double %27, %27
%29 = fmul double %28, 1.800000e-02
%30 = load i32, i32* %7
%31 = sitofp i32 %30 to double
%32 = fmul double %29, %31
%33 = load double, double* %3
%34 = fdiv double %33, 1.000000e+03
%35 = fmul double %32, %34
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%37 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %4)
%38 = load double, double* %8
%39 = fmul double %38, %38
%40 = fmul double %39, 4.000000e-03
%41 = load double, double* %4
%42 = fmul double %41, %40
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%44 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %6)
%45 = load double, double* %6
%46 = load i32, i32* %5
%47 = sitofp i32 %46 to double
%48 = fdiv double %45, %47
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%50 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %9)
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%52 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %10)
%53 = fadd double %35, 6.000000e-03
%54 = fadd double %53, %42
%55 = load double, double* %9
%56 = fadd double %54, %55
%57 = fadd double %56, 1.000000e-02
%58 = fadd double %48, %57
%59 = load double, double* %10
%60 = fmul double %59, %58
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), double %60)
ret i32 0
}