	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_A_Chase                        ## -- Begin function A_Chase
	.p2align	4, 0x90
_A_Chase:                               ## @A_Chase
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	48(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	decq	%rax
	movq	%rax, 48(%rbx)
LBB0_2:
	movq	40(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	32(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.5:
	decq	%rax
	xorl	%ecx, %ecx
	cmpq	$0, (%rdx)
	cmovgq	%rax, %rcx
	jmp	LBB0_6
LBB0_4:
	xorl	%ecx, %ecx
LBB0_6:
	movq	%rcx, 40(%rbx)
LBB0_7:
	movl	(%rbx), %eax
	cmpl	$7, %eax
	jg	LBB0_12
## %bb.8:
	movl	$-536870912, %ecx               ## imm = 0xE0000000
	andl	4(%rbx), %ecx
	movl	%ecx, 4(%rbx)
	shll	$29, %eax
	movl	%ecx, %edx
	subl	%eax, %edx
	movl	$-2, %esi
	testl	%edx, %edx
	jle	LBB0_9
LBB0_11:
	movq	_ANG90@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	%esi
	addl	%ecx, %eax
	movl	%eax, 4(%rbx)
	jmp	LBB0_12
LBB0_9:
	js	LBB0_10
LBB0_12:
	movq	32(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_MF_SHOOTABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%rax)
	je	LBB0_14
## %bb.16:
	movl	8(%rbx), %eax
	movq	_MF_JUSTATTACKED@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	testl	%eax, %ecx
	je	LBB0_20
## %bb.17:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 8(%rbx)
	movq	_gameskill@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_sk_nightmare@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_41
## %bb.18:
	movq	_fastparm@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_41
## %bb.19:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_P_NewChaseDir                  ## TAILCALL
LBB0_14:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_P_LookForPlayers
	testq	%rax, %rax
	je	LBB0_15
LBB0_41:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_15:
	movq	24(%rbx), %rax
	movq	32(%rax), %rsi
	jmp	LBB0_25
LBB0_20:
	movq	24(%rbx), %rcx
	cmpq	$0, 16(%rcx)
	je	LBB0_26
## %bb.21:
	movq	%rbx, %rdi
	callq	_P_CheckMeleeRange
	movq	24(%rbx), %rcx
	testq	%rax, %rax
	je	LBB0_26
## %bb.22:
	movq	24(%rcx), %rsi
	testq	%rsi, %rsi
	je	LBB0_24
## %bb.23:
	movq	%rbx, %rdi
	callq	_S_StartSound
	movq	24(%rbx), %rcx
LBB0_24:
	movq	16(%rcx), %rsi
LBB0_25:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_P_SetMobjState                 ## TAILCALL
LBB0_26:
	cmpq	$0, 8(%rcx)
	je	LBB0_32
## %bb.27:
	movq	_gameskill@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_sk_nightmare@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_30
## %bb.28:
	movq	_fastparm@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_30
## %bb.29:
	cmpq	$0, 16(%rbx)
	jne	LBB0_32
LBB0_30:
	movq	%rbx, %rdi
	callq	_P_CheckMissileRange
	testl	%eax, %eax
	je	LBB0_32
## %bb.31:
	movq	24(%rbx), %rax
	movq	8(%rax), %rsi
	movq	%rbx, %rdi
	callq	_P_SetMobjState
	movl	(%r14), %eax
	orl	%eax, 8(%rbx)
	jmp	LBB0_41
LBB0_10:
	movl	$2, %esi
	jmp	LBB0_11
LBB0_32:
	movq	_netgame@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_36
## %bb.33:
	cmpq	$0, 40(%rbx)
	jne	LBB0_36
## %bb.34:
	movq	32(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_P_CheckSight
	testl	%eax, %eax
	jne	LBB0_36
## %bb.35:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_P_LookForPlayers
	testq	%rax, %rax
	jne	LBB0_41
LBB0_36:
	movq	16(%rbx), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, 16(%rbx)
	testq	%rax, %rax
	jle	LBB0_38
## %bb.37:
	movq	%rbx, %rdi
	callq	_P_Move
	testl	%eax, %eax
	jne	LBB0_39
LBB0_38:
	movq	%rbx, %rdi
	callq	_P_NewChaseDir
LBB0_39:
	movq	24(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_41
## %bb.40:
	xorl	%eax, %eax
	callq	_P_Random
	cmpl	$2, %eax
	jg	LBB0_41
## %bb.42:
	movq	24(%rbx), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_S_StartSound                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ANG90,4,2                      ## @ANG90
	.comm	_MF_SHOOTABLE,4,2               ## @MF_SHOOTABLE
	.comm	_MF_JUSTATTACKED,4,2            ## @MF_JUSTATTACKED
	.comm	_gameskill,8,3                  ## @gameskill
	.comm	_sk_nightmare,8,3               ## @sk_nightmare
	.comm	_fastparm,4,2                   ## @fastparm
	.comm	_netgame,8,3                    ## @netgame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_A_Chase                        ; -- Begin function A_Chase
	.p2align	2
_A_Chase:                               ; @A_Chase
	.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	x8, [x0, #48]
	cbz	x8, LBB0_2
; %bb.1:
	sub	x8, x8, #1
	str	x8, [x19, #48]
LBB0_2:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_7
; %bb.3:
	ldr	x9, [x19, #32]
	cbz	x9, LBB0_5
; %bb.4:
	ldr	x9, [x9]
	sub	x8, x8, #1
	cmp	x9, #0
	csel	x8, x8, xzr, gt
	b	LBB0_6
LBB0_5:
	mov	x8, #0
LBB0_6:
	str	x8, [x19, #40]
LBB0_7:
	ldr	w9, [x19]
	cmp	w9, #7
	b.gt	LBB0_12
; %bb.8:
	ldr	w8, [x19, #4]
	and	w8, w8, #0xe0000000
	str	w8, [x19, #4]
	sub	w9, w8, w9, lsl #29
	cmp	w9, #0
	b.le	LBB0_11
; %bb.9:
	mov	w9, #-2
LBB0_10:
Lloh0:
	adrp	x10, _ANG90@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ANG90@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	sdiv	w9, w10, w9
	add	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_12
LBB0_11:
	tbnz	w9, #31, LBB0_31
LBB0_12:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_17
; %bb.13:
	ldr	w8, [x8, #8]
Lloh3:
	adrp	x9, _MF_SHOOTABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MF_SHOOTABLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.14:
	ldr	w8, [x19, #8]
Lloh6:
	adrp	x20, _MF_JUSTATTACKED@GOTPAGE
Lloh7:
	ldr	x20, [x20, _MF_JUSTATTACKED@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.15:
	bic	w8, w8, w9
	str	w8, [x19, #8]
Lloh8:
	adrp	x8, _gameskill@GOTPAGE
Lloh9:
	ldr	x8, [x8, _gameskill@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _sk_nightmare@GOTPAGE
Lloh12:
	ldr	x9, [x9, _sk_nightmare@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
Lloh14:
	adrp	x10, _fastparm@GOTPAGE
Lloh15:
	ldr	x10, [x10, _fastparm@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	cmp	x8, x9
	ccmp	w10, #0, #0, ne
	b.ne	LBB0_18
; %bb.16:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_P_NewChaseDir
LBB0_17:
	mov	x0, x19
	mov	w1, #1
	bl	_P_LookForPlayers
	cbz	x0, LBB0_19
LBB0_18:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_19:
	ldr	x8, [x19, #24]
	ldr	x1, [x8, #32]
	b	LBB0_25
LBB0_20:
	ldr	x8, [x19, #24]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_26
; %bb.21:
	mov	x0, x19
	bl	_P_CheckMeleeRange
	ldr	x8, [x19, #24]
	cbz	x0, LBB0_26
; %bb.22:
	ldr	x1, [x8, #24]
	cbz	x1, LBB0_24
; %bb.23:
	mov	x0, x19
	bl	_S_StartSound
	ldr	x8, [x19, #24]
LBB0_24:
	ldr	x1, [x8, #16]
LBB0_25:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_P_SetMobjState
LBB0_26:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_32
; %bb.27:
Lloh17:
	adrp	x8, _gameskill@GOTPAGE
Lloh18:
	ldr	x8, [x8, _gameskill@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _sk_nightmare@GOTPAGE
Lloh21:
	ldr	x9, [x9, _sk_nightmare@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
Lloh23:
	adrp	x10, _fastparm@GOTPAGE
Lloh24:
	ldr	x10, [x10, _fastparm@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	cmp	x8, x9
	ccmp	w10, #0, #0, lt
	b.ne	LBB0_29
; %bb.28:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_32
LBB0_29:
	mov	x0, x19
	bl	_P_CheckMissileRange
	cbz	w0, LBB0_32
; %bb.30:
	ldr	x8, [x19, #24]
	ldr	x1, [x8, #8]
	mov	x0, x19
	bl	_P_SetMobjState
	ldr	w8, [x20]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_18
LBB0_31:
	mov	w9, #2
	b	LBB0_10
LBB0_32:
Lloh26:
	adrp	x8, _netgame@GOTPAGE
Lloh27:
	ldr	x8, [x8, _netgame@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	cbz	x8, LBB0_36
; %bb.33:
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_36
; %bb.34:
	ldr	x1, [x19, #32]
	mov	x0, x19
	bl	_P_CheckSight
	cbnz	w0, LBB0_36
; %bb.35:
	mov	x0, x19
	mov	w1, #1
	bl	_P_LookForPlayers
	cbnz	x0, LBB0_18
LBB0_36:
	ldr	x8, [x19, #16]
	subs	x8, x8, #1
	str	x8, [x19, #16]
	b.lt	LBB0_38
; %bb.37:
	mov	x0, x19
	bl	_P_Move
	cbnz	w0, LBB0_39
LBB0_38:
	mov	x0, x19
	bl	_P_NewChaseDir
LBB0_39:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_18
; %bb.40:
	bl	_P_Random
	cmp	w0, #2
	b.gt	LBB0_18
; %bb.41:
	ldr	x8, [x19, #24]
	ldr	x1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_S_StartSound
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ANG90,4,2                      ; @ANG90
	.comm	_MF_SHOOTABLE,4,2               ; @MF_SHOOTABLE
	.comm	_MF_JUSTATTACKED,4,2            ; @MF_JUSTATTACKED
	.comm	_gameskill,8,3                  ; @gameskill
	.comm	_sk_nightmare,8,3               ; @sk_nightmare
	.comm	_fastparm,4,2                   ; @fastparm
	.comm	_netgame,8,3                    ; @netgame
.subsections_via_symbols
