#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 *, double, double, ...);
main() {
  printf("%-4d,%d\n", 12, 5);
  printf("%+d,%+d,%+d\n", -5, 0, 5);
  printf("% d,% d,% d,%+ d\n", 5, -5, 5, 5);
  double x = 3;
  printf("% e,%+e,%e\n", x, x, x);
  x = -3;
  printf("% e,%+e,%e\n", x, x, x);
  printf("%#o #%o\n", 3, 3);
  printf("%.0f,%#.0f,%g,%#g\n", 3.0, 3.0, 3.0, 3.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf02(%rip),%rdi
movsd  0xef2(%rip),%xmm0
movsd  0xeda(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
movsd  0xecc(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    $0x5,%esi
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
movsd  0xea6(%rip),%xmm0
movsd  0xea6(%rip),%xmm1
mov    $0x5,%edx
mov    %edx,%esi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe78(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
lea    0xead(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movsd  0xe56(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
lea    0xe83(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xe81(%rip),%rdi
movsd  0xe1d(%rip),%xmm1
movaps %xmm1,%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xe71(%rip),%rdi
movsd  0xe04(%rip),%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
mov    $0x4,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf10(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
movsd  0xed2(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    $0x5,%esi
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
movsd  0xeac(%rip),%xmm0
movsd  0xeac(%rip),%xmm1
mov    $0x5,%esi
mov    $0x5,%edx
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rbx
movsd  0xe94(%rip),%xmm0
mov    %rbx,%rdi
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
mov    $0x3,%al
call   1030 <printf@plt>
movsd  0xe84(%rip),%xmm0
mov    %rbx,%rdi
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xea9(%rip),%rdi
movsd  0xe5d(%rip),%xmm0
movaps %xmm0,%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xe99(%rip),%rdi
movsd  0xe44(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
movaps %xmm0,%xmm3
mov    $0x4,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%-4d,%d\0A\00"
@.str.1 = [13 x i8] c"%+d,%+d,%+d\0A\00"
@.str.2 = [18 x i8] c"% d,% d,% d,%+ d\0A\00"
@.str.3 = [12 x i8] c"% e,%+e,%e\0A\00"
@.str.4 = [9 x i8] c"%#o #%o\0A\00"
@.str.5 = [19 x i8] c"%.0f,%#.0f,%g,%#g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double 1.200000e+01, double 5.000000e+00)
%4 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double -5.000000e+00, double 0.000000e+00, i32 5)
%5 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double 5.000000e+00, double -5.000000e+00, i32 5, i32 5)
store double 3.000000e+00, double* %2
%6 = load double, double* %2
%7 = load double, double* %2
%8 = load double, double* %2
%9 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double %6, double %7, double %8)
store double -3.000000e+00, double* %2
%10 = load double, double* %2
%11 = load double, double* %2
%12 = load double, double* %2
%13 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double %10, double %11, double %12)
%14 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), double 3.000000e+00, double 3.000000e+00)
%15 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), double 3.000000e+00, double 3.000000e+00, double 3.000000e+00, double 3.000000e+00)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%-4d,%d\0A\00"
@.str.1 = [13 x i8] c"%+d,%+d,%+d\0A\00"
@.str.2 = [18 x i8] c"% d,% d,% d,%+ d\0A\00"
@.str.3 = [12 x i8] c"% e,%+e,%e\0A\00"
@.str.4 = [9 x i8] c"%#o #%o\0A\00"
@.str.5 = [19 x i8] c"%.0f,%#.0f,%g,%#g\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double 1.200000e+01, double 5.000000e+00)
%2 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double -5.000000e+00, double 0.000000e+00, i32 5)
%3 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double 5.000000e+00, double -5.000000e+00, i32 5, i32 5)
%4 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double 3.000000e+00, double 3.000000e+00, double 3.000000e+00)
%5 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double -3.000000e+00, double -3.000000e+00, double -3.000000e+00)
%6 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), double 3.000000e+00, double 3.000000e+00)
%7 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), double 3.000000e+00, double 3.000000e+00, double 3.000000e+00, double 3.000000e+00)
ret i32 0
}