#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 main(void) {
  long int your_salary = 1000;
  long int total_salary = 0;
  long int my_salary = 1999;
  total_salary = your_salary + my_salary;
  printf("salary is %ld\n", total_salary);
  printf("hello world!\n");
  printf("Be careful! %s, it's a beeeeee\a\n", "DAS");
  double total = 1E10;
  double piece = 0;
  double times = 2;
  piece = total / times;
  printf("%5.10f\n", piece);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x3e8,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x7cf,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0xedd(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  0xe88(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe6b(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xe9d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
mov    $0xbb7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
lea    0xed0(%rip),%rdi
lea    0xeea(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee0(%rip),%rdi
movsd  0xe9c(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"salary is %ld\0A\00"
@.str.1 = [14 x i8] c"hello world!\0A\00"
@.str.2 = [33 x i8] c"Be careful! %s, it's a beeeeee\07\0A\00"
@.str.3 = [4 x i8] c"DAS\00"
@.str.4 = [8 x i8] c"%5.10f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 0, i32* %1
store i64 1000, i64* %2
store i64 0, i64* %3
store i64 1999, i64* %4
%8 = load i64, i64* %2
%9 = load i64, i64* %4
%10 = add nsw i64 %8, %9
store i64 %10, i64* %3
%11 = load i64, i64* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store double 1.000000e+10, double* %5
store double 0.000000e+00, double* %6
store double 2.000000e+00, double* %7
%15 = load double, double* %5
%16 = load double, double* %7
%17 = fdiv double %15, %16
store double %17, double* %6
%18 = load double, double* %6
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), double %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"salary is %ld\0A\00"
@.str.2 = [33 x i8] c"Be careful! %s, it's a beeeeee\07\0A\00"
@.str.3 = [4 x i8] c"DAS\00"
@.str.4 = [8 x i8] c"%5.10f\0A\00"
@str = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 2999)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), double 5.000000e+09)
ret i32 0
}