#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() {
  int TA, DA, tax, salary, netSalary;
  printf("Enter your salary amount : \t");
  scanf("%d", &salary);
  TA = 0.1 * salary;
  DA = 0.12 * salary;
  tax = 0.15 * salary;
  netSalary = salary + TA + DA - tax;
  printf("Your net salary is : %d \n", netSalary);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0xeb6(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0xe96(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0xe76(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xeb0(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%esi
movsd  0xea8(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%ecx
mulsd  0xea0(%rip),%xmm0
cvttsd2si %xmm0,%edx
add    %eax,%esi
add    %ecx,%esi
sub    %edx,%esi
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Enter your salary amount : \09\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"Your net salary is : %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to double
%11 = fmul double 1.000000e-01, %10
%12 = fptosi double %11 to i32
store i32 %12, i32* %2
%13 = load i32, i32* %5
%14 = sitofp i32 %13 to double
%15 = fmul double 1.200000e-01, %14
%16 = fptosi double %15 to i32
store i32 %16, i32* %3
%17 = load i32, i32* %5
%18 = sitofp i32 %17 to double
%19 = fmul double 1.500000e-01, %18
%20 = fptosi double %19 to i32
store i32 %20, i32* %4
%21 = load i32, i32* %5
%22 = load i32, i32* %2
%23 = add nsw i32 %21, %22
%24 = load i32, i32* %3
%25 = add nsw i32 %23, %24
%26 = load i32, i32* %4
%27 = sub nsw i32 %25, %26
store i32 %27, i32* %6
%28 = load i32, i32* %6
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Enter your salary amount : \09\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"Your net salary is : %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = sitofp i32 %5 to double
%7 = fmul double %6, 1.000000e-01
%8 = fptosi double %7 to i32
%9 = fmul double %6, 1.200000e-01
%10 = fptosi double %9 to i32
%11 = fmul double %6, 1.500000e-01
%12 = fptosi double %11 to i32
%13 = add nsw i32 %5, %8
%14 = add nsw i32 %13, %10
%15 = sub i32 %14, %12
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %15)
ret i32 0
}