#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*/ print_format0(char *, int /*<<< orphan*/);
int /*<<< orphan*/ print_format1(char *, int /*<<< orphan*/, char *);
void printf4(char *s, char *a1, char *a2, char *a3, char *a4) {
  print_format0(
      s,
      print_format1(
          s,
          print_format1(s, print_format1(s, print_format1(s, 0, a1), a2), a3),
          a4));
}


x86 assembly (clang, -O0):
<printf4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <print_format1@plt>
mov    -0x48(%rbp),%rdi
mov    %eax,%esi
mov    -0x18(%rbp),%rdx
call   1030 <print_format1@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%esi
mov    -0x20(%rbp),%rdx
call   1030 <print_format1@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%esi
mov    -0x28(%rbp),%rdx
call   1030 <print_format1@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%esi
call   1040 <print_format0@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf4>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rdx
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <print_format1@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r12,%rdx
call   1030 <print_format1@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r15,%rdx
call   1030 <print_format1@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
call   1030 <print_format1@plt>
mov    %rbx,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <print_format0@plt>

LLVM IR (-O0):
define void @printf4(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %6
%13 = load i8*, i8** %6
%14 = load i8*, i8** %6
%15 = load i8*, i8** %6
%16 = load i8*, i8** %7
%17 = call i32 @print_format1(i8* %15, i32 0, i8* %16)
%18 = load i8*, i8** %8
%19 = call i32 @print_format1(i8* %14, i32 %17, i8* %18)
%20 = load i8*, i8** %9
%21 = call i32 @print_format1(i8* %13, i32 %19, i8* %20)
%22 = load i8*, i8** %10
%23 = call i32 @print_format1(i8* %12, i32 %21, i8* %22)
%24 = call i32 @print_format0(i8* %11, i32 %23)
ret void
}

LLVM IR (-O2):
define void @printf4(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @print_format1(i8* %0, i32 0, i8* %1)
%7 = tail call i32 @print_format1(i8* %0, i32 %6, i8* %2)
%8 = tail call i32 @print_format1(i8* %0, i32 %7, i8* %3)
%9 = tail call i32 @print_format1(i8* %0, i32 %8, i8* %4)
%10 = tail call i32 @print_format0(i8* %0, i32 %9)
ret void
}