	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BSPBrushWindings               ## -- Begin function BSPBrushWindings
	.p2align	4, 0x90
_BSPBrushWindings:                      ## @BSPBrushWindings
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	jle	LBB0_10
## %bb.1:
	movq	%rdi, %r15
	movq	8(%rdi), %rdx
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rdx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rax, 8(%rdx,%rsi)
	incq	%r13
	addq	$16, %rbx
	cmpq	%rcx, %r13
	jge	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	_mapplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r13, %r14
	shlq	$4, %r14
	movq	(%rdx,%r14), %rcx
	movl	(%rax,%rcx,8), %esi
	movl	4(%rax,%rcx,8), %edi
	callq	_BaseWindingForPlane
	movq	%rax, -48(%rbp)
	movslq	(%r15), %rcx
	testq	%rcx, %rcx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %r12d
	xorl	%r14d, %r14d
	movl	%ecx, %edx
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%r14, %rbx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	_mapplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	movq	(%rcx,%r14), %rcx
	xorq	$1, %rcx
	movl	(%rax,%rcx,8), %edx
	movl	4(%rax,%rcx,8), %esi
	leaq	-48(%rbp), %rdi
	xorl	%ecx, %ecx
	callq	_ChopWindingInPlace
	movl	(%r15), %edx
	movq	-48(%rbp), %rax
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=2
	movslq	%edx, %rcx
	cmpq	%rcx, %r12
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	addq	$16, %r14
	incq	%r12
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_9
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mapplanes,8,3                  ## @mapplanes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BSPBrushWindings               ; -- Begin function BSPBrushWindings
	.p2align	2
_BSPBrushWindings:                      ; @BSPBrushWindings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x19, x0
	mov	x20, #0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x21, _mapplanes@GOTPAGE
Lloh1:
	ldr	x21, [x21, _mapplanes@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x9, w8
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	add	x10, x8, x20, lsl #4
	str	x0, [x10, #8]
	add	x20, x20, #1
	cmp	x20, x9
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x9, [x21]
	lsl	x10, x20, #4
	ldr	x8, [x8, x10]
	add	x8, x9, x8, lsl #3
	ldp	w1, w0, [x8]
	bl	_BaseWindingForPlane
	str	x0, [sp, #8]
	ldr	w8, [x19]
	cmp	w8, #1
	ccmp	x0, #0, #4, ge
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, #0
	mov	x23, #0
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x20, x23
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x21]
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x22]
	eor	x9, x9, #0x1
	add	x8, x8, x9, lsl #3
	ldp	w2, w1, [x8]
	add	x0, sp, #8
	mov	w3, #0
	bl	_ChopWindingInPlace
	ldr	w8, [x19]
	ldr	x0, [sp, #8]
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x23, x23, #1
	sxtw	x9, w8
	cmp	x23, x9
	b.ge	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x22, x22, #16
	cbnz	x0, LBB0_6
	b	LBB0_3
LBB0_10:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_mapplanes,8,3                  ; @mapplanes
.subsections_via_symbols
