	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amr_wb_encode_frame
_amr_wb_encode_frame:                   ## @amr_wb_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	8(%rdx), %rax
	movq	(%rax), %r13
	movq	_MAX_PACKET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movq	(%rbx), %rdi
	cmpq	%rdi, (%r14)
	jne	LBB0_3
## %bb.2:
	movl	12(%r14), %esi
	jmp	LBB0_4
LBB0_3:
	movq	%rbx, %rsi
	callq	_get_wb_bitrate_mode
	movl	%eax, %esi
	movl	%eax, 12(%r14)
	movq	(%rbx), %rax
	movq	%rax, (%r14)
LBB0_4:
	movl	8(%r14), %r8d
	movl	16(%r14), %edi
	movl	12(%r15), %ecx
	movq	%r13, %rdx
	callq	_E_IF_encode
	testl	%eax, %eax
	jle	LBB0_10
## %bb.5:
	movl	%eax, %r13d
	movq	_MAX_PACKET_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jg	LBB0_10
## %bb.6:
	movq	(%r12), %r14
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_8
## %bb.7:
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_ff_samples_to_time_base
	subq	%rax, %r14
	movq	%r14, (%r15)
LBB0_8:
	movl	%r13d, 8(%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PACKET_SIZE,4,2            ## @MAX_PACKET_SIZE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error encoding frame\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.no_dead_strip	_amr_wb_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amr_wb_encode_frame
_amr_wb_encode_frame:                   ; @amr_wb_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	x25, [x0, #16]
	ldr	x8, [x2, #8]
	ldr	x23, [x8]
Lloh0:
	adrp	x24, _MAX_PACKET_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MAX_PACKET_SIZE@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_9
; %bb.1:
	ldr	x8, [x25]
	ldr	x0, [x21]
	cmp	x8, x0
	b.ne	LBB0_3
; %bb.2:
	ldr	w1, [x25, #12]
	b	LBB0_4
LBB0_3:
	mov	x1, x21
	bl	_get_wb_bitrate_mode
	mov	x1, x0
	str	w0, [x25, #12]
	ldr	x8, [x21]
	str	x8, [x25]
LBB0_4:
	ldr	w0, [x25, #16]
	ldr	w3, [x20, #12]
	ldr	w4, [x25, #8]
	mov	x2, x23
	bl	_E_IF_encode
	ldr	w8, [x24]
	cmp	w0, #1
	ccmp	w0, w8, #0, ge
	b.le	LBB0_6
; %bb.5:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_6:
	mov	x23, x0
	ldr	x22, [x22]
Lloh10:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x22, x8
	b.eq	LBB0_8
; %bb.7:
	ldr	w1, [x21, #8]
	mov	x0, x21
	bl	_ff_samples_to_time_base
	sub	x8, x22, x0
	str	x8, [x20]
LBB0_8:
	mov	w0, #0
	str	w23, [x20, #8]
	mov	w8, #1
	str	w8, [x19]
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PACKET_SIZE,4,2            ; @MAX_PACKET_SIZE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error encoding frame\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.no_dead_strip	_amr_wb_encode_frame
.subsections_via_symbols
