#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*/ getImpactLoc(short *, short *, short *, int,
                                int /*<<< orphan*/);
char openPathBetween(short x1, short y1, short x2, short y2) {
  short returnLoc[2], startLoc[2] = {x1, y1}, targetLoc[2] = {x2, y2};
  getImpactLoc(returnLoc, startLoc, targetLoc, (100 - 20 - 1), 0);
  if (returnLoc[0] == targetLoc[0] && returnLoc[1] == targetLoc[1]) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<openPathBetween>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %si,%dx
mov    %di,%si
mov    %si,-0x4(%rbp)
mov    %dx,-0x6(%rbp)
mov    %cx,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x4(%rbp),%ax
mov    %ax,-0x12(%rbp)
mov    -0x6(%rbp),%ax
mov    %ax,-0x10(%rbp)
mov    -0x8(%rbp),%ax
mov    %ax,-0x16(%rbp)
mov    -0xa(%rbp),%ax
mov    %ax,-0x14(%rbp)
lea    -0xe(%rbp),%rdi
lea    -0x12(%rbp),%rsi
lea    -0x16(%rbp),%rdx
mov    $0x4f,%ecx
xor    %r8d,%r8d
call   1030 <getImpactLoc@plt>
movswl -0xe(%rbp),%eax
movswl -0x16(%rbp),%ecx
cmp    %ecx,%eax
jne    1196 <openPathBetween+0x86>
movswl -0xc(%rbp),%eax
movswl -0x14(%rbp),%ecx
cmp    %ecx,%eax
jne    1196 <openPathBetween+0x86>
movb   $0x1,-0x1(%rbp)
jmp    119a <openPathBetween+0x8a>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openPathBetween>:
sub    $0x18,%rsp
mov    %di,0x10(%rsp)
mov    %si,0x12(%rsp)
mov    %dx,0xc(%rsp)
mov    %cx,0xe(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    $0x4f,%ecx
xor    %r8d,%r8d
call   1030 <getImpactLoc@plt>
movzwl 0x14(%rsp),%eax
cmp    0xc(%rsp),%ax
jne    115e <openPathBetween+0x4e>
movzwl 0x16(%rsp),%ecx
mov    $0x1,%al
cmp    0xe(%rsp),%cx
je     1160 <openPathBetween+0x50>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define signext i8 @openPathBetween(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3) {
%5 = alloca i8
%6 = alloca i16
%7 = alloca i16
%8 = alloca i16
%9 = alloca i16
%10 = alloca [2 x i16]
%11 = alloca [2 x i16]
%12 = alloca [2 x i16]
store i16 %0, i16* %6
store i16 %1, i16* %7
store i16 %2, i16* %8
store i16 %3, i16* %9
%13 = getelementptr inbounds [2 x i16], [2 x i16]* %11, i64 0, i64 0
%14 = load i16, i16* %6
store i16 %14, i16* %13
%15 = getelementptr inbounds i16, i16* %13, i64 1
%16 = load i16, i16* %7
store i16 %16, i16* %15
%17 = getelementptr inbounds [2 x i16], [2 x i16]* %12, i64 0, i64 0
%18 = load i16, i16* %8
store i16 %18, i16* %17
%19 = getelementptr inbounds i16, i16* %17, i64 1
%20 = load i16, i16* %9
store i16 %20, i16* %19
%21 = getelementptr inbounds [2 x i16], [2 x i16]* %10, i64 0, i64 0
%22 = getelementptr inbounds [2 x i16], [2 x i16]* %11, i64 0, i64 0
%23 = getelementptr inbounds [2 x i16], [2 x i16]* %12, i64 0, i64 0
%24 = call i32 @getImpactLoc(i16* %21, i16* %22, i16* %23, i32 79, i32 0)
%25 = getelementptr inbounds [2 x i16], [2 x i16]* %10, i64 0, i64 0
%26 = load i16, i16* %25
%27 = sext i16 %26 to i32
%28 = getelementptr inbounds [2 x i16], [2 x i16]* %12, i64 0, i64 0
%29 = load i16, i16* %28
%30 = sext i16 %29 to i32
%31 = icmp eq i32 %27, %30
br i1 %31, label %32, label %41
32: ; preds = %4
%33 = getelementptr inbounds [2 x i16], [2 x i16]* %10, i64 0, i64 1
%34 = load i16, i16* %33
%35 = sext i16 %34 to i32
%36 = getelementptr inbounds [2 x i16], [2 x i16]* %12, i64 0, i64 1
%37 = load i16, i16* %36
%38 = sext i16 %37 to i32
%39 = icmp eq i32 %35, %38
br i1 %39, label %40, label %41
40: ; preds = %32
store i8 1, i8* %5
br label %42
41: ; preds = %32, %4
store i8 0, i8* %5
br label %42
42: ; preds = %41, %40
%43 = load i8, i8* %5
ret i8 %43
}

LLVM IR (-O2):
define signext i8 @openPathBetween(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3) {
%5 = alloca [2 x i16]
%6 = alloca [2 x i16]
%7 = alloca [2 x i16]
%8 = bitcast [2 x i16]* %5 to i8*
%9 = bitcast [2 x i16]* %6 to i8*
%10 = getelementptr inbounds [2 x i16], [2 x i16]* %6, i64 0, i64 0
store i16 %0, i16* %10
%11 = getelementptr inbounds [2 x i16], [2 x i16]* %6, i64 0, i64 1
store i16 %1, i16* %11
%12 = bitcast [2 x i16]* %7 to i8*
%13 = getelementptr inbounds [2 x i16], [2 x i16]* %7, i64 0, i64 0
store i16 %2, i16* %13
%14 = getelementptr inbounds [2 x i16], [2 x i16]* %7, i64 0, i64 1
store i16 %3, i16* %14
%15 = getelementptr inbounds [2 x i16], [2 x i16]* %5, i64 0, i64 0
%16 = call i32 @getImpactLoc(i16* %15, i16* %10, i16* %13, i32 79, i32 0)
%17 = load i16, i16* %15
%18 = load i16, i16* %13
%19 = icmp eq i16 %17, %18
br i1 %19, label %20, label %25
20: ; preds = %4
%21 = getelementptr inbounds [2 x i16], [2 x i16]* %5, i64 0, i64 1
%22 = load i16, i16* %21
%23 = load i16, i16* %14
%24 = icmp eq i16 %22, %23
br i1 %24, label %26, label %25
25: ; preds = %20, %4
br label %26
26: ; preds = %20, %25
%27 = phi i8 [ 0, %25 ], [ 1, %20 ]
ret i8 %27
}