#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 max(int, int, int, int, ...);
int /*<<< orphan*/ printchar(int, char, float, char, ...);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ printstring(int, char *, char *, ...);
int main() {
  printf("%d \n", max(3, 1, 2, 3));
  printf("%d \n", max(4, 31, 89, 2, 3));
  printf("%d \n", max(5, 32, 68, 21, 92, 23));
  printchar(3, 'a', 'b', 'c');
  printchar(5, 'e', 'f', 'g', 'i', 'l');
  printstring(3, "hello", "world", "haha");
  printstring(2, "lala", "hoho");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%ecx
mov    $0x1,%esi
mov    $0x2,%edx
mov    %ecx,%edi
mov    $0x0,%al
call   1050 <max@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
mov    $0x4,%edi
mov    $0x1f,%esi
mov    $0x59,%edx
mov    $0x2,%ecx
mov    $0x3,%r8d
mov    $0x0,%al
call   1050 <max@plt>
mov    %eax,%esi
lea    0xe69(%rip),%rdi
call   1040 <printf@plt>
mov    $0x5,%edi
mov    $0x20,%esi
mov    $0x44,%edx
mov    $0x15,%ecx
mov    $0x5c,%r8d
mov    $0x17,%r9d
mov    $0x0,%al
call   1050 <max@plt>
mov    %eax,%esi
lea    0xe34(%rip),%rdi
call   1040 <printf@plt>
mov    $0x3,%edi
mov    $0x61,%esi
movss  0xe19(%rip),%xmm0
mov    $0x63,%edx
mov    $0x1,%al
call   1030 <printchar@plt>
mov    $0x5,%edi
mov    $0x65,%esi
movss  0xdf7(%rip),%xmm0
mov    $0x67,%edx
mov    $0x69,%ecx
mov    $0x6c,%r8d
mov    $0x1,%al
call   1030 <printchar@plt>
mov    $0x3,%edi
lea    0xde1(%rip),%rsi
lea    0xde0(%rip),%rdx
lea    0xddf(%rip),%rcx
mov    $0x0,%al
call   1060 <printstring@plt>
mov    $0x2,%edi
lea    0xdd1(%rip),%rsi
lea    0xdcf(%rip),%rdx
mov    $0x0,%al
call   1060 <printstring@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x3,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
xor    %eax,%eax
call   1050 <max@plt>
lea    0xea5(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x4,%edi
mov    $0x1f,%esi
mov    $0x59,%edx
mov    $0x2,%ecx
mov    $0x3,%r8d
xor    %eax,%eax
call   1050 <max@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x5,%edi
mov    $0x20,%esi
mov    $0x44,%edx
mov    $0x15,%ecx
mov    $0x5c,%r8d
mov    $0x17,%r9d
xor    %eax,%eax
call   1050 <max@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
movss  0xe2f(%rip),%xmm0
mov    $0x3,%edi
mov    $0x61,%esi
mov    $0x63,%edx
mov    $0x1,%al
call   1030 <printchar@plt>
movss  0xe15(%rip),%xmm0
mov    $0x5,%edi
mov    $0x65,%esi
mov    $0x67,%edx
mov    $0x69,%ecx
mov    $0x6c,%r8d
mov    $0x1,%al
call   1030 <printchar@plt>
lea    0xdf6(%rip),%rsi
lea    0xdf5(%rip),%rdx
lea    0xdf4(%rip),%rcx
mov    $0x3,%edi
xor    %eax,%eax
call   1060 <printstring@plt>
lea    0xde6(%rip),%rsi
lea    0xde4(%rip),%rdx
mov    $0x2,%edi
xor    %eax,%eax
call   1060 <printstring@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d \0A\00"
@.str.1 = [6 x i8] c"hello\00"
@.str.2 = [6 x i8] c"world\00"
@.str.3 = [5 x i8] c"haha\00"
@.str.4 = [5 x i8] c"lala\00"
@.str.5 = [5 x i8] c"hoho\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i32, i32, i32, i32, ...) @max(i32 3, i32 1, i32 2, i32 3)
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (i32, i32, i32, i32, ...) @max(i32 4, i32 31, i32 89, i32 2, i32 3)
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (i32, i32, i32, i32, ...) @max(i32 5, i32 32, i32 68, i32 21, i32 92, i32 23)
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 (i32, i8, float, i8, ...) @printchar(i32 3, i8 signext 97, float 9.800000e+01, i8 signext 99)
%9 = call i32 (i32, i8, float, i8, ...) @printchar(i32 5, i8 signext 101, float 1.020000e+02, i8 signext 103, i32 105, i32 108)
%10 = call i32 (i32, i8*, i8*, ...) @printstring(i32 3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (i32, i8*, i8*, ...) @printstring(i32 2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d \0A\00"
@.str.1 = [6 x i8] c"hello\00"
@.str.2 = [6 x i8] c"world\00"
@.str.3 = [5 x i8] c"haha\00"
@.str.4 = [5 x i8] c"lala\00"
@.str.5 = [5 x i8] c"hoho\00"
define i32 @main() {
%1 = tail call i32 (i32, i32, i32, i32, ...) @max(i32 3, i32 1, i32 2, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (i32, i32, i32, i32, ...) @max(i32 4, i32 31, i32 89, i32 2, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 (i32, i32, i32, i32, ...) @max(i32 5, i32 32, i32 68, i32 21, i32 92, i32 23)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 (i32, i8, float, i8, ...) @printchar(i32 3, i8 signext 97, float 9.800000e+01, i8 signext 99)
%8 = tail call i32 (i32, i8, float, i8, ...) @printchar(i32 5, i8 signext 101, float 1.020000e+02, i8 signext 103, i32 105, i32 108)
%9 = tail call i32 (i32, i8*, i8*, ...) @printstring(i32 3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 (i32, i8*, i8*, ...) @printstring(i32 2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}