	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function latm_write_frame_header
_latm_write_frame_header:               ## @latm_write_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	(%rdi), %rax
	movq	8(%rdi), %rbx
	movq	(%rax), %rax
	movq	(%rax), %r14
	xorl	%edx, %edx
	cmpl	$0, 16(%rbx)
	setne	%dl
	movq	%rsi, %rdi
	movl	$1, %esi
	callq	_put_bits
	movl	16(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$6, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$4, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	(%rbx), %rax
	movq	_AOT_ALS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movl	(%r14), %edx
	movl	8(%rbx), %eax
	sarl	$3, %eax
	subl	%eax, %edx
	movslq	%eax, %rsi
	shlq	$2, %rsi
	addq	8(%r14), %rsi
	movq	%r15, %rdi
	callq	_avpriv_copy_bits
	jmp	LBB0_5
LBB0_3:
	movq	8(%r14), %rsi
	movl	8(%rbx), %edx
	addl	$3, %edx
	movq	%r15, %rdi
	callq	_avpriv_copy_bits
	cmpl	$0, 20(%rbx)
	jne	LBB0_5
## %bb.4:
	movq	8(%r14), %rsi
	movl	(%r14), %edx
	leaq	-28(%rbp), %r14
	movq	%r14, %rdi
	callq	_init_get_bits8
	notl	%eax
	shrl	$31, %eax
	movl	%eax, %edi
	callq	_av_assert0
	movl	8(%rbx), %esi
	addl	$3, %esi
	movq	%r14, %rdi
	callq	_skip_bits_long
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ff_copy_pce_data
LBB0_5:
	movq	%r15, %rdi
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$8, %esi
	movl	$255, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movl	16(%rbx), %eax
LBB0_6:
	incl	%eax
	cltd
	idivl	12(%rbx)
	movl	%edx, 16(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AOT_ALS,8,3                    ## @AOT_ALS
	.no_dead_strip	_latm_write_frame_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function latm_write_frame_header
_latm_write_frame_header:               ; @latm_write_frame_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldp	x8, x20, [x0]
	ldr	x8, [x8]
	ldr	x21, [x8]
	ldr	w8, [x20, #16]
	cmp	w8, #0
	cset	w2, ne
	mov	x0, x1
	mov	w1, #1
	bl	_put_bits
	ldr	w8, [x20, #16]
	cbnz	w8, LBB0_6
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_put_bits
	mov	x0, x19
	mov	w1, #6
	mov	w2, #0
	bl	_put_bits
	mov	x0, x19
	mov	w1, #4
	mov	w2, #0
	bl	_put_bits
	mov	x0, x19
	mov	w1, #3
	mov	w2, #0
	bl	_put_bits
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _AOT_ALS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AOT_ALS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x21]
	ldr	w9, [x20, #8]
	asr	w9, w9, #3
	sub	w2, w8, w9
	ldr	x8, [x21, #8]
	add	x1, x8, w9, sxtw #2
	mov	x0, x19
	bl	_avpriv_copy_bits
	b	LBB0_5
LBB0_3:
	ldr	x1, [x21, #8]
	ldr	w8, [x20, #8]
	add	w2, w8, #3
	mov	x0, x19
	bl	_avpriv_copy_bits
	ldr	w8, [x20, #20]
	cbnz	w8, LBB0_5
; %bb.4:
	ldr	x1, [x21, #8]
	ldr	w2, [x21]
	add	x0, sp, #12
	bl	_init_get_bits8
	mvn	w8, w0
	lsr	w0, w8, #31
	bl	_av_assert0
	ldr	w8, [x20, #8]
	add	w1, w8, #3
	add	x0, sp, #12
	bl	_skip_bits_long
	add	x1, sp, #12
	mov	x0, x19
	bl	_ff_copy_pce_data
LBB0_5:
	mov	x0, x19
	mov	w1, #3
	mov	w2, #0
	bl	_put_bits
	mov	x0, x19
	mov	w1, #8
	mov	w2, #255
	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	w8, [x20, #16]
LBB0_6:
	add	w8, w8, #1
	ldr	w9, [x20, #12]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x20, #16]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AOT_ALS,8,3                    ; @AOT_ALS
	.no_dead_strip	_latm_write_frame_header
.subsections_via_symbols
