#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 *, ...);
void part1_main(void) {
  myprintf("Hello World!\n");
  myprintf("Am I on a new line?\n");
  myprintf("Int: %d (should be 3)\n", 3);
  myprintf("Negative Int: %d (should be -7)\n", -7);
  myprintf("String: %s (should be 'I'm Alive!')\n", "I'm Alive!");
  myprintf("Hex: %x (should be 559E7C4)\n", 89778116);
  myprintf("Char: %c (should be 'z')\n", 'z');
  myprintf("Full Check-\nInt: %d (5)\nNegative Int: %d (-121)\nString: %s "
           "('The cake is a lie!')\nHex: %x (12FD100)\nChar: %c ('y')\n",
           5, -121, "The cake is a lie!", 19910912, 'y');
}


x86 assembly (clang, -O0):
<part1_main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xeec(%rip),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xef0(%rip),%rdi
mov    $0xfffffff9,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xefe(%rip),%rdi
lea    0xf1c(%rip),%rsi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xf19(%rip),%rdi
mov    $0x559e7c4,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xf23(%rip),%rdi
mov    $0x7a,%esi
mov    $0x0,%al
call   1030 <myprintf@plt>
lea    0xf2a(%rip),%rdi
mov    $0x5,%esi
mov    $0xffffff87,%edx
lea    0xf8d(%rip),%rcx
mov    $0x12fd100,%r8d
mov    $0x79,%r9d
mov    $0x0,%al
call   1030 <myprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<part1_main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xeef(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xef3(%rip),%rdi
mov    $0xfffffff9,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xf01(%rip),%rdi
lea    0xf1f(%rip),%rsi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xf1c(%rip),%rdi
mov    $0x559e7c4,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xf26(%rip),%rdi
mov    $0x7a,%esi
xor    %eax,%eax
call   1030 <myprintf@plt>
lea    0xf2d(%rip),%rdi
lea    0xf9a(%rip),%rcx
mov    $0x5,%esi
mov    $0xffffff87,%edx
mov    $0x12fd100,%r8d
mov    $0x79,%r9d
xor    %eax,%eax
pop    %r11
jmp    1030 <myprintf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
@.str.1 = [21 x i8] c"Am I on a new line?\0A\00"
@.str.2 = [23 x i8] c"Int: %d (should be 3)\0A\00"
@.str.3 = [33 x i8] c"Negative Int: %d (should be -7)\0A\00"
@.str.4 = [37 x i8] c"String: %s (should be 'I'm Alive!')\0A\00"
@.str.5 = [11 x i8] c"I'm Alive!\00"
@.str.6 = [29 x i8] c"Hex: %x (should be 559E7C4)\0A\00"
@.str.7 = [26 x i8] c"Char: %c (should be 'z')\0A\00"
@.str.8 = [116 x i8] c"Full Check-\0AInt: %d (5)\0ANegative Int: %d (-121)\0AString: %s ('The cake is a lie!')\0AHex: %x (12FD100)\0AChar: %c ('y')\0A\00"
@.str.9 = [19 x i8] c"The cake is a lie!\00"
define void @part1_main() {
%1 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 3)
%4 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 -7)
%5 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%6 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i32 89778116)
%7 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 122)
%8 = call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str.8, i64 0, i64 0), i32 5, i32 -121, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i32 19910912, i32 121)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello World!\0A\00"
@.str.1 = [21 x i8] c"Am I on a new line?\0A\00"
@.str.2 = [23 x i8] c"Int: %d (should be 3)\0A\00"
@.str.3 = [33 x i8] c"Negative Int: %d (should be -7)\0A\00"
@.str.4 = [37 x i8] c"String: %s (should be 'I'm Alive!')\0A\00"
@.str.5 = [11 x i8] c"I'm Alive!\00"
@.str.6 = [29 x i8] c"Hex: %x (should be 559E7C4)\0A\00"
@.str.7 = [26 x i8] c"Char: %c (should be 'z')\0A\00"
@.str.8 = [116 x i8] c"Full Check-\0AInt: %d (5)\0ANegative Int: %d (-121)\0AString: %s ('The cake is a lie!')\0AHex: %x (12FD100)\0AChar: %c ('y')\0A\00"
@.str.9 = [19 x i8] c"The cake is a lie!\00"
define void @part1_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 ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 3)
%4 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 -7)
%5 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i32 89778116)
%7 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 122)
%8 = tail call i32 (i8*, ...) @myprintf(i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str.8, i64 0, i64 0), i32 5, i32 -121, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i32 19910912, i32 121)
ret void
}