#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_fprintf(int /*<<< orphan*/, char *, int (*)(), char *,
                              char *, char *, int, int, int, int (*)(), int,
                              int (*)());
int /*<<< orphan*/ my_fprintf2(int /*<<< orphan*/ *, int /*<<< orphan*/, char *,
                               int (*)(), char *, char *, char *, int, int, int,
                               int (*)(), int, int (*)());
int /*<<< orphan*/ my_fprintf3(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               int /*<<< orphan*/, char *, int (*)(), char *,
                               char *, char *, int, int, int, int (*)(), int,
                               int (*)());
int /*<<< orphan*/ my_fprintf4(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *, int /*<<< orphan*/, char *,
                               int (*)(), char *, char *, char *, int, int, int,
                               int (*)(), int, int (*)());
int /*<<< orphan*/ my_printf(char *, ...);
int /*<<< orphan*/ printf(char *, int (*)(), char *, char *, char *, int, int,
                          int, int (*)(), int, int (*)());
int /*<<< orphan*/ stdout;
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);
  my_fprintf(stdout, "hi %p=%s, %s, %s, %d %x %o %p %d %p\n", main, "hi",
             "there", "this", 10, 10, 10, main, 10, main);
  my_fprintf2(NULL, stdout, "hi %p=%s, %s, %s, %d %x %o %p %d %p\n", main, "hi",
              "there", "this", 10, 10, 10, main, 10, main);
  my_fprintf3(NULL, NULL, stdout, "hi %p=%s, %s, %s, %d %x %o %p %d %p\n", main,
              "hi", "there", "this", 10, 10, 10, main, 10, main);
  my_fprintf4(NULL, NULL, NULL, stdout, "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
push   %rbx
sub    $0x48,%rsp
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1060 <my_printf@plt>
lea    0xe86(%rip),%rdi
mov    0x2e63(%rip),%rax
lea    0xe9d(%rip),%rdx
lea    0xe99(%rip),%rcx
lea    0xe98(%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   1060 <my_printf@plt>
lea    0xe32(%rip),%rdi
mov    0x2e0f(%rip),%rax
lea    0xe49(%rip),%rdx
lea    0xe45(%rip),%rcx
lea    0xe44(%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   1040 <printf@plt>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
lea    0xdd7(%rip),%rsi
mov    0x2db4(%rip),%rax
lea    0xdee(%rip),%rcx
lea    0xdea(%rip),%r8
lea    0xde9(%rip),%r9
mov    %rax,%rdx
movl   $0xa,(%rsp)
movl   $0xa,0x8(%rsp)
movl   $0xa,0x10(%rsp)
mov    %rax,0x18(%rsp)
movl   $0xa,0x20(%rsp)
mov    %rax,0x28(%rsp)
call   1030 <my_fprintf@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edi
lea    0xd76(%rip),%rdx
mov    0x2d53(%rip),%rax
lea    0xd8d(%rip),%r8
lea    0xd89(%rip),%r9
lea    0xd88(%rip),%r10
mov    %rax,%rcx
mov    %r10,(%rsp)
movl   $0xa,0x8(%rsp)
movl   $0xa,0x10(%rsp)
movl   $0xa,0x18(%rsp)
mov    %rax,0x20(%rsp)
movl   $0xa,0x28(%rsp)
mov    %rax,0x30(%rsp)
call   1080 <my_fprintf2@plt>
mov    0x2cf1(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
lea    0xd10(%rip),%rcx
mov    0x2ced(%rip),%rax
lea    0xd27(%rip),%r9
lea    0xd23(%rip),%r11
lea    0xd22(%rip),%r10
mov    %rsi,%rdi
mov    %rax,%r8
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
movl   $0xa,0x10(%rsp)
movl   $0xa,0x18(%rsp)
movl   $0xa,0x20(%rsp)
mov    %rax,0x28(%rsp)
movl   $0xa,0x30(%rsp)
mov    %rax,0x38(%rsp)
call   1050 <my_fprintf3@plt>
mov    0x2c83(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
mov    %eax,%edx
lea    0xca2(%rip),%r8
mov    0x2c7f(%rip),%rax
lea    0xcb9(%rip),%rbx
lea    0xcb5(%rip),%r11
lea    0xcb4(%rip),%r10
mov    %rdx,%rdi
mov    %rdx,%rsi
mov    %rax,%r9
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
movl   $0xa,0x18(%rsp)
movl   $0xa,0x20(%rsp)
movl   $0xa,0x28(%rsp)
mov    %rax,0x30(%rsp)
movl   $0xa,0x38(%rsp)
mov    %rax,0x40(%rsp)
call   1070 <my_fprintf4@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe8e(%rip),%rdi
xor    %eax,%eax
call   1060 <my_printf@plt>
sub    $0x8,%rsp
mov    0x2e64(%rip),%rbx
lea    0xe79(%rip),%r13
lea    0xe97(%rip),%r14
lea    0xe93(%rip),%r15
lea    0xe92(%rip),%r12
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    %r12,%r8
mov    $0xa,%r9d
mov    $0x0,%eax
push   %rbx
push   $0xa
push   %rbx
push   $0xa
push   $0xa
call   1060 <my_printf@plt>
add    $0x28,%rsp
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    %r12,%r8
mov    $0xa,%r9d
push   %rbx
push   $0xa
push   %rbx
push   $0xa
push   $0xa
call   1040 <printf@plt>
add    $0x30,%rsp
mov    0x2de0(%rip),%rbp
mov    0x0(%rbp),%edi
mov    %r13,%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %r15,%r8
mov    %r12,%r9
push   %rbx
push   $0xa
push   %rbx
push   $0xa
push   $0xa
push   $0xa
call   1030 <my_fprintf@plt>
add    $0x30,%rsp
mov    0x0(%rbp),%esi
sub    $0x8,%rsp
xor    %edi,%edi
mov    %r13,%rdx
mov    %rbx,%rcx
mov    %r14,%r8
mov    %r15,%r9
push   %rbx
push   $0xa
push   %rbx
push   $0xa
push   $0xa
push   $0xa
push   %r12
call   1080 <my_fprintf2@plt>
add    $0x40,%rsp
mov    0x0(%rbp),%edx
xor    %edi,%edi
xor    %esi,%esi
mov    %r13,%rcx
mov    %rbx,%r8
mov    %r14,%r9
push   %rbx
push   $0xa
push   %rbx
push   $0xa
push   $0xa
push   $0xa
push   %r12
push   %r15
call   1050 <my_fprintf3@plt>
add    $0x40,%rsp
mov    0x0(%rbp),%ecx
sub    $0x8,%rsp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    %r13,%r8
mov    %rbx,%r9
push   %rbx
push   $0xa
push   %rbx
push   $0xa
push   $0xa
push   $0xa
push   %r12
push   %r15
push   %r14
call   1070 <my_fprintf4@plt>
add    $0x50,%rsp
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
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"
@stdout = global i32 0
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 (...)*))
%4 = load i32, i32* @stdout
%5 = call i32 @my_fprintf(i32 %4, 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 (...)*))
%6 = load i32, i32* @stdout
%7 = call i32 @my_fprintf2(i32* null, i32 %6, 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 (...)*))
%8 = load i32, i32* @stdout
%9 = call i32 @my_fprintf3(i32* null, i32* null, i32 %8, 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 (...)*))
%10 = load i32, i32* @stdout
%11 = call i32 @my_fprintf4(i32* null, i32* null, i32* null, i32 %10, 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"
@stdout = global i32 0
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 (...)*))
%4 = load i32, i32* @stdout
%5 = tail call i32 @my_fprintf(i32 %4, 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 (...)*))
%6 = load i32, i32* @stdout
%7 = tail call i32 @my_fprintf2(i32* null, i32 %6, 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 (...)*))
%8 = load i32, i32* @stdout
%9 = tail call i32 @my_fprintf3(i32* null, i32* null, i32 %8, 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 (...)*))
%10 = load i32, i32* @stdout
%11 = tail call i32 @my_fprintf4(i32* null, i32* null, i32* null, i32 %10, 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
}