	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function slice_to_vbi_lines
_slice_to_vbi_lines:                    ## @slice_to_vbi_lines
	.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	%edx, %r12d
	movq	%rdi, %r15
	xorl	%r14d, %r14d
	cmpl	$2, %edx
	jl	LBB0_25
## %bb.1:
	movq	_MAX_SLICES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_25
## %bb.2:
	movq	%rsi, %r13
	xorl	%r14d, %r14d
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movslq	4(%r13), %rbx
	leaq	2(%rbx), %rax
	subl	%eax, %r12d
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edi
	callq	_ff_data_unit_id_is_teletext
	testq	%rax, %rax
	je	LBB0_22
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$44, %ebx
	jne	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	8(%r13), %eax
	movl	%eax, %ecx
	andl	$31, %ecx
	movq	16(%r15), %rdx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movslq	%r14d, %rsi
	shlq	$4, %rsi
	movq	(%rdx,%rsi), %r14
	movq	_VBI_SLICED_TELETEXT_B@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	movl	%edi, 12(%rdx,%rsi)
	leal	313(%rcx), %edi
	testb	$32, %al
	cmovnel	%ecx, %edi
	testl	%ecx, %ecx
	cmovel	%ecx, %edi
	movl	%edi, 8(%rdx,%rsi)
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	16(%r13,%rbx,4), %edi
	callq	_vbi_rev8
	movl	%eax, (%r14,%rbx,4)
	incq	%rbx
	cmpq	$42, %rbx
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_vbi_unham16p
	cmpl	$7, %eax
	ja	LBB0_21
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r15d
	leaq	8(%r14), %rdi
	callq	_vbi_unham16p
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	leaq	24(%r14), %rdi
	callq	_vbi_unham16p
	movl	%eax, %ebx
	leaq	32(%r14), %rdi
	callq	_vbi_unham16p
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	testl	%esi, %esi
	js	LBB0_21
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	testl	%ebx, %ebx
	js	LBB0_21
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, %eax
	js	LBB0_21
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	andl	$7, %r15d
	shll	$8, %r15d
	addl	%r15d, %esi
	andl	$192, %ebx
	movl	%esi, %ecx
	cmpl	$128, %ebx
	jne	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdx
	andl	$1, %eax
	movl	%eax, (%rdx,%rcx,4)
	je	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	8(%rbx), %esi
	jne	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	12(%rbx), %edi
	movl	%esi, %r15d
	callq	_vbi_unham8
	movl	%r15d, %esi
	andl	$-2147483640, %eax              ## imm = 0x80000008
	cmpl	$8, %eax
	jne	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	20(%r14), %edi
	callq	_vbi_unham8
	movl	%r15d, %esi
	testl	%eax, %eax
	js	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	orl	$8, %eax
	movl	%eax, %edi
	callq	_vbi_ham8
	movl	%r15d, %esi
	movl	%eax, 20(%r14)
	jmp	LBB0_20
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rax
	movl	$0, (%rax,%rcx,4)
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%esi, 8(%rbx)
	movl	20(%r14), %eax
	movl	%eax, 12(%rbx)
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	incl	%r14d
LBB0_22:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$2, %r12d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	jl	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r13,%rax,4), %r13
	movq	_MAX_SLICES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jl	LBB0_3
LBB0_25:
	testl	%r12d, %r12d
	je	LBB0_27
LBB0_26:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%r12d, %ecx
	callq	_av_log
	jmp	LBB0_27
LBB0_4:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_27:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	testl	%r12d, %r12d
	jne	LBB0_26
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SLICES,4,2                 ## @MAX_SLICES
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_VBI_SLICED_TELETEXT_B,4,2      ## @VBI_SLICED_TELETEXT_B
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d bytes remained after slicing data\n"

	.no_dead_strip	_slice_to_vbi_lines
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function slice_to_vbi_lines
_slice_to_vbi_lines:                    ; @slice_to_vbi_lines
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x2
	mov	x21, x0
	mov	w19, #0
	cmp	w2, #2
	b.lt	LBB0_22
; %bb.1:
Lloh0:
	adrp	x27, _MAX_SLICES@GOTPAGE
Lloh1:
	ldr	x27, [x27, _MAX_SLICES@GOTPAGEOFF]
	ldr	w8, [x27]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.2:
	mov	x22, x1
	mov	w19, #0
	b	LBB0_7
LBB0_3:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x21]
	str	wzr, [x8, w24, uxtw #2]
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=1
	str	w24, [x21, #8]
	ldr	w8, [x23, #20]
	str	w8, [x21, #12]
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w19, w19, #1
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x22, w28, sxtw #2
	ldr	w8, [x27]
	cmp	w20, #2
	ccmp	w19, w8, #0, ge
	b.ge	LBB0_22
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldr	w23, [x22, #4]
	add	w28, w23, #2
	subs	w20, w20, w28
	b.lt	LBB0_24
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x22]
	bl	_ff_data_unit_id_is_teletext
	cbz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w23, #44
	b.ne	LBB0_24
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x24, #0
	ldr	w8, [x22, #8]
	ldr	x9, [x21, #16]
	add	x9, x9, w19, sxtw #4
	ldr	x23, [x9]
Lloh2:
	adrp	x10, _VBI_SLICED_TELETEXT_B@GOTPAGE
Lloh3:
	ldr	x10, [x10, _VBI_SLICED_TELETEXT_B@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	tst	w8, #0x20
	mov	w11, #313
	csel	w11, w11, wzr, eq
	ands	w8, w8, #0x1f
	add	w8, w11, w8
	csel	w8, wzr, w8, eq
	stp	w8, w10, [x9, #8]
	add	x25, x22, #16
LBB0_11:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x25, x24]
	bl	_vbi_rev8
	str	w0, [x23, x24]
	add	x24, x24, #4
	cmp	x24, #168
	b.ne	LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_vbi_unham16p
	cmp	w0, #7
	b.hi	LBB0_5
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x24, x0
	add	x0, x23, #8
	bl	_vbi_unham16p
	mov	x25, x0
	add	x0, x23, #24
	bl	_vbi_unham16p
	mov	x26, x0
	add	x0, x23, #32
	bl	_vbi_unham16p
	tbnz	w25, #31, LBB0_5
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	tbnz	w26, #31, LBB0_5
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	tbnz	w0, #31, LBB0_5
; %bb.16:                               ;   in Loop: Header=BB0_7 Depth=1
	ubfiz	w8, w24, #8, #3
	add	w24, w25, w8
	and	w8, w26, #0xc0
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	and	w8, w0, #0x1
	ldr	x9, [x21]
	str	w8, [x9, w24, uxtw #2]
	tbz	w0, #0, LBB0_4
; %bb.18:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x21, #8]
	cmp	w24, w8
	b.ne	LBB0_4
; %bb.19:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x21, #12]
	bl	_vbi_unham8
	mov	w8, #8
	movk	w8, #32768, lsl #16
	and	w8, w0, w8
	cmp	w8, #8
	b.ne	LBB0_4
; %bb.20:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x23, #20]
	bl	_vbi_unham8
	tbnz	w0, #31, LBB0_4
; %bb.21:                               ;   in Loop: Header=BB0_7 Depth=1
	orr	w0, w0, #0x8
	bl	_vbi_ham8
	str	w0, [x23, #20]
	b	LBB0_4
LBB0_22:
	cbz	w20, LBB0_25
; %bb.23:
Lloh5:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	bl	_av_log
	b	LBB0_25
LBB0_24:
Lloh10:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
LBB0_25:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SLICES,4,2                 ; @MAX_SLICES
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_VBI_SLICED_TELETEXT_B,4,2      ; @VBI_SLICED_TELETEXT_B
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d bytes remained after slicing data\n"

	.no_dead_strip	_slice_to_vbi_lines
.subsections_via_symbols
