#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*/ myprintf(char *, ...);
int main() {
  myprintf("Nothing much\n");
  myprintf("The letter %c\n", 'A');
  myprintf("A string: %s\n", "Splash!");
  myprintf("The number %d\n", 11);
  myprintf("The number %x in hexadecimal\n", 11);
  myprintf("%d is a negative number\n", -5);
  myprintf("The number %d\n", 'A');
  myprintf("The number %x in hexadecimal\n", 'A');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xeda(%rip),%rdi
mov    $0x41,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xed6(%rip),%rdi
lea    0xedd(%rip),%rsi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xed7(%rip),%rdi
mov    $0xb,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xed3(%rip),%rdi
mov    $0xb,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xede(%rip),%rdi
mov    $0xfffffffb,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xe9e(%rip),%rdi
mov    $0x41,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xe9a(%rip),%rdi
mov    $0x41,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xee5(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xee1(%rip),%rdi
lea    0xee8(%rip),%rsi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xee2(%rip),%r14
mov    %r14,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xedb(%rip),%rbx
mov    %rbx,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xee3(%rip),%rdi
mov    $0xfffffffb,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
mov    %r14,%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
mov    %rbx,%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Nothing much\0A\00"
@.str.1 = [15 x i8] c"The letter %c\0A\00"
@.str.2 = [14 x i8] c"A string: %s\0A\00"
@.str.3 = [8 x i8] c"Splash!\00"
@.str.4 = [15 x i8] c"The number %d\0A\00"
@.str.5 = [30 x i8] c"The number %x in hexadecimal\0A\00"
@.str.6 = [25 x i8] c"%d is a negative number\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 65)
%4 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 11)
%6 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 11)
%7 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 -5)
%8 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 65)
%9 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 65)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Nothing much\0A\00"
@.str.1 = [15 x i8] c"The letter %c\0A\00"
@.str.2 = [14 x i8] c"A string: %s\0A\00"
@.str.3 = [8 x i8] c"Splash!\00"
@.str.4 = [15 x i8] c"The number %d\0A\00"
@.str.5 = [30 x i8] c"The number %x in hexadecimal\0A\00"
@.str.6 = [25 x i8] c"%d is a negative number\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 65)
%3 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 11)
%5 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 11)
%6 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 -5)
%7 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 65)
%8 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 65)
ret i32 0
}