#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() {
  int a = 365;
  printf("%5d\t", a);
  float b = 3.14;
  printf("%3.1f\n", b);
  a = 1;
  printf("         1 + 1 = 2\n");
  printf(" %9d + 1 = 2\n", a);
  printf("\t %.0f + 1 = 2\n", 1.23);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x16d,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
movsd  0xe70(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x16d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
movsd  0xebd(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xebf(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeba(%rip),%rdi
movsd  0xe90(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%5d\09\00"
@.str.1 = [7 x i8] c"%3.1f\0A\00"
@.str.2 = [20 x i8] c" 1 + 1 = 2\0A\00"
@.str.3 = [14 x i8] c" %9d + 1 = 2\0A\00"
@.str.4 = [16 x i8] c"\09 %.0f + 1 = 2\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
store i32 365, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
store float 0x40091EB860000000, float* %3
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %7)
store i32 1, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), double 1.230000e+00)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%5d\09\00"
@.str.1 = [7 x i8] c"%3.1f\0A\00"
@.str.3 = [14 x i8] c" %9d + 1 = 2\0A\00"
@.str.4 = [16 x i8] c"\09 %.0f + 1 = 2\0A\00"
@str = [19 x i8] c" 1 + 1 = 2\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 365)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double 0x40091EB860000000)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 1)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), double 1.230000e+00)
ret i32 0
}