	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aac_encode_frame
_aac_encode_frame:                      ## @aac_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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rdi), %r12
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -192(%rbp)
	movaps	%xmm0, -208(%rbp)
	movaps	%xmm0, -224(%rbp)
	movaps	%xmm0, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movaps	%xmm0, -176(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	_IN_AUDIO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movq	_OUT_BITSTREAM_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	testq	%rdx, %rdx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	je	LBB0_3
## %bb.1:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)
	movl	(%rbx), %eax
	imull	(%r13), %eax
	leal	(%rax,%rax), %ecx
	movl	%ecx, -44(%rbp)
	movl	%eax, -64(%rbp)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ff_af_queue_add
	testl	%eax, %eax
	jns	LBB0_4
	jmp	LBB0_12
LBB0_3:
	leaq	-116(%rbp), %rax
	movq	%rax, -96(%rbp)
	movl	$0, -44(%rbp)
	movl	$-1, -64(%rbp)
LBB0_4:
	movl	$2, -80(%rbp)
	movl	$1, -224(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, -216(%rbp)
	leaq	-84(%rbp), %rax
	movq	%rax, -208(%rbp)
	leaq	-44(%rbp), %rax
	movq	%rax, -200(%rbp)
	leaq	-80(%rbp), %rax
	movq	%rax, -192(%rbp)
	movl	(%r13), %eax
	shll	$8, %eax
	leal	(%rax,%rax,2), %esi
	movl	$8192, %edi                     ## imm = 0x2000
	callq	_FFMAX
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movq	16(%r15), %rax
	movq	%rax, -112(%rbp)
	movl	(%r15), %eax
	movl	%eax, -72(%rbp)
	movl	$1, -68(%rbp)
	movl	$1, -176(%rbp)
	leaq	-112(%rbp), %rax
	movq	%rax, -168(%rbp)
	leaq	-76(%rbp), %rax
	movq	%rax, -160(%rbp)
	leaq	-72(%rbp), %rax
	movq	%rax, -152(%rbp)
	leaq	-68(%rbp), %rax
	movq	%rax, -144(%rbp)
	movl	4(%r12), %edi
	leaq	-224(%rbp), %rsi
	leaq	-176(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	leaq	-56(%rbp), %r8
	callq	_aacEncEncode
	movq	_AACENC_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.6:
	xorl	%r14d, %r14d
	cmpl	$0, -56(%rbp)
	je	LBB0_13
## %bb.7:
	movl	4(%r13), %esi
	leaq	8(%r15), %rdx
	leaq	4(%r15), %rcx
	movq	%r12, %rdi
	callq	_ff_af_queue_remove
	movl	-56(%rbp), %eax
	movl	%eax, (%r15)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	$1, (%rax)
	jmp	LBB0_13
LBB0_9:
	testq	%rbx, %rbx
	jne	LBB0_11
## %bb.10:
	xorl	%r14d, %r14d
	movq	_AACENC_ENCODE_EOF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
LBB0_11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	%rax, %rdi
	callq	_aac_get_error
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_12:
	movl	%eax, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IN_AUDIO_DATA,4,2              ## @IN_AUDIO_DATA
	.comm	_OUT_BITSTREAM_DATA,4,2         ## @OUT_BITSTREAM_DATA
	.comm	_AACENC_OK,8,3                  ## @AACENC_OK
	.comm	_AACENC_ENCODE_EOF,8,3          ## @AACENC_ENCODE_EOF
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to encode frame: %s\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_aac_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aac_encode_frame
_aac_encode_frame:                      ; @aac_encode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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	x20, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
	add	x24, sp, #112
	ldr	x22, [x0, #8]
	movi.2d	v0, #0000000000000000
	str	q0, [x24, #32]
	stp	q0, q0, [sp, #112]
	stp	q0, q0, [sp, #80]
	str	q0, [sp, #64]
	stp	xzr, xzr, [sp, #48]
Lloh0:
	adrp	x8, _IN_AUDIO_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IN_AUDIO_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #44]
Lloh3:
	adrp	x8, _OUT_BITSTREAM_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OUT_BITSTREAM_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #32]
	cbz	x2, LBB0_2
; %bb.1:
	ldr	x8, [x23, #8]
	ldr	x8, [x8]
	str	x8, [sp, #16]
	ldr	w8, [x19]
	ldr	w9, [x23]
	mul	w8, w9, w8
	lsl	w9, w8, #1
	str	w9, [sp, #40]
	str	w8, [sp, #56]
	mov	x0, x22
	mov	x1, x23
	bl	_ff_af_queue_add
	tbz	w0, #31, LBB0_3
	b	LBB0_11
LBB0_2:
	add	x8, sp, #4
	str	x8, [sp, #16]
	str	wzr, [sp, #40]
	mov	w8, #-1
	str	w8, [sp, #56]
LBB0_3:
	mov	w8, #2
	str	w8, [sp, #36]
	mov	w25, #1
	str	w25, [sp, #112]
	add	x8, sp, #16
	add	x9, sp, #44
	stp	x8, x9, [sp, #120]
	add	x8, sp, #40
	add	x9, sp, #36
	stp	x8, x9, [x24, #24]
	ldr	w8, [x19]
	add	w8, w8, w8, lsl #1
	lsl	w1, w8, #8
	mov	w0, #8192
	bl	_FFMAX
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_11
; %bb.4:
	ldr	x8, [x21, #16]
	str	x8, [sp, #8]
	ldr	w8, [x21]
	stp	w25, w8, [sp, #24]
	str	w25, [sp, #64]
	add	x8, sp, #8
	add	x9, sp, #32
	stp	x8, x9, [sp, #72]
	add	x8, sp, #28
	add	x9, sp, #24
	stp	x8, x9, [sp, #88]
	ldr	w0, [x22, #4]
	add	x1, sp, #112
	add	x2, sp, #64
	add	x3, sp, #56
	add	x4, sp, #48
	bl	_aacEncEncode
Lloh6:
	adrp	x8, _AACENC_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AACENC_OK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.5:
	ldr	w8, [sp, #48]
	cbz	w8, LBB0_9
; %bb.6:
	ldr	w1, [x19, #4]
	add	x2, x21, #8
	add	x3, x21, #4
	mov	x0, x22
	bl	_ff_af_queue_remove
	mov	w0, #0
	ldr	w8, [sp, #48]
	str	w8, [x21]
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_11
LBB0_7:
	cbnz	x23, LBB0_10
; %bb.8:
Lloh9:
	adrp	x8, _AACENC_ENCODE_EOF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AACENC_ENCODE_EOF@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh12:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	bl	_aac_get_error
	mov	x3, x0
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_av_log
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_11:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IN_AUDIO_DATA,4,2              ; @IN_AUDIO_DATA
	.comm	_OUT_BITSTREAM_DATA,4,2         ; @OUT_BITSTREAM_DATA
	.comm	_AACENC_OK,8,3                  ; @AACENC_OK
	.comm	_AACENC_ENCODE_EOF,8,3          ; @AACENC_ENCODE_EOF
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to encode frame: %s\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_aac_encode_frame
.subsections_via_symbols
