#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*/ i_to_x(int, char *);
int /*<<< orphan*/ j_to_y(int, char *);
int /*<<< orphan*/ set_vertex(int, int, int);
int /*<<< orphan*/ strcat(char *, char *);
void add_handicap(int i, int j, char output[]) {
  char x[2];
  char y[3];
  set_vertex(1, i, j);
  i_to_x(i, x);
  j_to_y(j, y);
  strcat(output, x);
  strcat(output, y);
  return;
}


x86 assembly (clang, -O0):
<add_handicap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    $0x1,%edi
call   1040 <set_vertex@plt>
mov    -0x4(%rbp),%edi
lea    -0x12(%rbp),%rsi
call   1030 <i_to_x@plt>
mov    -0x8(%rbp),%edi
lea    -0x15(%rbp),%rsi
call   1050 <j_to_y@plt>
mov    -0x10(%rbp),%rdi
lea    -0x12(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x10(%rbp),%rdi
lea    -0x15(%rbp),%rsi
call   1060 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_handicap>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x1,%edi
mov    %ebx,%esi
mov    %ebp,%edx
call   1040 <set_vertex@plt>
lea    0x3(%rsp),%r15
mov    %ebx,%edi
mov    %r15,%rsi
call   1030 <i_to_x@plt>
lea    0x5(%rsp),%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <j_to_y@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <strcat@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <strcat@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @add_handicap(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [2 x i8]
%8 = alloca [3 x i8]
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = call i32 @set_vertex(i32 1, i32 %9, i32 %10)
%12 = load i32, i32* %4
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%14 = call i32 @i_to_x(i32 %12, i8* %13)
%15 = load i32, i32* %5
%16 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%17 = call i32 @j_to_y(i32 %15, i8* %16)
%18 = load i8*, i8** %6
%19 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i64 0, i64 0
%20 = call i32 @strcat(i8* %18, i8* %19)
%21 = load i8*, i8** %6
%22 = getelementptr inbounds [3 x i8], [3 x i8]* %8, i64 0, i64 0
%23 = call i32 @strcat(i8* %21, i8* %22)
ret void
}

LLVM IR (-O2):
define void @add_handicap(i32 %0, i32 %1, i8* %2) {
%4 = alloca [2 x i8]
%5 = alloca [3 x i8]
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%8 = tail call i32 @set_vertex(i32 1, i32 %0, i32 %1)
%9 = call i32 @i_to_x(i32 %0, i8* %6)
%10 = call i32 @j_to_y(i32 %1, i8* %7)
%11 = call i32 @strcat(i8* %2, i8* %6)
%12 = call i32 @strcat(i8* %2, i8* %7)
ret void
}