	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_SpawnPlayer                  ## -- Begin function P_SpawnPlayer
	.p2align	4, 0x90
_P_SpawnPlayer:                         ## @P_SpawnPlayer
	.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	%rdi, %r15
	movq	_playeringame@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rdi), %rdi
	cmpl	$0, -4(%rax,%rdi,4)
	je	LBB0_10
## %bb.1:
	decq	%rdi
	movq	_players@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	imulq	$88, %rdi, %rbx
	movq	(%r12,%rbx), %rax
	movq	_PST_REBORN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_G_PlayerReborn
LBB0_3:
	leaq	(%r12,%rbx), %r14
	movq	_FRACBITS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	4(%r15), %edi
	shll	%cl, %edi
	movl	8(%r15), %esi
	shll	%cl, %esi
	movq	_ONFLOORZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MT_PLAYER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_P_SpawnMobj
	movl	(%r15), %edx
	cmpl	$2, %edx
	jl	LBB0_5
## %bb.4:
	decl	%edx
	movq	_MF_TRANSSHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	orl	%edx, (%rax)
LBB0_5:
	movq	_ANG45@GOTPCREL(%rip), %rcx
	movslq	12(%r15), %rdx
	imulq	$-1240768329, %rdx, %rsi        ## imm = 0xB60B60B7
	shrq	$32, %rsi
	addl	%edx, %esi
	movl	%esi, %edx
	shrl	$31, %edx
	sarl	$5, %esi
	addl	%edx, %esi
	imull	(%rcx), %esi
	movl	%esi, 4(%rax)
	movq	%r14, 16(%rax)
	movl	80(%r12,%rbx), %ecx
	movl	%ecx, 8(%rax)
	movq	%rax, 72(%r12,%rbx)
	movq	_PST_LIVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%r12,%rbx)
	movups	%xmm0, 40(%r12,%rbx)
	movups	%xmm0, 24(%r12,%rbx)
	movq	_VIEWHEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12,%rbx)
	movq	%r14, %rdi
	callq	_P_SetupPsprites
	movq	_deathmatch@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.6:
	movq	_NUMCARDS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_9
## %bb.7:
	movq	8(%r12,%rbx), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, (%rcx,%rdx,4)
	incq	%rdx
	movslq	(%rax), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_8
LBB0_9:
	movl	(%r15), %eax
	decl	%eax
	movq	_consoleplayer@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.11:
	xorl	%eax, %eax
	callq	_ST_Start
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HU_Start                       ## TAILCALL
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_playeringame,8,3               ## @playeringame
	.comm	_players,8,3                    ## @players
	.comm	_PST_REBORN,8,3                 ## @PST_REBORN
	.comm	_FRACBITS,4,2                   ## @FRACBITS
	.comm	_ONFLOORZ,4,2                   ## @ONFLOORZ
	.comm	_MT_PLAYER,4,2                  ## @MT_PLAYER
	.comm	_MF_TRANSSHIFT,4,2              ## @MF_TRANSSHIFT
	.comm	_ANG45,4,2                      ## @ANG45
	.comm	_PST_LIVE,8,3                   ## @PST_LIVE
	.comm	_VIEWHEIGHT,4,2                 ## @VIEWHEIGHT
	.comm	_deathmatch,8,3                 ## @deathmatch
	.comm	_NUMCARDS,4,2                   ## @NUMCARDS
	.comm	_consoleplayer,4,2              ## @consoleplayer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_SpawnPlayer                  ; -- Begin function P_SpawnPlayer
	.p2align	2
_P_SpawnPlayer:                         ; @P_SpawnPlayer
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _playeringame@GOTPAGE
Lloh1:
	ldr	x8, [x8, _playeringame@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldrsw	x9, [x0]
	sub	x20, x9, #1
	ldr	w8, [x8, x20, lsl #2]
	cbz	w8, LBB0_11
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _players@GOTPAGE
Lloh4:
	ldr	x8, [x8, _players@GOTPAGEOFF]
Lloh5:
	ldr	x22, [x8]
	mov	w8, #88
	madd	x21, x20, x8, x22
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _PST_REBORN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PST_REBORN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_G_PlayerReborn
LBB0_3:
Lloh9:
	adrp	x8, _FRACBITS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FRACBITS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldp	w9, w10, [x19, #4]
	lsl	w0, w9, w8
	lsl	w1, w10, w8
Lloh12:
	adrp	x8, _ONFLOORZ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ONFLOORZ@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _MT_PLAYER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MT_PLAYER@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	bl	_P_SpawnMobj
	ldr	w8, [x19]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.4:
Lloh18:
	adrp	x9, _MF_TRANSSHIFT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MF_TRANSSHIFT@GOTPAGEOFF]
	sub	w8, w8, #1
Lloh20:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldr	w9, [x0]
	orr	w8, w9, w8
	str	w8, [x0]
LBB0_5:
Lloh21:
	adrp	x8, _ANG45@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ANG45@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldrsw	x9, [x19, #12]
	mov	x10, #-40777
	movk	x10, #46603, lsl #16
	mul	x10, x9, x10
	lsr	x10, x10, #32
	add	w9, w10, w9
	asr	w10, w9, #5
	add	w9, w10, w9, lsr #31
	mul	w8, w9, w8
	str	x21, [x0, #16]
	mov	w9, #88
	madd	x9, x20, x9, x22
	ldr	w10, [x9, #80]
	stp	w8, w10, [x0, #4]
	str	x0, [x9, #72]
Lloh24:
	adrp	x8, _PST_LIVE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PST_LIVE@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x21]
	movi.2d	v0, #0000000000000000
	stur	q0, [x9, #24]
	stur	q0, [x9, #40]
	stur	q0, [x9, #56]
Lloh27:
	adrp	x8, _VIEWHEIGHT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VIEWHEIGHT@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x9, #16]
	mov	x0, x21
	bl	_P_SetupPsprites
Lloh30:
	adrp	x8, _deathmatch@GOTPAGE
Lloh31:
	ldr	x8, [x8, _deathmatch@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.6:
Lloh33:
	adrp	x8, _NUMCARDS@GOTPAGE
Lloh34:
	ldr	x8, [x8, _NUMCARDS@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x9, #0
	mov	w10, #88
	madd	x10, x20, x10, x22
	ldr	x10, [x10, #8]
	mov	w11, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	str	w11, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_8
LBB0_9:
	ldr	w8, [x19]
	sub	w8, w8, #1
Lloh35:
	adrp	x9, _consoleplayer@GOTPAGE
Lloh36:
	ldr	x9, [x9, _consoleplayer@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.10:
	bl	_ST_Start
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_HU_Start
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_playeringame,8,3               ; @playeringame
	.comm	_players,8,3                    ; @players
	.comm	_PST_REBORN,8,3                 ; @PST_REBORN
	.comm	_FRACBITS,4,2                   ; @FRACBITS
	.comm	_ONFLOORZ,4,2                   ; @ONFLOORZ
	.comm	_MT_PLAYER,4,2                  ; @MT_PLAYER
	.comm	_MF_TRANSSHIFT,4,2              ; @MF_TRANSSHIFT
	.comm	_ANG45,4,2                      ; @ANG45
	.comm	_PST_LIVE,8,3                   ; @PST_LIVE
	.comm	_VIEWHEIGHT,4,2                 ; @VIEWHEIGHT
	.comm	_deathmatch,8,3                 ; @deathmatch
	.comm	_NUMCARDS,4,2                   ; @NUMCARDS
	.comm	_consoleplayer,4,2              ; @consoleplayer
.subsections_via_symbols
