#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 *getPlayerInput();
int /*<<< orphan*/ memcpy(char *, char const *, int);
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *, char *, ...);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *pieceConflict(const char *piece_pos, const char p) {
  static char *temp, fpiece[3], name[7];
  switch (p) {
  case 'P':
    strcpy(name, "Pawn");
    break;
  case 'B':
    strcpy(name, "Bishop");
    break;
  case 'R':
    strcpy(name, "Rook");
    break;
  case 'N':
    strcpy(name, "Knight");
    break;
  default:
    strcpy(name, " ");
    break;
  }
  if (piece_pos[0] != piece_pos[2]) {
    printf("%s %s %s %s?\n%s", "Did you mean to move the left", name,
           "or the right", name,
           "Please specify with either 'left' or 'right': ");
    do {
      temp = getPlayerInput();
    } while (strcmp(temp, "left") != 0 && strcmp(temp, "right") != 0);
    if ((strcmp(temp, "right") == 0 && piece_pos[0] < piece_pos[2]) ||
        (strcmp(temp, "left") == 0 && piece_pos[0] > piece_pos[2])) {
      fpiece[0] = piece_pos[2];
      fpiece[1] = piece_pos[3];
    } else {
      memcpy(fpiece, piece_pos, 2);
    }
  } else {
    printf("%s %s %s %s %s\n%s", "Did you mean to move the", name,
           "above or the", name, "below?",
           "Please specify with either 'up' or 'down': ");
    do {
      temp = getPlayerInput();
    } while (strcmp(temp, "up") != 0 && strcmp(temp, "down") != 0);
    if ((strcmp(temp, "up") == 0 && piece_pos[1] > piece_pos[3]) ||
        (strcmp(temp, "down") == 0 && piece_pos[1] < piece_pos[3])) {
      fpiece[0] = piece_pos[2];
      fpiece[1] = piece_pos[3];
    } else {
      memcpy(fpiece, piece_pos, 2);
    }
  }
  fpiece[2] = '\0';
  return fpiece;
}


x86 assembly (clang, -O0):
<pieceConflict>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
add    $0xffffffbe,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x10,%eax
ja     11ec <pieceConflict+0x9c>
mov    -0x18(%rbp),%rax
lea    0xe7d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x2ec8(%rip),%rdi
lea    0xeaa(%rip),%rsi
call   1030 <strcpy@plt>
jmp    11ff <pieceConflict+0xaf>
lea    0x2eb0(%rip),%rdi
lea    0xe97(%rip),%rsi
call   1030 <strcpy@plt>
jmp    11ff <pieceConflict+0xaf>
lea    0x2e98(%rip),%rdi
lea    0xe86(%rip),%rsi
call   1030 <strcpy@plt>
jmp    11ff <pieceConflict+0xaf>
lea    0x2e80(%rip),%rdi
lea    0xe73(%rip),%rsi
call   1030 <strcpy@plt>
jmp    11ff <pieceConflict+0xaf>
lea    0x2e68(%rip),%rdi
lea    0xf35(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
cmp    %ecx,%eax
je     133f <pieceConflict+0x1ef>
lea    0xe3f(%rip),%rdi
lea    0xe48(%rip),%rsi
lea    0x2e30(%rip),%r8
lea    0xe58(%rip),%rcx
lea    0xe5e(%rip),%r9
mov    %r8,%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <getPlayerInput@plt>
mov    %rax,0x2dff(%rip)
mov    0x2df8(%rip),%rdi
lea    0xe26(%rip),%rsi
call   1050 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x19(%rbp)
je     1293 <pieceConflict+0x143>
mov    0x2dd3(%rip),%rdi
lea    0xe0d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1243 <pieceConflict+0xf3>
mov    0x2dab(%rip),%rdi
lea    0xde5(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12d2 <pieceConflict+0x182>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
cmp    %ecx,%eax
jl     1306 <pieceConflict+0x1b6>
mov    0x2d77(%rip),%rdi
lea    0xda5(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1325 <pieceConflict+0x1d5>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
cmp    %ecx,%eax
jle    1325 <pieceConflict+0x1d5>
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%al
mov    %al,0x2d45(%rip)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%al
mov    %al,0x2d39(%rip)
jmp    133a <pieceConflict+0x1ea>
mov    -0x8(%rbp),%rsi
lea    0x2d28(%rip),%rdi
mov    $0x2,%edx
call   1060 <memcpy@plt>
jmp    1475 <pieceConflict+0x325>
lea    0xd80(%rip),%rdi
lea    0xd8b(%rip),%rsi
lea    0x2d07(%rip),%r8
lea    0xd96(%rip),%rcx
lea    0xd9c(%rip),%r9
lea    0xd9c(%rip),%rax
mov    %r8,%rdx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <getPlayerInput@plt>
mov    %rax,0x2ccb(%rip)
mov    0x2cc4(%rip),%rdi
lea    0xd9e(%rip),%rsi
call   1050 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1a(%rbp)
je     13c7 <pieceConflict+0x277>
mov    0x2c9f(%rip),%rdi
lea    0xd7c(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1a(%rbp)
mov    -0x1a(%rbp),%al
test   $0x1,%al
jne    1377 <pieceConflict+0x227>
mov    0x2c77(%rip),%rdi
lea    0xd51(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1407 <pieceConflict+0x2b7>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x3(%rcx),%ecx
cmp    %ecx,%eax
jg     143c <pieceConflict+0x2ec>
mov    0x2c42(%rip),%rdi
lea    0xd1f(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    145b <pieceConflict+0x30b>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x3(%rcx),%ecx
cmp    %ecx,%eax
jge    145b <pieceConflict+0x30b>
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%al
mov    %al,0x2c0f(%rip)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%al
mov    %al,0x2c03(%rip)
jmp    1470 <pieceConflict+0x320>
mov    -0x8(%rbp),%rsi
lea    0x2bf2(%rip),%rdi
mov    $0x2,%edx
call   1060 <memcpy@plt>
jmp    1475 <pieceConflict+0x325>
movb   $0x0,0x2bde(%rip)
lea    0x2bd5(%rip),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pieceConflict>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
add    $0xffffffbe,%esi
ror    %esi
cmp    $0x8,%esi
ja     1179 <pieceConflict+0x29>
movslq %esi,%rax
lea    0xf88(%rip),%rcx
movslq (%rcx,%rax,4),%rsi
add    %rcx,%rsi
jmp    1180 <pieceConflict+0x30>
lea    0xf6b(%rip),%rsi
lea    0x2ed4(%rip),%rdi
call   1030 <strcpy@plt>
mov    (%r14),%al
cmp    0x2(%r14),%al
jne    1273 <pieceConflict+0x123>
lea    0xf21(%rip),%rax
mov    %rax,(%rsp)
lea    0xed7(%rip),%rdi
lea    0xee2(%rip),%rsi
lea    0xef4(%rip),%rcx
lea    0x2e9b(%rip),%rdx
lea    0xef3(%rip),%r9
mov    %rdx,%r8
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf15(%rip),%rbx
lea    0xf11(%rip),%r15
nop
xor    %eax,%eax
call   1070 <getPlayerInput@plt>
mov    %rax,0x2e62(%rip)
mov    %rax,%rdi
mov    %rbx,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1212 <pieceConflict+0xc2>
mov    0x2e4b(%rip),%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    11e0 <pieceConflict+0x90>
mov    0x2e37(%rip),%rdi
lea    0xecd(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    1234 <pieceConflict+0xe4>
mov    0x3(%r14),%al
cmp    %al,0x1(%r14)
jg     125e <pieceConflict+0x10e>
mov    0x2e15(%rip),%rdi
lea    0xeae(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    1336 <pieceConflict+0x1e6>
mov    0x3(%r14),%al
cmp    %al,0x1(%r14)
jge    1336 <pieceConflict+0x1e6>
mov    0x2(%r14),%cl
mov    %cl,0x2df0(%rip)
mov    %al,0x2deb(%rip)
jmp    134a <pieceConflict+0x1fa>
lea    0xd9e(%rip),%rdi
lea    0xda7(%rip),%rsi
lea    0xdbe(%rip),%rcx
lea    0x2dcc(%rip),%rdx
lea    0xdbd(%rip),%r9
mov    %rdx,%r8
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd9a(%rip),%rbx
lea    0xd9f(%rip),%r15
xchg   %ax,%ax
xor    %eax,%eax
call   1070 <getPlayerInput@plt>
mov    %rax,0x2d92(%rip)
mov    %rax,%rdi
mov    %rbx,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     12e2 <pieceConflict+0x192>
mov    0x2d7b(%rip),%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    12b0 <pieceConflict+0x160>
mov    0x2d67(%rip),%rdi
lea    0xd5d(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    1303 <pieceConflict+0x1b3>
mov    0x2(%r14),%al
cmp    %al,(%r14)
jl     1324 <pieceConflict+0x1d4>
mov    0x2d46(%rip),%rdi
lea    0xd30(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    1336 <pieceConflict+0x1e6>
mov    0x2(%r14),%al
cmp    %al,(%r14)
jle    1336 <pieceConflict+0x1e6>
mov    %al,0x2d2e(%rip)
mov    0x3(%r14),%al
mov    %al,0x2d25(%rip)
jmp    134a <pieceConflict+0x1fa>
lea    0x2d1b(%rip),%rdi
mov    %r14,%rsi
mov    $0x2,%edx
call   1060 <memcpy@plt>
movb   $0x0,0x2d09(%rip)
lea    0x2d00(%rip),%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@pieceConflict.temp = internal global i8* null
@pieceConflict.fpiece = internal global [3 x i8] zeroinitializer
@pieceConflict.name = internal global [7 x i8] zeroinitializer
@.str = [5 x i8] c"Pawn\00"
@.str.1 = [7 x i8] c"Bishop\00"
@.str.2 = [5 x i8] c"Rook\00"
@.str.3 = [7 x i8] c"Knight\00"
@.str.4 = [2 x i8] c" \00"
@.str.5 = [16 x i8] c"%s %s %s %s?\0A%s\00"
@.str.6 = [30 x i8] c"Did you mean to move the left\00"
@.str.7 = [13 x i8] c"or the right\00"
@.str.8 = [47 x i8] c"Please specify with either 'left' or 'right': \00"
@.str.9 = [5 x i8] c"left\00"
@.str.10 = [6 x i8] c"right\00"
@.str.11 = [18 x i8] c"%s %s %s %s %s\0A%s\00"
@.str.12 = [25 x i8] c"Did you mean to move the\00"
@.str.13 = [13 x i8] c"above or the\00"
@.str.14 = [7 x i8] c"below?\00"
@.str.15 = [44 x i8] c"Please specify with either 'up' or 'down': \00"
@.str.16 = [3 x i8] c"up\00"
@.str.17 = [5 x i8] c"down\00"
define i8* @pieceConflict(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
switch i32 %6, label %15 [
i32 80, label %7
i32 66, label %9
i32 82, label %11
i32 78, label %13
]
7: ; preds = %2
%8 = call i32 @strcpy(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %17
9: ; preds = %2
%10 = call i32 @strcpy(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %17
11: ; preds = %2
%12 = call i32 @strcpy(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %17
13: ; preds = %2
%14 = call i32 @strcpy(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %17
15: ; preds = %2
%16 = call i32 @strcpy(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %17
17: ; preds = %15, %13, %11, %9, %7
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 2
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %21, %25
br i1 %26, label %27, label %80
27: ; preds = %17
%28 = call i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0))
br label %29
29: ; preds = %39, %27
%30 = call i8* (...) @getPlayerInput()
store i8* %30, i8** @pieceConflict.temp
br label %31
31: ; preds = %29
%32 = load i8*, i8** @pieceConflict.temp
%33 = call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %39
35: ; preds = %31
%36 = load i8*, i8** @pieceConflict.temp
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%38 = icmp ne i64 %37, 0
br label %39
39: ; preds = %35, %31
%40 = phi i1 [ false, %31 ], [ %38, %35 ]
br i1 %40, label %29, label %41
41: ; preds = %39
%42 = load i8*, i8** @pieceConflict.temp
%43 = call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %55
45: ; preds = %41
%46 = load i8*, i8** %3
%47 = getelementptr inbounds i8, i8* %46, i64 0
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = load i8*, i8** %3
%51 = getelementptr inbounds i8, i8* %50, i64 2
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = icmp slt i32 %49, %53
br i1 %54, label %69, label %55
55: ; preds = %45, %41
%56 = load i8*, i8** @pieceConflict.temp
%57 = call i64 @strcmp(i8* %56, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %76
59: ; preds = %55
%60 = load i8*, i8** %3
%61 = getelementptr inbounds i8, i8* %60, i64 0
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = load i8*, i8** %3
%65 = getelementptr inbounds i8, i8* %64, i64 2
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp sgt i32 %63, %67
br i1 %68, label %69, label %76
69: ; preds = %59, %45
%70 = load i8*, i8** %3
%71 = getelementptr inbounds i8, i8* %70, i64 2
%72 = load i8, i8* %71
store i8 %72, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 0)
%73 = load i8*, i8** %3
%74 = getelementptr inbounds i8, i8* %73, i64 3
%75 = load i8, i8* %74
store i8 %75, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 1)
br label %79
76: ; preds = %59, %55
%77 = load i8*, i8** %3
%78 = call i32 @memcpy(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 0), i8* %77, i32 2)
br label %79
79: ; preds = %76, %69
br label %133
80: ; preds = %17
%81 = call i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.15, i64 0, i64 0))
br label %82
82: ; preds = %92, %80
%83 = call i8* (...) @getPlayerInput()
store i8* %83, i8** @pieceConflict.temp
br label %84
84: ; preds = %82
%85 = load i8*, i8** @pieceConflict.temp
%86 = call i64 @strcmp(i8* %85, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%87 = icmp ne i64 %86, 0
br i1 %87, label %88, label %92
88: ; preds = %84
%89 = load i8*, i8** @pieceConflict.temp
%90 = call i64 @strcmp(i8* %89, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%91 = icmp ne i64 %90, 0
br label %92
92: ; preds = %88, %84
%93 = phi i1 [ false, %84 ], [ %91, %88 ]
br i1 %93, label %82, label %94
94: ; preds = %92
%95 = load i8*, i8** @pieceConflict.temp
%96 = call i64 @strcmp(i8* %95, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%97 = icmp eq i64 %96, 0
br i1 %97, label %98, label %108
98: ; preds = %94
%99 = load i8*, i8** %3
%100 = getelementptr inbounds i8, i8* %99, i64 1
%101 = load i8, i8* %100
%102 = sext i8 %101 to i32
%103 = load i8*, i8** %3
%104 = getelementptr inbounds i8, i8* %103, i64 3
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = icmp sgt i32 %102, %106
br i1 %107, label %122, label %108
108: ; preds = %98, %94
%109 = load i8*, i8** @pieceConflict.temp
%110 = call i64 @strcmp(i8* %109, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%111 = icmp eq i64 %110, 0
br i1 %111, label %112, label %129
112: ; preds = %108
%113 = load i8*, i8** %3
%114 = getelementptr inbounds i8, i8* %113, i64 1
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = load i8*, i8** %3
%118 = getelementptr inbounds i8, i8* %117, i64 3
%119 = load i8, i8* %118
%120 = sext i8 %119 to i32
%121 = icmp slt i32 %116, %120
br i1 %121, label %122, label %129
122: ; preds = %112, %98
%123 = load i8*, i8** %3
%124 = getelementptr inbounds i8, i8* %123, i64 2
%125 = load i8, i8* %124
store i8 %125, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 0)
%126 = load i8*, i8** %3
%127 = getelementptr inbounds i8, i8* %126, i64 3
%128 = load i8, i8* %127
store i8 %128, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 1)
br label %132
129: ; preds = %112, %108
%130 = load i8*, i8** %3
%131 = call i32 @memcpy(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 0), i8* %130, i32 2)
br label %132
132: ; preds = %129, %122
br label %133
133: ; preds = %132, %79
store i8 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 2)
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 0)
}

LLVM IR (-O2):
@pieceConflict.temp = internal unnamed_addr global i8* null
@pieceConflict.fpiece = internal global [3 x i8] zeroinitializer
@pieceConflict.name = internal global [7 x i8] zeroinitializer
@.str = [5 x i8] c"Pawn\00"
@.str.1 = [7 x i8] c"Bishop\00"
@.str.2 = [5 x i8] c"Rook\00"
@.str.3 = [7 x i8] c"Knight\00"
@.str.4 = [2 x i8] c" \00"
@.str.5 = [16 x i8] c"%s %s %s %s?\0A%s\00"
@.str.6 = [30 x i8] c"Did you mean to move the left\00"
@.str.7 = [13 x i8] c"or the right\00"
@.str.8 = [47 x i8] c"Please specify with either 'left' or 'right': \00"
@.str.9 = [5 x i8] c"left\00"
@.str.10 = [6 x i8] c"right\00"
@.str.11 = [18 x i8] c"%s %s %s %s %s\0A%s\00"
@.str.12 = [25 x i8] c"Did you mean to move the\00"
@.str.13 = [13 x i8] c"above or the\00"
@.str.14 = [7 x i8] c"below?\00"
@.str.15 = [44 x i8] c"Please specify with either 'up' or 'down': \00"
@.str.16 = [3 x i8] c"up\00"
@.str.17 = [5 x i8] c"down\00"
@reltable.pieceConflict = [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([9 x i32]* @reltable.pieceConflict to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.pieceConflict to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.pieceConflict to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.pieceConflict to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.pieceConflict to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.pieceConflict to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.3 to i64), i64 ptrtoint ([9 x i32]* @reltable.pieceConflict to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str to i64), i64 ptrtoint ([9 x i32]* @reltable.pieceConflict to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.2 to i64), i64 ptrtoint ([9 x i32]* @reltable.pieceConflict to i64)) to i32)]
define i8* @pieceConflict(i8* %0, i8 signext %1) {
%3 = sext i8 %1 to i32
%4 = add nsw i32 %3, -66
%5 = tail call i32 @llvm.fshl.i32(i32 %4, i32 %4, i32 31)
%6 = icmp ult i32 %5, 9
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = sext i32 %5 to i64
%9 = shl i64 %8, 2
%10 = call i8* @llvm.load.relative.i64(i8* bitcast ([9 x i32]* @reltable.pieceConflict to i8*), i64 %9)
br label %11
11: ; preds = %2, %7
%12 = phi i8* [ %10, %7 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), %2 ]
%13 = tail call i32 @strcpy(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* %12)
%14 = load i8, i8* %0
%15 = getelementptr inbounds i8, i8* %0, i64 2
%16 = load i8, i8* %15
%17 = icmp eq i8 %14, %16
br i1 %17, label %50, label %18
18: ; preds = %11
%19 = tail call i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0))
br label %20
20: ; preds = %24, %18
%21 = tail call i8* (...) @getPlayerInput()
store i8* %21, i8** @pieceConflict.temp
%22 = tail call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %28, label %24
24: ; preds = %20
%25 = load i8*, i8** @pieceConflict.temp
%26 = tail call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %20
28: ; preds = %20, %24
%29 = load i8*, i8** @pieceConflict.temp
%30 = tail call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %36
32: ; preds = %28
%33 = load i8, i8* %0
%34 = load i8, i8* %15
%35 = icmp slt i8 %33, %34
br i1 %35, label %44, label %36
36: ; preds = %32, %28
%37 = load i8*, i8** @pieceConflict.temp
%38 = tail call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %48
40: ; preds = %36
%41 = load i8, i8* %0
%42 = load i8, i8* %15
%43 = icmp sgt i8 %41, %42
br i1 %43, label %44, label %48
44: ; preds = %40, %32
%45 = phi i8 [ %42, %40 ], [ %34, %32 ]
store i8 %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 0)
%46 = getelementptr inbounds i8, i8* %0, i64 3
%47 = load i8, i8* %46
store i8 %47, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 1)
br label %85
48: ; preds = %40, %36
%49 = tail call i32 @memcpy(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 0), i8* %0, i32 2)
br label %85
50: ; preds = %11
%51 = tail call i32 (i8*, i8*, i8*, i8*, i8*, i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @pieceConflict.name, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.15, i64 0, i64 0))
br label %52
52: ; preds = %56, %50
%53 = tail call i8* (...) @getPlayerInput()
store i8* %53, i8** @pieceConflict.temp
%54 = tail call i64 @strcmp(i8* %53, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %60, label %56
56: ; preds = %52
%57 = load i8*, i8** @pieceConflict.temp
%58 = tail call i64 @strcmp(i8* %57, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %52
60: ; preds = %52, %56
%61 = load i8*, i8** @pieceConflict.temp
%62 = tail call i64 @strcmp(i8* %61, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %70
64: ; preds = %60
%65 = getelementptr inbounds i8, i8* %0, i64 1
%66 = load i8, i8* %65
%67 = getelementptr inbounds i8, i8* %0, i64 3
%68 = load i8, i8* %67
%69 = icmp sgt i8 %66, %68
br i1 %69, label %80, label %70
70: ; preds = %64, %60
%71 = load i8*, i8** @pieceConflict.temp
%72 = tail call i64 @strcmp(i8* %71, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0))
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %83
74: ; preds = %70
%75 = getelementptr inbounds i8, i8* %0, i64 1
%76 = load i8, i8* %75
%77 = getelementptr inbounds i8, i8* %0, i64 3
%78 = load i8, i8* %77
%79 = icmp slt i8 %76, %78
br i1 %79, label %80, label %83
80: ; preds = %74, %64
%81 = phi i8 [ %78, %74 ], [ %68, %64 ]
%82 = load i8, i8* %15
store i8 %82, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 0)
store i8 %81, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 1)
br label %85
83: ; preds = %74, %70
%84 = tail call i32 @memcpy(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 0), i8* %0, i32 2)
br label %85
85: ; preds = %80, %83, %44, %48
store i8 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 2)
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @pieceConflict.fpiece, i64 0, i64 0)
}