#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("%d\n", 4459);
  minprintf("%10.2f\n", 4458933215.22236598745);
  minprintf("%s\n", "hello, world");
  minprintf("%10s\n", "hello, world");
  minprintf("%.10s\n", "hello, world");
  minprintf("%.15s\n", "hello, world");
  minprintf("%-15s\n", "hello, world");
  minprintf("%15.10s\n", "hello, world");
  minprintf("%-15.10s\n", "hello, world");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
mov    $0x116b,%esi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xed3(%rip),%rdi
movsd  0xebf(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xec5(%rip),%rdi
lea    0xec2(%rip),%rsi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xec1(%rip),%rdi
lea    0xead(%rip),%rsi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xeb2(%rip),%rdi
lea    0xe98(%rip),%rsi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xea4(%rip),%rdi
lea    0xe83(%rip),%rsi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xe96(%rip),%rdi
lea    0xe6e(%rip),%rsi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xe88(%rip),%rdi
lea    0xe59(%rip),%rsi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xe7c(%rip),%rdi
lea    0xe44(%rip),%rsi
mov    $0x0,%al
call   1030 <minprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef0(%rip),%rdi
mov    $0x116b,%esi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xee1(%rip),%rdi
movsd  0xecd(%rip),%xmm0
mov    $0x1,%al
call   1030 <minprintf@plt>
lea    0xed3(%rip),%rdi
lea    0xed0(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xead(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xea3(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xe9b(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <minprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [8 x i8] c"%10.2f\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [13 x i8] c"hello, world\00"
@.str.4 = [6 x i8] c"%10s\0A\00"
@.str.5 = [7 x i8] c"%.10s\0A\00"
@.str.6 = [7 x i8] c"%.15s\0A\00"
@.str.7 = [7 x i8] c"%-15s\0A\00"
@.str.8 = [9 x i8] c"%15.10s\0A\00"
@.str.9 = [10 x i8] c"%-15.10s\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4459)
%3 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double 0x41F09C5EBDF38ED0)
%4 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [8 x i8] c"%10.2f\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [13 x i8] c"hello, world\00"
@.str.4 = [6 x i8] c"%10s\0A\00"
@.str.5 = [7 x i8] c"%.10s\0A\00"
@.str.6 = [7 x i8] c"%.15s\0A\00"
@.str.7 = [7 x i8] c"%-15s\0A\00"
@.str.8 = [9 x i8] c"%15.10s\0A\00"
@.str.9 = [10 x i8] c"%-15.10s\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4459)
%2 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double 0x41F09C5EBDF38ED0)
%3 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}