	.file	"extr_ui_gameinfo.c_UI_GetCurrentGame.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"training"
.LC1:
	.string	"num"
.LC2:
	.string	"final"
	.text
	.p2align 4
	.globl	UI_GetCurrentGame
	.type	UI_GetCurrentGame, @function
UI_GetCurrentGame:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	rdi, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	DWORD PTR [rsp], 0
	call	UI_GetSpecialArenaInfo@PLT
	test	rax, rax
	je	.L6
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	lea	r13, 4[rsp]
	mov	rbp, rsp
	call	Info_ValueForKey@PLT
	mov	edi, eax
	call	atoi@PLT
	mov	rdx, r13
	mov	rsi, rbp
	mov	edi, eax
	mov	r12d, eax
	call	UI_GetBestScore@PLT
	mov	eax, DWORD PTR [rsp]
	test	eax, eax
	je	.L1
	cmp	eax, 1
	jg	.L1
.L6:
	mov	eax, DWORD PTR ui_numSinglePlayerArenas[rip]
	xor	r12d, r12d
	lea	r13, 4[rsp]
	mov	rbp, rsp
	test	eax, eax
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdx, r13
	mov	rsi, rbp
	mov	edi, r12d
	call	UI_GetBestScore@PLT
	mov	eax, DWORD PTR [rsp]
	test	eax, eax
	je	.L1
	cmp	eax, 1
	jg	.L1
	add	r12d, 1
	cmp	DWORD PTR ui_numSinglePlayerArenas[rip], r12d
	jg	.L3
.L4:
	lea	rdi, .LC2[rip]
	call	UI_GetSpecialArenaInfo@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L9
	lea	rsi, .LC1[rip]
	call	Info_ValueForKey@PLT
	mov	edi, eax
	call	atoi@PLT
	mov	r12d, eax
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	mov	r12d, -1
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	UI_GetCurrentGame, .-UI_GetCurrentGame
	.comm	ui_numSinglePlayerArenas,4,4
	.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_ui_gameinfo.c_UI_GetCurrentGame.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"training\000"
	.align	2
.LC1:
	.ascii	"num\000"
	.align	2
.LC2:
	.ascii	"final\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	UI_GetCurrentGame
	.syntax unified
	.arm
	.fpu softvfp
	.type	UI_GetCurrentGame, %function
UI_GetCurrentGame:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, lr}
	ldr	r2, .L15
	sub	sp, sp, #20
	ldr	r0, .L15+4
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	str	r3, [sp, #4]
	bl	UI_GetSpecialArenaInfo
	cmp	r0, #0
	beq	.L6
	ldr	r1, .L15+8
	bl	Info_ValueForKey
	bl	atoi
	add	r2, sp, #8
	add	r1, sp, #4
	mov	r4, r0
	bl	UI_GetBestScore
	ldr	r2, [sp, #4]
	cmp	r2, #1
	movle	r3, #0
	movgt	r3, #1
	cmp	r2, #0
	moveq	r3, #1
	cmp	r3, #0
	bne	.L1
.L6:
	ldr	r5, .L15+12
	ldr	r3, [r5]
	cmp	r3, #0
	movgt	r4, #0
	bgt	.L3
	b	.L4
.L13:
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L4
.L3:
	add	r2, sp, #8
	mov	r0, r4
	add	r1, sp, #4
	bl	UI_GetBestScore
	ldr	r2, [sp, #4]
	cmp	r2, #1
	movle	r3, #0
	movgt	r3, #1
	cmp	r2, #0
	moveq	r3, #1
	cmp	r3, #0
	beq	.L13
.L1:
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, pc}
.L4:
	ldr	r0, .L15+16
	bl	UI_GetSpecialArenaInfo
	cmp	r0, #0
	beq	.L9
	ldr	r1, .L15+8
	bl	Info_ValueForKey
	bl	atoi
	mov	r4, r0
	b	.L1
.L9:
	mvn	r4, #0
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	ui_numSinglePlayerArenas
	.word	.LC2
	.size	UI_GetCurrentGame, .-UI_GetCurrentGame
	.comm	ui_numSinglePlayerArenas,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
