#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) {
  int d = 10;
  unsigned int x = 0xa;
  float f = 0.123;
  char c = 'A';
  printf("String Literal only\n");
  printf("Decimal Int d = %d\n", d);
  printf("Hexadecimal Unsigned Int x = %x\n", x);
  printf("Float f = %f\n", f);
  printf("Char c = %c\n", c);
  printf("d = %d, x = %x, f = %f, c = %c\n", d, x, f, c);
  printf("Field: [%3d]\n", 10);
  printf("Zero: [%03d]\n", 10);
  printf("Precision: [%4.2f]\n", 12.345);
  printf("Radix: [%#x], [%#o]\n", 0xa, 012);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
movss  0xed3(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movb   $0x41,-0x11(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xed8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%esi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsbl -0x11(%rbp),%ecx
lea    0xec0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0xa,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0xa,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
movsd  0xe13(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0xa,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf9d(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeeb(%rip),%rdi
movsd  0xe9e(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0xa,%esi
mov    $0xa,%edx
movsd  0xe6b(%rip),%xmm0
mov    $0x41,%ecx
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
movsd  0xe32(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0xa,%esi
mov    $0xa,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"String Literal only\0A\00"
@.str.1 = [20 x i8] c"Decimal Int d = %d\0A\00"
@.str.2 = [33 x i8] c"Hexadecimal Unsigned Int x = %x\0A\00"
@.str.3 = [14 x i8] c"Float f = %f\0A\00"
@.str.4 = [13 x i8] c"Char c = %c\0A\00"
@.str.5 = [32 x i8] c"d = %d, x = %x, f = %f, c = %c\0A\00"
@.str.6 = [14 x i8] c"Field: [%3d]\0A\00"
@.str.7 = [14 x i8] c"Zero: [%03d]\0A\00"
@.str.8 = [20 x i8] c"Precision: [%4.2f]\0A\00"
@.str.9 = [21 x i8] c"Radix: [%#x], [%#o]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca i8
store i32 0, i32* %1
store i32 10, i32* %2
store i32 10, i32* %3
store float 0x3FBF7CEDA0000000, float* %4
store i8 65, i8* %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = load float, float* %4
%12 = fpext float %11 to double
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), double %12)
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = load float, float* %4
%20 = fpext float %19 to double
%21 = load i8, i8* %5
%22 = sext i8 %21 to i32
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i32 %17, i32 %18, double %20, i32 %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 10)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 10)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), double 1.234500e+01)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i32 10, i32 10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [20 x i8] c"Decimal Int d = %d\0A\00"
@.str.2 = [33 x i8] c"Hexadecimal Unsigned Int x = %x\0A\00"
@.str.3 = [14 x i8] c"Float f = %f\0A\00"
@.str.4 = [13 x i8] c"Char c = %c\0A\00"
@.str.5 = [32 x i8] c"d = %d, x = %x, f = %f, c = %c\0A\00"
@.str.6 = [14 x i8] c"Field: [%3d]\0A\00"
@.str.7 = [14 x i8] c"Zero: [%03d]\0A\00"
@.str.8 = [20 x i8] c"Precision: [%4.2f]\0A\00"
@.str.9 = [21 x i8] c"Radix: [%#x], [%#o]\0A\00"
@str = [20 x i8] c"String Literal only\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 10)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 10)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), double 0x3FBF7CEDA0000000)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 65)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i32 10, i32 10, double 0x3FBF7CEDA0000000, i32 65)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 10)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 10)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), double 1.234500e+01)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i32 10, i32 10)
ret i32 0
}