	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_QuickTestBrushToPlanenum       ## -- Begin function QuickTestBrushToPlanenum
	.p2align	4, 0x90
_QuickTestBrushToPlanenum:              ## @QuickTestBrushToPlanenum
	.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
	movq	%rdi, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	$0, (%rdx)
	movq	_mapplanes@GOTPCREL(%rip), %rax
	movslq	%esi, %rcx
	shlq	$4, %rcx
	addq	(%rax), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	cmpl	$0, 16(%rdi)
	jle	LBB0_10
## %bb.1:
	movl	%esi, %r12d
	movl	%esi, %edx
	xorl	$1, %edx
	xorl	%r13d, %r13d
	movq	_MAX_MAPFILE_PLANES@GOTPCREL(%rip), %r14
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rax
	movl	(%rax,%r13,4), %r15d
	cmpl	(%r14), %r15d
	jl	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r12d, %r15d
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%edx, %r15d
	je	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movslq	16(%rbx), %rax
	cmpq	%rax, %r13
	jl	LBB0_3
LBB0_10:
	movq	(%rbx), %rdi
	movq	8(%rbx), %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_BoxOnPlaneSide
	movq	_PSIDE_BOTH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.11:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addl	$3, (%rcx)
	jmp	LBB0_12
LBB0_6:
	movq	_PSIDE_BACK@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_9:
	movq	_PSIDE_FRONT@GOTPCREL(%rip), %rcx
LBB0_7:
	movq	_PSIDE_FACING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
LBB0_12:
	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
	.comm	_MAX_MAPFILE_PLANES,4,2         ## @MAX_MAPFILE_PLANES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad planenum"

	.comm	_PSIDE_BACK,4,2                 ## @PSIDE_BACK
	.comm	_PSIDE_FACING,4,2               ## @PSIDE_FACING
	.comm	_PSIDE_FRONT,4,2                ## @PSIDE_FRONT
	.comm	_PSIDE_BOTH,4,2                 ## @PSIDE_BOTH
	.comm	_PLANESIDE_EPSILON,8,3          ## @PLANESIDE_EPSILON
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_QuickTestBrushToPlanenum       ; -- Begin function QuickTestBrushToPlanenum
	.p2align	2
_QuickTestBrushToPlanenum:              ; @QuickTestBrushToPlanenum
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	str	wzr, [x2]
Lloh0:
	adrp	x8, _mapplanes@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mapplanes@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	ldr	w8, [x0, #16]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x24, #0
	eor	w25, w21, #0x1
Lloh3:
	adrp	x26, _MAX_MAPFILE_PLANES@GOTPAGE
Lloh4:
	ldr	x26, [x26, _MAX_MAPFILE_PLANES@GOTPAGEOFF]
Lloh5:
	adrp	x22, l_.str@PAGE
Lloh6:
	add	x22, x22, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	ldr	w27, [x8, x24, lsl #2]
	ldr	w8, [x26]
	cmp	w27, w8
	b.lt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	bl	_Error
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w27, w21
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w27, w25
	b.eq	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x20, #16]
	cmp	x24, x8
	b.lt	LBB0_2
LBB0_7:
	add	x2, x23, w21, sxtw #4
	ldp	x0, x1, [x20]
	bl	_BoxOnPlaneSide
Lloh7:
	adrp	x8, _PSIDE_BOTH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PSIDE_BOTH@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.8:
	ldr	w8, [x19]
	add	w8, w8, #3
	str	w8, [x19]
	b	LBB0_12
LBB0_9:
Lloh10:
	adrp	x8, _PSIDE_BACK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PSIDE_BACK@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh12:
	adrp	x8, _PSIDE_FRONT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PSIDE_FRONT@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _PSIDE_FACING@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PSIDE_FACING@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w0, w9, w8
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_mapplanes,8,3                  ; @mapplanes
	.comm	_MAX_MAPFILE_PLANES,4,2         ; @MAX_MAPFILE_PLANES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad planenum"

	.comm	_PSIDE_BACK,4,2                 ; @PSIDE_BACK
	.comm	_PSIDE_FACING,4,2               ; @PSIDE_FACING
	.comm	_PSIDE_FRONT,4,2                ; @PSIDE_FRONT
	.comm	_PSIDE_BOTH,4,2                 ; @PSIDE_BOTH
	.comm	_PLANESIDE_EPSILON,8,3          ; @PLANESIDE_EPSILON
.subsections_via_symbols
