	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotDeathmatchAI                ## -- Begin function BotDeathmatchAI
	.p2align	4, 0x90
_BotDeathmatchAI:                       ## @BotDeathmatchAI
	.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
	subq	$312, %rsp                      ## imm = 0x138
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	%rsp, -344(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_INFO_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	(%r13), %rax
	testq	%rax, %rax
	jle	LBB0_8
## %bb.1:
	leaq	-1(%rax), %rcx
	movq	%rcx, (%r13)
	cmpq	$1, %rax
	jne	LBB0_28
## %bb.2:
	movl	88(%r13), %edi
	movq	_CHARACTERISTIC_GENDER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-192(%rbp), %r12
	movq	%r12, %rdx
	movl	$144, %ecx
	callq	_trap_Characteristic_String
	movl	44(%r13), %edi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_trap_GetUserinfo
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_Info_SetValueForKey
	movl	44(%r13), %edi
	movq	%r14, %rsi
	callq	_trap_SetUserinfo
	movb	-192(%rbp), %cl
	cmpb	$102, %cl
	jne	LBB0_3
## %bb.4:
	movq	_CHAT_GENDERFEMALE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_CHAT_GENDERLESS@GOTPCREL(%rip), %rax
LBB0_5:
	movl	84(%r13), %edi
	cmpb	$109, %cl
	jne	LBB0_7
## %bb.6:
	movq	_CHAT_GENDERMALE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	callq	_trap_BotSetChatGender
	movl	44(%r13), %edi
	leaq	-336(%rbp), %r14
	movq	%r14, %rsi
	movl	$144, %edx
	callq	_ClientName
	movl	44(%r13), %edx
	movl	84(%r13), %edi
	movq	%r14, %rsi
	callq	_trap_BotSetChatName
	movq	16(%r13), %rax
	movq	32(%r13), %rcx
	movq	_INVENTORY_HEALTH@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rcx,%rdx,4), %ecx
	movl	%ecx, 40(%r13)
	movq	_PERS_HITS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 24(%r13)
	movq	$0, (%r13)
	xorl	%eax, %eax
	callq	_BotSetupAlternativeRouteGoals
LBB0_8:
	movq	_BFL_IDEALVIEWSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 80(%r13)
	movq	%r13, %rdi
	callq	_BotIntermission
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	callq	_BotSetTeleportTime
	movq	%r13, %rdi
	callq	_BotUpdateInventory
	movq	%r13, %rdi
	callq	_BotCheckSnapshot
	movq	%r13, %rdi
	callq	_BotCheckAir
LBB0_10:
	movq	%r13, %rdi
	callq	_BotCheckConsoleMessages
	movq	%r13, %rdi
	callq	_BotIntermission
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movq	%r13, %rdi
	callq	_BotIsObserver
	testl	%eax, %eax
	je	LBB0_12
LBB0_13:
	cmpq	$0, 56(%r13)
	je	LBB0_14
LBB0_15:
	cmpq	$0, 64(%r13)
	jne	LBB0_20
	jmp	LBB0_16
LBB0_12:
	movq	%r13, %rdi
	callq	_BotTeamAI
	cmpq	$0, 56(%r13)
	jne	LBB0_15
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_AIEnter_Seek_LTG
	cmpq	$0, 64(%r13)
	jne	LBB0_20
LBB0_16:
	movl	8(%r13), %ebx
	xorl	%eax, %eax
	callq	_FloatTime
	addl	$-8, %eax
	cmpl	%eax, %ebx
	jle	LBB0_20
## %bb.17:
	movq	%r13, %rdi
	callq	_BotChat_EnterGame
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	xorl	%eax, %eax
	callq	_FloatTime
	movslq	%eax, %rbx
	movq	%r13, %rdi
	callq	_BotChatTime
	addq	%rbx, %rax
	movq	%rax, 72(%r13)
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_AIEnter_Stand
LBB0_19:
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 64(%r13)
LBB0_20:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_BotResetNodeSwitches
	movq	_MAX_NODESWITCHES@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_24
## %bb.21:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	*56(%r13)
	testq	%rax, %rax
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_22
LBB0_24:
	cmpl	$0, 52(%r13)
	je	LBB0_28
## %bb.25:
	cmpl	(%r12), %ebx
	jl	LBB0_27
## %bb.26:
	movl	48(%r13), %edi
	callq	_trap_BotDumpGoalStack
	movl	48(%r13), %edi
	callq	_trap_BotDumpAvoidGoals
	movq	%r13, %rdi
	callq	_BotDumpNodeSwitches
	movl	44(%r13), %edi
	leaq	-336(%rbp), %r14
	movq	%r14, %rsi
	movl	$144, %edx
	callq	_ClientName
	movq	_PRT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_FloatTime
	movl	(%r12), %r8d
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	movq	%r14, %rdx
	movl	%eax, %ecx
	callq	_BotAI_Print
LBB0_27:
	movq	16(%r13), %rax
	movq	32(%r13), %rcx
	movq	_INVENTORY_HEALTH@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rcx,%rdx,4), %ecx
	movl	%ecx, 40(%r13)
	movq	_PERS_HITS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 24(%r13)
LBB0_28:
	movq	-344(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_30
## %bb.29:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_INFO_STRING,4,2            ## @MAX_INFO_STRING
	.comm	_CHARACTERISTIC_GENDER,4,2      ## @CHARACTERISTIC_GENDER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sex"

	.comm	_CHAT_GENDERMALE,4,2            ## @CHAT_GENDERMALE
	.comm	_CHAT_GENDERFEMALE,4,2          ## @CHAT_GENDERFEMALE
	.comm	_CHAT_GENDERLESS,4,2            ## @CHAT_GENDERLESS
	.comm	_INVENTORY_HEALTH,8,3           ## @INVENTORY_HEALTH
	.comm	_PERS_HITS,8,3                  ## @PERS_HITS
	.comm	_BFL_IDEALVIEWSET,4,2           ## @BFL_IDEALVIEWSET
L_.str.1:                               ## @.str.1
	.asciz	"BotDeathmatchAI: no ai node"

L_.str.2:                               ## @.str.2
	.asciz	"BotDeathmatchAI: chat enter game"

	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_MAX_NODESWITCHES,4,2           ## @MAX_NODESWITCHES
	.comm	_PRT_ERROR,4,2                  ## @PRT_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"%s at %1.1f switched more than %d AI nodes\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotDeathmatchAI                ; -- Begin function BotDeathmatchAI
	.p2align	2
_BotDeathmatchAI:                       ; @BotDeathmatchAI
	.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
	sub	sp, sp, #304
	mov	x19, sp
	mov	x20, x0
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAX_INFO_STRING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_INFO_STRING@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x9, x22
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x22, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
	ldr	x8, [x0]
	subs	x8, x8, #1
	b.lt	LBB0_3
; %bb.1:
	str	x8, [x20]
	b.ne	LBB0_24
; %bb.2:
	ldr	w0, [x20, #88]
Lloh8:
	adrp	x8, _CHARACTERISTIC_GENDER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CHARACTERISTIC_GENDER@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, x19, #152
	mov	w3, #144
	bl	_trap_Characteristic_String
	ldr	w0, [x20, #44]
	mov	x1, x21
	mov	x2, x22
	bl	_trap_GetUserinfo
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, x19, #152
	mov	x0, x21
	bl	_Info_SetValueForKey
	ldr	w0, [x20, #44]
	mov	x1, x21
	bl	_trap_SetUserinfo
	ldrb	w8, [x19, #152]
Lloh13:
	adrp	x9, _CHAT_GENDERMALE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CHAT_GENDERMALE@GOTPAGEOFF]
Lloh15:
	adrp	x10, _CHAT_GENDERFEMALE@GOTPAGE
Lloh16:
	ldr	x10, [x10, _CHAT_GENDERFEMALE@GOTPAGEOFF]
Lloh17:
	adrp	x11, _CHAT_GENDERLESS@GOTPAGE
Lloh18:
	ldr	x11, [x11, _CHAT_GENDERLESS@GOTPAGEOFF]
	ldr	w0, [x20, #84]
	cmp	w8, #102
	csel	x10, x10, x11, eq
	cmp	w8, #109
	csel	x8, x9, x10, eq
	ldr	w1, [x8]
	bl	_trap_BotSetChatGender
	ldr	w0, [x20, #44]
	add	x1, x19, #8
	mov	w2, #144
	bl	_ClientName
	ldr	w0, [x20, #84]
	ldr	w2, [x20, #44]
	add	x1, x19, #8
	bl	_trap_BotSetChatName
	ldr	x8, [x20, #32]
Lloh19:
	adrp	x9, _INVENTORY_HEALTH@GOTPAGE
Lloh20:
	ldr	x9, [x9, _INVENTORY_HEALTH@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x20, #40]
Lloh22:
	adrp	x8, _PERS_HITS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PERS_HITS@GOTPAGEOFF]
	ldr	x9, [x20, #16]
Lloh24:
	ldr	x8, [x8]
	ldr	w8, [x9, x8, lsl #2]
	str	w8, [x20, #24]
	str	xzr, [x20]
	bl	_BotSetupAlternativeRouteGoals
LBB0_3:
Lloh25:
	adrp	x8, _BFL_IDEALVIEWSET@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BFL_IDEALVIEWSET@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	w9, [x20, #80]
	bic	w8, w9, w8
	str	w8, [x20, #80]
	mov	x0, x20
	bl	_BotIntermission
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_BotSetTeleportTime
	mov	x0, x20
	bl	_BotUpdateInventory
	mov	x0, x20
	bl	_BotCheckSnapshot
	mov	x0, x20
	bl	_BotCheckAir
LBB0_5:
	mov	x0, x20
	bl	_BotCheckConsoleMessages
	mov	x0, x20
	bl	_BotIntermission
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_BotIsObserver
	cbz	w0, LBB0_9
LBB0_7:
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_10
LBB0_8:
	ldr	x8, [x20, #64]
	cbnz	x8, LBB0_15
	b	LBB0_11
LBB0_9:
	mov	x0, x20
	bl	_BotTeamAI
	ldr	x8, [x20, #56]
	cbnz	x8, LBB0_8
LBB0_10:
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_AIEnter_Seek_LTG
	ldr	x8, [x20, #64]
	cbnz	x8, LBB0_15
LBB0_11:
	ldr	w21, [x20, #8]
	bl	_FloatTime
	sub	w8, w0, #8
	cmp	w21, w8
	b.le	LBB0_15
; %bb.12:
	mov	x0, x20
	bl	_BotChat_EnterGame
	cbz	x0, LBB0_14
; %bb.13:
	bl	_FloatTime
	mov	x21, x0
	mov	x0, x20
	bl	_BotChatTime
	add	x8, x0, w21, sxtw
	str	x8, [x20, #72]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_AIEnter_Stand
LBB0_14:
Lloh32:
	adrp	x8, _qtrue@GOTPAGE
Lloh33:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	str	x8, [x20, #64]
LBB0_15:
	bl	_BotResetNodeSwitches
Lloh35:
	adrp	x22, _MAX_NODESWITCHES@GOTPAGE
Lloh36:
	ldr	x22, [x22, _MAX_NODESWITCHES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.16:
	mov	w21, #0
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #56]
	mov	x0, x20
	blr	x8
	cbnz	x0, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_17
LBB0_19:
	ldr	w8, [x20, #52]
	cbnz	w8, LBB0_21
	b	LBB0_24
LBB0_20:
	mov	w21, #0
	ldr	w8, [x20, #52]
	cbz	w8, LBB0_24
LBB0_21:
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_23
; %bb.22:
	ldr	w0, [x20, #48]
	bl	_trap_BotDumpGoalStack
	ldr	w0, [x20, #48]
	bl	_trap_BotDumpAvoidGoals
	mov	x0, x20
	bl	_BotDumpNodeSwitches
	ldr	w0, [x20, #44]
	add	x1, x19, #8
	mov	w2, #144
	bl	_ClientName
Lloh37:
	adrp	x8, _PRT_ERROR@GOTPAGE
Lloh38:
	ldr	x8, [x8, _PRT_ERROR@GOTPAGEOFF]
Lloh39:
	ldr	w21, [x8]
	bl	_FloatTime
	mov	x3, x0
	ldr	w4, [x22]
Lloh40:
	adrp	x1, l_.str.3@PAGE
Lloh41:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, x19, #8
	mov	x0, x21
	bl	_BotAI_Print
LBB0_23:
Lloh42:
	adrp	x8, _INVENTORY_HEALTH@GOTPAGE
Lloh43:
	ldr	x8, [x8, _INVENTORY_HEALTH@GOTPAGEOFF]
	ldr	x9, [x20, #32]
Lloh44:
	ldr	x8, [x8]
	ldr	w8, [x9, x8, lsl #2]
	str	w8, [x20, #40]
	ldr	x8, [x20, #16]
Lloh45:
	adrp	x9, _PERS_HITS@GOTPAGE
Lloh46:
	ldr	x9, [x9, _PERS_HITS@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x20, #24]
LBB0_24:
	mov	sp, x23
	ldur	x8, [x29, #-56]
Lloh48:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh49:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh50:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	sub	sp, x29, #48
	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
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_INFO_STRING,4,2            ; @MAX_INFO_STRING
	.comm	_CHARACTERISTIC_GENDER,4,2      ; @CHARACTERISTIC_GENDER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sex"

	.comm	_CHAT_GENDERMALE,4,2            ; @CHAT_GENDERMALE
	.comm	_CHAT_GENDERFEMALE,4,2          ; @CHAT_GENDERFEMALE
	.comm	_CHAT_GENDERLESS,4,2            ; @CHAT_GENDERLESS
	.comm	_INVENTORY_HEALTH,8,3           ; @INVENTORY_HEALTH
	.comm	_PERS_HITS,8,3                  ; @PERS_HITS
	.comm	_BFL_IDEALVIEWSET,4,2           ; @BFL_IDEALVIEWSET
l_.str.1:                               ; @.str.1
	.asciz	"BotDeathmatchAI: no ai node"

l_.str.2:                               ; @.str.2
	.asciz	"BotDeathmatchAI: chat enter game"

	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_MAX_NODESWITCHES,4,2           ; @MAX_NODESWITCHES
	.comm	_PRT_ERROR,4,2                  ; @PRT_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"%s at %1.1f switched more than %d AI nodes\n"

.subsections_via_symbols
