	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spdif_header_eac3
_spdif_header_eac3:                     ## @spdif_header_eac3
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movq	(%rsi), %rax
	movl	$1, %r15d
	cmpl	$88, 20(%rax)
	jl	LBB0_3
## %bb.1:
	movl	16(%rax), %eax
	movl	%eax, %ecx
	notl	%ecx
	testb	$-64, %cl
	je	LBB0_3
## %bb.2:
	shrq	$2, %rax
	andl	$12, %eax
	leaq	_spdif_header_eac3.eac3_repeat(%rip), %rcx
	movl	(%rax,%rcx), %r15d
LBB0_3:
	movq	32(%rbx), %rdi
	leaq	52(%rbx), %rsi
	movq	8(%r14), %rdx
	addq	(%rbx), %rdx
	callq	_av_fast_realloc
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	(%rbx), %rcx
	leaq	(%rax,%rcx,4), %rdi
	movq	(%r14), %rsi
	movq	8(%r14), %rdx
	callq	_memcpy
	movq	(%rbx), %rax
	addq	8(%r14), %rax
	movq	%rax, (%rbx)
	movl	8(%rbx), %ecx
	incl	%ecx
	movl	%ecx, 8(%rbx)
	cmpl	%r15d, %ecx
	jge	LBB0_6
## %bb.5:
	movl	$0, 12(%rbx)
	jmp	LBB0_7
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_6:
	movq	_IEC61937_EAC3@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 48(%rbx)
	movq	32(%rbx), %rcx
	movq	%rcx, 40(%rbx)
	movq	%rax, 16(%rbx)
	movq	%rax, 24(%rbx)
	movabsq	$105553116266496, %rax          ## imm = 0x600000000000
	movq	%rax, 8(%rbx)
	movq	$0, (%rbx)
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @spdif_header_eac3.eac3_repeat
_spdif_header_eac3.eac3_repeat:
	.long	6                               ## 0x6
	.long	3                               ## 0x3
	.long	2                               ## 0x2
	.long	1                               ## 0x1

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IEC61937_EAC3,4,2              ## @IEC61937_EAC3
	.no_dead_strip	_spdif_header_eac3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function spdif_header_eac3
lCPI0_0:
	.long	0                               ; 0x0
	.long	24576                           ; 0x6000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_spdif_header_eac3:                     ; @spdif_header_eac3
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldr	x20, [x0]
	ldr	x8, [x1]
	ldr	w9, [x8, #20]
	cmp	w9, #88
	b.lt	LBB0_2
; %bb.1:
	ldr	w8, [x8, #16]
	mvn	w9, w8
	tst	w9, #0xc0
	b.ne	LBB0_3
LBB0_2:
	mov	w21, #1
	b	LBB0_4
LBB0_3:
	ubfx	x8, x8, #4, #2
Lloh0:
	adrp	x9, _spdif_header_eac3.eac3_repeat@PAGE
Lloh1:
	add	x9, x9, _spdif_header_eac3.eac3_repeat@PAGEOFF
	ldr	w21, [x9, x8, lsl #2]
LBB0_4:
	ldr	x0, [x20, #32]
	add	x1, x20, #52
	ldr	x8, [x20]
	ldr	x9, [x19, #8]
	add	x2, x9, x8
	bl	_av_fast_realloc
	str	x0, [x20, #32]
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x8, [x20]
	add	x0, x0, x8, lsl #2
	ldp	x1, x2, [x19]
	bl	_memcpy
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x8, x9, x8
	str	x8, [x20]
	ldr	w9, [x20, #8]
	add	w9, w9, #1
	str	w9, [x20, #8]
	cmp	w9, w21
	b.ge	LBB0_8
; %bb.6:
	str	wzr, [x20, #12]
	b	LBB0_9
LBB0_7:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_8:
Lloh5:
	adrp	x9, _IEC61937_EAC3@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IEC61937_EAC3@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	str	w9, [x20, #48]
	ldr	x9, [x20, #32]
	str	x9, [x20, #40]
	stp	x8, x8, [x20, #16]
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x20, #8]
	str	xzr, [x20]
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @spdif_header_eac3.eac3_repeat
_spdif_header_eac3.eac3_repeat:
	.long	6                               ; 0x6
	.long	3                               ; 0x3
	.long	2                               ; 0x2
	.long	1                               ; 0x1

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IEC61937_EAC3,4,2              ; @IEC61937_EAC3
	.no_dead_strip	_spdif_header_eac3
.subsections_via_symbols
