#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) {
  char a = 97;
  short b = 85;
  int c = 110;
  long d = 94;
  float e = 99.444;
  double f = 3234.9234234;
  printf("================\n");
  printf("var a:\n");
  printf("double: %g\n", a);
  printf("signed int: %d\n", a);
  printf("signed int: %i\n", a);
  printf("double: %f\n", a);
  printf("double: %e\n", a);
  printf("Oct-int: %o\n", a);
  printf("Hex-int: %x\n", a);
  printf("================\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movw   $0x55,-0x8(%rbp)
movl   $0x6e,-0xc(%rbp)
movq   $0x5e,-0x18(%rbp)
movss  0xec8(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%esi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%esi
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%esi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x5(%rbp),%esi
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf3d(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf27(%rip),%rdi
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb6(%rip),%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb0(%rip),%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea9(%rip),%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea2(%rip),%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe9c(%rip),%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"================\0A\00"
@.str.1 = [8 x i8] c"var a:\0A\00"
@.str.2 = [12 x i8] c"double: %g\0A\00"
@.str.3 = [16 x i8] c"signed int: %d\0A\00"
@.str.4 = [16 x i8] c"signed int: %i\0A\00"
@.str.5 = [12 x i8] c"double: %f\0A\00"
@.str.6 = [12 x i8] c"double: %e\0A\00"
@.str.7 = [13 x i8] c"Oct-int: %o\0A\00"
@.str.8 = [13 x i8] c"Hex-int: %x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i16
%4 = alloca i32
%5 = alloca i64
%6 = alloca float
%7 = alloca double
store i32 0, i32* %1
store i8 97, i8* %2
store i16 85, i16* %3
store i32 110, i32* %4
store i64 94, i64* %5
store float 0x4058DC6A80000000, float* %6
store double 0x40A945D8CAF3AEB9, double* %7
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %14)
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %20)
%22 = load i8, i8* %2
%23 = sext i8 %22 to i32
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %23)
%25 = load i8, i8* %2
%26 = sext i8 %25 to i32
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 %26)
%28 = load i8, i8* %2
%29 = sext i8 %28 to i32
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 %29)
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [12 x i8] c"double: %g\0A\00"
@.str.3 = [16 x i8] c"signed int: %d\0A\00"
@.str.4 = [16 x i8] c"signed int: %i\0A\00"
@.str.5 = [12 x i8] c"double: %f\0A\00"
@.str.6 = [12 x i8] c"double: %e\0A\00"
@.str.7 = [13 x i8] c"Oct-int: %o\0A\00"
@.str.8 = [13 x i8] c"Hex-int: %x\0A\00"
@str.9 = [7 x i8] c"var a:\00"
@str.10 = [17 x i8] c"================\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.10, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.9, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 97)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 97)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 97)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 97)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 97)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i32 97)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 97)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.10, i64 0, i64 0))
ret i32 0
}