	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ac3_output_frame_header
_ac3_output_frame_header:               ## @ac3_output_frame_header
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	52(%rdi), %r14
	movq	%r14, %rdi
	movl	$16, %esi
	movl	$2935, %edx                     ## imm = 0xB77
	callq	_put_bits
	movq	%r14, %rdi
	movl	$16, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movl	56(%rbx), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_put_bits
	movl	4(%rbx), %eax
	subl	8(%rbx), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	addl	(%rbx), %edx
	movq	%r14, %rdi
	movl	$6, %esi
	callq	_put_bits
	movl	12(%rbx), %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_put_bits
	movl	16(%rbx), %edx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_put_bits
	movl	20(%rbx), %edx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_put_bits
	movl	20(%rbx), %eax
	testb	$1, %al
	je	LBB0_3
## %bb.1:
	movq	_AC3_CHMODE_MONO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_3
## %bb.2:
	movl	24(%rbx), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_put_bits
	movl	20(%rbx), %eax
LBB0_3:
	testb	$4, %al
	je	LBB0_5
## %bb.4:
	movl	28(%rbx), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_put_bits
	movl	20(%rbx), %eax
LBB0_5:
	movq	_AC3_CHMODE_STEREO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.6:
	movl	60(%rbx), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_put_bits
LBB0_7:
	movl	32(%rbx), %edx
	movl	$1, %r15d
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	subl	64(%rbx), %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_put_bits
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movl	68(%rbx), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	cmpl	$0, 68(%rbx)
	je	LBB0_9
## %bb.8:
	movl	72(%rbx), %edx
	addl	$-80, %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_put_bits
	movl	76(%rbx), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_put_bits
LBB0_9:
	movl	80(%rbx), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	movl	84(%rbx), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	cmpl	$6, 12(%rbx)
	jne	LBB0_14
## %bb.10:
	movl	88(%rbx), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	cmpl	$0, 88(%rbx)
	je	LBB0_12
## %bb.11:
	movl	92(%rbx), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_put_bits
	movl	36(%rbx), %edx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_put_bits
	movl	40(%rbx), %edx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_put_bits
	movl	44(%rbx), %edx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_put_bits
	movl	48(%rbx), %edx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_put_bits
LBB0_12:
	movl	96(%rbx), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_put_bits
	cmpl	$0, 96(%rbx)
	je	LBB0_15
## %bb.13:
	movl	100(%rbx), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_put_bits
	movl	104(%rbx), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_put_bits
	movl	108(%rbx), %r12d
	movl	$9, %r15d
LBB0_14:
	movq	%r14, %rdi
	movl	$1, %esi
	movl	%r12d, %edx
	callq	_put_bits
	movq	%r14, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_put_bits
LBB0_15:
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_bits                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AC3_CHMODE_MONO,4,2            ## @AC3_CHMODE_MONO
	.comm	_AC3_CHMODE_STEREO,4,2          ## @AC3_CHMODE_STEREO
	.no_dead_strip	_ac3_output_frame_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ac3_output_frame_header
_ac3_output_frame_header:               ; @ac3_output_frame_header
	.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	x20, x0
	add	x19, x0, #52
	mov	x0, x19
	mov	w1, #16
	mov	w2, #2935
	bl	_put_bits
	mov	x0, x19
	mov	w1, #16
	mov	w2, #0
	bl	_put_bits
	ldr	w2, [x20, #56]
	mov	x0, x19
	mov	w1, #2
	bl	_put_bits
	ldp	w8, w9, [x20]
	ldr	w10, [x20, #8]
	sub	w9, w9, w10
	cmp	w9, #0
	cinc	w9, w9, lt
	add	w2, w8, w9, asr #1
	mov	x0, x19
	mov	w1, #6
	bl	_put_bits
	ldr	w2, [x20, #12]
	mov	x0, x19
	mov	w1, #5
	bl	_put_bits
	ldr	w2, [x20, #16]
	mov	x0, x19
	mov	w1, #3
	bl	_put_bits
	ldr	w2, [x20, #20]
	mov	x0, x19
	mov	w1, #3
	bl	_put_bits
	ldr	w8, [x20, #20]
	tbz	w8, #0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, _AC3_CHMODE_MONO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AC3_CHMODE_MONO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_3
; %bb.2:
	ldr	w2, [x20, #24]
	mov	x0, x19
	mov	w1, #2
	bl	_put_bits
	ldr	w8, [x20, #20]
LBB0_3:
	tbz	w8, #2, LBB0_5
; %bb.4:
	ldr	w2, [x20, #28]
	mov	x0, x19
	mov	w1, #2
	bl	_put_bits
	ldr	w8, [x20, #20]
LBB0_5:
Lloh3:
	adrp	x9, _AC3_CHMODE_STEREO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AC3_CHMODE_STEREO@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.6:
	ldr	w2, [x20, #60]
	mov	x0, x19
	mov	w1, #2
	bl	_put_bits
LBB0_7:
	ldr	w2, [x20, #32]
	mov	x0, x19
	mov	w1, #1
	bl	_put_bits
	ldr	w8, [x20, #64]
	neg	w2, w8
	mov	x0, x19
	mov	w1, #5
	bl	_put_bits
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	ldr	w2, [x20, #68]
	mov	x0, x19
	mov	w1, #1
	bl	_put_bits
	ldr	w8, [x20, #68]
	cbz	w8, LBB0_9
; %bb.8:
	ldr	w8, [x20, #72]
	sub	w2, w8, #80
	mov	x0, x19
	mov	w1, #5
	bl	_put_bits
	ldr	w2, [x20, #76]
	mov	x0, x19
	mov	w1, #2
	bl	_put_bits
LBB0_9:
	ldr	w2, [x20, #80]
	mov	w21, #1
	mov	x0, x19
	mov	w1, #1
	bl	_put_bits
	ldr	w2, [x20, #84]
	mov	x0, x19
	mov	w1, #1
	bl	_put_bits
	ldr	w8, [x20, #12]
	cmp	w8, #6
	b.ne	LBB0_14
; %bb.10:
	ldr	w2, [x20, #88]
	mov	x0, x19
	mov	w1, #1
	bl	_put_bits
	ldr	w8, [x20, #88]
	cbz	w8, LBB0_12
; %bb.11:
	ldr	w2, [x20, #92]
	mov	x0, x19
	mov	w1, #2
	bl	_put_bits
	ldr	w2, [x20, #36]
	mov	x0, x19
	mov	w1, #3
	bl	_put_bits
	ldr	w2, [x20, #40]
	mov	x0, x19
	mov	w1, #3
	bl	_put_bits
	ldr	w2, [x20, #44]
	mov	x0, x19
	mov	w1, #3
	bl	_put_bits
	ldr	w2, [x20, #48]
	mov	x0, x19
	mov	w1, #3
	bl	_put_bits
LBB0_12:
	ldr	w2, [x20, #96]
	mov	x0, x19
	mov	w1, #1
	bl	_put_bits
	ldr	w8, [x20, #96]
	cbz	w8, LBB0_16
; %bb.13:
	ldr	w2, [x20, #100]
	mov	x0, x19
	mov	w1, #2
	bl	_put_bits
	ldr	w2, [x20, #104]
	mov	x0, x19
	mov	w1, #2
	bl	_put_bits
	ldr	w2, [x20, #108]
	mov	w21, #9
	b	LBB0_15
LBB0_14:
	mov	w2, #0
LBB0_15:
	mov	x0, x19
	mov	w1, #1
	bl	_put_bits
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_put_bits
LBB0_16:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #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
	b	_put_bits
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AC3_CHMODE_MONO,4,2            ; @AC3_CHMODE_MONO
	.comm	_AC3_CHMODE_STEREO,4,2          ; @AC3_CHMODE_STEREO
	.no_dead_strip	_ac3_output_frame_header
.subsections_via_symbols
