#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 *, double);
int scanf(char *, double *);
int main() {
  double salary, tax;
  if (scanf("%lf", &salary) == 1) {
    if (0 < salary && salary <= 750)
      tax = salary * 0.02;
    else if (750 < salary && salary <= 2250)
      tax = 15 + (salary - 750) * 0.05;
    else if (2250 < salary && salary <= 3750)
      tax = 90 + (salary - 2250) * 0.08;
    else if (3750 < salary && salary <= 5250)
      tax = 210 + (salary - 3750) * 0.10;
    else if (5250 < salary && salary <= 7000)
      tax = 360 + (salary - 5250) * 0.20;
    else if (salary > 7000)
      tax = 710 + (salary - 7000) * 0.30;
    printf("%.2lf\n", tax);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf4a(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1367 <main+0x247>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1184 <main+0x64>
movsd  0xe9e(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1184 <main+0x64>
movsd  0xf03(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1356 <main+0x236>
movsd  -0x10(%rbp),%xmm0
movsd  0xe6f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11e1 <main+0xc1>
movsd  0xe65(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     11e1 <main+0xc1>
movsd  -0x10(%rbp),%xmm0
movsd  0xe45(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xea1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1351 <main+0x231>
movsd  -0x10(%rbp),%xmm0
movsd  0xe1a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    123e <main+0x11e>
movsd  0xe10(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     123e <main+0x11e>
movsd  -0x10(%rbp),%xmm0
movsd  0xdf0(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe34(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe30(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    134c <main+0x22c>
movsd  -0x10(%rbp),%xmm0
movsd  0xdc5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    129b <main+0x17b>
movsd  0xdbb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     129b <main+0x17b>
movsd  -0x10(%rbp),%xmm0
movsd  0xd9b(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xdc7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdc3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1347 <main+0x227>
movsd  -0x10(%rbp),%xmm0
movsd  0xd70(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12f8 <main+0x1d8>
movsd  0xd66(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     12f8 <main+0x1d8>
movsd  -0x10(%rbp),%xmm0
movsd  0xd46(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xd5a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd56(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1342 <main+0x222>
movsd  -0x10(%rbp),%xmm0
movsd  0xd1b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    133d <main+0x21d>
movsd  -0x10(%rbp),%xmm0
movsd  0xd04(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xd00(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcfc(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1342 <main+0x222>
jmp    1347 <main+0x227>
jmp    134c <main+0x22c>
jmp    1351 <main+0x231>
jmp    1356 <main+0x236>
movsd  -0x18(%rbp),%xmm0
lea    0xd22(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf80(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1252 <main+0x132>
movsd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1163 <main+0x43>
movsd  0xeb0(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     1163 <main+0x43>
mulsd  0xf42(%rip),%xmm0
jmp    1246 <main+0x126>
ucomisd 0xe95(%rip),%xmm0
jbe    1198 <main+0x78>
movsd  0xe93(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     1198 <main+0x78>
addsd  0xf05(%rip),%xmm0
mulsd  0xf05(%rip),%xmm0
addsd  0xf05(%rip),%xmm0
jmp    1246 <main+0x126>
ucomisd 0xe68(%rip),%xmm0
jbe    11ca <main+0xaa>
movsd  0xe66(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     11ca <main+0xaa>
addsd  0xeb8(%rip),%xmm0
mulsd  0xeb8(%rip),%xmm0
addsd  0xeb8(%rip),%xmm0
jmp    1246 <main+0x126>
ucomisd 0xe3e(%rip),%xmm0
jbe    11fc <main+0xdc>
movsd  0xe3c(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     11fc <main+0xdc>
addsd  0xe6e(%rip),%xmm0
mulsd  0xe6e(%rip),%xmm0
addsd  0xe6e(%rip),%xmm0
jmp    1246 <main+0x126>
ucomisd 0xe14(%rip),%xmm0
jbe    122e <main+0x10e>
movsd  0xe12(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     122e <main+0x10e>
addsd  0xe24(%rip),%xmm0
mulsd  0xe24(%rip),%xmm0
addsd  0xe24(%rip),%xmm0
jmp    1246 <main+0x126>
addsd  0xdf2(%rip),%xmm0
mulsd  0xdf2(%rip),%xmm0
addsd  0xdf2(%rip),%xmm0
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %70
6: ; preds = %0
%7 = load double, double* %2
%8 = fcmp olt double 0.000000e+00, %7
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load double, double* %2
%11 = fcmp ole double %10, 7.500000e+02
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load double, double* %2
%14 = fmul double %13, 2.000000e-02
store double %14, double* %3
br label %67
15: ; preds = %9, %6
%16 = load double, double* %2
%17 = fcmp olt double 7.500000e+02, %16
br i1 %17, label %18, label %25
18: ; preds = %15
%19 = load double, double* %2
%20 = fcmp ole double %19, 2.250000e+03
br i1 %20, label %21, label %25
21: ; preds = %18
%22 = load double, double* %2
%23 = fsub double %22, 7.500000e+02
%24 = call double @llvm.fmuladd.f64(double %23, double 5.000000e-02, double 1.500000e+01)
store double %24, double* %3
br label %66
25: ; preds = %18, %15
%26 = load double, double* %2
%27 = fcmp olt double 2.250000e+03, %26
br i1 %27, label %28, label %35
28: ; preds = %25
%29 = load double, double* %2
%30 = fcmp ole double %29, 3.750000e+03
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = load double, double* %2
%33 = fsub double %32, 2.250000e+03
%34 = call double @llvm.fmuladd.f64(double %33, double 8.000000e-02, double 9.000000e+01)
store double %34, double* %3
br label %65
35: ; preds = %28, %25
%36 = load double, double* %2
%37 = fcmp olt double 3.750000e+03, %36
br i1 %37, label %38, label %45
38: ; preds = %35
%39 = load double, double* %2
%40 = fcmp ole double %39, 5.250000e+03
br i1 %40, label %41, label %45
41: ; preds = %38
%42 = load double, double* %2
%43 = fsub double %42, 3.750000e+03
%44 = call double @llvm.fmuladd.f64(double %43, double 1.000000e-01, double 2.100000e+02)
store double %44, double* %3
br label %64
45: ; preds = %38, %35
%46 = load double, double* %2
%47 = fcmp olt double 5.250000e+03, %46
br i1 %47, label %48, label %55
48: ; preds = %45
%49 = load double, double* %2
%50 = fcmp ole double %49, 7.000000e+03
br i1 %50, label %51, label %55
51: ; preds = %48
%52 = load double, double* %2
%53 = fsub double %52, 5.250000e+03
%54 = call double @llvm.fmuladd.f64(double %53, double 2.000000e-01, double 3.600000e+02)
store double %54, double* %3
br label %63
55: ; preds = %48, %45
%56 = load double, double* %2
%57 = fcmp ogt double %56, 7.000000e+03
br i1 %57, label %58, label %62
58: ; preds = %55
%59 = load double, double* %2
%60 = fsub double %59, 7.000000e+03
%61 = call double @llvm.fmuladd.f64(double %60, double 3.000000e-01, double 7.100000e+02)
store double %61, double* %3
br label %62
62: ; preds = %58, %55
br label %63
63: ; preds = %62, %51
br label %64
64: ; preds = %63, %41
br label %65
65: ; preds = %64, %31
br label %66
66: ; preds = %65, %21
br label %67
67: ; preds = %66, %12
%68 = load double, double* %3
%69 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %68)
br label %70
70: ; preds = %67, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %47
5: ; preds = %0
%6 = load double, double* %1
%7 = fcmp ogt double %6, 0.000000e+00
%8 = fcmp ole double %6, 7.500000e+02
%9 = and i1 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %5
%11 = fmul double %6, 2.000000e-02
br label %44
12: ; preds = %5
%13 = fcmp ogt double %6, 7.500000e+02
%14 = fcmp ole double %6, 2.250000e+03
%15 = and i1 %13, %14
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = fadd double %6, -7.500000e+02
%18 = call double @llvm.fmuladd.f64(double %17, double 5.000000e-02, double 1.500000e+01)
br label %44
19: ; preds = %12
%20 = fcmp ogt double %6, 2.250000e+03
%21 = fcmp ole double %6, 3.750000e+03
%22 = and i1 %20, %21
br i1 %22, label %23, label %26
23: ; preds = %19
%24 = fadd double %6, -2.250000e+03
%25 = call double @llvm.fmuladd.f64(double %24, double 8.000000e-02, double 9.000000e+01)
br label %44
26: ; preds = %19
%27 = fcmp ogt double %6, 3.750000e+03
%28 = fcmp ole double %6, 5.250000e+03
%29 = and i1 %27, %28
br i1 %29, label %30, label %33
30: ; preds = %26
%31 = fadd double %6, -3.750000e+03
%32 = call double @llvm.fmuladd.f64(double %31, double 1.000000e-01, double 2.100000e+02)
br label %44
33: ; preds = %26
%34 = fcmp ogt double %6, 5.250000e+03
%35 = fcmp ole double %6, 7.000000e+03
%36 = and i1 %34, %35
br i1 %36, label %37, label %40
37: ; preds = %33
%38 = fadd double %6, -5.250000e+03
%39 = call double @llvm.fmuladd.f64(double %38, double 2.000000e-01, double 3.600000e+02)
br label %44
40: ; preds = %33
%41 = fcmp ogt double %6, 7.000000e+03
%42 = fadd double %6, -7.000000e+03
%43 = call double @llvm.fmuladd.f64(double %42, double 3.000000e-01, double 7.100000e+02)
br label %44
44: ; preds = %16, %30, %40, %37, %23, %10
%45 = phi double [ %11, %10 ], [ %18, %16 ], [ %25, %23 ], [ %32, %30 ], [ %39, %37 ], [ %43, %40 ]
%46 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %45)
br label %47
47: ; preds = %44, %0
ret i32 0
}