	.file	"extr_visflow.c_RecursiveLeafFlow.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	RecursiveLeafFlow
	.type	RecursiveLeafFlow, @function
RecursiveLeafFlow:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movsx	rdi, edi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	sal	rdi, 4
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 168
	.cfi_def_cfa_offset 224
	add	rdi, QWORD PTR leafs[rip]
	mov	QWORD PTR 8[rsp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 152[rsp], rax
	xor	eax, eax
	lea	rax, 64[rsp]
	add	DWORD PTR 16[rsi], 1
	mov	QWORD PTR 24[rsp], rax
	mov	QWORD PTR 24[rdx], rax
	mov	rax, QWORD PTR 72[rdx]
	mov	QWORD PTR 88[rsp], 0
	mov	QWORD PTR 16[rsp], rax
	add	rax, 1
	mov	QWORD PTR 136[rsp], rax
	mov	eax, DWORD PTR [rdi]
	mov	QWORD PTR 144[rsp], rdi
	mov	QWORD PTR 120[rsp], 0
	test	eax, eax
	jle	.L1
	mov	rax, QWORD PTR [rsi]
	mov	r9, QWORD PTR 72[rsp]
	xor	r14d, r14d
	mov	r15, rdi
	mov	r13, QWORD PTR [rax]
	lea	rax, 56[rsp]
	mov	r12, r9
	mov	r9, rsi
	mov	QWORD PTR 40[rsp], rax
.L19:
	mov	rax, QWORD PTR 8[r15]
	mov	rbx, QWORD PTR [rax+r14*8]
	mov	rsi, QWORD PTR 56[rbx]
	test	rsi, rsi
	jne	.L4
	mov	rbp, rbx
	sub	rbp, QWORD PTR portals[rip]
	mov	rax, QWORD PTR 8[rsp]
	sar	rbp, 6
	mov	r8d, ebp
	mov	rdi, QWORD PTR 8[rax]
	and	ebp, 7
	sar	r8d, 3
	movsx	r8, r8d
	lea	rax, 0[0+r8*4]
	mov	QWORD PTR 16[rsp], rax
	mov	eax, DWORD PTR [rdi+r8*4]
	bt	eax, ebp
	jc	.L50
.L4:
	add	r14, 1
	cmp	DWORD PTR [r15], r14d
	jg	.L19
.L1:
	mov	rax, QWORD PTR 152[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L51
	add	rsp, 168
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L50:
	.cfi_restore_state
	mov	rax, QWORD PTR stat_done[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L52
	mov	r11, QWORD PTR 40[rbx]
.L7:
	mov	edx, DWORD PTR portallongs[rip]
	xor	eax, eax
	lea	r10d, -1[rdx]
	test	edx, edx
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdx, QWORD PTR [rdi+rax*8]
	mov	rcx, QWORD PTR [r11+rax*8]
	and	rcx, rdx
	mov	QWORD PTR [r12+rax*8], rcx
	mov	rdx, QWORD PTR 0[r13+rax*8]
	not	rdx
	and	rdx, rcx
	or	rsi, rdx
	mov	rdx, rax
	add	rax, 1
	cmp	rdx, r10
	jne	.L10
	test	rsi, rsi
	jne	.L9
.L11:
	mov	rax, QWORD PTR [r9]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax+r8*4]
	bt	eax, ebp
	jc	.L4
.L9:
	mov	rax, QWORD PTR 16[rbx]
	mov	esi, DWORD PTR 20[rbx]
	mov	QWORD PTR 32[rsp], r9
	mov	edx, DWORD PTR 60[rsp]
	mov	edi, DWORD PTR vec3_origin[rip]
	mov	QWORD PTR 128[rsp], rax
	call	VectorSubtract@PLT
	movss	xmm0, DWORD PTR 16[rbx]
	mov	rax, QWORD PTR 80[rsp]
	movabs	rsi, 4294967297
	xorps	xmm0, XMMWORD PTR .LC0[rip]
	mov	r9, QWORD PTR 32[rsp]
	mov	QWORD PTR 120[rsp], rbx
	mov	QWORD PTR 88[rsp], 0
	movss	DWORD PTR 56[rsp], xmm0
	mov	DWORD PTR 8[rax], 1
	mov	QWORD PTR [rax], rsi
	mov	esi, DWORD PTR 12[r9]
	mov	edi, DWORD PTR 32[rbx]
	call	DotProduct@PLT
	mov	r9, QWORD PTR 32[rsp]
	movss	xmm1, DWORD PTR 8[rbx]
	subss	xmm0, DWORD PTR 8[r9]
	movaps	xmm2, xmm1
	xorps	xmm2, XMMWORD PTR .LC0[rip]
	comiss	xmm2, xmm0
	ja	.L4
	comiss	xmm0, xmm1
	mov	rdi, QWORD PTR 24[rbx]
	jbe	.L45
	mov	QWORD PTR 96[rsp], rdi
.L14:
	mov	rax, QWORD PTR [r9]
	mov	esi, DWORD PTR 20[rbx]
	mov	QWORD PTR 32[rsp], r9
	mov	edi, DWORD PTR 12[rax]
	call	DotProduct@PLT
	mov	r9, QWORD PTR 32[rsp]
	subss	xmm0, DWORD PTR 16[rbx]
	mov	rax, QWORD PTR [r9]
	movss	xmm1, DWORD PTR 8[rax]
	comiss	xmm0, xmm1
	ja	.L4
	xorps	xmm1, XMMWORD PTR .LC0[rip]
	mov	rax, QWORD PTR 8[rsp]
	comiss	xmm1, xmm0
	mov	rdi, QWORD PTR 40[rax]
	jbe	.L46
	mov	QWORD PTR 104[rsp], rdi
.L17:
	mov	rax, QWORD PTR 8[rsp]
	mov	rsi, QWORD PTR 32[rax]
	test	rsi, rsi
	je	.L53
	mov	rdx, QWORD PTR 96[rsp]
	mov	r8, QWORD PTR 24[rsp]
	mov	QWORD PTR 32[rsp], r9
	mov	ecx, DWORD PTR qfalse[rip]
	mov	rdi, QWORD PTR 104[rsp]
	call	ClipToSeperators@PLT
	mov	r9, QWORD PTR 32[rsp]
	test	rax, rax
	mov	QWORD PTR 96[rsp], rax
	mov	rdx, rax
	je	.L4
	mov	rax, QWORD PTR 8[rsp]
	mov	r8, QWORD PTR 24[rsp]
	mov	ecx, DWORD PTR qtrue[rip]
	mov	rsi, QWORD PTR 104[rsp]
	mov	rdi, QWORD PTR 32[rax]
	call	ClipToSeperators@PLT
	mov	r9, QWORD PTR 32[rsp]
	test	rax, rax
	mov	QWORD PTR 96[rsp], rax
	je	.L4
	mov	rax, QWORD PTR [r9]
	mov	rsi, QWORD PTR 16[rsp]
	mov	ecx, ebp
	mov	edi, 1
	sal	edi, cl
	mov	rdx, QWORD PTR 24[rsp]
	mov	QWORD PTR 16[rsp], r9
	add	rsi, QWORD PTR [rax]
	or	DWORD PTR [rsi], edi
	mov	edi, DWORD PTR 12[rbx]
	mov	rsi, r9
	call	RecursiveLeafFlow
	mov	r9, QWORD PTR 16[rsp]
	mov	QWORD PTR 88[rsp], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L52:
	mov	r11, QWORD PTR 48[rbx]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L45:
	mov	rsi, QWORD PTR 24[rsp]
	lea	rdx, 8[r9]
	mov	QWORD PTR 32[rsp], r9
	call	VisChopWinding@PLT
	mov	r9, QWORD PTR 32[rsp]
	test	rax, rax
	mov	QWORD PTR 96[rsp], rax
	jne	.L14
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L46:
	mov	rdx, QWORD PTR 40[rsp]
	mov	rsi, QWORD PTR 24[rsp]
	mov	QWORD PTR 32[rsp], r9
	call	VisChopWinding@PLT
	mov	r9, QWORD PTR 32[rsp]
	test	rax, rax
	mov	QWORD PTR 104[rsp], rax
	jne	.L17
	jmp	.L4
.L53:
	mov	rax, QWORD PTR [r9]
	mov	rsi, QWORD PTR 16[rsp]
	mov	ecx, ebp
	mov	edx, 1
	sal	edx, cl
	mov	QWORD PTR 16[rsp], r9
	add	rsi, QWORD PTR [rax]
	or	DWORD PTR [rsi], edx
	mov	rdx, QWORD PTR 24[rsp]
	mov	rsi, r9
	mov	edi, DWORD PTR 12[rbx]
	call	RecursiveLeafFlow
	mov	r9, QWORD PTR 16[rsp]
	jmp	.L4
.L51:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	RecursiveLeafFlow, .-RecursiveLeafFlow
	.comm	vec3_origin,4,4
	.comm	stat_done,8,8
	.comm	qtrue,4,4
	.comm	qfalse,4,4
	.comm	portals,8,8
	.comm	portallongs,4,4
	.comm	leafs,8,8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	2147483648
	.long	0
	.long	0
	.long	0
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_visflow.c_RecursiveLeafFlow.c"
	.text
	.global	__aeabi_fsub
	.global	__aeabi_fcmpgt
	.global	__aeabi_fcmplt
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	RecursiveLeafFlow
	.syntax unified
	.arm
	.fpu softvfp
	.type	RecursiveLeafFlow, %function
RecursiveLeafFlow:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r1
	mov	r1, r2
	mov	r6, #0
	sub	sp, sp, #92
	ldr	r3, .L53
	str	r2, [sp, #12]
	ldr	r2, [r8, #12]
	ldr	r7, [r3]
	ldr	ip, .L53+4
	ldr	r3, [r1, #40]
	add	r2, r2, #1
	ldr	ip, [ip]
	str	ip, [sp, #84]
	mov	ip,#0
	str	r2, [r8, #12]
	ldr	r2, [r7, r0, lsl #3]
	add	r3, r3, #1
	add	r7, r7, r0, lsl #3
	str	r3, [sp, #76]
	cmp	r2, r6
	add	r3, sp, #36
	str	r7, [sp, #80]
	str	r3, [r1, #12]
	str	r6, [sp, #48]
	str	r6, [sp, #64]
	ble	.L1
	ldr	r3, [r8]
	ldr	r2, [sp, #40]
	ldr	r3, [r3]
	str	r2, [sp, #16]
	str	r3, [sp, #20]
.L19:
	ldr	r3, [r7, #4]
	ldr	r5, [r3, r6, lsl #2]
	ldr	r1, [r5, #36]
	cmp	r1, #0
	bne	.L4
	ldr	r3, .L53+8
	ldr	r4, [r3]
	ldr	r3, [sp, #12]
	sub	r4, r5, r4
	asr	r4, r4, #3
	ldr	r2, [r3, #4]
	add	r3, r4, r4, lsl #1
	add	r3, r3, r3, lsl #4
	add	r3, r3, r3, lsl #8
	add	r3, r3, r3, lsl #16
	add	r4, r4, r3, lsl #2
	asr	r9, r4, #3
	ldr	r3, [r2, r9, lsl #2]
	and	r4, r4, #7
	asr	r3, r3, r4
	tst	r3, #1
	bne	.L48
.L4:
	ldr	r3, [r7]
	add	r6, r6, #1
	cmp	r3, r6
	bgt	.L19
.L1:
	ldr	r3, .L53+4
	ldr	r2, [r3]
	ldr	r3, [sp, #84]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L49
	add	sp, sp, #92
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L48:
	ldr	r3, .L53+12
	ldr	r0, [r5]
	ldr	r3, [r3]
	cmp	r0, r3
	ldr	r3, .L53+16
	ldreq	r0, [r5, #32]
	ldr	r10, [r3]
	ldrne	r0, [r5, #28]
	cmp	r10, #0
	ble	.L11
	ldr	r3, [sp, #16]
	add	r10, r2, r10, lsl #2
	sub	lr, r3, #4
	ldr	r3, [sp, #20]
	sub	r10, r10, #4
	sub	r2, r2, #4
	sub	r0, r0, #4
	sub	ip, r3, #4
.L10:
	ldr	r3, [r2, #4]!
	ldr	fp, [r0, #4]!
	cmp	r2, r10
	and	r3, r3, fp
	str	r3, [lr, #4]!
	ldr	fp, [ip, #4]!
	bic	r3, r3, fp
	orr	r1, r1, r3
	bne	.L10
	cmp	r1, #0
	bne	.L9
.L11:
	ldr	r3, [r8]
	ldr	r3, [r3]
	ldr	r3, [r3, r9, lsl #2]
	asr	r3, r3, r4
	tst	r3, #1
	bne	.L4
.L9:
	ldr	r1, [r5, #16]
	ldr	r0, [r5, #12]
	add	r3, sp, #68
	stm	r3, {r0, r1}
	ldr	r3, .L53+20
	ldr	r2, [sp, #32]
	ldr	r1, [r5, #16]
	ldr	r0, [r3]
	bl	VectorSubtract
	mov	r2, #1
	mov	r0, #0
	ldr	r1, [r5, #12]
	ldr	r3, [sp, #44]
	add	r1, r1, #-2147483648
	str	r0, [sp, #48]
	str	r5, [sp, #64]
	str	r1, [sp, #28]	@ float
	str	r2, [r3, #4]
	str	r2, [r3]
	str	r2, [r3, #8]
	ldr	r1, [r8, #8]
	ldr	r0, [r5, #24]
	bl	DotProduct
	ldr	r1, [r8, #4]	@ float
	bl	__aeabi_fsub
	ldr	fp, [r5, #4]	@ float
	mov	r1, r0
	mov	r10, r0
	add	r0, fp, #-2147483648
	bl	__aeabi_fcmpgt
	cmp	r0, #0
	bne	.L4
	mov	r1, r10
	mov	r0, fp
	bl	__aeabi_fcmplt
	cmp	r0, #0
	ldr	r0, [r5, #20]
	strne	r0, [sp, #52]
	beq	.L50
.L14:
	ldr	r3, [r8]
	ldr	r1, [r5, #16]
	ldr	r0, [r3, #8]
	bl	DotProduct
	ldr	r1, [r5, #12]	@ float
	bl	__aeabi_fsub
	ldr	r3, [r8]
	mov	r1, r0
	ldr	fp, [r3, #4]	@ float
	mov	r10, r0
	mov	r0, fp
	bl	__aeabi_fcmplt
	cmp	r0, #0
	bne	.L4
	mov	r1, r10
	add	r0, fp, #-2147483648
	bl	__aeabi_fcmpgt
	ldr	r3, [sp, #12]
	cmp	r0, #0
	ldr	r0, [r3, #20]
	strne	r0, [sp, #56]
	beq	.L51
.L17:
	ldr	r3, [sp, #12]
	ldr	r1, [r3, #16]
	cmp	r1, #0
	beq	.L52
	add	r3, sp, #36
	str	r3, [sp]
	ldr	r3, .L53+24
	ldr	r2, [sp, #52]
	ldr	r3, [r3]
	ldr	r0, [sp, #56]
	bl	ClipToSeperators
	cmp	r0, #0
	mov	r2, r0
	str	r0, [sp, #52]
	beq	.L4
	add	r3, sp, #36
	str	r3, [sp]
	ldr	r0, [sp, #12]
	ldr	r3, .L53+28
	ldr	r1, [sp, #56]
	ldr	r3, [r3]
	ldr	r0, [r0, #16]
	bl	ClipToSeperators
	cmp	r0, #0
	str	r0, [sp, #52]
	beq	.L4
	mov	r0, #1
	ldr	r3, [r8]
	add	r2, sp, #36
	ldr	r1, [r3]
	ldr	r3, [r1, r9, lsl #2]
	orr	r4, r3, r0, lsl r4
	str	r4, [r1, r9, lsl #2]
	ldr	r0, [r5, #8]
	mov	r1, r8
	bl	RecursiveLeafFlow
	mov	r3, #0
	str	r3, [sp, #48]
	b	.L4
.L50:
	add	r2, r8, #4
	add	r1, sp, #36
	bl	VisChopWinding
	cmp	r0, #0
	str	r0, [sp, #52]
	bne	.L14
	b	.L4
.L51:
	add	r2, sp, #28
	add	r1, sp, #36
	bl	VisChopWinding
	cmp	r0, #0
	str	r0, [sp, #56]
	bne	.L17
	b	.L4
.L52:
	mov	r0, #1
	ldr	r3, [r8]
	add	r2, sp, #36
	ldr	r1, [r3]
	ldr	r3, [r1, r9, lsl #2]
	orr	r4, r3, r0, lsl r4
	str	r4, [r1, r9, lsl #2]
	ldr	r0, [r5, #8]
	mov	r1, r8
	bl	RecursiveLeafFlow
	b	.L4
.L49:
	bl	__stack_chk_fail
.L54:
	.align	2
.L53:
	.word	leafs
	.word	.LC0
	.word	portals
	.word	stat_done
	.word	portallongs
	.word	vec3_origin
	.word	qfalse
	.word	qtrue
	.size	RecursiveLeafFlow, .-RecursiveLeafFlow
	.comm	vec3_origin,4,4
	.comm	stat_done,4,4
	.comm	qtrue,4,4
	.comm	qfalse,4,4
	.comm	portals,4,4
	.comm	portallongs,4,4
	.comm	leafs,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
