	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_frame
_encode_frame:                          ## @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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, %r15
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_av_bprint_clear
	cmpl	$0, (%r15)
	jle	LBB0_10
## %bb.1:
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_ff_ass_split_override_codes
	leaq	-56(%rbp), %rdi
	callq	_ff_ass_free_dialog
	incq	%r12
	movslq	(%r15), %rax
	cmpq	%rax, %r12
	jge	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%r12,8), %rax
	movq	8(%rax), %rcx
	movq	_SUBTITLE_ASS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %rsi
	movl	16(%rbx), %edi
	callq	_ff_ass_split_dialog2
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, 8(%rbx)
	movq	(%r14), %rcx
	movq	_AV_CODEC_ID_SUBRIP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rax), %esi
	movq	%rbx, %rdi
	callq	_srt_style_apply
	movq	-56(%rbp), %rax
	jmp	LBB0_9
LBB0_10:
	movq	%rbx, %rdi
	callq	_av_bprint_is_complete
	testl	%eax, %eax
	je	LBB0_5
## %bb.11:
	movl	(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_12
## %bb.13:
	cmpl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	jle	LBB0_15
## %bb.14:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movl	$-1, %eax
	jmp	LBB0_16
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movq	_ENOSYS@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_15:
	movl	4(%rbx), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_memcpy
	movl	(%rbx), %eax
	jmp	LBB0_16
	.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	_AV_CODEC_ID_SUBRIP,8,3         ## @AV_CODEC_ID_SUBRIP
L_.str.1:                               ## @.str.1
	.asciz	"Buffer too small for ASS event.\n"

	.no_dead_strip	_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_frame
_encode_frame:                          ; @encode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x4
	mov	x24, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
	mov	x0, x20
	bl	_av_bprint_clear
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x25, #0
Lloh0:
	adrp	x26, _SUBTITLE_ASS@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SUBTITLE_ASS@GOTPAGEOFF]
Lloh2:
	adrp	x27, _AV_CODEC_ID_SUBRIP@GOTPAGE
Lloh3:
	ldr	x27, [x27, _AV_CODEC_ID_SUBRIP@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [x0]
	mov	x0, x23
	mov	x1, x20
	bl	_ff_ass_split_override_codes
	add	x0, sp, #8
	bl	_ff_ass_free_dialog
	add	x25, x25, #1
	ldrsw	x8, [x24]
	cmp	x25, x8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #8]
	ldr	x8, [x8, x25, lsl #3]
	ldr	x9, [x8, #8]
	ldr	x10, [x26]
	cmp	x9, x10
	b.ne	LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x1, [x8]
	ldr	w0, [x20, #16]
	bl	_ff_ass_split_dialog2
	str	x0, [sp, #8]
	cbz	x0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [x20, #8]
	ldr	x8, [x19]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x0, #4]
	mov	x0, x20
	bl	_srt_style_apply
	ldr	x0, [sp, #8]
	b	LBB0_2
LBB0_7:
	mov	x0, x20
	bl	_av_bprint_is_complete
	cbz	w0, LBB0_11
; %bb.8:
	ldr	w2, [x20]
	cbz	w2, LBB0_15
; %bb.9:
	cmp	w2, w22
	b.le	LBB0_16
; %bb.10:
Lloh4:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w0, #-1
	b	LBB0_14
LBB0_11:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh16:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
	mov	w0, #0
	b	LBB0_14
LBB0_16:
	ldr	w1, [x20, #4]
	mov	x0, x21
	bl	_memcpy
	ldr	w0, [x20]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.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	_AV_CODEC_ID_SUBRIP,8,3         ; @AV_CODEC_ID_SUBRIP
l_.str.1:                               ; @.str.1
	.asciz	"Buffer too small for ASS event.\n"

	.no_dead_strip	_encode_frame
.subsections_via_symbols
