#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(void) {
  minprintf("String %s\n", "This is a string");
  minprintf("Integers %d %d %d\n", -1, 0, 1);
  minprintf("Doubles %f %f %g %e %E\n", 0.236, 1.3 * 10e25, 1.25555555,
            1.8888888, 1.999999);
  minprintf("Single Char %c\n", 'a');
  minprintf("Pointer address os a string literal: %p\n",
            "Address of this string");
  minprintf("Unsigned types %u %u\n", 1, -1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf02(%rip),%rdi
lea    0xf06(%rip),%rsi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xf09(%rip),%rdi
mov    $0xffffffff,%esi
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xf02(%rip),%rdi
movsd  0xea3(%rip),%xmm0
movsd  0xea3(%rip),%xmm1
movsd  0xea3(%rip),%xmm2
movsd  0xea3(%rip),%xmm3
movsd  0xea3(%rip),%xmm4
mov    $0x5,%al
call   1030 <minprintf@plt>
lea    0xee4(%rip),%rdi
mov    $0x61,%esi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xee1(%rip),%rdi
lea    0xf03(%rip),%rsi
mov    $0x0,%al
call   1030 <minprintf@plt>
lea    0xf0c(%rip),%rdi
mov    $0x1,%esi
mov    $0xffffffff,%edx
mov    $0x0,%al
call   1030 <minprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf10(%rip),%rdi
lea    0xf14(%rip),%rsi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xf17(%rip),%rdi
mov    $0xffffffff,%esi
xor    %edx,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xf10(%rip),%rdi
movsd  0xeb1(%rip),%xmm0
movsd  0xeb1(%rip),%xmm1
movsd  0xeb1(%rip),%xmm2
movsd  0xeb1(%rip),%xmm3
movsd  0xeb1(%rip),%xmm4
mov    $0x5,%al
call   1030 <minprintf@plt>
lea    0xef2(%rip),%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xeef(%rip),%rdi
lea    0xf11(%rip),%rsi
xor    %eax,%eax
call   1030 <minprintf@plt>
lea    0xf1a(%rip),%rdi
mov    $0x1,%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1030 <minprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"String %s\0A\00"
@.str.1 = [17 x i8] c"This is a string\00"
@.str.2 = [19 x i8] c"Integers %d %d %d\0A\00"
@.str.3 = [24 x i8] c"Doubles %f %f %g %e %E\0A\00"
@.str.4 = [16 x i8] c"Single Char %c\0A\00"
@.str.5 = [41 x i8] c"Pointer address os a string literal: %p\0A\00"
@.str.6 = [23 x i8] c"Address of this string\00"
@.str.7 = [22 x i8] c"Unsigned types %u %u\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 -1, i32 0, i32 1)
%4 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), double 2.360000e-01, double 0x455AE22487C1042C, double 0x3FF416C16A98FB0E, double 0x3FFE38E3765C7DAF, double 0x3FFFFFFEF39085F5)
%5 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 97)
%6 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%7 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 1, i32 -1)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"String %s\0A\00"
@.str.1 = [17 x i8] c"This is a string\00"
@.str.2 = [19 x i8] c"Integers %d %d %d\0A\00"
@.str.3 = [24 x i8] c"Doubles %f %f %g %e %E\0A\00"
@.str.4 = [16 x i8] c"Single Char %c\0A\00"
@.str.5 = [41 x i8] c"Pointer address os a string literal: %p\0A\00"
@.str.6 = [23 x i8] c"Address of this string\00"
@.str.7 = [22 x i8] c"Unsigned types %u %u\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 -1, i32 0, i32 1)
%3 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), double 2.360000e-01, double 0x455AE22487C1042C, double 0x3FF416C16A98FB0E, double 0x3FFE38E3765C7DAF, double 0x3FFFFFFEF39085F5)
%4 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 97)
%5 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 1, i32 -1)
ret i32 0
}