#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*/ minprintf(char *, ...);
int main() {
  minprintf("Integers: %d, %i\n", 1, 2);
  minprintf("Unsigned: %u\n", ~0);
  minprintf("Float: %f\n", 1.23456789);
  minprintf("String: %s\n", "Hello World!");
  minprintf("Octal: %o\n", 63);
  minprintf("Hexadecimal: %x\n", 255);
  minprintf("Hexadecimal: %X\n", 255);
  minprintf("Char (newline): %c", '\n');
  minprintf("Exponential: %e\n", 300e6);
  minprintf("Exponential: %E\n", 6626e-37);
  minprintf("%%g: %g\n", 300000000.);
  minprintf("%%G: %G\n", 0.000005);
  minprintf("Percentage symbol: %%\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xefa(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xef4(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xeef(%rip),%rdi
movsd  0xebf(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xee4(%rip),%rdi
lea    0xee9(%rip),%rsi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xee8(%rip),%rdi
mov    $0x3f,%esi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xee0(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xede(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xedc(%rip),%rdi
mov    $0xa,%esi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xedc(%rip),%rdi
movsd  0xe38(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xed7(%rip),%rdi
movsd  0xe2a(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xed2(%rip),%rdi
movsd  0xe0c(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xec5(%rip),%rdi
movsd  0xdee(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <minprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf08(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xf02(%rip),%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xefd(%rip),%rdi
movsd  0xeb5(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xef2(%rip),%rdi
lea    0xef7(%rip),%rsi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xef6(%rip),%rdi
mov    $0x3f,%esi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xeee(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xeec(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xeea(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xeea(%rip),%rdi
movsd  0xe46(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xee5(%rip),%rdi
movsd  0xe38(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xee0(%rip),%rdi
movsd  0xe1a(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xed3(%rip),%rdi
movsd  0xe14(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1030 <minprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Integers: %d, %i\0A\00"
@.str.1 = [14 x i8] c"Unsigned: %u\0A\00"
@.str.2 = [11 x i8] c"Float: %f\0A\00"
@.str.3 = [12 x i8] c"String: %s\0A\00"
@.str.4 = [13 x i8] c"Hello World!\00"
@.str.5 = [11 x i8] c"Octal: %o\0A\00"
@.str.6 = [17 x i8] c"Hexadecimal: %x\0A\00"
@.str.7 = [17 x i8] c"Hexadecimal: %X\0A\00"
@.str.8 = [19 x i8] c"Char (newline): %c\00"
@.str.9 = [17 x i8] c"Exponential: %e\0A\00"
@.str.10 = [17 x i8] c"Exponential: %E\0A\00"
@.str.11 = [9 x i8] c"%%g: %g\0A\00"
@.str.12 = [9 x i8] c"%%G: %G\0A\00"
@.str.13 = [23 x i8] c"Percentage symbol: %%\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%3 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 -1)
%4 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double 0x3FF3C0CA4283DE1B)
%5 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 63)
%7 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 255)
%8 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 255)
%9 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i32 10)
%10 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), double 3.000000e+08)
%11 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), double 6.626000e-34)
%12 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), double 3.000000e+08)
%13 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), double 5.000000e-06)
%14 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Integers: %d, %i\0A\00"
@.str.1 = [14 x i8] c"Unsigned: %u\0A\00"
@.str.2 = [11 x i8] c"Float: %f\0A\00"
@.str.3 = [12 x i8] c"String: %s\0A\00"
@.str.4 = [13 x i8] c"Hello World!\00"
@.str.5 = [11 x i8] c"Octal: %o\0A\00"
@.str.6 = [17 x i8] c"Hexadecimal: %x\0A\00"
@.str.7 = [17 x i8] c"Hexadecimal: %X\0A\00"
@.str.8 = [19 x i8] c"Char (newline): %c\00"
@.str.9 = [17 x i8] c"Exponential: %e\0A\00"
@.str.10 = [17 x i8] c"Exponential: %E\0A\00"
@.str.11 = [9 x i8] c"%%g: %g\0A\00"
@.str.12 = [9 x i8] c"%%G: %G\0A\00"
@.str.13 = [23 x i8] c"Percentage symbol: %%\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%2 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 -1)
%3 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double 0x3FF3C0CA4283DE1B)
%4 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i32 63)
%6 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i32 255)
%7 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i32 255)
%8 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i32 10)
%9 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), double 3.000000e+08)
%10 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), double 6.626000e-34)
%11 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), double 3.000000e+08)
%12 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), double 5.000000e-06)
%13 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0))
ret i32 0
}