	.file	"extr_cg_view.c_CG_DrawActiveFrame.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"%f"
.LC3:
	.string	"timescale"
.LC4:
	.string	"cg.clientFrame:%i\n"
	.text
	.p2align 4
	.globl	CG_DrawActiveFrame
	.type	CG_DrawActiveFrame, @function
CG_DrawActiveFrame:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	eax, eax
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	DWORD PTR cg[rip], edi
	mov	DWORD PTR cg[rip+96], edx
	call	CG_UpdateCvars@PLT
	mov	rax, QWORD PTR cg[rip+8]
	cmp	QWORD PTR [rax], 0
	jne	.L3
	mov	edi, DWORD PTR qfalse[rip]
	call	trap_S_ClearLoopingSounds@PLT
	xor	eax, eax
	call	trap_R_ClearScene@PLT
	xor	eax, eax
	call	CG_ProcessSnapshots@PLT
	mov	rax, QWORD PTR cg[rip+64]
	test	rax, rax
	je	.L3
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR SNAPFLAG_NOT_ACTIVE[rip], eax
	je	.L28
.L3:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	CG_DrawInformation@PLT
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	esi, DWORD PTR cg[rip+88]
	mov	edi, DWORD PTR cg[rip+92]
	call	trap_SetUserCmdValue@PLT
	xor	eax, eax
	add	DWORD PTR cg[rip+40], 1
	call	CG_PredictPlayerState@PLT
	cmp	QWORD PTR cg_thirdPerson[rip], 0
	mov	eax, 1
	je	.L29
.L4:
	mov	DWORD PTR cg[rip+16], eax
	xor	eax, eax
	call	CG_CalcViewValues@PLT
	mov	edx, DWORD PTR cg[rip+16]
	mov	r12d, eax
	test	edx, edx
	je	.L30
.L5:
	mov	eax, DWORD PTR cg[rip+84]
	test	eax, eax
	je	.L31
.L6:
	lea	rdi, cg[rip+80]
	call	CG_AddViewWeapon@PLT
	xor	eax, eax
	call	CG_PlayBufferedSounds@PLT
	xor	eax, eax
	call	CG_PlayBufferedVoiceChats@PLT
	cmp	QWORD PTR cg[rip+72], 0
	jne	.L32
.L7:
	mov	eax, DWORD PTR cg[rip]
	mov	edi, DWORD PTR cg[rip+56]
	mov	edx, 4
	mov	DWORD PTR cg[rip+44], eax
	mov	rax, QWORD PTR cg[rip+64]
	mov	esi, DWORD PTR 24[rax]
	call	memcpy@PLT
	xor	eax, eax
	call	CG_PowerupTimerSounds@PLT
	mov	rax, QWORD PTR cg[rip+64]
	mov	edx, DWORD PTR cg[rip+48]
	mov	ecx, r12d
	mov	esi, DWORD PTR cg[rip+52]
	mov	edi, DWORD PTR 16[rax]
	call	trap_S_Respatialize@PLT
	cmp	QWORD PTR STEREO_RIGHT[rip], rbp
	je	.L8
	movsx	rax, DWORD PTR cg[rip]
	mov	ecx, 0
	mov	rdx, rax
	sub	rdx, QWORD PTR cg[rip+32]
	mov	QWORD PTR cg[rip+32], rax
	cmovs	rdx, rcx
	xor	eax, eax
	mov	QWORD PTR cg[rip+24], rdx
	call	CG_AddLagometerFrameInfo@PLT
.L8:
	mov	rax, QWORD PTR cg_timescale[rip]
	mov	rcx, QWORD PTR cg_timescaleFadeEnd[rip]
	cmp	rax, rcx
	je	.L12
	pxor	xmm1, xmm1
	movss	xmm2, DWORD PTR cg_timescaleFadeSpeed[rip]
	pxor	xmm0, xmm0
	cvtsi2ss	xmm1, QWORD PTR cg[rip+24]
	cvtsi2ss	xmm0, rax
	mulss	xmm1, xmm2
	divss	xmm1, DWORD PTR .LC0[rip]
	jge	.L13
	addss	xmm0, xmm1
	cvttss2si	rdx, xmm0
	cmp	rcx, rdx
	cmovl	rdx, rcx
	mov	QWORD PTR cg_timescale[rip], rdx
.L15:
	ucomiss	xmm2, DWORD PTR .LC1[rip]
	jp	.L22
	je	.L12
.L22:
	mov	rsi, QWORD PTR cg_timescale[rip]
	lea	rdi, .LC2[rip]
	call	va@PLT
	lea	rdi, .LC3[rip]
	mov	esi, eax
	call	trap_Cvar_Set@PLT
.L12:
	mov	rdi, rbp
	call	CG_DrawActive@PLT
	cmp	QWORD PTR cg_stats[rip], 0
	jne	.L33
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L29:
	.cfi_restore_state
	mov	rax, QWORD PTR cg[rip+64]
	mov	rdx, QWORD PTR STAT_HEALTH[rip]
	mov	rax, QWORD PTR 8[rax]
	cmp	QWORD PTR [rax+rdx*8], 0
	setle	al
	movzx	eax, al
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L30:
	xor	eax, eax
	call	CG_DamageBlendBlob@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L33:
	mov	esi, DWORD PTR cg[rip+40]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, .LC4[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	CG_Printf@PLT
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	xor	eax, eax
	call	CG_AddTestModel@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L31:
	xor	eax, eax
	call	CG_AddPacketEntities@PLT
	xor	eax, eax
	call	CG_AddMarks@PLT
	xor	eax, eax
	call	CG_AddParticles@PLT
	xor	eax, eax
	call	CG_AddLocalEntities@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	subss	xmm0, xmm1
	cvttss2si	rax, xmm0
	cmp	rcx, rax
	cmovg	rax, rcx
	mov	QWORD PTR cg_timescale[rip], rax
	jmp	.L15
	.cfi_endproc
.LFE0:
	.size	CG_DrawActiveFrame, .-CG_DrawActiveFrame
	.comm	qfalse,4,4
	.comm	cg_timescaleFadeSpeed,4,4
	.comm	cg_timescaleFadeEnd,8,8
	.comm	cg_timescale,8,8
	.comm	cg_thirdPerson,8,8
	.comm	cg_stats,8,8
	.comm	cg,104,32
	.comm	STEREO_RIGHT,8,8
	.comm	STAT_HEALTH,8,8
	.comm	SNAPFLAG_NOT_ACTIVE,4,4
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	1148846080
	.align 4
.LC1:
	.long	0
	.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_cg_view.c_CG_DrawActiveFrame.c"
	.text
	.global	__aeabi_i2f
	.global	__aeabi_fmul
	.global	__aeabi_fdiv
	.global	__aeabi_fadd
	.global	__aeabi_f2iz
	.global	__aeabi_fsub
	.global	__aeabi_fcmpeq
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%f\000"
	.align	2
.LC1:
	.ascii	"timescale\000"
	.align	2
.LC2:
	.ascii	"cg.clientFrame:%i\012\000"
	.text
	.align	2
	.global	CG_DrawActiveFrame
	.syntax unified
	.arm
	.fpu softvfp
	.type	CG_DrawActiveFrame, %function
CG_DrawActiveFrame:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r4, .L37
	mov	r5, r1
	str	r0, [r4]
	str	r2, [r4, #64]
	bl	CG_UpdateCvars
	ldr	r3, [r4, #4]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L37+4
	ldr	r0, [r3]
	bl	trap_S_ClearLoopingSounds
	bl	trap_R_ClearScene
	bl	CG_ProcessSnapshots
	ldr	r3, [r4, #40]
	cmp	r3, #0
	beq	.L3
	ldr	r1, .L37+8
	ldr	r2, [r3]
	ldr	r3, [r1]
	tst	r2, r3
	beq	.L32
.L3:
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	CG_DrawInformation
.L32:
	ldr	r1, [r4, #56]
	ldr	r0, [r4, #60]
	bl	trap_SetUserCmdValue
	ldr	r3, [r4, #20]
	add	r3, r3, #1
	str	r3, [r4, #20]
	bl	CG_PredictPlayerState
	ldr	r3, .L37+12
	ldr	r3, [r3]
	cmp	r3, #0
	movne	r3, #1
	beq	.L33
.L4:
	str	r3, [r4, #8]
	bl	CG_CalcViewValues
	ldr	r3, [r4, #8]
	mov	r6, r0
	cmp	r3, #0
	beq	.L34
.L5:
	ldr	r3, [r4, #52]
	cmp	r3, #0
	beq	.L35
.L6:
	ldr	r0, .L37+16
	bl	CG_AddViewWeapon
	bl	CG_PlayBufferedSounds
	bl	CG_PlayBufferedVoiceChats
	ldr	r3, [r4, #44]
	cmp	r3, #0
	bne	.L36
.L7:
	ldr	r2, [r4, #40]
	ldr	r3, [r4]
	ldr	r1, [r2, #12]
	ldr	r0, [r4, #36]
	mov	r2, #4
	str	r3, [r4, #24]
	bl	memcpy
	bl	CG_PowerupTimerSounds
	ldr	r2, [r4, #40]
	mov	r3, r6
	ldr	r0, [r2, #8]
	ldr	r1, [r4, #32]
	ldr	r2, [r4, #28]
	bl	trap_S_Respatialize
	ldr	r3, .L37+20
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L8
	ldr	r2, [r4]
	ldr	r3, [r4, #16]
	str	r2, [r4, #16]
	subs	r3, r2, r3
	movmi	r3, #0
	str	r3, [r4, #12]
	bl	CG_AddLagometerFrameInfo
.L8:
	ldr	r8, .L37+24
	ldr	r3, .L37+28
	ldr	r7, [r8]
	ldr	r6, [r3]
	cmp	r7, r6
	beq	.L12
	mov	r0, r7
	bl	__aeabi_i2f
	ldr	r3, .L37+32
	mov	r9, r0
	ldr	r10, [r3]	@ float
	ldr	r0, [r4, #12]
	bl	__aeabi_i2f
	mov	r1, r10
	bl	__aeabi_fmul
	ldr	r1, .L37+36
	bl	__aeabi_fdiv
	cmp	r7, r6
	mov	r1, r0
	mov	r0, r9
	bge	.L13
	bl	__aeabi_fadd
	bl	__aeabi_f2iz
	cmp	r0, r6
	movge	r0, r6
	str	r0, [r8]
.L15:
	mov	r0, r10
	mov	r1, #0
	bl	__aeabi_fcmpeq
	cmp	r0, #0
	bne	.L12
	ldr	r1, [r8]
	ldr	r0, .L37+40
	bl	va
	mov	r1, r0
	ldr	r0, .L37+44
	bl	trap_Cvar_Set
.L12:
	mov	r0, r5
	bl	CG_DrawActive
	ldr	r3, .L37+48
	ldr	r3, [r3]
	cmp	r3, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r1, [r4, #20]
	ldr	r0, .L37+52
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	CG_Printf
.L33:
	ldr	r3, [r4, #40]
	ldr	r2, .L37+56
	ldr	r3, [r3, #4]
	ldr	r2, [r2]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	movgt	r3, #0
	movle	r3, #1
	b	.L4
.L36:
	bl	CG_AddTestModel
	b	.L7
.L35:
	bl	CG_AddPacketEntities
	bl	CG_AddMarks
	bl	CG_AddParticles
	bl	CG_AddLocalEntities
	b	.L6
.L34:
	bl	CG_DamageBlendBlob
	b	.L5
.L13:
	bl	__aeabi_fsub
	bl	__aeabi_f2iz
	cmp	r0, r6
	movlt	r0, r6
	str	r0, [r8]
	b	.L15
.L38:
	.align	2
.L37:
	.word	cg
	.word	qfalse
	.word	SNAPFLAG_NOT_ACTIVE
	.word	cg_thirdPerson
	.word	cg+48
	.word	STEREO_RIGHT
	.word	cg_timescale
	.word	cg_timescaleFadeEnd
	.word	cg_timescaleFadeSpeed
	.word	1148846080
	.word	.LC0
	.word	.LC1
	.word	cg_stats
	.word	.LC2
	.word	STAT_HEALTH
	.size	CG_DrawActiveFrame, .-CG_DrawActiveFrame
	.comm	qfalse,4,4
	.comm	cg_timescaleFadeSpeed,4,4
	.comm	cg_timescaleFadeEnd,4,4
	.comm	cg_timescale,4,4
	.comm	cg_thirdPerson,4,4
	.comm	cg_stats,4,4
	.comm	cg,68,4
	.comm	STEREO_RIGHT,4,4
	.comm	STAT_HEALTH,4,4
	.comm	SNAPFLAG_NOT_ACTIVE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
