	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BG_PlayerStateToEntityStateExtraPolate ## -- Begin function BG_PlayerStateToEntityStateExtraPolate
	.p2align	4, 0x90
_BG_PlayerStateToEntityStateExtraPolate: ## @BG_PlayerStateToEntityStateExtraPolate
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rcx
	movq	_PM_INTERMISSION@GOTPCREL(%rip), %rdx
	movq	_ET_INVISIBLE@GOTPCREL(%rip), %rax
	cmpq	(%rdx), %rcx
	je	LBB0_5
## %bb.1:
	movq	_PM_SPECTATOR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_5
## %bb.2:
	movq	8(%r14), %rax
	movq	_STAT_HEALTH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_GIB_HEALTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_3
## %bb.4:
	movq	_ET_PLAYER@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_ET_INVISIBLE@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	%rax, 88(%rbx)
	movl	80(%r14), %eax
	movl	%eax, 84(%rbx)
	movq	_TR_LINEAR_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%rbx)
	movl	104(%r14), %edi
	movl	76(%rbx), %esi
	callq	_VectorCopy
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movl	76(%rbx), %edi
	callq	_SnapVector
LBB0_7:
	movl	100(%r14), %edi
	movl	72(%rbx), %esi
	callq	_VectorCopy
	movl	%r12d, 64(%rbx)
	movl	$50, 68(%rbx)
	movq	_TR_INTERPOLATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%rbx)
	movl	96(%r14), %edi
	movl	56(%rbx), %esi
	callq	_VectorCopy
	testq	%r15, %r15
	je	LBB0_9
## %bb.8:
	movl	56(%rbx), %edi
	callq	_SnapVector
LBB0_9:
	movl	92(%r14), %eax
	movq	48(%rbx), %rcx
	movq	_YAW@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	88(%r14), %eax
	movl	%eax, 40(%rbx)
	movl	84(%r14), %eax
	movl	%eax, 36(%rbx)
	movl	80(%r14), %eax
	movl	%eax, 32(%rbx)
	movl	76(%r14), %eax
	movq	8(%r14), %rcx
	movq	_STAT_HEALTH@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_EF_DEAD@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, %edi
	notl	%edi
	andl	%eax, %edi
	orl	%eax, %esi
	cmpq	$0, (%rcx,%rdx,8)
	cmovgl	%edi, %esi
	movl	%esi, 28(%rbx)
	movl	16(%r14), %eax
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, (%rbx)
	movl	72(%r14), %eax
	movl	%eax, 24(%rbx)
	jmp	LBB0_15
LBB0_11:
	movl	20(%r14), %eax
	movl	24(%r14), %edx
	cmpl	%edx, %eax
	jge	LBB0_15
## %bb.12:
	movq	_MAX_PS_EVENTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	subl	%ecx, %edx
	cmpl	%edx, %eax
	jge	LBB0_14
## %bb.13:
	movl	%edx, 20(%r14)
	movl	%edx, %eax
LBB0_14:
	decl	%ecx
	andl	%eax, %ecx
	movq	32(%r14), %rdx
	movslq	%ecx, %rcx
	movl	%eax, %esi
	andl	$3, %esi
	shll	$8, %esi
	orl	(%rdx,%rcx,4), %esi
	movl	%esi, (%rbx)
	movq	64(%r14), %rdx
	movl	(%rdx,%rcx,4), %ecx
	movl	%ecx, 24(%rbx)
	incl	%eax
	movl	%eax, 20(%r14)
LBB0_15:
	movl	60(%r14), %eax
	movl	%eax, 20(%rbx)
	movl	56(%r14), %eax
	movl	%eax, 16(%rbx)
	movl	$0, 4(%rbx)
	movq	_MAX_POWERUPS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r8d, %r8d
	jle	LBB0_27
## %bb.16:
	movq	48(%r14), %rcx
	cmpl	$1, %r8d
	jne	LBB0_18
## %bb.17:
	xorl	%edx, %edx
	xorl	%esi, %esi
LBB0_24:
	testb	$1, %r8b
	je	LBB0_27
## %bb.25:
	cmpq	$0, (%rcx,%rsi,8)
	je	LBB0_27
## %bb.26:
	btsl	%esi, %edx
	movl	%edx, 4(%rbx)
LBB0_27:
	movl	44(%r14), %eax
	movl	%eax, 12(%rbx)
	movl	40(%r14), %eax
	movl	%eax, 8(%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	%r8d, %edi
	andl	$-2, %edi
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	addq	$2, %rsi
	cmpq	%rsi, %rdi
	je	LBB0_24
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rsi,8)
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	btsl	%esi, %edx
	movl	%edx, 4(%rbx)
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	cmpq	$0, 8(%rcx,%rsi,8)
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	leal	1(%rsi), %eax
	btsl	%eax, %edx
	movl	%edx, 4(%rbx)
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_PM_INTERMISSION,8,3            ## @PM_INTERMISSION
	.comm	_PM_SPECTATOR,8,3               ## @PM_SPECTATOR
	.comm	_ET_INVISIBLE,8,3               ## @ET_INVISIBLE
	.comm	_STAT_HEALTH,8,3                ## @STAT_HEALTH
	.comm	_GIB_HEALTH,8,3                 ## @GIB_HEALTH
	.comm	_ET_PLAYER,8,3                  ## @ET_PLAYER
	.comm	_TR_LINEAR_STOP,4,2             ## @TR_LINEAR_STOP
	.comm	_TR_INTERPOLATE,4,2             ## @TR_INTERPOLATE
	.comm	_YAW,8,3                        ## @YAW
	.comm	_EF_DEAD,4,2                    ## @EF_DEAD
	.comm	_MAX_PS_EVENTS,4,2              ## @MAX_PS_EVENTS
	.comm	_MAX_POWERUPS,4,2               ## @MAX_POWERUPS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BG_PlayerStateToEntityStateExtraPolate ; -- Begin function BG_PlayerStateToEntityStateExtraPolate
	.p2align	2
_BG_PlayerStateToEntityStateExtraPolate: ; @BG_PlayerStateToEntityStateExtraPolate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x9, [x0]
Lloh0:
	adrp	x8, _PM_INTERMISSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PM_INTERMISSION@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
Lloh3:
	adrp	x8, _PM_SPECTATOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PM_SPECTATOR@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x8]
Lloh6:
	adrp	x8, _ET_INVISIBLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ET_INVISIBLE@GOTPAGEOFF]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
Lloh8:
	adrp	x23, _STAT_HEALTH@GOTPAGE
Lloh9:
	ldr	x23, [x23, _STAT_HEALTH@GOTPAGEOFF]
	b.eq	LBB0_2
; %bb.1:
	ldr	x9, [x20, #8]
	ldr	x10, [x23]
	ldr	x9, [x9, x10, lsl #3]
Lloh10:
	adrp	x10, _GIB_HEALTH@GOTPAGE
Lloh11:
	ldr	x10, [x10, _GIB_HEALTH@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
Lloh13:
	adrp	x11, _ET_PLAYER@GOTPAGE
Lloh14:
	ldr	x11, [x11, _ET_PLAYER@GOTPAGEOFF]
	cmp	x9, x10
	csel	x8, x11, x8, gt
LBB0_2:
	ldr	x8, [x8]
	str	x8, [x19, #88]
Lloh15:
	adrp	x8, _TR_LINEAR_STOP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TR_LINEAR_STOP@GOTPAGEOFF]
	ldr	w9, [x20, #80]
Lloh17:
	ldr	w8, [x8]
	stp	w8, w9, [x19, #80]
	ldr	w0, [x20, #104]
	ldr	w1, [x19, #76]
	bl	_VectorCopy
	cbz	x21, LBB0_4
; %bb.3:
	ldr	w0, [x19, #76]
	bl	_SnapVector
LBB0_4:
	ldr	w0, [x20, #100]
	ldr	w1, [x19, #72]
	bl	_VectorCopy
	mov	w8, #50
Lloh18:
	adrp	x9, _TR_INTERPOLATE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _TR_INTERPOLATE@GOTPAGEOFF]
	stp	w22, w8, [x19, #64]
Lloh20:
	ldr	w8, [x9]
	str	w8, [x19, #60]
	ldr	w0, [x20, #96]
	ldr	w1, [x19, #56]
	bl	_VectorCopy
	cbz	x21, LBB0_6
; %bb.5:
	ldr	w0, [x19, #56]
	bl	_SnapVector
LBB0_6:
	ldr	w8, [x20, #92]
	ldr	x9, [x19, #48]
Lloh21:
	adrp	x10, _YAW@GOTPAGE
Lloh22:
	ldr	x10, [x10, _YAW@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
	ldr	w8, [x20, #88]
	str	w8, [x19, #40]
	ldr	d0, [x20, #80]
	str	d0, [x19, #32]
	ldr	w8, [x20, #76]
	ldr	x9, [x20, #8]
	ldr	x10, [x23]
	ldr	x9, [x9, x10, lsl #3]
Lloh24:
	adrp	x10, _EF_DEAD@GOTPAGE
Lloh25:
	ldr	x10, [x10, _EF_DEAD@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	bic	w11, w8, w10
	orr	w8, w10, w8
	cmp	x9, #1
	csel	w8, w8, w11, lt
	str	w8, [x19, #28]
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_8
; %bb.7:
	str	w8, [x19]
	ldr	w8, [x20, #72]
	str	w8, [x19, #24]
	b	LBB0_12
LBB0_8:
	ldp	w8, w10, [x20, #20]
	cmp	w8, w10
	b.ge	LBB0_12
; %bb.9:
Lloh27:
	adrp	x9, _MAX_PS_EVENTS@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MAX_PS_EVENTS@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	sub	w10, w10, w9
	cmp	w8, w10
	b.ge	LBB0_11
; %bb.10:
	str	w10, [x20, #20]
	mov	x8, x10
LBB0_11:
	sub	w9, w9, #1
	and	w9, w8, w9
	ldr	x10, [x20, #32]
	sbfiz	x9, x9, #2, #32
	ldr	w10, [x10, x9]
	ubfiz	w11, w8, #8, #2
	orr	w10, w10, w11
	str	w10, [x19]
	ldr	x10, [x20, #64]
	ldr	w9, [x10, x9]
	str	w9, [x19, #24]
	add	w8, w8, #1
	str	w8, [x20, #20]
LBB0_12:
	ldr	d0, [x20, #56]
	str	d0, [x19, #16]
	str	wzr, [x19, #4]
Lloh30:
	adrp	x8, _MAX_POWERUPS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MAX_POWERUPS@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.13:
	mov	w9, #0
	mov	x10, #0
	ldr	x11, [x20, #48]
	mov	w12, #1
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x10, x10, #1
	cmp	x8, x10
	b.eq	LBB0_17
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x11, x10, lsl #3]
	cbz	x13, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	lsl	w13, w12, w10
	orr	w9, w9, w13
	str	w9, [x19, #4]
	b	LBB0_14
LBB0_17:
	ldr	d0, [x20, #40]
	str	d0, [x19, #8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_PM_INTERMISSION,8,3            ; @PM_INTERMISSION
	.comm	_PM_SPECTATOR,8,3               ; @PM_SPECTATOR
	.comm	_ET_INVISIBLE,8,3               ; @ET_INVISIBLE
	.comm	_STAT_HEALTH,8,3                ; @STAT_HEALTH
	.comm	_GIB_HEALTH,8,3                 ; @GIB_HEALTH
	.comm	_ET_PLAYER,8,3                  ; @ET_PLAYER
	.comm	_TR_LINEAR_STOP,4,2             ; @TR_LINEAR_STOP
	.comm	_TR_INTERPOLATE,4,2             ; @TR_INTERPOLATE
	.comm	_YAW,8,3                        ; @YAW
	.comm	_EF_DEAD,4,2                    ; @EF_DEAD
	.comm	_MAX_PS_EVENTS,4,2              ; @MAX_PS_EVENTS
	.comm	_MAX_POWERUPS,4,2               ; @MAX_POWERUPS
.subsections_via_symbols
