	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_SpawnMissile                 ## -- Begin function P_SpawnMissile
	.p2align	4, 0x90
_P_SpawnMissile:                        ## @P_SpawnMissile
	.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
	movl	%edx, %ecx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	24(%rdi), %rsi
	movq	32(%rdi), %rdi
	movq	_FRACUNIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$5, %edx
	addl	(%r15), %edx
	callq	_P_SpawnMobj
	movq	%rax, %r12
	movq	16(%rax), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_S_StartSound
LBB0_2:
	movq	%r15, 56(%r12)
	movq	24(%r15), %rsi
	movq	32(%r15), %rdi
	movq	24(%r14), %rcx
	movq	32(%r14), %rdx
	callq	_R_PointToAngle2
	movl	%eax, %r13d
	movq	_MF_SHADOW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_P_Random
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_P_Random
	subl	%eax, %ebx
	shll	$20, %ebx
	addl	%ebx, %r13d
LBB0_4:
	movl	%r13d, 8(%r12)
	movq	_ANGLETOFINESHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r13d
	movq	16(%r12), %rax
	movl	(%rax), %edi
	movq	_finecosine@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r13d, %rbx
	movl	(%rax,%rbx,4), %esi
	callq	_FixedMul
	movq	%rax, 48(%r12)
	movq	16(%r12), %rax
	movl	(%rax), %edi
	movq	_finesine@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_FixedMul
	movq	%rax, 40(%r12)
	movq	24(%r14), %rsi
	movq	32(%r14), %rdi
	subq	32(%r15), %rdi
	subq	24(%r15), %rsi
	callq	_P_AproxDistance
	movq	16(%r12), %rcx
	cltd
	idivl	(%rcx)
	cmpl	$2, %eax
	movl	$1, %ecx
	cmovgel	%eax, %ecx
	movl	(%r14), %eax
	subl	(%r15), %eax
	cltd
	idivl	%ecx
	movl	%eax, 12(%r12)
	movq	%r12, %rdi
	callq	_P_CheckMissileSpawn
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FRACUNIT,4,2                   ## @FRACUNIT
	.comm	_MF_SHADOW,4,2                  ## @MF_SHADOW
	.comm	_ANGLETOFINESHIFT,4,2           ## @ANGLETOFINESHIFT
	.comm	_finecosine,8,3                 ## @finecosine
	.comm	_finesine,8,3                   ## @finesine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_SpawnMissile                 ; -- Begin function P_SpawnMissile
	.p2align	2
_P_SpawnMissile:                        ; @P_SpawnMissile
	.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	x3, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x0, [x0, #32]
	ldr	x1, [x19, #24]
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _FRACUNIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FRACUNIT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w2, w8, w9, lsl #5
	bl	_P_SpawnMobj
	mov	x21, x0
	ldr	x8, [x0, #16]
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_S_StartSound
LBB0_2:
	str	x19, [x21, #56]
	ldp	x1, x0, [x19, #24]
	ldp	x3, x2, [x20, #24]
	bl	_R_PointToAngle2
	mov	x22, x0
	ldr	w8, [x20, #4]
Lloh3:
	adrp	x9, _MF_SHADOW@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MF_SHADOW@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	bl	_P_Random
	mov	x23, x0
	bl	_P_Random
	sub	w8, w23, w0
	add	w22, w22, w8, lsl #20
LBB0_4:
	str	w22, [x21, #8]
Lloh6:
	adrp	x8, _ANGLETOFINESHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ANGLETOFINESHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	asr	w8, w22, w8
	ldr	x9, [x21, #16]
	ldr	w0, [x9]
Lloh9:
	adrp	x9, _finecosine@GOTPAGE
Lloh10:
	ldr	x9, [x9, _finecosine@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	sbfiz	x22, x8, #2, #32
	ldr	w1, [x9, x22]
	bl	_FixedMul
	str	x0, [x21, #48]
	ldr	x8, [x21, #16]
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _finesine@GOTPAGE
Lloh13:
	ldr	x8, [x8, _finesine@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	w1, [x8, x22]
	bl	_FixedMul
	str	x0, [x21, #40]
	ldp	x9, x8, [x20, #24]
	ldp	x11, x10, [x19, #24]
	sub	x0, x8, x10
	sub	x1, x9, x11
	bl	_P_AproxDistance
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
	sdiv	w8, w0, w8
	cmp	w8, #1
	csinc	w8, w8, wzr, gt
	ldr	w9, [x20]
	ldr	w10, [x19]
	sub	w9, w9, w10
	sdiv	w8, w9, w8
	str	w8, [x21, #12]
	mov	x0, x21
	bl	_P_CheckMissileSpawn
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_FRACUNIT,4,2                   ; @FRACUNIT
	.comm	_MF_SHADOW,4,2                  ; @MF_SHADOW
	.comm	_ANGLETOFINESHIFT,4,2           ; @ANGLETOFINESHIFT
	.comm	_finecosine,8,3                 ; @finecosine
	.comm	_finesine,8,3                   ; @finesine
.subsections_via_symbols
