	.file	"extr_vis.c_MergeLeaves.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%6d leaves merged\n"
	.text
	.p2align 4
	.globl	MergeLeaves
	.type	MergeLeaves, @function
MergeLeaves:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xor	r14d, r14d
	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, 8
	.cfi_def_cfa_offset 64
	mov	ecx, DWORD PTR portalclusters[rip]
	.p2align 4,,10
	.p2align 3
.L9:
	test	ecx, ecx
	jle	.L2
	xor	r12d, r12d
	xor	r13d, r13d
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdx, QWORD PTR leafs[rip]
	lea	rax, [r12+r12*2]
	mov	r15d, r12d
	lea	rbp, [rdx+rax*8]
	cmp	QWORD PTR 0[rbp], 0
	js	.L6
	mov	rax, QWORD PTR qfalse[rip]
	cmp	QWORD PTR hint[rip], rax
	je	.L5
.L6:
	mov	eax, DWORD PTR 8[rbp]
	xor	ebx, ebx
	test	eax, eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 16[rbp]
	mov	rax, QWORD PTR [rax+rbx*8]
	cmp	QWORD PTR 16[rax], 0
	jne	.L7
	cmp	QWORD PTR 8[rax], 0
	jne	.L7
	mov	esi, DWORD PTR [rax]
	mov	edi, r15d
	call	TryMergeLeaves@PLT
	test	rax, rax
	jne	.L20
.L7:
	add	rbx, 1
	cmp	DWORD PTR 8[rbp], ebx
	jg	.L4
	mov	ecx, DWORD PTR portalclusters[rip]
.L5:
	add	r12, 1
	cmp	ecx, r12d
	jg	.L8
	add	r14d, r13d
	test	r13d, r13d
	jne	.L9
.L2:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	esi, r14d
	lea	rdi, .LC0[rip]
	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
	jmp	Sys_Printf@PLT
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	xor	eax, eax
	add	r13d, 1
	call	UpdatePortals@PLT
	mov	ecx, DWORD PTR portalclusters[rip]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	MergeLeaves, .-MergeLeaves
	.comm	qfalse,8,8
	.comm	portalclusters,4,4
	.comm	leafs,8,8
	.comm	hint,8,8
	.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_vis.c_MergeLeaves.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%6d leaves merged\012\000"
	.text
	.align	2
	.global	MergeLeaves
	.syntax unified
	.arm
	.fpu softvfp
	.type	MergeLeaves, %function
MergeLeaves:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r6, .L19
	sub	sp, sp, #12
	str	r3, [sp, #4]
	ldr	r7, .L19+4
	ldr	r3, [r6]
	ldr	r9, .L19+8
	ldr	r8, .L19+12
.L9:
	cmp	r3, #0
	ble	.L2
	mov	r5, #0
	mov	fp, r5
	str	r5, [sp]
.L8:
	ldr	r3, [r7]
	ldr	r1, [r3, r5]
	add	r10, r3, r5
	cmp	r1, #0
	blt	.L6
	ldr	r0, [r9]
	ldr	r1, [r8]
	cmp	r0, r1
	beq	.L5
.L6:
	ldr	ip, [r10, #4]
	cmp	ip, #0
	movgt	r4, #0
	ble	.L5
.L4:
	ldr	r1, [r10, #8]
	ldr	r1, [r1, r4, lsl #2]
	ldr	r0, [r1, #8]
	cmp	r0, #0
	bne	.L7
	ldr	r0, [r1, #4]
	cmp	r0, #0
	bne	.L7
	mov	r0, fp
	ldr	r1, [r1]
	bl	TryMergeLeaves
	cmp	r0, #0
	bne	.L16
	ldr	ip, [r10, #4]
.L7:
	add	r4, r4, #1
	cmp	ip, r4
	bgt	.L4
.L5:
	ldr	r3, [r6]
	add	fp, fp, #1
	cmp	r3, fp
	add	r5, r5, #12
	bgt	.L8
	ldr	r2, [sp]
	ldr	r1, [sp, #4]
	cmp	r2, #0
	add	r2, r1, r2
	str	r2, [sp, #4]
	bne	.L9
.L2:
	ldr	r1, [sp, #4]
	ldr	r0, .L19+16
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	Sys_Printf
.L16:
	bl	UpdatePortals
	ldr	r3, [sp]
	add	r3, r3, #1
	str	r3, [sp]
	b	.L5
.L20:
	.align	2
.L19:
	.word	portalclusters
	.word	leafs
	.word	hint
	.word	qfalse
	.word	.LC0
	.size	MergeLeaves, .-MergeLeaves
	.comm	qfalse,4,4
	.comm	portalclusters,4,4
	.comm	leafs,4,4
	.comm	hint,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
