	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mov_write_ac3_tag
_mov_write_ac3_tag:                     ## @mov_write_ac3_tag
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpl	$6, (%rdx)
	jg	LBB0_3
## %bb.1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.2:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_3:
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rsi, %rdi
	movl	$11, %esi
	callq	_avio_wb32
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_ffio_wfourcc
	movq	8(%rbx), %rsi
	addq	$4, %rsi
	movl	(%rbx), %eax
	leal	-32(,%rax,8), %edx
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_init_get_bits
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_get_bits
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_get_bits
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	$5, %esi
	callq	_get_bits
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_get_bits
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_get_bits
	movl	%eax, %r15d
	cmpl	$2, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$1, %r15d
	je	LBB0_7
## %bb.5:
	movl	%r15d, %eax
	andl	$1, %eax
	je	LBB0_7
## %bb.6:
	leaq	-64(%rbp), %rdi
	movl	$2, %esi
	callq	_skip_bits
LBB0_7:
	testb	$4, %r15b
	je	LBB0_9
LBB0_8:
	leaq	-64(%rbp), %rdi
	movl	$2, %esi
	callq	_skip_bits
LBB0_9:
	leaq	-64(%rbp), %rdi
	callq	_get_bits1
	movl	%eax, %r13d
	leaq	-92(%rbp), %r12
	leaq	-60(%rbp), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$12, %edx
	callq	_init_put_bits
	movq	%r12, %rdi
	movl	$2, %esi
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	callq	_put_bits
	movq	%r12, %rdi
	movl	$5, %esi
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	callq	_put_bits
	movq	%r12, %rdi
	movl	$3, %esi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	callq	_put_bits
	movq	%r12, %rdi
	movl	$3, %esi
	movl	%r15d, %edx
	callq	_put_bits
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%r13d, %edx
	callq	_put_bits
	sarl	%r14d
	movq	%r12, %rdi
	movl	$5, %esi
	movl	%r14d, %edx
	callq	_put_bits
	movq	%r12, %rdi
	movl	$5, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r12, %rdi
	callq	_flush_put_bits
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	$12, %edx
	callq	_avio_write
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	$11, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot write moov atom before AC3 packets. Set the delay_moov flag to fix this.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"dac3"

	.no_dead_strip	_mov_write_ac3_tag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mov_write_ac3_tag
_mov_write_ac3_tag:                     ; @mov_write_ac3_tag
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w8, [x2]
	cmp	w8, #6
	b.gt	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	x8, [sp, #24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.2:
	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_3:
	mov	x20, x2
	mov	x19, x1
	mov	x0, x1
	mov	w1, #11
	bl	_avio_wb32
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ffio_wfourcc
	ldr	x8, [x20, #8]
	add	x1, x8, #4
	ldr	w8, [x20]
	lsl	w8, w8, #3
	sub	w2, w8, #32
	add	x0, sp, #8
	bl	_init_get_bits
	add	x0, sp, #8
	mov	w1, #2
	bl	_get_bits
	mov	x21, x0
	add	x0, sp, #8
	mov	w1, #6
	bl	_get_bits
	mov	x20, x0
	add	x0, sp, #8
	mov	w1, #5
	bl	_get_bits
	mov	x22, x0
	add	x0, sp, #8
	mov	w1, #3
	bl	_get_bits
	mov	x23, x0
	add	x0, sp, #8
	mov	w1, #3
	bl	_get_bits
	mov	x24, x0
	cmp	w0, #2
	b.eq	LBB0_8
; %bb.4:
	cmp	w24, #1
	b.eq	LBB0_7
; %bb.5:
	tbz	w24, #0, LBB0_7
; %bb.6:
	add	x0, sp, #8
	mov	w1, #2
	bl	_skip_bits
LBB0_7:
	tbz	w24, #2, LBB0_9
LBB0_8:
	add	x0, sp, #8
	mov	w1, #2
	bl	_skip_bits
LBB0_9:
	add	x0, sp, #8
	bl	_get_bits1
	mov	x25, x0
	add	x0, sp, #4
	add	x1, sp, #12
	mov	w2, #12
	bl	_init_put_bits
	add	x0, sp, #4
	mov	w1, #2
	mov	x2, x21
	bl	_put_bits
	add	x0, sp, #4
	mov	w1, #5
	mov	x2, x22
	bl	_put_bits
	add	x0, sp, #4
	mov	w1, #3
	mov	x2, x23
	bl	_put_bits
	add	x0, sp, #4
	mov	w1, #3
	mov	x2, x24
	bl	_put_bits
	add	x0, sp, #4
	mov	w1, #1
	mov	x2, x25
	bl	_put_bits
	asr	w2, w20, #1
	add	x0, sp, #4
	mov	w1, #5
	bl	_put_bits
	add	x0, sp, #4
	mov	w1, #5
	mov	w2, #0
	bl	_put_bits
	add	x0, sp, #4
	bl	_flush_put_bits
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #12
	bl	_avio_write
	ldr	x8, [sp, #24]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	w0, #11
	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
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot write moov atom before AC3 packets. Set the delay_moov flag to fix this.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"dac3"

	.no_dead_strip	_mov_write_ac3_tag
.subsections_via_symbols
