	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpeg_decode_a53_cc
_mpeg_decode_a53_cc:                    ## @mpeg_decode_a53_cc
	.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
	movq	%rsi, %rbx
	movq	8(%rdi), %r13
	cmpl	$6, %edx
	jl	LBB0_13
## %bb.1:
	movb	(%rbx), %al
	cmpb	$71, %al
	jne	LBB0_15
## %bb.2:
	xorl	%r12d, %r12d
	cmpb	$65, 1(%rbx)
	jne	LBB0_27
## %bb.3:
	cmpb	$57, 2(%rbx)
	jne	LBB0_27
## %bb.4:
	cmpb	$52, 3(%rbx)
	jne	LBB0_27
## %bb.5:
	cmpb	$3, 4(%rbx)
	jne	LBB0_27
## %bb.6:
	movzbl	5(%rbx), %eax
	testb	$64, %al
	je	LBB0_27
## %bb.7:
	movl	$1, %r12d
	andl	$31, %eax
	je	LBB0_27
## %bb.8:
	leal	(%rax,%rax,2), %ecx
	addl	$7, %ecx
	cmpl	%edx, %ecx
	ja	LBB0_27
## %bb.9:
	movq	%rdi, %r15
	leal	(%rax,%rax,2), %r14d
	movq	%r13, %rdi
	callq	_av_freep
	movl	%r14d, 8(%r13)
	movl	%r14d, %edi
	callq	_av_malloc
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	addq	$7, %rbx
	movl	8(%r13), %edx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_memcpy
	jmp	LBB0_12
LBB0_13:
	xorl	%r12d, %r12d
	cmpl	$2, %edx
	jl	LBB0_27
## %bb.14:
	movb	(%rbx), %al
LBB0_15:
	xorl	%r12d, %r12d
	cmpb	$3, %al
	jne	LBB0_27
## %bb.16:
	movb	1(%rbx), %al
	andb	$127, %al
	cmpb	$1, %al
	jne	LBB0_27
## %bb.17:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	addq	$2, %rbx
	addl	$-2, %edx
	leaq	-44(%rbp), %r14
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_init_get_bits
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_get_bits
	movq	%rax, %r12
	testl	%r12d, %r12d
	jle	LBB0_26
## %bb.18:
	movq	%r13, %rdi
	callq	_av_freep
	leal	(%r12,%r12,2), %edi
	movl	%edi, 8(%r13)
	callq	_av_mallocz
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_28
## %bb.19:
	movq	%rax, %r15
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	addq	$2, %r15
	leaq	-44(%rbp), %rbx
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_20 Depth=1
	cmpb	$2, %r14b
	sete	%al
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, 12(%rcx)
	sete	%cl
	xorb	%al, %cl
	orb	$4, %cl
	movb	%cl, -2(%r15)
	movq	_ff_reverse@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rax
	movsbq	-80(%rbp), %rcx                 ## 1-byte Folded Reload
	movzbl	(%rax,%rcx), %eax
	movb	%al, -1(%r15)
	movq	(%rdx), %rax
	movsbq	-72(%rbp), %rcx                 ## 1-byte Folded Reload
	movzbl	(%rax,%rcx), %eax
LBB0_24:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%r13, %rbx
	movb	%al, (%r15)
	addq	$3, %r15
	decl	%r12d
	je	LBB0_25
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_get_bits_left
	cmpl	$26, %eax
	jl	LBB0_25
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_skip_bits
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_get_bits
	movq	%rax, %r14
	movq	%rbx, %rdi
	movl	$5, %esi
	callq	_skip_bits
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_get_bits
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_get_bits
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r13
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_skip_bits
	testb	%r14b, %r14b
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=1
	movw	$0, -2(%r15)
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_28:
	movl	$0, 8(%r13)
LBB0_25:
	movq	_FF_CODEC_PROPERTY_CLOSED_CAPTIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
LBB0_26:
	movl	$1, %r12d
LBB0_27:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	$0, 8(%r13)
LBB0_12:
	movq	_FF_CODEC_PROPERTY_CLOSED_CAPTIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_FF_CODEC_PROPERTY_CLOSED_CAPTIONS,4,2 ## @FF_CODEC_PROPERTY_CLOSED_CAPTIONS
	.comm	_ff_reverse,8,3                 ## @ff_reverse
	.no_dead_strip	_mpeg_decode_a53_cc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpeg_decode_a53_cc
_mpeg_decode_a53_cc:                    ; @mpeg_decode_a53_cc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
	cmp	w2, #6
	b.lt	LBB0_11
; %bb.1:
	ldrb	w8, [x21]
	cmp	w8, #71
	b.ne	LBB0_13
; %bb.2:
	ldrb	w8, [x21, #1]
	cmp	w8, #65
	b.ne	LBB0_18
; %bb.3:
	ldrb	w8, [x21, #2]
	cmp	w8, #57
	b.ne	LBB0_18
; %bb.4:
	ldrb	w8, [x21, #3]
	cmp	w8, #52
	b.ne	LBB0_18
; %bb.5:
	ldrb	w8, [x21, #4]
	cmp	w8, #3
	b.ne	LBB0_18
; %bb.6:
	ldrb	w8, [x21, #5]
	tbz	w8, #6, LBB0_18
; %bb.7:
	ands	w8, w8, #0x1f
	b.eq	LBB0_27
; %bb.8:
	add	w22, w8, w8, lsl #1
	add	w8, w22, #7
	cmp	w8, w2
	b.hi	LBB0_27
; %bb.9:
	mov	x0, x20
	bl	_av_freep
	str	w22, [x20, #8]
	mov	x0, x22
	bl	_av_malloc
	str	x0, [x20]
	cbz	x0, LBB0_25
; %bb.10:
	add	x1, x21, #7
	ldr	w2, [x20, #8]
	bl	_memcpy
	b	LBB0_26
LBB0_11:
	cmp	w2, #2
	b.lt	LBB0_18
; %bb.12:
	ldrb	w8, [x21]
LBB0_13:
	cmp	w8, #3
	b.ne	LBB0_18
; %bb.14:
	ldrb	w8, [x21, #1]
	and	w8, w8, #0x7f
	cmp	w8, #1
	b.ne	LBB0_18
; %bb.15:
	add	x1, x21, #2
	sub	w2, w2, #2
	add	x0, sp, #12
	bl	_init_get_bits
	add	x0, sp, #12
	mov	w1, #5
	bl	_get_bits
	mov	x21, x0
	cmp	w21, #1
	b.lt	LBB0_27
; %bb.16:
	mov	x0, x20
	bl	_av_freep
	add	w0, w21, w21, lsl #1
	str	w0, [x20, #8]
	bl	_av_mallocz
	str	x0, [x20]
	cbz	x0, LBB0_25
; %bb.17:
	add	x24, x0, #1
Lloh0:
	adrp	x25, _ff_reverse@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ff_reverse@GOTPAGEOFF]
	b	LBB0_22
LBB0_18:
	mov	w0, #0
LBB0_19:
	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
	add	sp, sp, #96
	ret
LBB0_20:                                ;   in Loop: Header=BB0_22 Depth=1
	cmp	w26, #2
	cset	w8, eq
	ldr	w9, [x20, #12]
	cmp	w9, #0
	cset	w9, eq
	eor	w8, w8, w9
	orr	w8, w8, #0x4
	sturb	w8, [x24, #-1]
	ldr	x8, [x25]
	sxtb	x9, w22
	ldrb	w8, [x8, x9]
	strb	w8, [x24]
	ldr	x8, [x25]
	sxtb	x9, w23
	ldrb	w8, [x8, x9]
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	strb	w8, [x24, #1]
	add	x24, x24, #3
	subs	w21, w21, #1
	b.eq	LBB0_26
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	bl	_get_bits_left
	cmp	w0, #26
	b.lt	LBB0_26
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x0, sp, #12
	mov	w1, #2
	bl	_skip_bits
	add	x0, sp, #12
	mov	w1, #2
	bl	_get_bits
	and	w26, w0, #0xff
	add	x0, sp, #12
	mov	w1, #5
	bl	_skip_bits
	add	x0, sp, #12
	mov	w1, #8
	bl	_get_bits
	mov	x22, x0
	add	x0, sp, #12
	mov	w1, #8
	bl	_get_bits
	mov	x23, x0
	add	x0, sp, #12
	mov	w1, #1
	bl	_skip_bits
	cbnz	w26, LBB0_20
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	w8, #0
	sturh	wzr, [x24, #-1]
	b	LBB0_21
LBB0_25:
	str	wzr, [x20, #8]
LBB0_26:
Lloh2:
	adrp	x8, _FF_CODEC_PROPERTY_CLOSED_CAPTIONS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FF_CODEC_PROPERTY_CLOSED_CAPTIONS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_27:
	mov	w0, #1
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FF_CODEC_PROPERTY_CLOSED_CAPTIONS,4,2 ; @FF_CODEC_PROPERTY_CLOSED_CAPTIONS
	.comm	_ff_reverse,8,3                 ; @ff_reverse
	.no_dead_strip	_mpeg_decode_a53_cc
.subsections_via_symbols
