	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_frame
_encode_frame:                          ## @encode_frame
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movl	(%r15), %edx
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_12
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rax
	movq	(%rax), %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_subband_transform
	cmpq	$0, 16(%r15)
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_lfe_downsample
LBB0_3:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_calc_masking
	cmpq	$0, 8(%r15)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_adpcm_analysis
LBB0_5:
	movq	%r15, %rdi
	callq	_find_peaks
	movq	%r15, %rdi
	callq	_assign_bits
	movq	%r15, %rdi
	callq	_calc_lfe_scales
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_shift_history
	leaq	4(%r15), %r14
	movl	(%r13), %edx
	movl	12(%r13), %esi
	movq	%r14, %rdi
	callq	_init_put_bits
	movq	%r15, %rdi
	callq	_fill_in_adpcm_bufer
	movq	%r15, %rdi
	callq	_put_frame_header
	movq	%r15, %rdi
	callq	_put_primary_audio_header
	movq	_SUBFRAMES@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_put_subframe
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_7
LBB0_8:
	movq	%r14, %rdi
	callq	_put_bits_count
	movl	%eax, %r12d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %eax
	shll	$3, %eax
	movq	%r14, %rdi
	cmpl	%eax, %r12d
	jge	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	incl	%r12d
	jmp	LBB0_10
LBB0_11:
	callq	_flush_put_bits
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %eax
	movl	%eax, 8(%r13)
	movl	(%rcx), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_ff_samples_to_time_base
	movl	%eax, 4(%r13)
	movq	%r14, %rdi
	callq	_put_bits_count
	sarl	$3, %eax
	movl	%eax, (%r13)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%eax, %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUBFRAMES,4,2                  ## @SUBFRAMES
	.no_dead_strip	_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_frame
_encode_frame:                          ; @encode_frame
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x23, [x0]
	ldr	w2, [x23]
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_12
; %bb.1:
	ldr	x8, [x22, #8]
	ldr	x24, [x8]
	mov	x0, x23
	mov	x1, x24
	bl	_subband_transform
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x23
	mov	x1, x24
	bl	_lfe_downsample
LBB0_3:
	mov	x0, x23
	mov	x1, x24
	bl	_calc_masking
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x23
	bl	_adpcm_analysis
LBB0_5:
	mov	x0, x23
	bl	_find_peaks
	mov	x0, x23
	bl	_assign_bits
	mov	x0, x23
	bl	_calc_lfe_scales
	mov	x0, x23
	mov	x1, x24
	bl	_shift_history
	add	x24, x23, #4
	ldr	w1, [x20, #12]
	ldr	w2, [x20]
	mov	x0, x24
	bl	_init_put_bits
	mov	x0, x23
	bl	_fill_in_adpcm_bufer
	mov	x0, x23
	bl	_put_frame_header
	mov	x0, x23
	bl	_put_primary_audio_header
Lloh0:
	adrp	x26, _SUBFRAMES@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SUBFRAMES@GOTPAGEOFF]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	w25, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x25
	bl	_put_subframe
	add	w25, w25, #1
	ldr	w8, [x26]
	cmp	w25, w8
	b.lt	LBB0_7
LBB0_8:
	mov	x0, x24
	bl	_put_bits_count
	ldr	w8, [x23]
	cmp	w0, w8, lsl #3
	b.ge	LBB0_11
; %bb.9:
	mov	x25, x0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	add	w25, w25, #1
	ldr	w8, [x23]
	cmp	w25, w8, lsl #3
	b.lt	LBB0_10
LBB0_11:
	mov	x0, x24
	bl	_flush_put_bits
	ldp	w1, w8, [x22]
	str	w8, [x20, #8]
	mov	x0, x21
	bl	_ff_samples_to_time_base
	str	w0, [x20, #4]
	mov	x0, x24
	bl	_put_bits_count
	mov	x8, x0
	mov	w0, #0
	asr	w8, w8, #3
	str	w8, [x20]
	mov	w8, #1
	str	w8, [x19]
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SUBFRAMES,4,2                  ; @SUBFRAMES
	.no_dead_strip	_encode_frame
.subsections_via_symbols
