	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PlaceOccupant                  ## -- Begin function PlaceOccupant
	.p2align	4, 0x90
_PlaceOccupant:                         ## @PlaceOccupant
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	movq	_PLANENUM_LEAF@GOTPCREL(%rip), %r14
	cmpq	(%r14), %r13
	jne	LBB0_1
LBB0_7:
	movq	_CONTENTS_SOLID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, 8(%rbx)
	jne	LBB0_10
## %bb.8:
	cmpq	$0, 24(%rbx)
	jne	LBB0_10
## %bb.9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%rbx)
	movq	_numrec@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	%rbx, %rdi
	callq	_FloodPortals
	movl	$1, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_mapplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	shlq	$4, %r13
	movl	8(%r12,%r13), %esi
	movl	%r15d, %edi
	callq	_DotProduct
	movq	(%r12,%r13), %rcx
	movq	32(%rbx), %rdx
	xorl	%esi, %esi
	cmpq	%rcx, %rax
	setl	%sil
	movq	(%rdx,%rsi,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %r13
	cmpq	(%r14), %r13
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_nummapplanes@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jbe	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_Error
	movq	(%rbx), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%esi, %esi
	cmpq	%rcx, %rax
	setl	%sil
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_Error
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_PLANENUM_LEAF,8,3              ## @PLANENUM_LEAF
	.comm	_nummapplanes,8,3               ## @nummapplanes
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PlaceOccupant: invalid node->planenum\n"

	.comm	_mapplanes,8,3                  ## @mapplanes
L_.str.1:                               ## @.str.1
	.asciz	"PlaceOccupant: invalid child %d\n"

	.comm	_CONTENTS_SOLID,4,2             ## @CONTENTS_SOLID
	.comm	_numrec,8,3                     ## @numrec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PlaceOccupant                  ; -- Begin function PlaceOccupant
	.p2align	2
_PlaceOccupant:                         ; @PlaceOccupant
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.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
	mov	x19, x2
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x24, _PLANENUM_LEAF@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PLANENUM_LEAF@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_5
LBB0_1:
	ldr	w8, [x20, #8]
Lloh2:
	adrp	x9, _CONTENTS_SOLID@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CONTENTS_SOLID@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_11
LBB0_3:
	mov	w0, #0
LBB0_4:
	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
	add	sp, sp, #112
	ret
LBB0_5:
	mov	x21, x1
Lloh5:
	adrp	x25, _nummapplanes@GOTPAGE
Lloh6:
	ldr	x25, [x25, _nummapplanes@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str@PAGE
Lloh8:
	add	x22, x22, l_.str@PAGEOFF
Lloh9:
	adrp	x26, _mapplanes@GOTPAGE
Lloh10:
	ldr	x26, [x26, _mapplanes@GOTPAGEOFF]
Lloh11:
	adrp	x23, l_.str.1@PAGE
Lloh12:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x26]
	add	x27, x9, x8, lsl #4
	ldr	w1, [x27, #8]
	mov	x0, x21
	bl	_DotProduct
	ldr	x8, [x27]
	ldr	x9, [x20, #32]
	cmp	x0, x8
	cset	w10, lt
	ldr	x20, [x9, w10, uxtw #3]
	cbz	x20, LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25]
	cmp	x8, x9
	b.ls	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x22
	bl	_Error
	ldr	x8, [x20]
	b	LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	x0, x8
	cset	w8, lt
	str	x8, [sp]
	mov	x0, x23
	bl	_Error
	b	LBB0_7
LBB0_11:
	str	x19, [x20, #16]
Lloh13:
	adrp	x8, _numrec@GOTPAGE
Lloh14:
	ldr	x8, [x8, _numrec@GOTPAGEOFF]
Lloh15:
	str	xzr, [x8]
	mov	x0, x20
	bl	_FloodPortals
	mov	w0, #1
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PLANENUM_LEAF,8,3              ; @PLANENUM_LEAF
	.comm	_nummapplanes,8,3               ; @nummapplanes
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PlaceOccupant: invalid node->planenum\n"

	.comm	_mapplanes,8,3                  ; @mapplanes
l_.str.1:                               ; @.str.1
	.asciz	"PlaceOccupant: invalid child %d\n"

	.comm	_CONTENTS_SOLID,4,2             ; @CONTENTS_SOLID
	.comm	_numrec,8,3                     ; @numrec
.subsections_via_symbols
