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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xff,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
lea    0xef7(%rip),%rdi
mov    $0x1,%al
mov    %al,-0x51(%rbp)
call   1040 <printf@plt>
mov    -0x51(%rbp),%al
cvtsi2sdl -0x14(%rbp),%xmm0
lea    0xee8(%rip),%rdi
call   1040 <printf@plt>
mov    -0x51(%rbp),%al
cvtsi2sdl -0x14(%rbp),%xmm0
lea    0xee8(%rip),%rdi
call   1040 <printf@plt>
mov    -0x51(%rbp),%al
movq   $0xff,-0x20(%rbp)
cvtsi2sdq -0x20(%rbp),%xmm0
lea    0xee5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x51(%rbp),%al
cvtsi2sdq -0x20(%rbp),%xmm0
lea    0xedb(%rip),%rdi
call   1040 <printf@plt>
mov    -0x51(%rbp),%al
cvtsi2sdq -0x20(%rbp),%xmm0
lea    0xedb(%rip),%rdi
call   1040 <printf@plt>
mov    -0x51(%rbp),%al
movq   $0xff,-0x28(%rbp)
movq   -0x28(%rbp),%xmm0
movaps 0xe47(%rip),%xmm1
movaps %xmm1,-0x50(%rbp)
punpckldq %xmm1,%xmm0
movapd 0xe47(%rip),%xmm1
movaps %xmm1,-0x40(%rbp)
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
movaps -0x50(%rbp),%xmm2
movaps -0x40(%rbp),%xmm1
mov    -0x51(%rbp),%al
movq   -0x28(%rbp),%xmm0
punpckldq %xmm2,%xmm0
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
movaps -0x50(%rbp),%xmm2
movaps -0x40(%rbp),%xmm1
movq   -0x28(%rbp),%xmm0
punpckldq %xmm2,%xmm0
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
lea    0xe75(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe82(%rip),%rdi
movsd  0xda4(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe80(%rip),%rdi
movsd  0xd86(%rip),%xmm0
mov    $0x2,%esi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe83(%rip),%rdi
movsd  0xd63(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0xfffffffb,%edi
call   1030 <abs@plt>
cvtsi2sd %eax,%xmm0
lea    0xe6e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xd30(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xe6e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x30(%rbp),%xmm0
lea    0xe66(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf18(%rip),%rdi
movsd  0xee0(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
movsd  0xeca(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
movsd  0xeb4(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf0e(%rip),%rdi
movsd  0xe9e(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
movsd  0xe88(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
movsd  0xe72(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
movsd  0xe5c(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
movsd  0xe46(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
movsd  0xe30(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
movsd  0xe22(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
movsd  0xe14(%rip),%xmm0
mov    $0x2,%esi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
movsd  0xe01(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
movsd  0xdf3(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
movsd  0xde5(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
movsd  0xdcf(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"x is %d.\0A\00"
@.str.1 = [20 x i8] c"In octal, x is %o.\0A\00"
@.str.2 = [26 x i8] c"In hexadecimal, x is %x.\0A\00"
@.str.3 = [11 x i8] c"y is %ld.\0A\00"
@.str.4 = [21 x i8] c"In octal, y is %lo.\0A\00"
@.str.5 = [27 x i8] c"In hexadecimal, y is %lx.\0A\00"
@.str.6 = [11 x i8] c"z is %lu.\0A\00"
@.str.7 = [21 x i8] c"In octal, z is %lo.\0A\00"
@.str.8 = [27 x i8] c"In hexadecimal, z is %lx.\0A\00"
@.str.9 = [20 x i8] c"3 * 3 + 5 * 2 = %d\0A\00"
@.str.10 = [30 x i8] c"11 / 3 = %d remainder of %d \0A\00"
@.str.11 = [15 x i8] c"11 / 3.0 = %f\0A\00"
@.str.12 = [32 x i8] c"The absolute value of -5 is %d\0A\00"
@.str.13 = [11 x i8] c"d is %.2f\0A\00"
@.str.14 = [11 x i8] c"d is %.2e\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 255, i32* %6
%10 = load i32, i32* %6
%11 = sitofp i32 %10 to double
%12 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %11)
%13 = load i32, i32* %6
%14 = sitofp i32 %13 to double
%15 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), double %14)
%16 = load i32, i32* %6
%17 = sitofp i32 %16 to double
%18 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), double %17)
store i64 255, i64* %7
%19 = load i64, i64* %7
%20 = sitofp i64 %19 to double
%21 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double %20)
%22 = load i64, i64* %7
%23 = sitofp i64 %22 to double
%24 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double %23)
%25 = load i64, i64* %7
%26 = sitofp i64 %25 to double
%27 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), double %26)
store i64 255, i64* %8
%28 = load i64, i64* %8
%29 = uitofp i64 %28 to double
%30 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), double %29)
%31 = load i64, i64* %8
%32 = uitofp i64 %31 to double
%33 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), double %32)
%34 = load i64, i64* %8
%35 = uitofp i64 %34 to double
%36 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), double %35)
%37 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), double 1.900000e+01)
%38 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), double 3.000000e+00, i32 2)
%39 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0), double 0x400D555560000000)
%40 = call i32 @abs(i32 -5)
%41 = sitofp i32 %40 to double
%42 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0), double %41)
store double 0x40C81CD6E631F8A1, double* %9
%43 = load double, double* %9
%44 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), double %43)
%45 = load double, double* %9
%46 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0), double %45)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"x is %d.\0A\00"
@.str.1 = [20 x i8] c"In octal, x is %o.\0A\00"
@.str.2 = [26 x i8] c"In hexadecimal, x is %x.\0A\00"
@.str.3 = [11 x i8] c"y is %ld.\0A\00"
@.str.4 = [21 x i8] c"In octal, y is %lo.\0A\00"
@.str.5 = [27 x i8] c"In hexadecimal, y is %lx.\0A\00"
@.str.6 = [11 x i8] c"z is %lu.\0A\00"
@.str.7 = [21 x i8] c"In octal, z is %lo.\0A\00"
@.str.8 = [27 x i8] c"In hexadecimal, z is %lx.\0A\00"
@.str.9 = [20 x i8] c"3 * 3 + 5 * 2 = %d\0A\00"
@.str.10 = [30 x i8] c"11 / 3 = %d remainder of %d \0A\00"
@.str.11 = [15 x i8] c"11 / 3.0 = %f\0A\00"
@.str.12 = [32 x i8] c"The absolute value of -5 is %d\0A\00"
@.str.13 = [11 x i8] c"d is %.2f\0A\00"
@.str.14 = [11 x i8] c"d is %.2e\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double 2.550000e+02)
%4 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), double 2.550000e+02)
%5 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), double 2.550000e+02)
%6 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double 2.550000e+02)
%7 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), double 2.550000e+02)
%8 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), double 2.550000e+02)
%9 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), double 2.550000e+02)
%10 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), double 2.550000e+02)
%11 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), double 2.550000e+02)
%12 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), double 1.900000e+01)
%13 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), double 3.000000e+00, i32 2)
%14 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0), double 0x400D555560000000)
%15 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0), double 5.000000e+00)
%16 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), double 0x40C81CD6E631F8A1)
%17 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0), double 0x40C81CD6E631F8A1)
ret i32 0
}