// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: wallfront
int wallfront(int l1, int l2)
{
	walltype *wal;
	int x11, y11, x21, y21, x12, y12, x22, y22, dx, dy, t1, t2;

	wal = &wall[thewall[l1]]; x11 = wal->x; y11 = wal->y;
	wal = &wall[wal->point2]; x21 = wal->x; y21 = wal->y;
	wal = &wall[thewall[l2]]; x12 = wal->x; y12 = wal->y;
	wal = &wall[wal->point2]; x22 = wal->x; y22 = wal->y;

	dx = x21-x11; dy = y21-y11;
	t1 = dmulscale2(x12-x11,dy,-dx,y12-y11); //p1(l2) vs. l1
	t2 = dmulscale2(x22-x11,dy,-dx,y22-y11); //p2(l2) vs. l1
	if (t1 == 0) { t1 = t2; if (t1 == 0) return(-1); }
	if (t2 == 0) t2 = t1;
	if ((t1^t2) >= 0)
	{
		t2 = dmulscale2(globalposx-x11,dy,-dx,globalposy-y11); //pos vs. l1
		return((t2^t1) >= 0);
	}

	dx = x22-x12; dy = y22-y12;
	t1 = dmulscale2(x11-x12,dy,-dx,y11-y12); //p1(l1) vs. l2
	t2 = dmulscale2(x21-x12,dy,-dx,y21-y12); //p2(l1) vs. l2
	if (t1 == 0) { t1 = t2; if (t1 == 0) return(-1); }
	if (t2 == 0) t2 = t1;
	if ((t1^t2) >= 0)
	{
		t2 = dmulscale2(globalposx-x12,dy,-dx,globalposy-y12); //pos vs. l2
		return((t2^t1) < 0);
	}
	return(-2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x23f657(%rip), %rax    # 0x2755b0
movswq (%rax,%rcx,2), %rcx
leaq 0x1bf64b(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movswq 0x8(%rax), %rcx
leaq 0x1bf61d(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x28(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x23f5f4(%rip), %rax    # 0x2755b0
movswq (%rax,%rcx,2), %rcx
leaq 0x1bf5e8(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movswq 0x8(%rax), %rcx
leaq 0x1bf5ba(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x24(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x28(%rbp), %eax
subl -0x20(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x2c(%rbp), %edi
subl -0x1c(%rbp), %edi
movl -0x40(%rbp), %esi
xorl %edx, %edx
subl -0x3c(%rbp), %edx
movl -0x30(%rbp), %ecx
subl -0x20(%rbp), %ecx
callq 0x361a0
movl %eax, -0x44(%rbp)
movl -0x34(%rbp), %edi
subl -0x1c(%rbp), %edi
movl -0x40(%rbp), %esi
xorl %edx, %edx
subl -0x3c(%rbp), %edx
movl -0x38(%rbp), %ecx
subl -0x20(%rbp), %ecx
callq 0x361a0
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x3607e
movl -0x48(%rbp), %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x3607c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3618d
jmp 0x3607e
cmpl $0x0, -0x48(%rbp)
jne 0x3608a
movl -0x44(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
xorl -0x48(%rbp), %eax
cmpl $0x0, %eax
jl 0x360d0
movl 0x241515(%rip), %edi    # 0x2775b0
subl -0x1c(%rbp), %edi
movl -0x40(%rbp), %esi
xorl %edx, %edx
subl -0x3c(%rbp), %edx
movl 0x241508(%rip), %ecx    # 0x2775b4
subl -0x20(%rbp), %ecx
callq 0x361a0
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
xorl -0x44(%rbp), %eax
cmpl $0x0, %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x3618d
movl -0x34(%rbp), %eax
subl -0x2c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %eax
subl -0x30(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x1c(%rbp), %edi
subl -0x2c(%rbp), %edi
movl -0x40(%rbp), %esi
xorl %edx, %edx
subl -0x3c(%rbp), %edx
movl -0x20(%rbp), %ecx
subl -0x30(%rbp), %ecx
callq 0x361a0
movl %eax, -0x44(%rbp)
movl -0x24(%rbp), %edi
subl -0x2c(%rbp), %edi
movl -0x40(%rbp), %esi
xorl %edx, %edx
subl -0x3c(%rbp), %edx
movl -0x28(%rbp), %ecx
subl -0x30(%rbp), %ecx
callq 0x361a0
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x36137
movl -0x48(%rbp), %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x36135
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3618d
jmp 0x36137
cmpl $0x0, -0x48(%rbp)
jne 0x36143
movl -0x44(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
xorl -0x48(%rbp), %eax
cmpl $0x0, %eax
jl 0x36186
movl 0x24145c(%rip), %edi    # 0x2775b0
subl -0x2c(%rbp), %edi
movl -0x40(%rbp), %esi
xorl %edx, %edx
subl -0x3c(%rbp), %edx
movl 0x24144f(%rip), %ecx    # 0x2775b4
subl -0x30(%rbp), %ecx
callq 0x361a0
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
xorl -0x44(%rbp), %eax
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x3618d
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)