#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() {
  float a = 3.1415;
  int i = 12345, j = -6789, k = 24500;
  printf("123456789012345678901234567890\n");
  printf("%d %d %d\n", i, j, k);
  printf("%3d %3d %3d\n", i, j, k);
  printf("%8d %8d %8d\n", i, j, k);
  printf("%08d %08d %08d\n", i, j, k);
  printf("%-8d %-8d %-8d\n", i, j, k);
  printf("%10f\n", a);
  printf("%3f\n", a);
  printf("%-10f\n", a);
  printf("%-10.3f\n", a);
  printf("%10.2f\n", a);
  printf("%.1f\n", a);
  printf("%.3f\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x3039,-0xc(%rbp)
movl   $0xffffe57b,-0x10(%rbp)
movl   $0x5fb4,-0x14(%rbp)
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe96(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe85(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe73(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe63(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe55(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe46(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe35(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf53(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
mov    $0x3039,%esi
mov    $0xffffe57b,%edx
mov    $0x5fb4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x3039,%esi
mov    $0xffffe57b,%edx
mov    $0x5fb4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    $0x3039,%esi
mov    $0xffffe57b,%edx
mov    $0x5fb4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea1(%rip),%rdi
mov    $0x3039,%esi
mov    $0xffffe57b,%edx
mov    $0x5fb4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe94(%rip),%rdi
mov    $0x3039,%esi
mov    $0xffffe57b,%edx
mov    $0x5fb4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe87(%rip),%rdi
movsd  0xe33(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe77(%rip),%rdi
movsd  0xe1d(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe66(%rip),%rdi
movsd  0xe07(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe57(%rip),%rdi
movsd  0xdf1(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe4a(%rip),%rdi
movsd  0xddb(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe3c(%rip),%rdi
movsd  0xdc5(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe2c(%rip),%rdi
movsd  0xdaf(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"123456789012345678901234567890\0A\00"
@.str.1 = [10 x i8] c"%d %d %d\0A\00"
@.str.2 = [13 x i8] c"%3d %3d %3d\0A\00"
@.str.3 = [13 x i8] c"%8d %8d %8d\0A\00"
@.str.4 = [16 x i8] c"%08d %08d %08d\0A\00"
@.str.5 = [16 x i8] c"%-8d %-8d %-8d\0A\00"
@.str.6 = [6 x i8] c"%10f\0A\00"
@.str.7 = [5 x i8] c"%3f\0A\00"
@.str.8 = [7 x i8] c"%-10f\0A\00"
@.str.9 = [9 x i8] c"%-10.3f\0A\00"
@.str.10 = [8 x i8] c"%10.2f\0A\00"
@.str.11 = [6 x i8] c"%.1f\0A\00"
@.str.12 = [6 x i8] c"%.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store float 0x400921CAC0000000, float* %2
store i32 12345, i32* %3
store i32 -6789, i32* %4
store i32 24500, i32* %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 %12, i32 %13)
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %15, i32 %16, i32 %17)
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %19, i32 %20, i32 %21)
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = load i32, i32* %5
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %23, i32 %24, i32 %25)
%27 = load float, float* %2
%28 = fpext float %27 to double
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), double %28)
%30 = load float, float* %2
%31 = fpext float %30 to double
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), double %31)
%33 = load float, float* %2
%34 = fpext float %33 to double
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), double %34)
%36 = load float, float* %2
%37 = fpext float %36 to double
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %37)
%39 = load float, float* %2
%40 = fpext float %39 to double
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), double %40)
%42 = load float, float* %2
%43 = fpext float %42 to double
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), double %43)
%45 = load float, float* %2
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), double %46)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"%d %d %d\0A\00"
@.str.2 = [13 x i8] c"%3d %3d %3d\0A\00"
@.str.3 = [13 x i8] c"%8d %8d %8d\0A\00"
@.str.4 = [16 x i8] c"%08d %08d %08d\0A\00"
@.str.5 = [16 x i8] c"%-8d %-8d %-8d\0A\00"
@.str.6 = [6 x i8] c"%10f\0A\00"
@.str.7 = [5 x i8] c"%3f\0A\00"
@.str.8 = [7 x i8] c"%-10f\0A\00"
@.str.9 = [9 x i8] c"%-10.3f\0A\00"
@.str.10 = [8 x i8] c"%10.2f\0A\00"
@.str.11 = [6 x i8] c"%.1f\0A\00"
@.str.12 = [6 x i8] c"%.3f\0A\00"
@str = [31 x i8] c"123456789012345678901234567890\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 12345, i32 -6789, i32 24500)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 12345, i32 -6789, i32 24500)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 12345, i32 -6789, i32 24500)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 12345, i32 -6789, i32 24500)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 12345, i32 -6789, i32 24500)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), double 0x400921CAC0000000)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), double 0x400921CAC0000000)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), double 0x400921CAC0000000)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double 0x400921CAC0000000)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), double 0x400921CAC0000000)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), double 0x400921CAC0000000)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i64 0, i64 0), double 0x400921CAC0000000)
ret i32 0
}