#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int checkArguments(int, char **, char **, int *, int *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ transformMove(char *, int, int, char *);
int main(int argc, char **argv) {
  char *move;
  int boardSize;
  int transformations;
  int retValue =
      checkArguments(argc, argv, &move, &boardSize, &transformations);
  if (retValue == EXIT_FAILURE) {
    return EXIT_FAILURE;
  }
  char letterCoordinates[3];
  transformMove(move, boardSize, transformations, letterCoordinates);
  printf("%s\n", letterCoordinates);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
lea    -0x20(%rbp),%r8
call   1050 <checkArguments@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    0x2e75(%rip),%rcx
cmp    (%rcx),%eax
jne    1184 <main+0x54>
mov    0x2e66(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    11b3 <main+0x83>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
lea    -0x27(%rbp),%rcx
call   1030 <transformMove@plt>
lea    -0x27(%rbp),%rsi
lea    0xe5e(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e2a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
call   1050 <checkArguments@plt>
mov    0x2e90(%rip),%rcx
cmp    (%rcx),%eax
je     1186 <main+0x56>
mov    0x18(%rsp),%rdi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
lea    0x15(%rsp),%rbx
mov    %rbx,%rcx
call   1030 <transformMove@plt>
lea    0xe8b(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [3 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = call i32 @checkArguments(i32 %11, i8** %12, i8** %6, i32* %7, i32* %8)
store i32 %13, i32* %9
%14 = load i32, i32* %9
%15 = load i32, i32* @EXIT_FAILURE
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = load i32, i32* @EXIT_FAILURE
store i32 %18, i32* %3
br label %28
19: ; preds = %2
%20 = load i8*, i8** %6
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%24 = call i32 @transformMove(i8* %20, i32 %21, i32 %22, i8* %23)
%25 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 0
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %25)
%27 = load i32, i32* @EXIT_SUCCESS
store i32 %27, i32* %3
br label %28
28: ; preds = %19, %17
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca [3 x i8]
%7 = bitcast i8** %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = call i32 @checkArguments(i32 %0, i8** %1, i8** %3, i32* %4, i32* %5)
%11 = load i32, i32* @EXIT_FAILURE
%12 = icmp eq i32 %10, %11
br i1 %12, label %21, label %13
13: ; preds = %2
%14 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%15 = load i8*, i8** %3
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = call i32 @transformMove(i8* %15, i32 %16, i32 %17, i8* %14)
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
%20 = load i32, i32* @EXIT_SUCCESS
br label %21
21: ; preds = %2, %13
%22 = phi i32 [ %20, %13 ], [ %10, %2 ]
ret i32 %22
}