	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function CG_DrawReward
LCPI0_0:
	.long	0x42600000                      ## float 56
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CG_DrawReward:                         ## @CG_DrawReward
	.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
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_cg_drawRewards@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_12
## %bb.1:
	movq	_cg@GOTPCREL(%rip), %r14
	movl	32(%r14), %edi
	movq	_REWARD_TIME@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_CG_FadeColor
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	cmpl	$0, (%r14)
	jle	LBB0_12
## %bb.3:
	movq	24(%r14), %rax
	movq	8(%r14), %rcx
	movq	16(%r14), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rax,%rsi,4), %edi
	movl	%edi, (%rax,%rsi,4)
	movl	4(%rdx,%rsi,4), %edi
	movl	%edi, (%rdx,%rsi,4)
	movl	4(%rcx,%rsi,4), %edi
	movl	%edi, (%rcx,%rsi,4)
	leaq	1(%rsi), %rdi
	movslq	(%r14), %rbx
	movq	%rdi, %rsi
	cmpq	%rbx, %rdi
	jl	LBB0_4
## %bb.5:
	decl	%ebx
	movl	36(%r14), %edi
	movl	%edi, 32(%r14)
	movl	%ebx, (%r14)
	movl	(%r12), %esi
	callq	_CG_FadeColor
	movq	%rax, %r15
	movq	24(%r14), %rax
	movl	(%rax), %edi
	movq	_CHAN_ANNOUNCER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_trap_S_StartLocalSound
LBB0_6:
	movq	%r15, %rdi
	callq	_trap_R_SetColor
	movq	8(%r14), %rax
	movl	(%rax), %ebx
	cmpl	$10, %ebx
	jl	LBB0_8
## %bb.7:
	movq	_ICON_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	movl	$320, %ecx                      ## imm = 0x140
	subl	%eax, %ecx
	cvtsi2ss	%ecx, %xmm0
	addl	$-4, %edi
	movq	16(%r14), %rax
	movl	(%rax), %edx
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movl	%edi, %esi
	callq	_CG_DrawPic
	movq	8(%r14), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rdx
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	movl	$32, %esi
	callq	_Com_sprintf
	movq	_SCREEN_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_SMALLCHAR_WIDTH@GOTPCREL(%rip), %r13
	movl	(%r13), %r12d
	movq	%r14, %rdi
	callq	_CG_DrawStrlen
	imull	%r12d, %eax
	subl	%eax, %ebx
	movl	%ebx, %eax
	shrl	$31, %eax
	addl	%ebx, %eax
	sarl	%eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movq	_ICON_SIZE@GOTPCREL(%rip), %rax
	xorps	%xmm1, %xmm1
	cvtsi2ssl	(%rax), %xmm1
	addss	LCPI0_0(%rip), %xmm1
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r13), %r8d
	movq	_SMALLCHAR_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$0, (%rsp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_CG_DrawStringExt
	jmp	LBB0_11
LBB0_8:
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.9:
	movq	_ICON_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	%edi, %eax
	imull	%ebx, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	$320, %eax                      ## imm = 0x140
	subl	%ecx, %eax
	cvtsi2ss	%eax, %xmm0
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movss	%xmm0, -84(%rbp)                ## 4-byte Spill
	addl	$-4, %edi
	movq	16(%r14), %rax
	movl	(%rax), %edx
	movss	-84(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movl	%edi, %esi
	callq	_CG_DrawPic
	movl	(%r15), %edi
	xorps	%xmm0, %xmm0
	cvtsi2ss	%edi, %xmm0
	movss	-84(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	%xmm1, -84(%rbp)                ## 4-byte Spill
	movss	-84(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	decl	%ebx
	jne	LBB0_10
LBB0_11:
	xorl	%edi, %edi
	callq	_trap_R_SetColor
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_cg_drawRewards,4,2             ## @cg_drawRewards
	.comm	_cg,40,3                        ## @cg
	.comm	_REWARD_TIME,4,2                ## @REWARD_TIME
	.comm	_CHAN_ANNOUNCER,4,2             ## @CHAN_ANNOUNCER
	.comm	_ICON_SIZE,4,2                  ## @ICON_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d"

	.comm	_SCREEN_WIDTH,4,2               ## @SCREEN_WIDTH
	.comm	_SMALLCHAR_WIDTH,4,2            ## @SMALLCHAR_WIDTH
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_SMALLCHAR_HEIGHT,4,2           ## @SMALLCHAR_HEIGHT
	.no_dead_strip	_CG_DrawReward
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_DrawReward
_CG_DrawReward:                         ; @CG_DrawReward
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #48]               ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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 b8, -72
	.cfi_offset b9, -80
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
Lloh3:
	adrp	x8, _cg_drawRewards@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cg_drawRewards@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_12
; %bb.1:
Lloh6:
	adrp	x20, _cg@GOTPAGE
Lloh7:
	ldr	x20, [x20, _cg@GOTPAGEOFF]
	ldr	w0, [x20, #32]
Lloh8:
	adrp	x21, _REWARD_TIME@GOTPAGE
Lloh9:
	ldr	x21, [x21, _REWARD_TIME@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_CG_FadeColor
	mov	x19, x0
	cbnz	x0, LBB0_6
; %bb.2:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.3:
	mov	x8, #0
	ldp	x10, x11, [x20, #16]
	ldr	x9, [x20, #8]
	add	x9, x9, #4
	add	x10, x10, #4
	add	x11, x11, #4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, #1
	ldr	w12, [x11]
	stur	w12, [x11, #-4]
	ldr	w12, [x10]
	stur	w12, [x10, #-4]
	ldr	w12, [x9]
	stur	w12, [x9, #-4]
	ldrsw	x12, [x20]
	add	x9, x9, #4
	add	x10, x10, #4
	add	x11, x11, #4
	cmp	x8, x12
	b.lt	LBB0_4
; %bb.5:
	sub	w8, w12, #1
	ldr	w0, [x20, #36]
	str	w0, [x20, #32]
	str	w8, [x20]
	ldr	w1, [x21]
	bl	_CG_FadeColor
	mov	x19, x0
	ldr	x8, [x20, #24]
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _CHAN_ANNOUNCER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CHAN_ANNOUNCER@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_trap_S_StartLocalSound
LBB0_6:
	mov	x0, x19
	bl	_trap_R_SetColor
	ldr	x8, [x20, #8]
	ldr	w21, [x8]
	cmp	w21, #10
	b.lt	LBB0_8
; %bb.7:
Lloh13:
	adrp	x21, _ICON_SIZE@GOTPAGE
Lloh14:
	ldr	x21, [x21, _ICON_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #0
	cinc	w9, w8, lt
	mov	w10, #320
	sub	w9, w10, w9, asr #1
	scvtf	s0, w9
	sub	w0, w8, #4
	ldr	x8, [x20, #16]
	ldr	w2, [x8]
	mov	w8, #1113587712
	fmov	s8, w8
	fmov	s1, s8
	mov	x1, x0
	bl	_CG_DrawPic
	ldr	x8, [x20, #8]
	ldr	w3, [x8]
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	w1, #32
	bl	_Com_sprintf
Lloh17:
	adrp	x8, _SCREEN_WIDTH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SCREEN_WIDTH@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
Lloh20:
	adrp	x22, _SMALLCHAR_WIDTH@GOTPAGE
Lloh21:
	ldr	x22, [x22, _SMALLCHAR_WIDTH@GOTPAGEOFF]
	ldr	w23, [x22]
	add	x0, sp, #8
	bl	_CG_DrawStrlen
	msub	w8, w0, w23, w20
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	scvtf	s0, w8
	ldr	s1, [x21]
	scvtf	s1, s1
	fadd	s1, s1, s8
Lloh22:
	adrp	x8, _qfalse@GOTPAGE
Lloh23:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh24:
	adrp	x9, _qtrue@GOTPAGE
Lloh25:
	ldr	x9, [x9, _qtrue@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
Lloh27:
	ldr	w3, [x9]
	ldr	w4, [x22]
Lloh28:
	adrp	x8, _SMALLCHAR_HEIGHT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SMALLCHAR_HEIGHT@GOTPAGEOFF]
Lloh30:
	ldr	w5, [x8]
	add	x0, sp, #8
	mov	x1, x19
	mov	w6, #0
	bl	_CG_DrawStringExt
	b	LBB0_11
LBB0_8:
	cmp	w21, #1
	b.lt	LBB0_11
; %bb.9:
Lloh31:
	adrp	x19, _ICON_SIZE@GOTPAGE
Lloh32:
	ldr	x19, [x19, _ICON_SIZE@GOTPAGEOFF]
	ldr	w8, [x19]
	mul	w9, w8, w21
	cmp	w9, #0
	cinc	w9, w9, lt
	mov	w10, #320
	sub	w9, w10, w9, asr #1
	scvtf	s8, w9
	mov	w22, #1113587712
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sub	w0, w8, #4
	ldr	x8, [x20, #16]
	ldr	w2, [x8]
	fmov	s1, w22
	fmov	s0, s8
	mov	x1, x0
	bl	_CG_DrawPic
	ldr	w8, [x19]
	scvtf	s0, w8
	fadd	s8, s8, s0
	subs	w21, w21, #1
	b.ne	LBB0_10
LBB0_11:
	mov	x0, #0
	bl	_trap_R_SetColor
LBB0_12:
	ldr	x8, [sp, #40]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh26
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_cg_drawRewards,4,2             ; @cg_drawRewards
	.comm	_cg,40,3                        ; @cg
	.comm	_REWARD_TIME,4,2                ; @REWARD_TIME
	.comm	_CHAN_ANNOUNCER,4,2             ; @CHAN_ANNOUNCER
	.comm	_ICON_SIZE,4,2                  ; @ICON_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d"

	.comm	_SCREEN_WIDTH,4,2               ; @SCREEN_WIDTH
	.comm	_SMALLCHAR_WIDTH,4,2            ; @SMALLCHAR_WIDTH
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_SMALLCHAR_HEIGHT,4,2           ; @SMALLCHAR_HEIGHT
	.no_dead_strip	_CG_DrawReward
.subsections_via_symbols
