#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 /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  int a = 200;
  char s[] = "Hello there";
  printf("Testing strings:\n");
  minprintf("Well hello %s\n", "mr. ups man");
  minprintf("Well hello %s\n", s);
  printf("Testing ints:\n");
  minprintf("Well hello %d\n", a);
  printf("Testin octals:\n");
  minprintf("Well hello %o\n", a);
  printf("Testin hexadecimals:\n");
  minprintf("Well hello %x\n", a);
  minprintf("Well hello %X\n", a);
  printf("Testin character:\n");
  minprintf("Well hello %c\n", 'a');
  printf("Testing addreses:\n");
  minprintf("Well hello %p\n", &a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xc8,-0x14(%rbp)
mov    0xebc(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeba(%rip),%eax
mov    %eax,-0x18(%rbp)
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
lea    0xec2(%rip),%rsi
mov    $0x0,%al
call   1040 <minprintf@plt>
lea    -0x20(%rbp),%rsi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1040 <minprintf@plt>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1040 <minprintf@plt>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1040 <minprintf@plt>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <minprintf@plt>
mov    -0x14(%rbp),%esi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <minprintf@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
mov    $0x61,%esi
mov    $0x0,%al
call   1040 <minprintf@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <minprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movl   $0xc8,0xc(%rsp)
movabs $0x6874206f6c6c6548,%rax
20 74 68
mov    %rax,0x10(%rsp)
movl   $0x657265,0x18(%rsp)
lea    0xf36(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rbx
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <minprintf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <minprintf@plt>
lea    0xf14(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9d(%rip),%rdi
mov    $0xc8,%esi
xor    %eax,%eax
call   1040 <minprintf@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xe8d(%rip),%rdi
mov    $0xc8,%esi
xor    %eax,%eax
call   1040 <minprintf@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7d(%rip),%rdi
mov    $0xc8,%esi
xor    %eax,%eax
call   1040 <minprintf@plt>
lea    0xe79(%rip),%rdi
mov    $0xc8,%esi
xor    %eax,%eax
call   1040 <minprintf@plt>
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
lea    0xe69(%rip),%rdi
mov    $0x61,%esi
xor    %eax,%eax
call   1040 <minprintf@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
lea    0xe59(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <minprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s = [12 x i8] c"Hello there\00"
@.str = [18 x i8] c"Testing strings:\0A\00"
@.str.1 = [15 x i8] c"Well hello %s\0A\00"
@.str.2 = [12 x i8] c"mr. ups man\00"
@.str.3 = [15 x i8] c"Testing ints:\0A\00"
@.str.4 = [15 x i8] c"Well hello %d\0A\00"
@.str.5 = [16 x i8] c"Testin octals:\0A\00"
@.str.6 = [15 x i8] c"Well hello %o\0A\00"
@.str.7 = [22 x i8] c"Testin hexadecimals:\0A\00"
@.str.8 = [15 x i8] c"Well hello %x\0A\00"
@.str.9 = [15 x i8] c"Well hello %X\0A\00"
@.str.10 = [19 x i8] c"Testin character:\0A\00"
@.str.11 = [15 x i8] c"Well hello %c\0A\00"
@.str.12 = [19 x i8] c"Testing addreses:\0A\00"
@.str.13 = [15 x i8] c"Well hello %p\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [12 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 200, i32* %6
%8 = bitcast [12 x i8]* %7 to i8*
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%11 = getelementptr inbounds [12 x i8], [12 x i8]* %7, i64 0, i64 0
%12 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%14 = load i32, i32* %6
%15 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%17 = load i32, i32* %6
%18 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0))
%20 = load i32, i32* %6
%21 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %6
%23 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 %22)
%24 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
%25 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0), i32 97)
%26 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0))
%27 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i32* %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [12 x i8] c"Hello there\00"
@.str.1 = [15 x i8] c"Well hello %s\0A\00"
@.str.2 = [12 x i8] c"mr. ups man\00"
@.str.4 = [15 x i8] c"Well hello %d\0A\00"
@.str.6 = [15 x i8] c"Well hello %o\0A\00"
@.str.8 = [15 x i8] c"Well hello %x\0A\00"
@.str.9 = [15 x i8] c"Well hello %X\0A\00"
@.str.11 = [15 x i8] c"Well hello %c\0A\00"
@.str.13 = [15 x i8] c"Well hello %p\0A\00"
@str = [17 x i8] c"Testing strings:\00"
@str.14 = [14 x i8] c"Testing ints:\00"
@str.15 = [15 x i8] c"Testin octals:\00"
@str.16 = [21 x i8] c"Testin hexadecimals:\00"
@str.17 = [18 x i8] c"Testin character:\00"
@str.18 = [18 x i8] c"Testing addreses:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca [12 x i8]
%5 = bitcast i32* %3 to i8*
store i32 200, i32* %3
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.14, i64 0, i64 0))
%11 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 200)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.15, i64 0, i64 0))
%13 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 200)
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.16, i64 0, i64 0))
%15 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 200)
%16 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 200)
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.17, i64 0, i64 0))
%18 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.11, i64 0, i64 0), i32 97)
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.18, i64 0, i64 0))
%20 = call i32 (i8*, ...) @minprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i32* %3)
ret i32 0
}