#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*/ calculate_tax(unsigned long long);
int /*<<< orphan*/ printf(char *, unsigned long long, int /*<<< orphan*/);
int /*<<< orphan*/ sscanf(char *, char *, unsigned long long *);
int main(int argc, char *argv[]) {
  int i;
  unsigned long long income;
  for (i = 1; i < argc; i++) {
    sscanf(argv[i], "%llu", &income);
    printf("%llu\t%.2Lf\n", income, calculate_tax(income));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11a6 <main+0x76>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe94(%rip),%rsi
lea    -0x20(%rbp),%rdx
call   1050 <sscanf@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <calculate_tax@plt>
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114d <main+0x1d>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     1196 <main+0x66>
mov    %rsi,%r13
mov    %edi,%ebp
mov    $0x1,%r14d
mov    %rsp,%r15
lea    0xeb0(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x0(%r13,%r14,8),%rdi
lea    0xe94(%rip),%rsi
mov    %r15,%rdx
call   1050 <sscanf@plt>
mov    (%rsp),%rbx
mov    %rbx,%rdi
call   1030 <calculate_tax@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <printf@plt>
add    $0x1,%r14
cmp    %r14,%rbp
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [12 x i8] c"%llu\09%.2Lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %8
8: ; preds = %23, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %26
12: ; preds = %8
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @sscanf(i8* %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %7)
%19 = load i64, i64* %7
%20 = load i64, i64* %7
%21 = call i32 @calculate_tax(i64 %20)
%22 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i64 %19, i32 %21)
br label %23
23: ; preds = %12
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %8
26: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [12 x i8] c"%llu\09%.2Lf\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %18
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 1, %6 ], [ %16, %8 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = call i32 @sscanf(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %3)
%13 = load i64, i64* %3
%14 = call i32 @calculate_tax(i64 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i64 %13, i32 %14)
%16 = add nuw nsw i64 %9, 1
%17 = icmp eq i64 %16, %7
br i1 %17, label %18, label %8
18: ; preds = %8, %2
ret i32 0
}