	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen_sub_text
_gen_sub_text:                          ## @gen_sub_text
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %rbx
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_TEXT_MAXSZ@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_av_malloc
	testq	%rax, %rax
	je	LBB0_21
## %bb.1:
	movq	%rax, %r13
	movq	(%r14), %rdx
	decq	%rdx
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	8(%rbx), %r10d
	movq	(%rbx), %rax
	movslq	%r12d, %r11
	subq	%r11, %rax
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	pushq	%rax
	pushq	%r10
	pushq	%r11
	pushq	$0
	callq	_vbi_print_page_region
	addq	$32, %rsp
	testl	%eax, %eax
	jle	LBB0_2
## %bb.3:
	movl	%eax, %eax
	movb	$0, (%r13,%rax)
	movq	(%r14), %rdx
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	callq	_av_bprint_init
	cmpq	$0, (%r15)
	je	LBB0_12
## %bb.4:
	leaq	L_.str.2(%rip), %r14
	movq	%r13, %rbx
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_strspn
	movslq	%eax, %r12
	addq	%rbx, %r12
	xorl	%esi, %esi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=2
	testb	%al, %al
	je	LBB0_13
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=2
	incq	%rsi
LBB0_6:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r12,%rsi), %eax
	cmpb	$10, %al
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	cmpb	$0, -1(%r12,%rsi)
	js	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%esi, %ebx
	addq	%r12, %rbx
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_chop_spaces_utf8
	movq	%r15, %r13
	movq	%r14, %r15
	leaq	-56(%rbp), %r14
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_av_bprint_append_data
	movq	%r14, %rdi
	movq	%r15, %r14
	movq	%r13, %r15
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_av_bprintf
	jmp	LBB0_5
LBB0_21:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	%r13, %rdi
	callq	_av_free
	movq	_AVERROR_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_20
LBB0_12:
	leaq	L_.str.4(%rip), %rsi
	leaq	-56(%rbp), %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_av_bprintf
LBB0_13:
	movq	%r13, %rdi
	callq	_av_free
	leaq	-56(%rbp), %rdi
	callq	_av_bprint_is_complete
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	cmpq	$0, -48(%rbp)
	je	LBB0_18
## %bb.16:
	movq	_SUBTITLE_ASS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movl	-56(%rbp), %esi
	movq	%r15, %rdi
	callq	_create_ass_text
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	je	LBB0_14
## %bb.17:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_19
LBB0_14:
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	callq	_av_bprint_finalize
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_20
LBB0_18:
	movq	_SUBTITLE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_19:
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	callq	_av_bprint_finalize
LBB0_20:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TEXT_MAXSZ,8,3                 ## @TEXT_MAXSZ
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UTF-8"

	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"vbi_print error\n"

	.comm	_AVERROR_EXTERNAL,4,2           ## @AVERROR_EXTERNAL
L_.str.2:                               ## @.str.2
	.asciz	" \n"

L_.str.3:                               ## @.str.3
	.asciz	"\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s\n"

	.comm	_SUBTITLE_ASS,4,2               ## @SUBTITLE_ASS
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.5:                               ## @.str.5
	.asciz	"subtext:%s:txetbus\n"

	.comm	_SUBTITLE_NONE,4,2              ## @SUBTITLE_NONE
	.no_dead_strip	_gen_sub_text
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen_sub_text
_gen_sub_text:                          ; @gen_sub_text
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _TEXT_MAXSZ@GOTPAGE
Lloh1:
	ldr	x24, [x24, _TEXT_MAXSZ@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_av_malloc
	cbz	x0, LBB0_11
; %bb.1:
	mov	x21, x0
	ldr	x8, [x24]
	sub	x2, x8, #1
Lloh2:
	adrp	x8, _TRUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh4:
	ldr	w4, [x8]
Lloh5:
	adrp	x8, _FALSE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh7:
	ldr	w5, [x8]
	ldr	w8, [x23, #8]
	ldr	x9, [x23]
	sub	x9, x9, w22, sxtw
	str	x9, [sp, #8]
	str	w8, [sp]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x23
	mov	x1, x21
	mov	w6, #0
	mov	x7, x22
	bl	_vbi_print_page_region
	cmp	w0, #0
	b.le	LBB0_12
; %bb.2:
	strb	wzr, [x21, w0, uxtw]
	ldr	x2, [x24]
	add	x0, sp, #16
	mov	w1, #0
	bl	_av_bprint_init
	ldr	x8, [x19]
	cbz	x8, LBB0_13
; %bb.3:
Lloh10:
	adrp	x22, l_.str.2@PAGE
Lloh11:
	add	x22, x22, l_.str.2@PAGEOFF
	mov	x25, x21
Lloh12:
	adrp	x23, l_.str.3@PAGE
Lloh13:
	add	x23, x23, l_.str.3@PAGEOFF
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	mov	x0, x25
	mov	x1, x22
	bl	_strspn
	mov	x1, #0
	add	x24, x25, w0, sxtw
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=2
	cbz	w8, LBB0_14
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x1, x1, #1
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w8, [x24, x1]
	cmp	w8, #10
	b.ne	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	cbz	x1, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	add	x8, x24, x1
	ldursb	w8, [x8, #-1]
	tbnz	w8, #31, LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x24, w1, uxtw
	mov	x0, x24
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_chop_spaces_utf8
	mov	x2, x0
	add	x0, sp, #16
	mov	x1, x24
	bl	_av_bprint_append_data
	add	x0, sp, #16
	mov	x1, x23
	bl	_av_bprintf
	b	LBB0_4
LBB0_11:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	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
	add	sp, sp, #112
	b	_AVERROR
LBB0_12:
Lloh17:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	x0, x21
	bl	_av_free
Lloh22:
	adrp	x8, _AVERROR_EXTERNAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AVERROR_EXTERNAL@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	b	LBB0_21
LBB0_13:
	str	x21, [sp]
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x0, sp, #16
	bl	_av_bprintf
LBB0_14:
	mov	x0, x21
	bl	_av_free
	add	x0, sp, #16
	bl	_av_bprint_is_complete
	cbz	w0, LBB0_18
; %bb.15:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_19
; %bb.16:
Lloh27:
	adrp	x8, _SUBTITLE_ASS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SUBTITLE_ASS@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x20]
	ldr	w1, [sp, #16]
	mov	x0, x19
	bl	_create_ass_text
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [x20, #4]
	cbz	w0, LBB0_18
; %bb.17:
Lloh30:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh33:
	adrp	x2, l_.str.5@PAGE
Lloh34:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_20
LBB0_18:
	add	x0, sp, #16
	mov	x1, #0
	bl	_av_bprint_finalize
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_21
LBB0_19:
Lloh38:
	adrp	x8, _SUBTITLE_NONE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _SUBTITLE_NONE@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_20:
	add	x0, sp, #16
	mov	x1, #0
	bl	_av_bprint_finalize
	mov	w0, #0
LBB0_21:
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_TEXT_MAXSZ,8,3                 ; @TEXT_MAXSZ
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UTF-8"

	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"vbi_print error\n"

	.comm	_AVERROR_EXTERNAL,4,2           ; @AVERROR_EXTERNAL
l_.str.2:                               ; @.str.2
	.asciz	" \n"

l_.str.3:                               ; @.str.3
	.asciz	"\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s\n"

	.comm	_SUBTITLE_ASS,4,2               ; @SUBTITLE_ASS
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.5:                               ; @.str.5
	.asciz	"subtext:%s:txetbus\n"

	.comm	_SUBTITLE_NONE,4,2              ; @SUBTITLE_NONE
	.no_dead_strip	_gen_sub_text
.subsections_via_symbols
