	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_SetThingPosition             ## -- Begin function P_SetThingPosition
	.p2align	4, 0x90
_P_SetThingPosition:                    ## @P_SetThingPosition
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movl	4(%rbx), %esi
	callq	_R_PointInSubsector
	movq	%rax, 48(%rbx)
	movl	8(%rbx), %ecx
	movq	_MF_NOSECTOR@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_4
## %bb.1:
	movq	(%rax), %rax
	movq	$0, 32(%rbx)
	movq	(%rax), %rdx
	movq	%rdx, 40(%rbx)
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.2:
	movq	%rbx, 32(%rdx)
LBB0_3:
	movq	%rbx, (%rax)
LBB0_4:
	movq	_MF_NOBLOCKMAP@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_13
## %bb.5:
	movq	_bmaporgx@GOTPCREL(%rip), %rcx
	movl	(%rbx), %eax
	subl	(%rcx), %eax
	movq	_MAPBLOCKSHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movl	4(%rbx), %edx
	movq	_bmaporgy@GOTPCREL(%rip), %rsi
	subl	(%rsi), %edx
	sarl	%cl, %edx
	testl	%eax, %eax
	js	LBB0_12
## %bb.6:
	movq	_bmapwidth@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jge	LBB0_12
## %bb.7:
	testl	%edx, %edx
	js	LBB0_12
## %bb.8:
	movq	_bmapheight@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jge	LBB0_12
## %bb.9:
	movq	_blocklinks@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	imull	%edx, %ecx
	addl	%eax, %ecx
	movslq	%ecx, %rax
	movq	$0, 16(%rbx)
	movq	(%rsi,%rax,8), %rcx
	movq	%rcx, 24(%rbx)
	movq	(%rsi,%rax,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.10:
	movq	%rbx, 16(%rcx)
LBB0_11:
	movq	%rbx, (%rsi,%rax,8)
	jmp	LBB0_13
LBB0_12:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MF_NOSECTOR,4,2                ## @MF_NOSECTOR
	.comm	_MF_NOBLOCKMAP,4,2              ## @MF_NOBLOCKMAP
	.comm	_bmaporgx,4,2                   ## @bmaporgx
	.comm	_MAPBLOCKSHIFT,4,2              ## @MAPBLOCKSHIFT
	.comm	_bmaporgy,4,2                   ## @bmaporgy
	.comm	_bmapwidth,4,2                  ## @bmapwidth
	.comm	_bmapheight,4,2                 ## @bmapheight
	.comm	_blocklinks,8,3                 ## @blocklinks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_SetThingPosition             ; -- Begin function P_SetThingPosition
	.p2align	2
_P_SetThingPosition:                    ; @P_SetThingPosition
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0]
	ldr	w1, [x19, #4]
	bl	_R_PointInSubsector
	str	x0, [x19, #48]
	ldr	w8, [x19, #8]
Lloh0:
	adrp	x9, _MF_NOSECTOR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MF_NOSECTOR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.1:
	ldr	x9, [x0]
	ldr	x10, [x9]
	stp	xzr, x10, [x19, #32]
	cbz	x10, LBB0_3
; %bb.2:
	str	x19, [x10, #32]
LBB0_3:
	str	x19, [x9]
LBB0_4:
Lloh3:
	adrp	x9, _MF_NOBLOCKMAP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MF_NOBLOCKMAP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.5:
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _bmaporgx@GOTPAGE
Lloh7:
	ldr	x9, [x9, _bmaporgx@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	sub	w8, w8, w9
Lloh9:
	adrp	x9, _MAPBLOCKSHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAPBLOCKSHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x9]
	asr	w8, w8, w10
	tbnz	w8, #31, LBB0_12
; %bb.6:
Lloh12:
	adrp	x9, _bmapwidth@GOTPAGE
Lloh13:
	ldr	x9, [x9, _bmapwidth@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_12
; %bb.7:
	ldr	w11, [x19, #4]
Lloh15:
	adrp	x12, _bmaporgy@GOTPAGE
Lloh16:
	ldr	x12, [x12, _bmaporgy@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x12]
	sub	w11, w11, w12
	asr	w11, w11, w10
	tbnz	w11, #31, LBB0_12
; %bb.8:
Lloh18:
	adrp	x10, _bmapheight@GOTPAGE
Lloh19:
	ldr	x10, [x10, _bmapheight@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	cmp	w11, w10
	b.ge	LBB0_12
; %bb.9:
Lloh21:
	adrp	x10, _blocklinks@GOTPAGE
Lloh22:
	ldr	x10, [x10, _blocklinks@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	madd	w9, w9, w11, w8
	sxtw	x8, w9
	sbfiz	x9, x9, #3, #32
	str	xzr, [x19, #16]
	ldr	x11, [x10, x9]
	str	x11, [x19, #24]
	ldr	x9, [x10, x9]
	cbz	x9, LBB0_11
; %bb.10:
	str	x19, [x9, #16]
LBB0_11:
	str	x19, [x10, x8, lsl #3]
	b	LBB0_13
LBB0_12:
	stp	xzr, xzr, [x19, #16]
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MF_NOSECTOR,4,2                ; @MF_NOSECTOR
	.comm	_MF_NOBLOCKMAP,4,2              ; @MF_NOBLOCKMAP
	.comm	_bmaporgx,4,2                   ; @bmaporgx
	.comm	_MAPBLOCKSHIFT,4,2              ; @MAPBLOCKSHIFT
	.comm	_bmaporgy,4,2                   ; @bmaporgy
	.comm	_bmapwidth,4,2                  ; @bmapwidth
	.comm	_bmapheight,4,2                 ; @bmapheight
	.comm	_blocklinks,8,3                 ; @blocklinks
.subsections_via_symbols
