#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, int, int, int, int, int, int, char,
                             double, char *, double, double, double);
int main(void) {
  int ret = 0;
  char str[] =
      "decimal = %d\ndecimal = %i\noctal = %o\nhex = %x\nhex = %X\nunsigned = "
      "%u \nunsigned = %u \nchar = %c \nfloat = %f \nstring = %s \ndouble = %e "
      "\ndouble = %E \ndouble = %g \n%%%% = %% \n";
  minprintf(str, 10, 34, 8, 16, 255, -1, 1, 'a', 12.54, "hello world", 32.54,
            0.21, 0.00000000054);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0xc0(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0xac,%edx
call   1040 <memcpy@plt>
lea    -0xc0(%rbp),%rdi
mov    $0xa,%esi
mov    $0x22,%edx
mov    $0x8,%ecx
mov    $0x10,%r8d
mov    $0xff,%r9d
movsd  0xe85(%rip),%xmm0
lea    0xf4a(%rip),%rax
movsd  0xe7e(%rip),%xmm1
movsd  0xe7e(%rip),%xmm2
movsd  0xe7e(%rip),%xmm3
movl   $0xffffffff,(%rsp)
movl   $0x1,0x8(%rsp)
movl   $0x61,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <minprintf@plt>
mov    -0x8(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xb0,%rsp
lea    0xef1(%rip),%rsi
mov    %rsp,%rbx
mov    $0xac,%edx
mov    %rbx,%rdi
call   1040 <memcpy@plt>
lea    0xf86(%rip),%rax
movsd  0xeb2(%rip),%xmm0
movsd  0xeb2(%rip),%xmm1
movsd  0xeb2(%rip),%xmm2
movsd  0xeb2(%rip),%xmm3
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x22,%edx
mov    $0x8,%ecx
mov    $0x10,%r8d
mov    $0xff,%r9d
push   %rax
push   $0x61
push   $0x1
push   $0xffffffffffffffff
call   1030 <minprintf@plt>
add    $0x20,%rsp
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [172 x i8] c"decimal = %d\0Adecimal = %i\0Aoctal = %o\0Ahex = %x\0Ahex = %X\0Aunsigned = %u \0Aunsigned = %u \0Achar = %c \0Afloat = %f \0Astring = %s \0Adouble = %e \0Adouble = %E \0Adouble = %g \0A%%%% = %% \0A\00"
@.str = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [172 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
%4 = bitcast [172 x i8]* %3 to i8*
%5 = getelementptr inbounds [172 x i8], [172 x i8]* %3, i64 0, i64 0
%6 = call i32 @minprintf(i8* %5, i32 10, i32 34, i32 8, i32 16, i32 255, i32 -1, i32 1, i8 signext 97, double 1.254000e+01, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double 3.254000e+01, double 2.100000e-01, double 5.400000e-10)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@__const.main.str = [172 x i8] c"decimal = %d\0Adecimal = %i\0Aoctal = %o\0Ahex = %x\0Ahex = %X\0Aunsigned = %u \0Aunsigned = %u \0Achar = %c \0Afloat = %f \0Astring = %s \0Adouble = %e \0Adouble = %E \0Adouble = %g \0A%%%% = %% \0A\00"
@.str = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = alloca [172 x i8]
%2 = getelementptr inbounds [172 x i8], [172 x i8]* %1, i64 0, i64 0
%3 = call i32 @minprintf(i8* %2, i32 10, i32 34, i32 8, i32 16, i32 255, i32 -1, i32 1, i8 signext 97, double 1.254000e+01, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double 3.254000e+01, double 2.100000e-01, double 5.400000e-10)
ret i32 0
}