	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotSortTeamMatesByTaskPreference ## -- Begin function BotSortTeamMatesByTaskPreference
	.p2align	4, 0x90
_BotSortTeamMatesByTaskPreference:      ## @BotSortTeamMatesByTaskPreference
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_CLIENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	shlq	$2, %r13
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	jle	LBB0_1
## %bb.2:
	movl	%r14d, %r15d
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx,%r13,4), %ecx
	movl	%r14d, %eax
	leal	1(%r14), %esi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movl	%esi, %r14d
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	cltq
	movl	%ecx, (%rdx,%rax,4)
	incq	%r13
	cmpq	%r13, %r15
	je	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r13,4), %esi
	movq	%r12, %rdi
	callq	_BotGetTeamMateTaskPreference
	movq	_TEAMTP_DEFENDER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx,%r13,4), %ecx
	movq	_TEAMTP_ATTACKER@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%edx, %eax
	leal	1(%rdx), %esi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%edx, %eax
	leal	1(%rdx), %esi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
LBB0_1:
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_9:
	movslq	%r14d, %r14
	leal	(,%r14,4), %edx
	movq	%rbx, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	leaq	(%rbx,%r14,4), %rdi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	leal	(,%r15,4), %edx
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	addl	%r14d, %r15d
	movslq	%r15d, %rax
	leaq	(%rbx,%rax,4), %rdi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	leal	(,%rbx,4), %edx
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcpy
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	addl	%ebx, %r15d
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CLIENTS,4,2                ## @MAX_CLIENTS
	.comm	_TEAMTP_DEFENDER,4,2            ## @TEAMTP_DEFENDER
	.comm	_TEAMTP_ATTACKER,4,2            ## @TEAMTP_ATTACKER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BotSortTeamMatesByTaskPreference ; -- Begin function BotSortTeamMatesByTaskPreference
	.p2align	2
_BotSortTeamMatesByTaskPreference:      ; @BotSortTeamMatesByTaskPreference
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAX_CLIENTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_CLIENTS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x21, x9, x12
	mov	sp, x21
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x20, x9, x12
	mov	sp, x20
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x23, x8, x12
	mov	sp, x23
	cmp	w2, #1
	stur	x1, [x29, #-96]                 ; 8-byte Folded Spill
	b.lt	LBB0_6
; %bb.1:
	mov	w25, #0
	mov	w26, #0
	mov	w24, #0
Lloh12:
	adrp	x27, _TEAMTP_DEFENDER@GOTPAGE
Lloh13:
	ldr	x27, [x27, _TEAMTP_DEFENDER@GOTPAGEOFF]
	mov	x19, x1
	mov	w28, w2
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh14:
	adrp	x8, _TEAMTP_ATTACKER@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TEAMTP_ATTACKER@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w0
	ldr	w8, [x19]
	csel	w9, w25, w24, eq
	csel	x10, x23, x20, eq
	cinc	w24, w24, ne
	cinc	w25, w25, eq
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x10, w9, sxtw #2]
	add	x19, x19, #4
	subs	x28, x28, #1
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19]
	mov	x0, x22
	bl	_BotGetTeamMateTaskPreference
	ldr	w8, [x27]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	mov	x9, x26
	add	w26, w26, #1
	mov	x10, x21
	b	LBB0_3
LBB0_6:
	mov	w24, #0
	mov	w26, #0
	mov	w25, #0
LBB0_7:
	lsl	w2, w26, #2
	ldur	x22, [x29, #-96]                ; 8-byte Folded Reload
	mov	x0, x22
	mov	x1, x21
	bl	_memcpy
	lsl	w2, w25, #2
	add	x0, x22, w26, sxtw #2
	mov	x1, x23
	bl	_memcpy
	add	w19, w25, w26
	add	x0, x22, w19, sxtw #2
	lsl	w2, w24, #2
	mov	x1, x20
	bl	_memcpy
	ldur	x8, [x29, #-88]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	add	w0, w19, w24
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CLIENTS,4,2                ; @MAX_CLIENTS
	.comm	_TEAMTP_DEFENDER,4,2            ; @TEAMTP_DEFENDER
	.comm	_TEAMTP_ATTACKER,4,2            ; @TEAMTP_ATTACKER
.subsections_via_symbols
