#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*/ my_printf(char *, ...);
int /*<<< orphan*/ printf(char *, int (*)(), char *, char *, char *, int, int,
                          int, int (*)(), int, int (*)());
int main(void) {
  my_printf("hi\n");
  my_printf("hi %p=%s, %s, %s, %d %x %o %p %d %p\n", main, "hi", "there",
            "this", 10, 10, 10, main, 10, main);
  printf("hi %p=%s, %s, %s, %d %x %o %p %d %p\n", main, "hi", "there", "this",
         10, 10, 10, main, 10, main);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1040 <my_printf@plt>
lea    0xec7(%rip),%rdi
mov    0x2ea4(%rip),%rax
lea    0xede(%rip),%rdx
lea    0xeda(%rip),%rcx
lea    0xed9(%rip),%r8
mov    $0xa,%r9d
mov    %rax,%rsi
movl   $0xa,(%rsp)
movl   $0xa,0x8(%rsp)
mov    %rax,0x10(%rsp)
movl   $0xa,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    $0x0,%al
call   1040 <my_printf@plt>
lea    0xe73(%rip),%rdi
mov    0x2e50(%rip),%rax
lea    0xe8a(%rip),%rdx
lea    0xe86(%rip),%rcx
lea    0xe85(%rip),%r8
mov    $0xa,%r9d
mov    %rax,%rsi
movl   $0xa,(%rsp)
movl   $0xa,0x8(%rsp)
mov    %rax,0x10(%rsp)
movl   $0xa,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <my_printf@plt>
sub    $0x8,%rsp
mov    0x2ea6(%rip),%rbx
lea    0xebb(%rip),%r14
lea    0xed9(%rip),%r15
lea    0xed5(%rip),%r12
lea    0xed4(%rip),%r13
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    $0xa,%r9d
mov    $0x0,%eax
push   %rbx
push   $0xa
push   %rbx
push   $0xa
push   $0xa
call   1040 <my_printf@plt>
add    $0x28,%rsp
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
mov    $0xa,%r9d
push   %rbx
push   $0xa
push   %rbx
push   $0xa
push   $0xa
call   1030 <printf@plt>
add    $0x30,%rsp
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"hi\0A\00"
@.str.1 = [37 x i8] c"hi %p=%s, %s, %s, %d %x %o %p %d %p\0A\00"
@.str.2 = [3 x i8] c"hi\00"
@.str.3 = [6 x i8] c"there\00"
@.str.4 = [5 x i8] c"this\00"
define i32 @main() {
%1 = call i32 (i8*, ...) @my_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @my_printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 ()* @main, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 10, i32 10, i32 10, i32 ()* @main, i32 10, i32 ()* @main)
%3 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 (...)* bitcast (i32 ()* @main to i32 (...)*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 10, i32 10, i32 10, i32 (...)* bitcast (i32 ()* @main to i32 (...)*), i32 10, i32 (...)* bitcast (i32 ()* @main to i32 (...)*))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"hi\0A\00"
@.str.1 = [37 x i8] c"hi %p=%s, %s, %s, %d %x %o %p %d %p\0A\00"
@.str.2 = [3 x i8] c"hi\00"
@.str.3 = [6 x i8] c"there\00"
@.str.4 = [5 x i8] c"this\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @my_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @my_printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 ()* @main, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 10, i32 10, i32 10, i32 ()* @main, i32 10, i32 ()* @main)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 (...)* bitcast (i32 ()* @main to i32 (...)*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 10, i32 10, i32 10, i32 (...)* bitcast (i32 ()* @main to i32 (...)*), i32 10, i32 (...)* bitcast (i32 ()* @main to i32 (...)*))
ret i32 0
}