#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 EXIT_SUCCESS;
int abs(int);
int /*<<< orphan*/ printf(char *, double, ...);
double sin(double);
int main(int argc, const char *argv[]) {
  unsigned long unum = 255;
  printf("My number is %lu \n", unum);
  printf("In octal, num is %lo \n", unum);
  printf("In hexidecimal, num is %lx \n", unum);
  long lnum = 255;
  printf("My number is %ld \n", lnum);
  printf("In octal, num is %lo \n", lnum);
  printf("In hexidecimal, num is %lx \n", lnum);
  int num = 255;
  printf("My number is %d \n", num);
  printf("In octal, num is %o \n", num);
  printf("In hexidecimal, num is %x \n", num);
  printf("3 * 3 + 5 * 2 = %d \n", 3 * 3 + 5 * 2);
  printf("11 / 3 = %d \n", 11 / 3);
  printf("11 / 3 = %d remainder of %d \n", 11 / 3, 11 % 2);
  printf("11 / 3 = %f \n", 11 / (float)3);
  num -= 260;
  num += -5;
  num *= 2;
  num /= 3;
  printf("The absolute value of %d is %d \n", num, abs(num));
  double y = 12345.6789;
  printf("y is %.2f \n", y);
  printf("y is %.2e \n", y);
  double x = 1;
  printf("The sin of x is %.3f \n", sin(x));
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0xff,-0x18(%rbp)
movq   -0x18(%rbp),%xmm0
movaps 0xed6(%rip),%xmm1
movaps %xmm1,-0x60(%rbp)
punpckldq %xmm1,%xmm0
movapd 0xed6(%rip),%xmm1
movaps %xmm1,-0x50(%rbp)
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
lea    0xecc(%rip),%rdi
mov    $0x1,%al
mov    %al,-0x61(%rbp)
call   1040 <printf@plt>
movaps -0x60(%rbp),%xmm2
movaps -0x50(%rbp),%xmm1
mov    -0x61(%rbp),%al
movq   -0x18(%rbp),%xmm0
punpckldq %xmm2,%xmm0
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
movaps -0x60(%rbp),%xmm2
movaps -0x50(%rbp),%xmm1
movq   -0x18(%rbp),%xmm0
punpckldq %xmm2,%xmm0
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
lea    0xe96(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movq   $0xff,-0x20(%rbp)
cvtsi2sdq -0x20(%rbp),%xmm0
lea    0xe97(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cvtsi2sdq -0x20(%rbp),%xmm0
lea    0xe4f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cvtsi2sdq -0x20(%rbp),%xmm0
lea    0xe52(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0xff,-0x24(%rbp)
cvtsi2sdl -0x24(%rbp),%xmm0
lea    0xe68(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cvtsi2sdl -0x24(%rbp),%xmm0
lea    0xe67(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cvtsi2sdl -0x24(%rbp),%xmm0
lea    0xe6a(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe78(%rip),%rdi
movsd  0xda2(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe77(%rip),%rdi
movsd  0xd84(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe6f(%rip),%rdi
movsd  0xd6e(%rip),%xmm0
mov    $0x1,%esi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe72(%rip),%rdi
movsd  0xd4b(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
sub    $0x104,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0xfffffffb,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x24(%rbp),%edi
call   1030 <abs@plt>
movsd  -0x40(%rbp),%xmm0
mov    %eax,%esi
lea    0xe26(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xce2(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xe27(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x30(%rbp),%xmm0
lea    0xe20(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xca7(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1050 <sin@plt>
lea    0xe07(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x2c63(%rip),%rax
mov    (%rax),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xf1d(%rip),%rdi
movsd  0xedd(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf1a(%rip),%r14
mov    %r14,%rdi
movsd  0xec4(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf18(%rip),%rbx
mov    %rbx,%rdi
movsd  0xeab(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
movsd  0xe95(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
mov    %r14,%rdi
movsd  0xe83(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
mov    %rbx,%rdi
movsd  0xe71(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
movsd  0xe5b(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
movsd  0xe45(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
movsd  0xe2f(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
movsd  0xe21(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
movsd  0xe13(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
movsd  0xdfd(%rip),%xmm0
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
movsd  0xdea(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
movsd  0xddc(%rip),%xmm0
mov    $0x6,%esi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
movsd  0xdc9(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
movsd  0xdb3(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
movsd  0xda5(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2d47(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [19 x i8] c"My number is %lu \0A\00"
@.str.1 = [23 x i8] c"In octal, num is %lo \0A\00"
@.str.2 = [29 x i8] c"In hexidecimal, num is %lx \0A\00"
@.str.3 = [19 x i8] c"My number is %ld \0A\00"
@.str.4 = [18 x i8] c"My number is %d \0A\00"
@.str.5 = [22 x i8] c"In octal, num is %o \0A\00"
@.str.6 = [28 x i8] c"In hexidecimal, num is %x \0A\00"
@.str.7 = [21 x i8] c"3 * 3 + 5 * 2 = %d \0A\00"
@.str.8 = [14 x i8] c"11 / 3 = %d \0A\00"
@.str.9 = [30 x i8] c"11 / 3 = %d remainder of %d \0A\00"
@.str.10 = [14 x i8] c"11 / 3 = %f \0A\00"
@.str.11 = [33 x i8] c"The absolute value of %d is %d \0A\00"
@.str.12 = [12 x i8] c"y is %.2f \0A\00"
@.str.13 = [12 x i8] c"y is %.2e \0A\00"
@.str.14 = [23 x i8] c"The sin of x is %.3f \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32
%9 = alloca double
%10 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 255, i64* %6
%11 = load i64, i64* %6
%12 = uitofp i64 %11 to double
%13 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double %12)
%14 = load i64, i64* %6
%15 = uitofp i64 %14 to double
%16 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), double %15)
%17 = load i64, i64* %6
%18 = uitofp i64 %17 to double
%19 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %18)
store i64 255, i64* %7
%20 = load i64, i64* %7
%21 = sitofp i64 %20 to double
%22 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), double %21)
%23 = load i64, i64* %7
%24 = sitofp i64 %23 to double
%25 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), double %24)
%26 = load i64, i64* %7
%27 = sitofp i64 %26 to double
%28 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %27)
store i32 255, i32* %8
%29 = load i32, i32* %8
%30 = sitofp i32 %29 to double
%31 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), double %30)
%32 = load i32, i32* %8
%33 = sitofp i32 %32 to double
%34 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %33)
%35 = load i32, i32* %8
%36 = sitofp i32 %35 to double
%37 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), double %36)
%38 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), double 1.900000e+01)
%39 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), double 3.000000e+00)
%40 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), double 3.000000e+00, i32 1)
%41 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), double 0x400D555560000000)
%42 = load i32, i32* %8
%43 = sub nsw i32 %42, 260
store i32 %43, i32* %8
%44 = load i32, i32* %8
%45 = add nsw i32 %44, -5
store i32 %45, i32* %8
%46 = load i32, i32* %8
%47 = mul nsw i32 %46, 2
store i32 %47, i32* %8
%48 = load i32, i32* %8
%49 = sdiv i32 %48, 3
store i32 %49, i32* %8
%50 = load i32, i32* %8
%51 = sitofp i32 %50 to double
%52 = load i32, i32* %8
%53 = call i32 @abs(i32 %52)
%54 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), double %51, i32 %53)
store double 0x40C81CD6E631F8A1, double* %9
%55 = load double, double* %9
%56 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), double %55)
%57 = load double, double* %9
%58 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), double %57)
store double 1.000000e+00, double* %10
%59 = load double, double* %10
%60 = call double @sin(double %59)
%61 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), double %60)
%62 = load i32, i32* @EXIT_SUCCESS
ret i32 %62
}

LLVM IR (-O2):
@.str = [19 x i8] c"My number is %lu \0A\00"
@.str.1 = [23 x i8] c"In octal, num is %lo \0A\00"
@.str.2 = [29 x i8] c"In hexidecimal, num is %lx \0A\00"
@.str.3 = [19 x i8] c"My number is %ld \0A\00"
@.str.4 = [18 x i8] c"My number is %d \0A\00"
@.str.5 = [22 x i8] c"In octal, num is %o \0A\00"
@.str.6 = [28 x i8] c"In hexidecimal, num is %x \0A\00"
@.str.7 = [21 x i8] c"3 * 3 + 5 * 2 = %d \0A\00"
@.str.8 = [14 x i8] c"11 / 3 = %d \0A\00"
@.str.9 = [30 x i8] c"11 / 3 = %d remainder of %d \0A\00"
@.str.10 = [14 x i8] c"11 / 3 = %f \0A\00"
@.str.11 = [33 x i8] c"The absolute value of %d is %d \0A\00"
@.str.12 = [12 x i8] c"y is %.2f \0A\00"
@.str.13 = [12 x i8] c"y is %.2e \0A\00"
@.str.14 = [23 x i8] c"The sin of x is %.3f \0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double 2.550000e+02)
%4 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), double 2.550000e+02)
%5 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double 2.550000e+02)
%6 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), double 2.550000e+02)
%7 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), double 2.550000e+02)
%8 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double 2.550000e+02)
%9 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), double 2.550000e+02)
%10 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double 2.550000e+02)
%11 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), double 2.550000e+02)
%12 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), double 1.900000e+01)
%13 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), double 3.000000e+00)
%14 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), double 3.000000e+00, i32 1)
%15 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), double 0x400D555560000000)
%16 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), double -6.000000e+00, i32 6)
%17 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), double 0x40C81CD6E631F8A1)
%18 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), double 0x40C81CD6E631F8A1)
%19 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), double 0x3FEAED548F090CEE)
%20 = load i32, i32* @EXIT_SUCCESS
ret i32 %20
}