	.file	"extr_g_client.c_PickTeam.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	PickTeam
	.type	PickTeam, @function
PickTeam:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	.cfi_offset 13, -24
	mov	r13d, edi
	push	r12
	push	rbx
	sub	rsp, 24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR TEAM_NUM_TEAMS[rip]
	mov	rsi, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L13:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L13
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L14
.L4:
	mov	r12, QWORD PTR TEAM_BLUE[rip]
	mov	edi, r13d
	mov	rbx, rsp
	mov	rsi, r12
	call	TeamCount@PLT
	mov	edi, r13d
	mov	DWORD PTR [rbx+r12*4], eax
	mov	r12, QWORD PTR TEAM_RED[rip]
	mov	rsi, r12
	call	TeamCount@PLT
	mov	rdx, QWORD PTR TEAM_RED[rip]
	mov	DWORD PTR [rbx+r12*4], eax
	mov	rax, QWORD PTR TEAM_BLUE[rip]
	mov	ecx, DWORD PTR [rbx+rdx*4]
	cmp	DWORD PTR [rbx+rax*4], ecx
	jg	.L7
	jl	.L1
	mov	rcx, QWORD PTR level[rip]
	mov	rbx, QWORD PTR [rcx+rdx*8]
	cmp	QWORD PTR [rcx+rax*8], rbx
	cmovg	rax, rdx
.L1:
	mov	rcx, QWORD PTR -40[rbp]
	xor	rcx, QWORD PTR fs:40
	jne	.L15
	lea	rsp, -24[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rax, rdx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	PickTeam, .-PickTeam
	.comm	level,8,8
	.comm	TEAM_RED,8,8
	.comm	TEAM_NUM_TEAMS,4,4
	.comm	TEAM_BLUE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_g_client.c_PickTeam.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	PickTeam
	.syntax unified
	.arm
	.fpu softvfp
	.type	PickTeam, %function
PickTeam:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #12
	ldr	r3, .L8
	ldr	r6, .L8+4
	ldr	r3, [r3]
	ldr	r7, [r6]
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L8+8
	mov	r1, r7
	mov	r5, r0
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	TeamCount
	mov	r4, sp
	mov	r3, r0
	ldr	r8, .L8+12
	mov	r0, r5
	ldr	r5, [r8]
	str	r3, [r4, r7, lsl #2]
	mov	r1, r5
	bl	TeamCount
	ldr	r3, [r6]
	ldr	r2, [r8]
	str	r0, [r4, r5, lsl #2]
	ldr	r0, [r4, r3, lsl #2]
	ldr	r1, [r4, r2, lsl #2]
	cmp	r0, r1
	movgt	r3, r2
	bgt	.L1
	blt	.L1
	ldr	r1, .L8+16
	ldr	r1, [r1]
	ldr	r0, [r1, r3, lsl #2]
	ldr	r1, [r1, r2, lsl #2]
	cmp	r0, r1
	movgt	r3, r2
.L1:
	ldr	r2, .L8+8
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	bne	.L7
	mov	r0, r3
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L7:
	bl	__stack_chk_fail
.L9:
	.align	2
.L8:
	.word	TEAM_NUM_TEAMS
	.word	TEAM_BLUE
	.word	.LC0
	.word	TEAM_RED
	.word	level
	.size	PickTeam, .-PickTeam
	.comm	level,4,4
	.comm	TEAM_RED,4,4
	.comm	TEAM_NUM_TEAMS,4,4
	.comm	TEAM_BLUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
