	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CG_Text_Paint_Limit
_CG_Text_Paint_Limit:                   ## @CG_Text_Paint_Limit
	.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
	movss	%xmm3, -76(%rbp)                ## 4-byte Spill
	movss	%xmm1, -72(%rbp)                ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.1:
	movl	%ecx, %ebx
	movq	%rdx, %r13
	movq	_cg_smallFont@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movq	_cgDC@GOTPCREL(%rip), %r15
	ucomiss	%xmm2, %xmm1
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	jae	LBB0_2
## %bb.3:
	movq	_cg_bigFont@GOTPCREL(%rip), %rax
	ucomiss	(%rax), %xmm2
	ja	LBB0_5
## %bb.4:
	addq	$32, %r15
	jmp	LBB0_5
LBB0_2:
	addq	$16, %r15
LBB0_5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -68(%rbp)                ## 4-byte Spill
	mulss	(%r15), %xmm2
	movss	%xmm2, -48(%rbp)                ## 4-byte Spill
	movq	%rsi, %rdi
	callq	_trap_R_SetColor
	movq	%r13, %rdi
	callq	_strlen
	cmpl	%ebx, %eax
	movl	%eax, %ecx
	cmovgl	%ebx, %ecx
	testl	%ebx, %ebx
	cmovlel	%eax, %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movb	(%r13), %r12b
	testb	%r12b, %r12b
	je	LBB0_15
## %bb.6:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_15
## %bb.7:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %r14
	movq	%r13, %rdi
	callq	_Q_IsColorString
	testq	%rax, %rax
	jne	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movsbq	%r12b, %rax
	leaq	(%rax,%rax,8), %rbx
	movss	(%r14,%rbx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -80(%rbp)                ## 4-byte Spill
	movq	%r13, %rdi
	movss	-48(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movl	$1, %esi
	callq	_CG_Text_Width
	movss	-44(%rbp), %xmm3                ## 4-byte Reload
                                        ## xmm3 = mem[0],zero,zero,zero
	addss	%xmm3, %xmm0
	ucomiss	-68(%rbp), %xmm0                ## 4-byte Folded Reload
	ja	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movss	-48(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	-80(%rbp), %xmm4                ## 4-byte Reload
                                        ## xmm4 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm4
	movaps	%xmm0, %xmm2
	movss	-72(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	subss	%xmm4, %xmm1
	movl	32(%r14,%rbx,4), %edi
	movl	28(%r14,%rbx,4), %esi
	movl	24(%r14,%rbx,4), %edx
	movl	20(%r14,%rbx,4), %ecx
	movl	16(%r14,%rbx,4), %r8d
	movl	8(%r14,%rbx,4), %eax
	movl	12(%r14,%rbx,4), %r9d
	movl	%eax, (%rsp)
	movaps	%xmm3, %xmm0
	movss	%xmm3, -44(%rbp)                ## 4-byte Spill
	callq	_CG_Text_PaintChar
	movss	4(%r14,%rbx,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	mulss	-48(%rbp), %xmm0                ## 4-byte Folded Reload
	addss	-76(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	movss	%xmm1, (%rax)
	movzbl	1(%r13), %r12d
	testb	%r12b, %r12b
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	incq	%r13
	leal	1(%rcx), %eax
	cmpl	-52(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%eax, %ebx
	jl	LBB0_8
	jmp	LBB0_15
LBB0_12:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
LBB0_15:
	xorl	%edi, %edi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_trap_R_SetColor                ## TAILCALL
LBB0_9:
	movq	%r13, %rdi
	callq	_CG_Text_Paint_Limit.cold.1
LBB0_10:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function CG_Text_Paint_Limit.cold.1
_CG_Text_Paint_Limit.cold.1:            ## @CG_Text_Paint_Limit.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_g_color_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movsbl	1(%rdi), %edi
	callq	_ColorIndex
	movl	(%rbx,%rax,4), %esi
	pushq	$8
	popq	%rdx
	callq	_memcpy
	ud2
	.cfi_endproc
                                        ## -- End function
	.comm	_cgDC,48,3                      ## @cgDC
	.comm	_cg_smallFont,4,2               ## @cg_smallFont
	.comm	_cg_bigFont,4,2                 ## @cg_bigFont
	.comm	_g_color_table,8,3              ## @g_color_table
	.no_dead_strip	_CG_Text_Paint_Limit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_Text_Paint_Limit
_CG_Text_Paint_Limit:                   ; @CG_Text_Paint_Limit
	.cfi_startproc
; %bb.0:
	stp	d13, d12, [sp, #-144]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 144
	stp	d11, d10, [sp, #16]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	.cfi_offset b12, -136
	.cfi_offset b13, -144
	cbz	x2, LBB0_3
; %bb.1:
	mov	x21, x3
	fmov	s8, s3
	mov	x19, x2
	fmov	s11, s2
	fmov	s9, s1
	fmov	s10, s0
	mov	x20, x0
Lloh0:
	adrp	x8, _cg_smallFont@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cg_smallFont@GOTPAGEOFF]
Lloh2:
	ldr	s0, [x8]
Lloh3:
	adrp	x8, _cgDC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cgDC@GOTPAGEOFF]
	fcmp	s0, s2
	b.ge	LBB0_4
; %bb.2:
Lloh5:
	adrp	x9, _cg_bigFont@GOTPAGE
Lloh6:
	ldr	x9, [x9, _cg_bigFont@GOTPAGEOFF]
Lloh7:
	ldr	s0, [x9]
	add	x8, x8, #32
	fcmp	s0, s11
Lloh8:
	adrp	x9, _cgDC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _cgDC@GOTPAGEOFF]
	csel	x22, x8, x9, pl
	b	LBB0_5
LBB0_3:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp], #144            ; 16-byte Folded Reload
	ret
LBB0_4:
	add	x22, x8, #16
LBB0_5:
	ldr	s12, [x20]
	ldr	s13, [x22]
	mov	x0, x1
	bl	_trap_R_SetColor
	mov	x0, x19
	bl	_strlen
	cmp	w0, w21
	ccmp	w21, #0, #4, gt
	csel	w23, w21, w0, gt
	ldrb	w26, [x19]
	cbz	w26, LBB0_13
; %bb.6:
	cmp	w23, #1
	b.lt	LBB0_13
; %bb.7:
	mov	x24, #0
	fmul	s11, s13, s11
	mov	w25, #36
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x21, x19, x24
	ldr	x27, [x22, #8]
	mov	x0, x21
	bl	_Q_IsColorString
	cbnz	x0, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	sxtb	x26, w26
	mul	x8, x26, x25
	ldr	s13, [x27, x8]
	mov	x0, x21
	fmov	s0, s11
	mov	w1, #1
	bl	_CG_Text_Width
	fadd	s0, s10, s0
	fcmp	s0, s12
	b.gt	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	fmul	s0, s11, s13
	fsub	s1, s9, s0
	madd	x21, x26, x25, x27
	ldp	w1, w0, [x21, #28]
	ldp	w3, w2, [x21, #20]
	ldp	w5, w4, [x21, #12]
	ldr	w6, [x21, #8]
	fmov	s0, s10
	fmov	s2, s11
	bl	_CG_Text_PaintChar
	ldr	s0, [x21, #4]
	fmadd	s0, s0, s11, s8
	fadd	s10, s10, s0
	str	s10, [x20]
	add	x8, x19, x24
	ldrb	w26, [x8, #1]
	cbz	w26, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x24, x24, #1
	cmp	w24, w23
	b.lt	LBB0_8
	b	LBB0_13
LBB0_12:
	str	wzr, [x20]
LBB0_13:
	mov	x0, #0
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp], #144            ; 16-byte Folded Reload
	b	_trap_R_SetColor
LBB0_14:
	mov	x0, x21
	bl	_CG_Text_Paint_Limit.cold.1
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function CG_Text_Paint_Limit.cold.1
_CG_Text_Paint_Limit.cold.1:            ; @CG_Text_Paint_Limit.cold.1
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh10:
	adrp	x8, _g_color_table@GOTPAGE
Lloh11:
	ldr	x8, [x8, _g_color_table@GOTPAGEOFF]
Lloh12:
	ldr	x19, [x8]
	ldrsb	w0, [x0, #1]
	bl	_ColorIndex
	ldr	w1, [x19, x0, lsl #2]
	mov	w2, #8
	bl	_memcpy
	brk	#0x1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_cgDC,48,3                      ; @cgDC
	.comm	_cg_smallFont,4,2               ; @cg_smallFont
	.comm	_cg_bigFont,4,2                 ; @cg_bigFont
	.comm	_g_color_table,8,3              ; @g_color_table
	.no_dead_strip	_CG_Text_Paint_Limit
.subsections_via_symbols
