#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() {
  printf("signed decimal integer: %i \n", 7);
  printf("signed decimal integer: %d \n", -4);
  printf("unsigned decimal integer: %i \n", 23);
  printf("unsigned octal: %o \n", 520);
  printf("unsigned hexadecimal integer: %x \n", 100);
  printf("unsigned hexadecimal integer (uppercase): %X \n", 100);
  printf("decimal floating point: %f \n", 102.47);
  printf("decimal floating point, rounded: %.2f \n", 102.47);
  printf("character: %c \n", 'c');
  printf("string: %s \n", "foo bar...");
  int p = 0;
  printf("pointer address: %p \n", &p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf01(%rip),%rdi
mov    $0x7,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0xfffffffc,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x17,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
mov    $0x208,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x64,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x64,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
movsd  0xe60(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
movsd  0xe4a(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf2c(%rip),%rdi
mov    $0x63,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf29(%rip),%rdi
lea    0xf2f(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
lea    0xf25(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf0f(%rip),%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0xfffffffc,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x17,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x208,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf21(%rip),%rdi
movsd  0xe6e(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf28(%rip),%rdi
movsd  0xe58(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xf3a(%rip),%rdi
mov    $0x63,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf37(%rip),%rdi
lea    0xf3d(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x0,0x4(%rsp)
lea    0xf32(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"signed decimal integer: %i \0A\00"
@.str.1 = [29 x i8] c"signed decimal integer: %d \0A\00"
@.str.2 = [31 x i8] c"unsigned decimal integer: %i \0A\00"
@.str.3 = [21 x i8] c"unsigned octal: %o \0A\00"
@.str.4 = [35 x i8] c"unsigned hexadecimal integer: %x \0A\00"
@.str.5 = [47 x i8] c"unsigned hexadecimal integer (uppercase): %X \0A\00"
@.str.6 = [29 x i8] c"decimal floating point: %f \0A\00"
@.str.7 = [40 x i8] c"decimal floating point, rounded: %.2f \0A\00"
@.str.8 = [16 x i8] c"character: %c \0A\00"
@.str.9 = [13 x i8] c"string: %s \0A\00"
@.str.10 = [11 x i8] c"foo bar...\00"
@.str.11 = [22 x i8] c"pointer address: %p \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 7)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 -4)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 23)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 520)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 100)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i32 100)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), double 1.024700e+02)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0), double 1.024700e+02)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 99)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), i32* %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"signed decimal integer: %i \0A\00"
@.str.1 = [29 x i8] c"signed decimal integer: %d \0A\00"
@.str.2 = [31 x i8] c"unsigned decimal integer: %i \0A\00"
@.str.3 = [21 x i8] c"unsigned octal: %o \0A\00"
@.str.4 = [35 x i8] c"unsigned hexadecimal integer: %x \0A\00"
@.str.5 = [47 x i8] c"unsigned hexadecimal integer (uppercase): %X \0A\00"
@.str.6 = [29 x i8] c"decimal floating point: %f \0A\00"
@.str.7 = [40 x i8] c"decimal floating point, rounded: %.2f \0A\00"
@.str.8 = [16 x i8] c"character: %c \0A\00"
@.str.9 = [13 x i8] c"string: %s \0A\00"
@.str.10 = [11 x i8] c"foo bar...\00"
@.str.11 = [22 x i8] c"pointer address: %p \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 7)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 -4)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 23)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 520)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 100)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i32 100)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), double 1.024700e+02)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0), double 1.024700e+02)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i32 99)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%12 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), i32* %1)
ret i32 0
}