#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 */
char *a64l(char *);
char *l64a(int);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  printf("%s\n", l64a(0));
  printf("%s\n", l64a(1));
  printf("%s\n", l64a(2));
  printf("%s\n", l64a(10));
  printf("%s\n", l64a(16));
  printf("%s\n", l64a(63));
  printf("%ld\n", a64l(l64a(0)));
  printf("%ld\n", a64l(l64a(10)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1040 <l64a@plt>
mov    %rax,%rsi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <l64a@plt>
mov    %rax,%rsi
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <l64a@plt>
mov    %rax,%rsi
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <l64a@plt>
mov    %rax,%rsi
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
mov    $0x10,%edi
call   1040 <l64a@plt>
mov    %rax,%rsi
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3f,%edi
call   1040 <l64a@plt>
mov    %rax,%rsi
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <l64a@plt>
mov    %rax,%rdi
call   1050 <a64l@plt>
mov    %rax,%rsi
lea    0xe12(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <l64a@plt>
mov    %rax,%rdi
call   1050 <a64l@plt>
mov    %rax,%rsi
lea    0xdf1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1040 <l64a@plt>
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <l64a@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <l64a@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <l64a@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0x10,%edi
call   1040 <l64a@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0x3f,%edi
call   1040 <l64a@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <l64a@plt>
mov    %rax,%rdi
call   1050 <a64l@plt>
lea    0xe3b(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <l64a@plt>
mov    %rax,%rdi
call   1050 <a64l@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i8* @l64a(i32 0)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i8* @l64a(i32 1)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i8* @l64a(i32 2)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i8* @l64a(i32 10)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i8* @l64a(i32 16)
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = call i8* @l64a(i32 63)
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = call i8* @l64a(i32 0)
%19 = call i8* @a64l(i8* %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %19)
%21 = call i8* @l64a(i32 10)
%22 = call i8* @a64l(i8* %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [5 x i8] c"%ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @l64a(i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i8* @l64a(i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i8* @l64a(i32 2)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = tail call i8* @l64a(i32 10)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = tail call i8* @l64a(i32 16)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = tail call i8* @l64a(i32 63)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = tail call i8* @l64a(i32 0)
%16 = tail call i8* @a64l(i8* %15)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = tail call i8* @l64a(i32 10)
%19 = tail call i8* @a64l(i8* %18)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %19)
ret i32 0
}