	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function PatchMapDrawSurfs
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_PatchMapDrawSurfs
	.p2align	4, 0x90
_PatchMapDrawSurfs:                     ## @PatchMapDrawSurfs
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_MAP_DRAW_SURFS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	(,%r13,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	leaq	(,%r13,4), %r14
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -128(%rbp)                ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_qprintf
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_33
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, (%r15,%rbx,8)
	incq	%rbx
	movq	32(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	testl	%ebx, %ebx
	je	LBB0_33
## %bb.4:
	movq	%r13, -136(%rbp)                ## 8-byte Spill
	movl	%ebx, %r12d
	imull	%ebx, %r12d
	movl	%r12d, %edi
	callq	_malloc
	xorl	%r14d, %r14d
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_memset
	movl	%ebx, %edx
	movl	$1, %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movq	%rdx, -144(%rbp)                ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	-104(%rbp)                      ## 8-byte Folded Spill
	movq	-144(%rbp), %rdx                ## 8-byte Reload
	movq	-152(%rbp), %r14                ## 8-byte Reload
	cmpq	%rdx, %r14
	je	LBB0_24
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##       Child Loop BB0_11 Depth 3
                                        ##         Child Loop BB0_13 Depth 4
	movl	%ebx, %eax
	imull	%r14d, %eax
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	addq	%r14, %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	$1, (%rcx,%rax,4)
	movq	%r14, %rax
	movq	%r14, -120(%rbp)                ## 8-byte Spill
	leaq	1(%r14), %rax
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	cmpq	%rdx, %rax
	jae	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movq	(%r15,%rax,8), %rsi
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_8 Depth=2
	xorl	%eax, %eax
LBB0_23:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movl	%ebx, %ecx
	movq	-168(%rbp), %rdi                ## 8-byte Reload
	imull	%edi, %ecx
	addq	-120(%rbp), %rcx                ## 8-byte Folded Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rdx,%rcx,4)
	movq	-160(%rbp), %rcx                ## 8-byte Reload
	addq	%rdi, %rcx
	movl	%eax, (%rdx,%rcx,4)
	incq	%rdi
	cmpl	%edi, %ebx
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_5
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_11 Depth 3
                                        ##         Child Loop BB0_13 Depth 4
	movq	%rdi, -168(%rbp)                ## 8-byte Spill
	movq	(%r15,%rdi,8), %rax
	movl	12(%rax), %ecx
	imull	8(%rax), %ecx
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	16(%rax), %r15
	xorl	%r14d, %r14d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_11 Depth=3
	cmpl	%eax, %ebx
	jne	LBB0_20
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=3
	incl	%r14d
	addq	$8, %r15
	cmpl	-72(%rbp), %r14d                ## 4-byte Folded Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_22
LBB0_11:                                ##   Parent Loop BB0_6 Depth=1
                                        ##     Parent Loop BB0_8 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_13 Depth 4
	movl	12(%rsi), %eax
	imull	8(%rsi), %eax
	movl	$0, %ebx
	testl	%eax, %eax
	jle	LBB0_19
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=3
	movq	16(%rsi), %r13
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=4
	incq	%rbx
	cmpl	%ebx, %r12d
	je	LBB0_17
LBB0_13:                                ##   Parent Loop BB0_6 Depth=1
                                        ##     Parent Loop BB0_8 Depth=2
                                        ##       Parent Loop BB0_11 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movq	(%r15), %rax
	movq	(%rax), %rdi
	movq	(%r13,%rbx,8), %rax
	subq	(%rax), %rdi
	callq	_fabs
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=4
	movq	(%r15), %rax
	movq	8(%rax), %rdi
	movq	(%r13,%rbx,8), %rax
	subq	8(%rax), %rdi
	callq	_fabs
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=4
	movq	(%r15), %rax
	movq	16(%rax), %rdi
	movq	(%r13,%rbx,8), %rax
	subq	16(%rax), %rdi
	callq	_fabs
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_11 Depth=3
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_8 Depth=2
	xorl	%r14d, %r14d
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
LBB0_21:                                ##   in Loop: Header=BB0_8 Depth=2
	movl	$1, %eax
	cmpl	-72(%rbp), %r14d                ## 4-byte Folded Reload
	je	LBB0_22
	jmp	LBB0_23
LBB0_24:
	movq	-136(%rbp), %rdx                ## 8-byte Reload
	shll	$2, %edx
	xorl	%r12d, %r12d
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memset
	cmpl	$2, %ebx
	movl	$1, %r15d
	cmovael	%ebx, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_25 Depth=1
	movl	-64(%rbp), %r13d                ## 4-byte Reload
	addl	-52(%rbp), %r13d                ## 4-byte Folded Reload
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	(%rax,%r12,8), %rbx
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	leaq	8(%rbx), %rdi
	callq	_DrawSurfaceForMesh
	movq	%rax, %r14
	movl	(%rbx), %eax
	movl	%eax, 8(%r14)
	movq	(%r14), %rax
	movl	(%rax), %esi
	callq	_VectorCopy
	movq	(%r14), %rax
	movl	4(%rax), %esi
	callq	_VectorCopy
	incq	%r12
	cmpq	%r15, %r12
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_32
LBB0_25:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_26 Depth 2
                                        ##       Child Loop BB0_29 Depth 3
	movl	%r13d, -64(%rbp)                ## 4-byte Spill
	xorl	%ecx, %ecx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax,%r12,4)
	sete	%cl
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	-128(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edi
	movl	%ebx, %esi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_GrowGroup_r
	callq	_ClearBounds
	xorl	%r13d, %r13d
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_26 Depth=2
	incq	%r13
	cmpq	%r15, %r13
	je	LBB0_31
LBB0_26:                                ##   Parent Loop BB0_25 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_29 Depth 3
	movq	-128(%rbp), %rax                ## 8-byte Reload
	cmpl	$0, (%rax,%r13,4)
	je	LBB0_30
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r13,4)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r13,8), %rax
	movl	12(%rax), %ecx
	imull	8(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_30
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=2
	movq	16(%rax), %rbx
	movl	%ecx, %r14d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_29:                                ##   Parent Loop BB0_25 Depth=1
                                        ##     Parent Loop BB0_26 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	(%rbx,%r12,8), %rdi
	callq	_AddPointToBounds
	incq	%r12
	cmpl	%r12d, %r14d
	jne	LBB0_29
	jmp	LBB0_30
LBB0_32:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_qprintf
	leaq	L_.str.2(%rip), %rdi
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_qprintf
LBB0_33:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_35
## %bb.34:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_MAP_DRAW_SURFS,4,2         ## @MAX_MAP_DRAW_SURFS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"----- PatchMapDrawSurfs -----\n"

	.comm	_qtrue,8,3                      ## @qtrue
L_.str.1:                               ## @.str.1
	.asciz	"%5i patches\n"

L_.str.2:                               ## @.str.2
	.asciz	"%5i patch LOD groups\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PatchMapDrawSurfs              ; -- Begin function PatchMapDrawSurfs
	.p2align	2
_PatchMapDrawSurfs:                     ; @PatchMapDrawSurfs
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	sub	sp, sp, #80
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-104]
Lloh3:
	adrp	x8, _MAX_MAP_DRAW_SURFS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_MAP_DRAW_SURFS@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
	lsl	x8, x19, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x25, x9, x8
	mov	sp, x25
	lsl	x8, x19, #2
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x9, x9, x12
	stur	x9, [x29, #-120]                ; 8-byte Folded Spill
	mov	sp, x9
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x8, x8, x12
	stur	x8, [x29, #-112]                ; 8-byte Folded Spill
	mov	sp, x8
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_qprintf
	ldr	x8, [x21]
	cbz	x8, LBB0_33
; %bb.1:
	mov	x22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	x8, [x25, x22, lsl #3]
	add	x22, x22, #1
	ldr	x8, [x8, #32]
	cbnz	x8, LBB0_2
; %bb.3:
	cbz	w22, LBB0_33
; %bb.4:
	stur	x19, [x29, #-176]               ; 8-byte Folded Spill
	mul	w23, w22, w22
	mov	x0, x23
	bl	_malloc
	stur	x0, [x29, #-128]                ; 8-byte Folded Spill
	mov	w1, #0
	mov	x2, x23
	bl	_memset
	mov	x21, #0
	and	x10, x22, #0xffffffff
	fmov	d8, #1.00000000
	mov	w8, #1
	stur	x8, [x29, #-152]                ; 8-byte Folded Spill
	stur	x22, [x29, #-136]               ; 8-byte Folded Spill
	stur	x10, [x29, #-168]               ; 8-byte Folded Spill
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldur	x8, [x29, #-152]                ; 8-byte Folded Reload
	add	x8, x8, #1
	stur	x8, [x29, #-152]                ; 8-byte Folded Spill
	ldp	x10, x8, [x29, #-168]           ; 16-byte Folded Reload
	mov	x21, x8
	cmp	x8, x10
	b.eq	LBB0_24
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;       Child Loop BB0_15 Depth 3
                                        ;         Child Loop BB0_18 Depth 4
	mul	w8, w22, w21
	stur	x8, [x29, #-144]                ; 8-byte Folded Spill
	add	x8, x21, x8
	ldur	x9, [x29, #-128]                ; 8-byte Folded Reload
	mov	w11, #1
	str	w11, [x9, x8, lsl #2]
	add	x8, x21, #1
	stur	x8, [x29, #-160]                ; 8-byte Folded Spill
	cmp	x8, x10
	b.hs	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x23, [x25, x21, lsl #3]
	ldur	x28, [x29, #-152]               ; 8-byte Folded Reload
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	mov	w8, #0
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldp	x22, x10, [x29, #-136]          ; 16-byte Folded Reload
	mul	w9, w22, w28
	add	x9, x21, x9
	str	w8, [x10, x9, lsl #2]
	ldur	x9, [x29, #-144]                ; 8-byte Folded Reload
	add	x9, x28, x9
	str	w8, [x10, x9, lsl #2]
	add	x28, x28, #1
	cmp	w22, w28
	mov	x25, x27
	b.eq	LBB0_5
LBB0_10:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_15 Depth 3
                                        ;         Child Loop BB0_18 Depth 4
	mov	x27, x25
	ldr	x8, [x25, x28, lsl #3]
	ldp	w9, w10, [x8, #8]
	mul	w24, w10, w9
	cmp	w24, #1
	b.lt	LBB0_21
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	w19, #0
	ldr	x20, [x8, #16]
	b	LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_15 Depth=3
	mov	w26, #0
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=3
	cmp	w26, w25
	b.ne	LBB0_22
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=3
	add	w19, w19, #1
	add	x20, x20, #8
	cmp	w19, w24
	b.eq	LBB0_8
LBB0_15:                                ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_18 Depth 4
	ldp	w8, w9, [x23, #8]
	mul	w25, w9, w8
	cmp	w25, #1
	b.lt	LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=3
	mov	x26, #0
	ldr	x22, [x23, #16]
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=4
	add	x26, x26, #1
	cmp	w25, w26
	b.eq	LBB0_14
LBB0_18:                                ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ;       Parent Loop BB0_15 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x9, [x22, x26, lsl #3]
	ldr	x9, [x9]
	sub	x0, x8, x9
	bl	_fabs
	fcmp	d0, d8
	b.pl	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=4
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	x9, [x22, x26, lsl #3]
	ldr	x9, [x9, #8]
	sub	x0, x8, x9
	bl	_fabs
	fcmp	d0, d8
	b.pl	LBB0_17
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=4
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	x9, [x22, x26, lsl #3]
	ldr	x9, [x9, #16]
	sub	x0, x8, x9
	bl	_fabs
	fcmp	d0, d8
	b.pl	LBB0_17
	b	LBB0_13
LBB0_21:                                ;   in Loop: Header=BB0_10 Depth=2
	mov	w19, #0
LBB0_22:                                ;   in Loop: Header=BB0_10 Depth=2
	cmp	w19, w24
	b.eq	LBB0_8
; %bb.23:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	w8, #1
	b	LBB0_9
LBB0_24:
	ldur	x8, [x29, #-176]                ; 8-byte Folded Reload
	lsl	w2, w8, #2
	ldur	x0, [x29, #-120]                ; 8-byte Folded Reload
	mov	w1, #0
	bl	_memset
	mov	x23, #0
	mov	w26, #0
	cmp	w22, #1
	csinc	w27, w22, wzr, hi
Lloh14:
	adrp	x28, _qtrue@GOTPAGE
Lloh15:
	ldr	x28, [x28, _qtrue@GOTPAGEOFF]
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=1
	add	w26, w26, w19
	ldr	x19, [x25, x23, lsl #3]
	ldr	x8, [x28]
	str	x8, [x19, #24]
	add	x0, x19, #8
	bl	_DrawSurfaceForMesh
	mov	x24, x0
	ldr	w8, [x19]
	str	w8, [x0, #8]
	ldr	x8, [x0]
	ldr	w1, [x8]
	bl	_VectorCopy
	ldr	x8, [x24]
	ldr	w1, [x8, #4]
	bl	_VectorCopy
	add	x23, x23, #1
	cmp	x23, x27
	ldur	x22, [x29, #-136]               ; 8-byte Folded Reload
	b.eq	LBB0_32
LBB0_26:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_28 Depth 2
                                        ;       Child Loop BB0_31 Depth 3
	ldp	x8, x20, [x29, #-120]           ; 16-byte Folded Reload
	ldr	w8, [x8, x23, lsl #2]
	cmp	w8, #0
	cset	w19, eq
	mov	x0, x20
	mov	w1, #0
	mov	x2, x22
	bl	_memset
	mov	x0, x23
	mov	x1, x22
	ldur	x2, [x29, #-128]                ; 8-byte Folded Reload
	mov	x3, x20
	bl	_GrowGroup_r
	bl	_ClearBounds
	mov	x20, #0
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=2
	add	x20, x20, #1
	cmp	x20, x27
	b.eq	LBB0_25
LBB0_28:                                ;   Parent Loop BB0_26 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_31 Depth 3
	ldur	x8, [x29, #-112]                ; 8-byte Folded Reload
	ldr	w8, [x8, x20, lsl #2]
	cbz	w8, LBB0_27
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=2
	ldr	x8, [x28]
	ldur	x9, [x29, #-120]                ; 8-byte Folded Reload
	str	w8, [x9, x20, lsl #2]
	ldr	x8, [x25, x20, lsl #3]
	ldp	w9, w10, [x8, #8]
	mul	w22, w10, w9
	cmp	w22, #1
	b.lt	LBB0_27
; %bb.30:                               ;   in Loop: Header=BB0_28 Depth=2
	ldr	x24, [x8, #16]
LBB0_31:                                ;   Parent Loop BB0_26 Depth=1
                                        ;     Parent Loop BB0_28 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x0, [x24], #8
	bl	_AddPointToBounds
	subs	w22, w22, #1
	b.ne	LBB0_31
	b	LBB0_27
LBB0_32:
	str	x22, [sp, #-16]!
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_qprintf
	add	sp, sp, #16
	str	x26, [sp, #-16]!
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_qprintf
	add	sp, sp, #16
LBB0_33:
	ldur	x8, [x29, #-104]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_35
; %bb.34:
	sub	sp, x29, #96
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
LBB0_35:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_MAP_DRAW_SURFS,4,2         ; @MAX_MAP_DRAW_SURFS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"----- PatchMapDrawSurfs -----\n"

	.comm	_qtrue,8,3                      ; @qtrue
l_.str.1:                               ; @.str.1
	.asciz	"%5i patches\n"

l_.str.2:                               ; @.str.2
	.asciz	"%5i patch LOD groups\n"

.subsections_via_symbols
