	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_CheckMissileRange            ## -- Begin function P_CheckMissileRange
	.p2align	4, 0x90
_P_CheckMissileRange:                   ## @P_CheckMissileRange
	.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
	movq	24(%rdi), %rsi
	callq	_P_CheckSight
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.1:
	movl	(%rbx), %ecx
	movq	_MF_JUSTHIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%ecx, %edx
	je	LBB0_3
## %bb.2:
	notl	%edx
	andl	%edx, %ecx
	movl	%ecx, (%rbx)
	movl	$1, %eax
	jmp	LBB0_11
LBB0_3:
	cmpq	$0, 48(%rbx)
	jne	LBB0_11
## %bb.4:
	movq	40(%rbx), %rdi
	movq	24(%rbx), %rax
	movq	32(%rbx), %rsi
	subq	8(%rax), %rdi
	subq	(%rax), %rsi
	callq	_P_AproxDistance
	movl	%eax, %ecx
	movq	_FRACUNIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	shll	$6, %eax
	subl	%eax, %ecx
	movq	8(%rbx), %rsi
	movq	16(%rbx), %rdi
	shll	$7, %edx
	negl	%edx
	xorl	%eax, %eax
	cmpl	$0, (%rdi)
	cmovnel	%eax, %edx
	addl	%ecx, %edx
	movq	_MT_VILE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	jne	LBB0_6
## %bb.5:
	cmpl	$58785791, %edx                 ## imm = 0x380FFFF
	jg	LBB0_11
LBB0_6:
	movq	_MT_UNDEAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	jne	LBB0_7
## %bb.8:
	cmpl	$12845056, %edx                 ## imm = 0xC40000
	jl	LBB0_11
## %bb.9:
	shrl	$17, %edx
	jmp	LBB0_10
LBB0_7:
	sarl	$16, %edx
LBB0_10:
	movq	_MT_CYBORG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rsi
	sete	%dil
	movq	_MT_SPIDER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	sete	%bl
	movq	_MT_SKULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	sete	%cl
	orb	%bl, %cl
	orb	%dil, %cl
	sarl	%cl, %edx
	cmpl	$200, %edx
	movl	$200, %ecx
	cmovll	%edx, %ecx
	cmpl	$161, %ecx
	movl	$160, %ebx
	cmovll	%ecx, %ebx
	cmpq	%rax, %rsi
	cmovnel	%ecx, %ebx
	xorl	%eax, %eax
	callq	_P_Random
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%ebx, %ecx
	setge	%al
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MF_JUSTHIT,4,2                 ## @MF_JUSTHIT
	.comm	_FRACUNIT,4,2                   ## @FRACUNIT
	.comm	_MT_VILE,8,3                    ## @MT_VILE
	.comm	_MT_UNDEAD,8,3                  ## @MT_UNDEAD
	.comm	_MT_CYBORG,8,3                  ## @MT_CYBORG
	.comm	_MT_SPIDER,8,3                  ## @MT_SPIDER
	.comm	_MT_SKULL,8,3                   ## @MT_SKULL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_P_CheckMissileRange            ; -- Begin function P_CheckMissileRange
	.p2align	2
_P_CheckMissileRange:                   ; @P_CheckMissileRange
	.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	x1, [x0, #24]
	bl	_P_CheckSight
	cbz	w0, LBB0_11
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _MF_JUSTHIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MF_JUSTHIT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	bic	w8, w8, w9
	str	w8, [x19]
	mov	w0, #1
	b	LBB0_11
LBB0_3:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_5
LBB0_4:
	mov	w0, #0
	b	LBB0_11
LBB0_5:
	ldp	x10, x8, [x19, #32]
	ldr	x9, [x19, #24]
	ldp	x9, x11, [x9]
	sub	x0, x8, x11
	sub	x1, x10, x9
	bl	_P_AproxDistance
	mov	x8, x0
	mov	w0, #0
Lloh3:
	adrp	x10, _FRACUNIT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _FRACUNIT@GOTPAGEOFF]
	ldp	x9, x11, [x19, #8]
	ldr	w11, [x11]
	cmp	w11, #0
Lloh5:
	ldr	w10, [x10]
	sub	w8, w8, w10, lsl #6
	lsl	w10, w10, #7
	csneg	w10, wzr, w10, ne
	add	w8, w8, w10
Lloh6:
	adrp	x10, _MT_VILE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MT_VILE@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	mov	w10, #58785791
	ccmp	w8, w10, #4, eq
	b.gt	LBB0_11
; %bb.6:
Lloh9:
	adrp	x10, _MT_UNDEAD@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MT_UNDEAD@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.7:
	cmp	w8, #3136, lsl #12              ; =12845056
	b.lt	LBB0_4
; %bb.8:
	lsr	w8, w8, #17
	b	LBB0_10
LBB0_9:
	asr	w8, w8, #16
LBB0_10:
Lloh12:
	adrp	x10, _MT_CYBORG@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MT_CYBORG@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x9, x10
	cset	w10, eq
Lloh15:
	adrp	x11, _MT_SPIDER@GOTPAGE
Lloh16:
	ldr	x11, [x11, _MT_SPIDER@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
	cmp	x9, x11
	cset	w11, eq
	orr	w11, w10, w11
Lloh18:
	adrp	x12, _MT_SKULL@GOTPAGE
Lloh19:
	ldr	x12, [x12, _MT_SKULL@GOTPAGEOFF]
Lloh20:
	ldr	x12, [x12]
	cmp	x9, x12
	cset	w9, eq
	orr	w9, w11, w9
	asr	w8, w8, w9
	mov	w9, #200
	cmp	w8, #200
	csel	w8, w8, w9, lt
	cmp	w8, #160
	cset	w9, gt
	tst	w10, w9
	mov	w9, #160
	csel	w19, w9, w8, ne
	bl	_P_Random
	cmp	w0, w19
	cset	w0, ge
LBB0_11:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MF_JUSTHIT,4,2                 ; @MF_JUSTHIT
	.comm	_FRACUNIT,4,2                   ; @FRACUNIT
	.comm	_MT_VILE,8,3                    ; @MT_VILE
	.comm	_MT_UNDEAD,8,3                  ; @MT_UNDEAD
	.comm	_MT_CYBORG,8,3                  ; @MT_CYBORG
	.comm	_MT_SPIDER,8,3                  ; @MT_SPIDER
	.comm	_MT_SKULL,8,3                   ; @MT_SKULL
.subsections_via_symbols
