	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mov_text_encode_frame
_mov_text_encode_frame:                 ## @mov_text_encode_frame
	.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	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movq	$0, 8(%r12)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r12)
	movups	%xmm0, 40(%r12)
	cmpl	$0, (%rcx)
	jle	LBB0_1
## %bb.2:
	movq	%rcx, %r13
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_box_count@GOTPCREL(%rip), %r15
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jge	LBB0_12
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movq	8(%rax), %rcx
	movq	_SUBTITLE_ASS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rax), %rsi
	movl	16(%r12), %edi
	callq	_ff_ass_split_dialog2
	movq	%rax, -88(%rbp)
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	(%rax), %edx
	movq	_mov_text_callbacks@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	callq	_ff_ass_split_override_codes
	leaq	-88(%rbp), %rdi
	callq	_ff_ass_free_dialog
	cmpq	$0, (%r15)
	movq	_box_types@GOTPCREL(%rip), %rbx
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$8, %r13d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rax
	movl	-8(%rax,%r13), %esi
	movq	%r12, %rdi
	callq	*(%rax,%r13)
	incq	%r14
	addq	$16, %r13
	cmpq	(%r15), %r14
	jb	LBB0_10
	jmp	LBB0_11
LBB0_1:
	xorl	%esi, %esi
	jmp	LBB0_13
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_12:
	movq	8(%r12), %rsi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_13:
	movq	%r15, %rdi
	callq	_AV_WB16
	movq	%r12, %rdi
	callq	_av_bprint_is_complete
	testl	%eax, %eax
	je	LBB0_14
## %bb.16:
	movl	(%r12), %edx
	testl	%edx, %edx
	je	LBB0_17
## %bb.18:
	addl	$-3, %ebx
	cmpl	%ebx, %edx
	jle	LBB0_20
## %bb.19:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
	jmp	LBB0_21
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
	jmp	LBB0_22
LBB0_17:
	xorl	%r14d, %r14d
	jmp	LBB0_21
LBB0_20:
	addq	$2, %r15
	movl	4(%r12), %esi
	movq	%r15, %rdi
	callq	_memcpy
	movl	(%r12), %r14d
	addl	$2, %r14d
LBB0_21:
	movq	%r12, %rdi
	callq	_av_bprint_clear
LBB0_22:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUBTITLE_ASS,8,3               ## @SUBTITLE_ASS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Only SUBTITLE_ASS type supported.\n"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mov_text_callbacks,4,2         ## @mov_text_callbacks
	.comm	_box_count,8,3                  ## @box_count
	.comm	_box_types,8,3                  ## @box_types
L_.str.1:                               ## @.str.1
	.asciz	"Buffer too small for ASS event.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mov_text_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mov_text_encode_frame
_mov_text_encode_frame:                 ; @mov_text_encode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [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 w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x19, [x0]
	str	xzr, [x19, #8]
	movi.2d	v0, #0000000000000000
	stur	q0, [x19, #24]
	stur	q0, [x19, #40]
	ldr	w8, [x3]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x23, x3
	str	w22, [sp, #12]                  ; 4-byte Folded Spill
	str	x21, [sp, #16]                  ; 8-byte Folded Spill
	mov	x25, #0
Lloh0:
	adrp	x26, _SUBTITLE_ASS@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SUBTITLE_ASS@GOTPAGEOFF]
Lloh2:
	adrp	x24, _mov_text_callbacks@GOTPAGE
Lloh3:
	ldr	x24, [x24, _mov_text_callbacks@GOTPAGEOFF]
Lloh4:
	adrp	x27, _box_count@GOTPAGE
Lloh5:
	ldr	x27, [x27, _box_count@GOTPAGEOFF]
Lloh6:
	adrp	x28, _box_types@GOTPAGE
Lloh7:
	ldr	x28, [x28, _box_types@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x23]
	cmp	x25, x8
	b.ge	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x8, [x23, #8]
	ldr	x8, [x8, x25, lsl #3]
	ldr	x9, [x8, #8]
	ldr	x10, [x26]
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x1, [x8]
	ldr	w0, [x19, #16]
	bl	_ff_ass_split_dialog2
	str	x0, [sp, #24]
	cbz	x0, LBB0_17
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x0]
	mov	x0, x24
	mov	x1, x19
	bl	_ff_ass_split_override_codes
	add	x0, sp, #24
	bl	_ff_ass_free_dialog
	ldr	x8, [x27]
	cbz	x8, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, #0
	mov	x21, #0
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x28]
	add	x8, x8, x22
	ldr	x9, [x8, #8]
	ldr	w1, [x8]
	mov	x0, x19
	blr	x9
	add	x21, x21, #1
	ldr	x8, [x27]
	add	x22, x22, #16
	cmp	x21, x8
	b.lo	LBB0_7
	b	LBB0_2
LBB0_8:
	mov	x1, #0
	b	LBB0_11
LBB0_9:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh13:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_18
LBB0_10:
	ldr	x1, [x19, #8]
	ldr	x21, [sp, #16]                  ; 8-byte Folded Reload
	ldr	w22, [sp, #12]                  ; 4-byte Folded Reload
LBB0_11:
	mov	x0, x21
	bl	_AV_WB16
	mov	x0, x19
	bl	_av_bprint_is_complete
	cbz	w0, LBB0_15
; %bb.12:
	ldr	w2, [x19]
	cbz	w2, LBB0_19
; %bb.13:
	sub	w8, w22, #3
	cmp	w2, w8
	b.le	LBB0_20
; %bb.14:
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
	b	LBB0_21
LBB0_17:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
	b	LBB0_22
LBB0_19:
	mov	w20, #0
	b	LBB0_21
LBB0_20:
	add	x0, x21, #2
	ldr	w1, [x19, #4]
	bl	_memcpy
	ldr	w8, [x19]
	add	w20, w8, #2
LBB0_21:
	mov	x0, x19
	bl	_av_bprint_clear
LBB0_22:
	mov	x0, x20
	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	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_SUBTITLE_ASS,8,3               ; @SUBTITLE_ASS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Only SUBTITLE_ASS type supported.\n"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mov_text_callbacks,4,2         ; @mov_text_callbacks
	.comm	_box_count,8,3                  ; @box_count
	.comm	_box_types,8,3                  ; @box_types
l_.str.1:                               ; @.str.1
	.asciz	"Buffer too small for ASS event.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mov_text_encode_frame
.subsections_via_symbols
