	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CheckAlmostCapture             ## -- Begin function CheckAlmostCapture
	.p2align	4, 0x90
_CheckAlmostCapture:                    ## @CheckAlmostCapture
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	16(%rax), %rcx
	movq	_PW_REDFLAG@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	$0, (%rcx,%rdx,8)
	jne	LBB0_3
## %bb.1:
	movq	_PW_BLUEFLAG@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	$0, (%rcx,%rdx,8)
	jne	LBB0_3
## %bb.2:
	movq	_PW_NEUTRALFLAG@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	$0, (%rcx,%rdx,8)
	je	LBB0_10
LBB0_3:
	movq	_g_gametype@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_GT_CTF@GOTPCREL(%rip), %rdx
	movq	24(%rax), %rax
	movq	_TEAM_BLUE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	leaq	L_.str(%rip), %r12
	leaq	L_.str.1(%rip), %rax
	movq	%rax, %rsi
	cmoveq	%r12, %rsi
	cmoveq	%rax, %r12
	cmpq	(%rdx), %rcx
	cmoveq	%rsi, %r12
	xorl	%ebx, %ebx
	movq	_FL_DROPPED_ITEM@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_FOFS
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_G_Find
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	movl	(%r13), %eax
	testl	%eax, (%rbx)
	jne	LBB0_4
## %bb.6:
	movq	_SVF_NOCLIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 20(%rbx)
	jne	LBB0_10
## %bb.7:
	movq	8(%r15), %rax
	movl	8(%rax), %edi
	movl	16(%rbx), %esi
	callq	_VectorSubtract
	callq	_VectorLength
	cmpl	$199, %eax
	jg	LBB0_10
## %bb.8:
	movq	_PLAYEREVENT_HOLYSHIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%r15), %rcx
	movq	(%rcx), %rsi
	movq	_PERS_PLAYEREVENTS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, (%rsi,%rcx,4)
	movq	8(%r14), %rdx
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.9:
	movl	(%rax), %eax
	movq	(%rdx), %rdx
	xorl	%eax, (%rdx,%rcx,4)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PW_REDFLAG,8,3                 ## @PW_REDFLAG
	.comm	_PW_BLUEFLAG,8,3                ## @PW_BLUEFLAG
	.comm	_PW_NEUTRALFLAG,8,3             ## @PW_NEUTRALFLAG
	.comm	_g_gametype,8,3                 ## @g_gametype
	.comm	_GT_CTF,8,3                     ## @GT_CTF
	.comm	_TEAM_BLUE,8,3                  ## @TEAM_BLUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"team_CTF_blueflag"

L_.str.1:                               ## @.str.1
	.asciz	"team_CTF_redflag"

	.comm	_FL_DROPPED_ITEM,4,2            ## @FL_DROPPED_ITEM
	.comm	_SVF_NOCLIENT,4,2               ## @SVF_NOCLIENT
	.comm	_PLAYEREVENT_HOLYSHIT,4,2       ## @PLAYEREVENT_HOLYSHIT
	.comm	_PERS_PLAYEREVENTS,8,3          ## @PERS_PLAYEREVENTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CheckAlmostCapture             ; -- Begin function CheckAlmostCapture
	.p2align	2
_CheckAlmostCapture:                    ; @CheckAlmostCapture
	.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	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x9, [x8, #16]
Lloh0:
	adrp	x10, _PW_REDFLAG@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PW_REDFLAG@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	ldr	x10, [x9, x10, lsl #3]
	cbnz	x10, LBB0_3
; %bb.1:
Lloh3:
	adrp	x10, _PW_BLUEFLAG@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PW_BLUEFLAG@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	ldr	x10, [x9, x10, lsl #3]
	cbnz	x10, LBB0_3
; %bb.2:
Lloh6:
	adrp	x10, _PW_NEUTRALFLAG@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PW_NEUTRALFLAG@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	cbz	x9, LBB0_10
LBB0_3:
	mov	x21, #0
Lloh9:
	adrp	x9, _g_gametype@GOTPAGE
Lloh10:
	ldr	x9, [x9, _g_gametype@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _GT_CTF@GOTPAGE
Lloh13:
	ldr	x10, [x10, _GT_CTF@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	ldr	x8, [x8, #24]
Lloh15:
	adrp	x11, _TEAM_BLUE@GOTPAGE
Lloh16:
	ldr	x11, [x11, _TEAM_BLUE@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
Lloh18:
	adrp	x12, l_.str.1@PAGE
Lloh19:
	add	x12, x12, l_.str.1@PAGEOFF
Lloh20:
	adrp	x13, l_.str@PAGE
Lloh21:
	add	x13, x13, l_.str@PAGEOFF
	cmp	x8, x11
	csel	x8, x13, x12, eq
	csel	x11, x12, x13, eq
	cmp	x9, x10
	csel	x22, x8, x11, eq
Lloh22:
	adrp	x23, _FL_DROPPED_ITEM@GOTPAGE
Lloh23:
	ldr	x23, [x23, _FL_DROPPED_ITEM@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_FOFS
	mov	x1, x0
	mov	x0, x21
	mov	x2, x22
	bl	_G_Find
	cbz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x0
	ldr	w8, [x0]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.6:
	ldr	w8, [x21, #20]
Lloh24:
	adrp	x9, _SVF_NOCLIENT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SVF_NOCLIENT@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.7:
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #8]
	ldr	w1, [x21, #16]
	bl	_VectorSubtract
	bl	_VectorLength
	cmp	w0, #199
	b.gt	LBB0_10
; %bb.8:
Lloh27:
	adrp	x8, _PLAYEREVENT_HOLYSHIT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PLAYEREVENT_HOLYSHIT@GOTPAGEOFF]
	ldr	w10, [x8]
	ldr	x9, [x20, #8]
	ldr	x11, [x9]
Lloh29:
	adrp	x9, _PERS_PLAYEREVENTS@GOTPAGE
Lloh30:
	ldr	x9, [x9, _PERS_PLAYEREVENTS@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	lsl	x9, x9, #2
	ldr	w12, [x11, x9]
	eor	w10, w12, w10
	str	w10, [x11, x9]
	ldr	x10, [x19, #8]
	cbz	x10, LBB0_10
; %bb.9:
	ldr	w8, [x8]
	ldr	x10, [x10]
	ldr	w11, [x10, x9]
	eor	w8, w11, w8
	str	w8, [x10, x9]
LBB0_10:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_PW_REDFLAG,8,3                 ; @PW_REDFLAG
	.comm	_PW_BLUEFLAG,8,3                ; @PW_BLUEFLAG
	.comm	_PW_NEUTRALFLAG,8,3             ; @PW_NEUTRALFLAG
	.comm	_g_gametype,8,3                 ; @g_gametype
	.comm	_GT_CTF,8,3                     ; @GT_CTF
	.comm	_TEAM_BLUE,8,3                  ; @TEAM_BLUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"team_CTF_blueflag"

l_.str.1:                               ; @.str.1
	.asciz	"team_CTF_redflag"

	.comm	_FL_DROPPED_ITEM,4,2            ; @FL_DROPPED_ITEM
	.comm	_SVF_NOCLIENT,4,2               ; @SVF_NOCLIENT
	.comm	_PLAYEREVENT_HOLYSHIT,4,2       ; @PLAYEREVENT_HOLYSHIT
	.comm	_PERS_PLAYEREVENTS,8,3          ; @PERS_PLAYEREVENTS
.subsections_via_symbols
