	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_render_subtitle                ## -- Begin function render_subtitle
	.p2align	4, 0x90
_render_subtitle:                       ## @render_subtitle
	.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
	movl	%r8d, %r15d
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %r14d
	movq	%rsi, %r13
	movl	%edi, %ebx
	movq	%rsi, %rdi
	callq	_strlen
	movl	%eax, %r12d
	movl	$0, -56(%rbp)
	movl	$0, -52(%rbp)
	leaq	-60(%rbp), %rsi
	leaq	-96(%rbp), %rdx
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_graphics_get_resource_size
	xorl	%ebx, %ebx
	movl	%r12d, -92(%rbp)                ## 4-byte Spill
                                        ## kill: def $r12d killed $r12d def $r12
	subl	%r14d, %r12d
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_2:
	cmpb	$0, (%r13)
	je	LBB0_10
## %bb.3:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	xorl	%ebx, %ebx
	movq	%r13, %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %r15d
	subl	%r14d, %r15d
	addl	%r12d, %r15d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %rsi
	movl	%r15d, %edx
	leaq	-56(%rbp), %rcx
	leaq	-52(%rbp), %r8
	movq	-72(%rbp), %r9                  ## 8-byte Reload
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_graphics_resource_text_dimensions_ext
	testq	%rax, %rax
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-56(%rbp), %eax
	cmpl	-60(%rbp), %eax
	jle	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$32, %edx
	callq	_strnchr
	leaq	1(%r14), %rcx
	movq	%r14, %rdx
	leaq	1(%rax), %r14
	testq	%rax, %rax
	cmovneq	%rax, %rdx
	cmoveq	%rcx, %r14
	cmoveq	%rcx, %rax
	movq	%r13, %rbx
	subq	%rax, %rbx
	cmpb	$0, 1(%rdx)
	jne	LBB0_4
## %bb.7:
	movl	-56(%rbp), %eax
LBB0_8:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	-60(%rbp), %ecx
	subl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, -88(%rbp)                 ## 4-byte Spill
	subl	-52(%rbp), %r15d
	movl	%r15d, -84(%rbp)                ## 4-byte Spill
	movq	_GRAPHICS_RESOURCE_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movq	_GRAPHICS_RESOURCE_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movl	$255, %edi
	movl	$255, %esi
	movl	$255, %edx
	movl	$255, %ecx
	callq	_GRAPHICS_RGBA32
	movl	%eax, %r15d
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$128, %ecx
	callq	_GRAPHICS_RGBA32
                                        ## kill: def $eax killed $eax def $rax
	movl	%r13d, %ecx
	subl	%r14d, %ecx
	addl	%ecx, %r12d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	-88(%rbp), %esi                 ## 4-byte Reload
	movl	-84(%rbp), %edx                 ## 4-byte Reload
	movl	-80(%rbp), %ecx                 ## 4-byte Reload
	movl	-76(%rbp), %r8d                 ## 4-byte Reload
	movl	%r15d, %r9d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	%r12
	pushq	%r14
	pushq	%rax
	callq	_graphics_resource_render_text_ext
	addq	$32, %rsp
	testq	%rax, %rax
	jne	LBB0_11
LBB0_10:
	addl	-92(%rbp), %ebx                 ## 4-byte Folded Reload
	subl	-52(%rbp), %r15d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	movl	%ebx, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r15d, %r8d
	callq	_render_subtitle
LBB0_11:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRAPHICS_RESOURCE_WIDTH,4,2    ## @GRAPHICS_RESOURCE_WIDTH
	.comm	_GRAPHICS_RESOURCE_HEIGHT,4,2   ## @GRAPHICS_RESOURCE_HEIGHT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_render_subtitle                ; -- Begin function render_subtitle
	.p2align	2
_render_subtitle:                       ; @render_subtitle
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	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
	mov	x21, x4
	mov	x19, x3
	mov	x24, x2
	mov	x20, x1
	mov	x22, x0
	mov	x0, x1
	bl	_strlen
	mov	x23, x0
	str	xzr, [sp, #40]
	add	x1, sp, #36
	add	x2, sp, #32
	mov	x0, x22
	bl	_graphics_get_resource_size
	subs	w27, w23, w24
	b.ne	LBB0_2
; %bb.1:
	mov	x0, #0
	b	LBB0_12
LBB0_2:
	ldrb	w8, [x20]
	cbz	w8, LBB0_10
; %bb.3:
	mov	w26, #0
	mov	x24, x20
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w20, w24
	add	w25, w27, w8
	add	x3, sp, #44
	add	x4, sp, #40
	mov	x0, x22
	mov	x1, x24
	mov	x2, x25
	mov	x5, x19
	bl	_graphics_resource_text_dimensions_ext
	cbnz	x0, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #44]
	ldr	w9, [sp, #36]
	cmp	w8, w9
	b.le	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	mov	x1, x25
	mov	w2, #32
	bl	_strnchr
	add	x8, x24, #1
	cmp	x0, #0
	csel	x10, x24, x0, eq
	csinc	x9, x8, x0, eq
	csinc	x8, x0, x24, ne
	sub	x26, x20, x8
	ldrb	w8, [x10, #1]
	mov	x24, x9
	cbnz	w8, LBB0_4
; %bb.7:
	ldr	w8, [sp, #44]
	mov	x24, x9
LBB0_8:
	cbz	w8, LBB0_11
; %bb.9:
	ldr	w9, [sp, #36]
	sub	w8, w9, w8
	asr	w9, w8, #1
	ldr	w8, [sp, #40]
	sub	w8, w21, w8
	stp	w8, w9, [sp, #24]               ; 8-byte Folded Spill
Lloh0:
	adrp	x8, _GRAPHICS_RESOURCE_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRAPHICS_RESOURCE_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
Lloh3:
	adrp	x8, _GRAPHICS_RESOURCE_HEIGHT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GRAPHICS_RESOURCE_HEIGHT@GOTPAGEOFF]
Lloh5:
	ldr	w28, [x8]
	mov	w0, #255
	mov	w1, #255
	mov	w2, #255
	mov	w3, #255
	bl	_GRAPHICS_RGBA32
	mov	x25, x0
	mov	w0, #0
	mov	w1, #0
	mov	w2, #0
	mov	w3, #128
	bl	_GRAPHICS_RGBA32
	mov	x6, x0
	sub	w8, w20, w24
	add	w8, w27, w8
	stp	w8, w19, [sp]
	mov	x0, x22
	ldp	w2, w1, [sp, #24]               ; 8-byte Folded Reload
	ldr	w3, [sp, #20]                   ; 4-byte Folded Reload
	mov	x4, x28
	mov	x5, x25
	mov	x7, x24
	bl	_graphics_resource_render_text_ext
	cbnz	x0, LBB0_12
	b	LBB0_11
LBB0_10:
	mov	w26, #0
LBB0_11:
	add	w2, w26, w23
	ldr	w8, [sp, #40]
	sub	w4, w21, w8
	mov	x0, x22
	mov	x1, x20
	mov	x3, x19
	bl	_render_subtitle
LBB0_12:
	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
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GRAPHICS_RESOURCE_WIDTH,4,2    ; @GRAPHICS_RESOURCE_WIDTH
	.comm	_GRAPHICS_RESOURCE_HEIGHT,4,2   ; @GRAPHICS_RESOURCE_HEIGHT
.subsections_via_symbols
