	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SubdivideDrawSurfs             ## -- Begin function SubdivideDrawSurfs
	.p2align	4, 0x90
_SubdivideDrawSurfs:                    ## @SubdivideDrawSurfs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_qprintf
	movq	_numMapDrawSurfs@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movslq	(%r14), %rax
	cmpl	%r15d, %eax
	jge	LBB0_9
## %bb.1:
	movq	%rax, %rcx
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,2), %rbx
	subl	%eax, %r15d
	movq	_mapDrawSurfs@GOTPCREL(%rip), %r12
	xorps	%xmm0, %xmm0
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$24, %rbx
	decl	%r15d
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %r13
	movq	16(%r13,%rbx), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13,%rbx), %rcx
	cmpq	$0, (%rcx)
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 8(%rax)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jne	LBB0_7
	jnp	LBB0_8
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rbx,%r13), %r14
	movq	%r14, %rdi
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	callq	_WindingFromDrawSurf
	movq	$0, (%r13,%rbx)
	movq	%r14, %rdi
	movq	%rax, %rsi
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	callq	_SubdivideDrawSurf
	xorps	%xmm0, %xmm0
	jmp	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"----- SubdivideDrawSurfs -----\n"

	.comm	_numMapDrawSurfs,4,2            ## @numMapDrawSurfs
	.comm	_mapDrawSurfs,8,3               ## @mapDrawSurfs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SubdivideDrawSurfs             ; -- Begin function SubdivideDrawSurfs
	.p2align	2
_SubdivideDrawSurfs:                    ; @SubdivideDrawSurfs
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 b8, -72
	.cfi_offset b9, -80
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_qprintf
Lloh2:
	adrp	x8, _numMapDrawSurfs@GOTPAGE
Lloh3:
	ldr	x8, [x8, _numMapDrawSurfs@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldrsw	x9, [x19]
	cmp	w9, w8
	b.ge	LBB0_9
; %bb.1:
	add	x10, x9, x9, lsl #1
	lsl	x20, x10, #3
	sub	w21, w8, w9
Lloh5:
	adrp	x22, _mapDrawSurfs@GOTPAGE
Lloh6:
	ldr	x22, [x22, _mapDrawSurfs@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #24
	subs	w21, w21, #1
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x22]
	add	x19, x23, x20
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x23, x20
	ldr	x9, [x9, #8]
	ldr	x9, [x9]
	cbnz	x9, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	s8, [x8]
	fcmp	s8, #0.0
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_WindingFromDrawSurf
	mov	x1, x0
	str	xzr, [x23, x20]
	mov	x0, x19
	fmov	s0, s8
	bl	_SubdivideDrawSurf
	b	LBB0_2
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"----- SubdivideDrawSurfs -----\n"

	.comm	_numMapDrawSurfs,4,2            ; @numMapDrawSurfs
	.comm	_mapDrawSurfs,8,3               ; @mapDrawSurfs
.subsections_via_symbols
