// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq %edi, %rax
leaq 0x213e7f(%rip), %rcx    # 0x237a50
movswq (%rcx,%rax,2), %rax
shlq $0x5, %rax
leaq 0x193e6f(%rip), %rbx    # 0x1b7a50
movslq (%rax,%rbx), %r10
movslq 0x4(%rax,%rbx), %r9
movswq 0x8(%rax,%rbx), %rax
shlq $0x5, %rax
movl (%rax,%rbx), %r8d
movl 0x4(%rax,%rbx), %edi
movslq %esi, %rax
movswq (%rcx,%rax,2), %rax
shlq $0x5, %rax
movslq (%rax,%rbx), %rdx
movslq 0x4(%rax,%rbx), %rcx
movswq 0x8(%rax,%rbx), %rax
shlq $0x5, %rax
movl (%rax,%rbx), %r11d
movl 0x4(%rax,%rbx), %esi
movl %r11d, %ebp
subl %r10d, %ebp
movl %r10d, %r14d
subl %r8d, %r14d
movl %edi, %ebx
subl %r9d, %ebx
movq %rdx, %r15
subq %r10, %r15
movq %rcx, %rax
subq %r9, %rax
movslq %ebx, %rbx
imulq %rbx, %r15
movslq %r14d, %r14
imulq %r14, %rax
addq %r15, %rax
shrq $0x2, %rax
movl %esi, %r15d
subl %r9d, %r15d
movslq %ebp, %r12
imulq %rbx, %r12
movslq %r15d, %r15
imulq %r14, %r15
addq %r12, %r15
shrq $0x2, %r15
testl %eax, %eax
jne 0x23c80
movl %r15d, %eax
testl %r15d, %r15d
je 0x23d34
testl %r15d, %r15d
cmovel %eax, %r15d
xorl %eax, %r15d
js 0x23cb5
movslq 0x215dbd(%rip), %rcx    # 0x239a50
subq %r10, %rcx
movslq 0x215db7(%rip), %rdx    # 0x239a54
subq %r9, %rdx
imulq %rbx, %rcx
imulq %r14, %rdx
addq %rcx, %rdx
shrq $0x2, %rdx
xorl %edx, %eax
notl %eax
jmp 0x23d2f
movl %edx, %eax
subl %r11d, %eax
subl %ecx, %esi
subl %edx, %r10d
subl %ecx, %r9d
movslq %r10d, %r11
movslq %esi, %rsi
imulq %rsi, %r11
movslq %eax, %r10
movslq %r9d, %rax
imulq %r10, %rax
addq %r11, %rax
shrq $0x2, %rax
subl %edx, %r8d
subl %ecx, %edi
movslq %r8d, %r8
imulq %rsi, %r8
movslq %edi, %rdi
imulq %r10, %rdi
addq %r8, %rdi
shrq $0x2, %rdi
testl %eax, %eax
jne 0x23d01
movl %edi, %eax
testl %edi, %edi
je 0x23d34
testl %edi, %edi
cmovel %eax, %edi
xorl %eax, %edi
js 0x23d3b
movslq 0x215d3f(%rip), %rdi    # 0x239a50
subq %rdx, %rdi
movslq 0x215d39(%rip), %rdx    # 0x239a54
subq %rcx, %rdx
imulq %rsi, %rdi
imulq %r10, %rdx
addq %rdi, %rdx
shrq $0x2, %rdx
xorl %edx, %eax
shrl $0x1f, %eax
jmp 0x23d40
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x23d40
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq