	.file	"854027.c"
	.intel_syntax noprefix
	.text
	.globl	g_walls
	.data
	.align 32
	.type	g_walls, @object
	.size	g_walls, 80
g_walls:
	.long	-1054867456
	.long	1092616192
	.long	-1054867456
	.long	-1054867456
	.long	1092616192
	.long	-1054867456
	.long	0
	.long	-1054867456
	.long	0
	.long	-1054867456
	.long	0
	.long	0
	.long	0
	.long	0
	.long	1092616192
	.long	0
	.long	1092616192
	.long	0
	.long	1092616192
	.long	1092616192
	.globl	g_num_walls
	.align 4
	.type	g_num_walls, @object
	.size	g_num_walls, 4
g_num_walls:
	.long	5
	.globl	g_nodes_in_tree
	.bss
	.align 4
	.type	g_nodes_in_tree, @object
	.size	g_nodes_in_tree, 4
g_nodes_in_tree:
	.zero	4
	.section	.rodata
	.align 8
.LC0:
	.string	"BSP tree created with %i nodes\n"
.LC1:
	.string	"\n----Drawing from V:-----"
.LC3:
	.string	"\n----Drawing from W:-----"
.LC5:
	.string	"\n----Drawing from Z:-----"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	eax, DWORD PTR g_num_walls[rip]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -20[rbp], 1
.L2:
	mov	eax, DWORD PTR g_num_walls[rip]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L3
	mov	edx, DWORD PTR g_num_walls[rip]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	create_bsp
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR g_nodes_in_tree[rip]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	movss	xmm1, DWORD PTR .LC2[rip]
	movss	xmm0, DWORD PTR .LC2[rip]
	mov	rdi, rax
	call	traverse_BSP_tree
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	movss	xmm1, DWORD PTR .LC4[rip]
	movss	xmm0, DWORD PTR .LC2[rip]
	mov	rdi, rax
	call	traverse_BSP_tree
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	movss	xmm1, DWORD PTR .LC6[rip]
	movss	xmm0, DWORD PTR .LC6[rip]
	mov	rdi, rax
	call	traverse_BSP_tree
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC7:
	.string	"draw wall %i\n"
	.text
	.globl	traverse_BSP_tree
	.type	traverse_BSP_tree, @function
traverse_BSP_tree:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	movss	DWORD PTR -12[rbp], xmm0
	movss	DWORD PTR -16[rbp], xmm1
	cmp	QWORD PTR -8[rbp], 0
	je	.L10
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L8
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L8
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L5
.L8:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	movss	xmm0, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	edi, -1
	movaps	xmm1, xmm0
	movd	xmm0, eax
	call	is_point_ahead_of
	test	al, al
	je	.L9
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	movss	xmm0, DWORD PTR -16[rbp]
	mov	edx, DWORD PTR -12[rbp]
	movaps	xmm1, xmm0
	movd	xmm0, edx
	mov	rdi, rax
	call	traverse_BSP_tree
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	movss	xmm0, DWORD PTR -16[rbp]
	mov	edx, DWORD PTR -12[rbp]
	movaps	xmm1, xmm0
	movd	xmm0, edx
	mov	rdi, rax
	call	traverse_BSP_tree
	jmp	.L5
.L9:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	movss	xmm0, DWORD PTR -16[rbp]
	mov	edx, DWORD PTR -12[rbp]
	movaps	xmm1, xmm0
	movd	xmm0, edx
	mov	rdi, rax
	call	traverse_BSP_tree
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	movss	xmm0, DWORD PTR -16[rbp]
	mov	edx, DWORD PTR -12[rbp]
	movaps	xmm1, xmm0
	movd	xmm0, edx
	mov	rdi, rax
	call	traverse_BSP_tree
	jmp	.L5
.L10:
	nop
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	traverse_BSP_tree, .-traverse_BSP_tree
	.section	.rodata
	.align 8
.LC10:
	.string	"WARNING: two walls are on top of each other! - distance 0\n"
	.align 8
.LC13:
	.string	"dot prod = %f .: %i is in front of %i\n"
	.align 8
.LC14:
	.string	"dot prod = %f .: %i is BEHIND %i\n"
	.text
	.globl	is_point_ahead_of
	.type	is_point_ahead_of, @function
is_point_ahead_of:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	movss	DWORD PTR -68[rbp], xmm0
	movss	DWORD PTR -72[rbp], xmm1
	mov	DWORD PTR -76[rbp], edi
	mov	DWORD PTR -80[rbp], esi
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip+8]
	movss	xmm1, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip]
	movss	xmm0, DWORD PTR [rdx+rax]
	addss	xmm1, xmm0
	movss	xmm0, DWORD PTR .LC8[rip]
	mulss	xmm0, xmm1
	movss	DWORD PTR -52[rbp], xmm0
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip+12]
	movss	xmm1, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip+4]
	movss	xmm0, DWORD PTR [rdx+rax]
	addss	xmm1, xmm0
	movss	xmm0, DWORD PTR .LC8[rip]
	mulss	xmm0, xmm1
	movss	DWORD PTR -48[rbp], xmm0
	movss	xmm0, DWORD PTR -68[rbp]
	subss	xmm0, DWORD PTR -52[rbp]
	movss	DWORD PTR -44[rbp], xmm0
	movss	xmm0, DWORD PTR -72[rbp]
	subss	xmm0, DWORD PTR -48[rbp]
	movss	DWORD PTR -40[rbp], xmm0
	movss	xmm0, DWORD PTR -44[rbp]
	movaps	xmm1, xmm0
	mulss	xmm1, xmm0
	movss	xmm0, DWORD PTR -40[rbp]
	mulss	xmm0, xmm0
	addss	xmm0, xmm1
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, xmm0
	movq	rax, xmm2
	movq	xmm0, rax
	call	sqrt@PLT
	cvtsd2ss	xmm0, xmm0
	movss	DWORD PTR -36[rbp], xmm0
	pxor	xmm1, xmm1
	cvtss2sd	xmm1, DWORD PTR -36[rbp]
	movsd	xmm0, QWORD PTR .LC9[rip]
	comisd	xmm0, xmm1
	jbe	.L19
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 58
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	mov	eax, 0
	jmp	.L14
.L19:
	movss	xmm0, DWORD PTR -44[rbp]
	divss	xmm0, DWORD PTR -36[rbp]
	movss	DWORD PTR -32[rbp], xmm0
	movss	xmm0, DWORD PTR -40[rbp]
	divss	xmm0, DWORD PTR -36[rbp]
	movss	DWORD PTR -28[rbp], xmm0
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip+8]
	movss	xmm0, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip]
	movss	xmm1, DWORD PTR [rdx+rax]
	subss	xmm0, xmm1
	movss	DWORD PTR -24[rbp], xmm0
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip+12]
	movss	xmm0, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip+4]
	movss	xmm1, DWORD PTR [rdx+rax]
	subss	xmm0, xmm1
	movss	DWORD PTR -20[rbp], xmm0
	movss	xmm0, DWORD PTR -24[rbp]
	movaps	xmm1, xmm0
	mulss	xmm1, xmm0
	movss	xmm0, DWORD PTR -20[rbp]
	mulss	xmm0, xmm0
	addss	xmm0, xmm1
	pxor	xmm3, xmm3
	cvtss2sd	xmm3, xmm0
	movq	rax, xmm3
	movq	xmm0, rax
	call	sqrt@PLT
	cvtsd2ss	xmm0, xmm0
	movss	DWORD PTR -16[rbp], xmm0
	movss	xmm0, DWORD PTR -20[rbp]
	divss	xmm0, DWORD PTR -16[rbp]
	movss	xmm1, DWORD PTR .LC11[rip]
	xorps	xmm0, xmm1
	movss	DWORD PTR -12[rbp], xmm0
	movss	xmm0, DWORD PTR -24[rbp]
	divss	xmm0, DWORD PTR -16[rbp]
	movss	DWORD PTR -8[rbp], xmm0
	movss	xmm0, DWORD PTR -32[rbp]
	movaps	xmm1, xmm0
	mulss	xmm1, DWORD PTR -12[rbp]
	movss	xmm0, DWORD PTR -28[rbp]
	mulss	xmm0, DWORD PTR -8[rbp]
	addss	xmm0, xmm1
	movss	DWORD PTR -4[rbp], xmm0
	movss	xmm0, DWORD PTR -4[rbp]
	pxor	xmm1, xmm1
	comiss	xmm0, xmm1
	jbe	.L20
	pxor	xmm4, xmm4
	cvtss2sd	xmm4, DWORD PTR -4[rbp]
	movq	rax, xmm4
	mov	edx, DWORD PTR -80[rbp]
	mov	ecx, DWORD PTR -76[rbp]
	mov	esi, ecx
	movq	xmm0, rax
	lea	rdi, .LC13[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, 1
	jmp	.L14
.L20:
	pxor	xmm5, xmm5
	cvtss2sd	xmm5, DWORD PTR -4[rbp]
	movq	rax, xmm5
	mov	edx, DWORD PTR -80[rbp]
	mov	ecx, DWORD PTR -76[rbp]
	mov	esi, ecx
	movq	xmm0, rax
	lea	rdi, .LC14[rip]
	mov	eax, 1
	call	printf@PLT
	mov	eax, 0
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	is_point_ahead_of, .-is_point_ahead_of
	.section	.rodata
.LC15:
	.string	"the_stack_data/854027.c"
.LC16:
	.string	"walls_list"
	.text
	.globl	create_bsp
	.type	create_bsp, @function
create_bsp:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	cmp	DWORD PTR -60[rbp], 0
	jg	.L22
	mov	eax, 0
	jmp	.L23
.L22:
	cmp	QWORD PTR -56[rbp], 0
	jne	.L24
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 223
	lea	rsi, .LC15[rip]
	lea	rdi, .LC16[rip]
	call	__assert_fail@PLT
.L24:
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR g_nodes_in_tree[rip]
	add	eax, 1
	mov	DWORD PTR g_nodes_in_tree[rip], eax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -44[rbp], 0
	mov	DWORD PTR -40[rbp], 0
	mov	DWORD PTR -36[rbp], 1
	jmp	.L25
.L28:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip+8]
	movss	xmm1, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip]
	movss	xmm0, DWORD PTR [rdx+rax]
	addss	xmm1, xmm0
	movss	xmm0, DWORD PTR .LC8[rip]
	mulss	xmm0, xmm1
	movss	DWORD PTR -32[rbp], xmm0
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip+12]
	movss	xmm1, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, g_walls[rip+4]
	movss	xmm0, DWORD PTR [rdx+rax]
	addss	xmm1, xmm0
	movss	xmm0, DWORD PTR .LC8[rip]
	mulss	xmm0, xmm1
	movss	DWORD PTR -28[rbp], xmm0
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	movss	xmm0, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, ecx
	mov	edi, edx
	movaps	xmm1, xmm0
	movd	xmm0, eax
	call	is_point_ahead_of
	test	al, al
	je	.L26
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -44[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -44[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
	jmp	.L27
.L26:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -40[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR [rcx]
	mov	DWORD PTR [rdx], eax
.L27:
	add	DWORD PTR -36[rbp], 1
.L25:
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L28
	mov	edx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	create_bsp
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	create_bsp
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	create_bsp, .-create_bsp
	.section	.rodata
	.align 8
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 11
__PRETTY_FUNCTION__.0:
	.string	"create_bsp"
	.align 4
.LC2:
	.long	1084227584
	.align 4
.LC4:
	.long	-1049624576
	.align 4
.LC6:
	.long	-1063256064
	.align 4
.LC8:
	.long	1056964608
	.align 8
.LC9:
	.long	1202590843
	.long	1065646817
	.align 16
.LC11:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"854027.c"
	.text
	.global	g_walls
	.data
	.align	2
	.type	g_walls, %object
	.size	g_walls, 80
g_walls:
	.word	3240099840
	.word	1092616192
	.word	3240099840
	.word	3240099840
	.word	1092616192
	.word	3240099840
	.word	0
	.word	3240099840
	.word	0
	.word	3240099840
	.word	0
	.word	0
	.word	0
	.word	0
	.word	1092616192
	.word	0
	.word	1092616192
	.word	0
	.word	1092616192
	.word	1092616192
	.global	g_num_walls
	.align	2
	.type	g_num_walls, %object
	.size	g_num_walls, 4
g_num_walls:
	.word	5
	.comm	g_nodes_in_tree,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"BSP tree created with %i nodes\012\000"
	.align	2
.LC1:
	.ascii	"\012----Drawing from V:-----\000"
	.align	2
.LC2:
	.ascii	"\012----Drawing from W:-----\000"
	.align	2
.LC3:
	.ascii	"\012----Drawing from Z:-----\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L5
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L3:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r3, .L5
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L3
	ldr	r3, .L5
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	create_bsp
	str	r0, [fp, #-8]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L5+8
	bl	printf
	ldr	r0, .L5+12
	bl	puts
	ldr	r2, .L5+16
	ldr	r1, .L5+16
	ldr	r0, [fp, #-8]
	bl	traverse_BSP_tree
	ldr	r0, .L5+20
	bl	puts
	ldr	r2, .L5+24
	ldr	r1, .L5+16
	ldr	r0, [fp, #-8]
	bl	traverse_BSP_tree
	ldr	r0, .L5+28
	bl	puts
	ldr	r2, .L5+32
	ldr	r1, .L5+32
	ldr	r0, [fp, #-8]
	bl	traverse_BSP_tree
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	g_num_walls
	.word	g_nodes_in_tree
	.word	.LC0
	.word	.LC1
	.word	1084227584
	.word	.LC2
	.word	-1049624576
	.word	.LC3
	.word	-1063256064
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.ascii	"draw wall %i\012\000"
	.text
	.align	2
	.global	traverse_BSP_tree
	.syntax unified
	.arm
	.fpu softvfp
	.type	traverse_BSP_tree, %function
traverse_BSP_tree:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]	@ float
	str	r2, [fp, #-16]	@ float
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L13
	bl	printf
	b	.L7
.L10:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mvn	r2, #0
	ldr	r1, [fp, #-16]	@ float
	ldr	r0, [fp, #-12]	@ float
	bl	is_point_ahead_of
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]	@ float
	ldr	r1, [fp, #-12]	@ float
	mov	r0, r3
	bl	traverse_BSP_tree
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L13
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]	@ float
	ldr	r1, [fp, #-12]	@ float
	mov	r0, r3
	bl	traverse_BSP_tree
	b	.L7
.L11:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]	@ float
	ldr	r1, [fp, #-12]	@ float
	mov	r0, r3
	bl	traverse_BSP_tree
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L13
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]	@ float
	ldr	r1, [fp, #-12]	@ float
	mov	r0, r3
	bl	traverse_BSP_tree
	b	.L7
.L12:
	nop
.L7:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC4
	.size	traverse_BSP_tree, .-traverse_BSP_tree
	.global	__aeabi_fadd
	.global	__aeabi_fmul
	.global	__aeabi_fsub
	.global	__aeabi_f2d
	.global	__aeabi_d2f
	.global	__aeabi_dcmplt
	.section	.rodata
	.align	2
.LC5:
	.ascii	"WARNING: two walls are on top of each other! - dist"
	.ascii	"ance 0\012\000"
	.global	__aeabi_fdiv
	.global	__aeabi_fcmpgt
	.align	2
.LC6:
	.ascii	"dot prod = %f .: %i is in front of %i\012\000"
	.align	2
.LC7:
	.ascii	"dot prod = %f .: %i is BEHIND %i\012\000"
	.text
	.align	2
	.global	is_point_ahead_of
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_point_ahead_of, %function
is_point_ahead_of:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #84
	str	r0, [fp, #-72]	@ float
	str	r1, [fp, #-76]	@ float
	str	r2, [fp, #-80]
	str	r3, [fp, #-84]
	ldr	r2, .L25
	ldr	r3, [fp, #-84]
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r2, [r3, #8]	@ float
	ldr	r1, .L25
	ldr	r3, [fp, #-84]
	ldr	r3, [r1, r3, lsl #4]	@ float
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_fadd
	mov	r3, r0
	mov	r1, #1056964608
	mov	r0, r3
	bl	__aeabi_fmul
	mov	r3, r0
	str	r3, [fp, #-64]	@ float
	ldr	r2, .L25
	ldr	r3, [fp, #-84]
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r2, [r3, #12]	@ float
	ldr	r1, .L25
	ldr	r3, [fp, #-84]
	lsl	r3, r3, #4
	add	r3, r1, r3
	ldr	r3, [r3, #4]	@ float
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_fadd
	mov	r3, r0
	mov	r1, #1056964608
	mov	r0, r3
	bl	__aeabi_fmul
	mov	r3, r0
	str	r3, [fp, #-60]	@ float
	ldr	r1, [fp, #-64]	@ float
	ldr	r0, [fp, #-72]	@ float
	bl	__aeabi_fsub
	mov	r3, r0
	str	r3, [fp, #-56]	@ float
	ldr	r1, [fp, #-60]	@ float
	ldr	r0, [fp, #-76]	@ float
	bl	__aeabi_fsub
	mov	r3, r0
	str	r3, [fp, #-52]	@ float
	ldr	r1, [fp, #-56]	@ float
	ldr	r0, [fp, #-56]	@ float
	bl	__aeabi_fmul
	mov	r3, r0
	mov	r4, r3
	ldr	r1, [fp, #-52]	@ float
	ldr	r0, [fp, #-52]	@ float
	bl	__aeabi_fmul
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	__aeabi_fadd
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2f
	mov	r3, r0
	str	r3, [fp, #-48]	@ float
	ldr	r0, [fp, #-48]	@ float
	bl	__aeabi_f2d
	ldr	r2, .L25+4
	ldr	r3, .L25+8
	bl	__aeabi_dcmplt
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	ldr	r3, .L25+12
	ldr	r3, [r3]
	mov	r2, #58
	mov	r1, #1
	ldr	r0, .L25+16
	bl	fwrite
	mov	r3, #0
	b	.L18
.L23:
	ldr	r1, [fp, #-48]	@ float
	ldr	r0, [fp, #-56]	@ float
	bl	__aeabi_fdiv
	mov	r3, r0
	str	r3, [fp, #-44]	@ float
	ldr	r1, [fp, #-48]	@ float
	ldr	r0, [fp, #-52]	@ float
	bl	__aeabi_fdiv
	mov	r3, r0
	str	r3, [fp, #-40]	@ float
	ldr	r2, .L25
	ldr	r3, [fp, #-84]
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r2, [r3, #8]	@ float
	ldr	r1, .L25
	ldr	r3, [fp, #-84]
	ldr	r3, [r1, r3, lsl #4]	@ float
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_fsub
	mov	r3, r0
	str	r3, [fp, #-36]	@ float
	ldr	r2, .L25
	ldr	r3, [fp, #-84]
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r2, [r3, #12]	@ float
	ldr	r1, .L25
	ldr	r3, [fp, #-84]
	lsl	r3, r3, #4
	add	r3, r1, r3
	ldr	r3, [r3, #4]	@ float
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_fsub
	mov	r3, r0
	str	r3, [fp, #-32]	@ float
	ldr	r1, [fp, #-36]	@ float
	ldr	r0, [fp, #-36]	@ float
	bl	__aeabi_fmul
	mov	r3, r0
	mov	r4, r3
	ldr	r1, [fp, #-32]	@ float
	ldr	r0, [fp, #-32]	@ float
	bl	__aeabi_fmul
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	__aeabi_fadd
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	sqrt
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2f
	mov	r3, r0
	str	r3, [fp, #-28]	@ float
	ldr	r1, [fp, #-28]	@ float
	ldr	r0, [fp, #-32]	@ float
	bl	__aeabi_fdiv
	mov	r3, r0
	eor	r3, r3, #-2147483648
	str	r3, [fp, #-24]	@ float
	ldr	r1, [fp, #-28]	@ float
	ldr	r0, [fp, #-36]	@ float
	bl	__aeabi_fdiv
	mov	r3, r0
	str	r3, [fp, #-20]	@ float
	ldr	r1, [fp, #-24]	@ float
	ldr	r0, [fp, #-44]	@ float
	bl	__aeabi_fmul
	mov	r3, r0
	mov	r4, r3
	ldr	r1, [fp, #-20]	@ float
	ldr	r0, [fp, #-40]	@ float
	bl	__aeabi_fmul
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	__aeabi_fadd
	mov	r3, r0
	str	r3, [fp, #-16]	@ float
	mov	r1, #0
	ldr	r0, [fp, #-16]	@ float
	bl	__aeabi_fcmpgt
	mov	r3, r0
	cmp	r3, #0
	beq	.L24
	ldr	r0, [fp, #-16]	@ float
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-84]
	str	r1, [sp, #4]
	ldr	r1, [fp, #-80]
	str	r1, [sp]
	ldr	r0, .L25+20
	bl	printf
	mov	r3, #1
	b	.L18
.L24:
	ldr	r0, [fp, #-16]	@ float
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-84]
	str	r1, [sp, #4]
	ldr	r1, [fp, #-80]
	str	r1, [sp]
	ldr	r0, .L25+24
	bl	printf
	mov	r3, #0
.L18:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L26:
	.align	2
.L25:
	.word	g_walls
	.word	1202590843
	.word	1065646817
	.word	stderr
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	is_point_ahead_of, .-is_point_ahead_of
	.section	.rodata
	.align	2
.LC8:
	.ascii	"the_stack_data/854027.c\000"
	.align	2
.LC9:
	.ascii	"walls_list\000"
	.text
	.align	2
	.global	create_bsp
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_bsp, %function
create_bsp:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bgt	.L28
	mov	r3, #0
	b	.L29
.L28:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L30
	ldr	r3, .L35
	mov	r2, #223
	ldr	r1, .L35+4
	ldr	r0, .L35+8
	bl	__assert_fail
.L30:
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-40]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, .L35+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L35+12
	str	r3, [r2]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L31
.L34:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L35+16
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r0, [r3, #8]	@ float
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L35+16
	ldr	r3, [r2, r3, lsl #4]	@ float
	mov	r1, r3
	bl	__aeabi_fadd
	mov	r3, r0
	mov	r1, #1056964608
	mov	r0, r3
	bl	__aeabi_fmul
	mov	r3, r0
	str	r3, [fp, #-12]	@ float
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L35+16
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r0, [r3, #12]	@ float
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L35+16
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r3, [r3, #4]	@ float
	mov	r1, r3
	bl	__aeabi_fadd
	mov	r3, r0
	mov	r1, #1056964608
	mov	r0, r3
	bl	__aeabi_fmul
	mov	r3, r0
	str	r3, [fp, #-8]	@ float
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]	@ float
	ldr	r0, [fp, #-12]	@ float
	bl	is_point_ahead_of
	mov	r3, r0
	cmp	r3, #0
	beq	.L32
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r2, r2, r3
	ldr	r3, [fp, #-36]
	add	r1, r3, #1
	str	r1, [fp, #-36]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	b	.L33
.L32:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	add	r1, r3, #1
	str	r1, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
.L33:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L31:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L34
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-20]
	bl	create_bsp
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-16]
	bl	create_bsp
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
	ldr	r0, [fp, #-20]
	bl	free
	ldr	r0, [fp, #-16]
	bl	free
	ldr	r3, [fp, #-24]
.L29:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	__PRETTY_FUNCTION__.6229
	.word	.LC8
	.word	.LC9
	.word	g_nodes_in_tree
	.word	g_walls
	.size	create_bsp, .-create_bsp
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6229, %object
	.size	__PRETTY_FUNCTION__.6229, 11
__PRETTY_FUNCTION__.6229:
	.ascii	"create_bsp\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
