	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbc_encode_frame
_sbc_encode_frame:                      ## @sbc_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, %r15
	movq	(%rdi), %r14
	movl	60(%r14), %eax
	movl	(%rdx), %ecx
	imull	%eax, %ecx
	addl	%ecx, %ecx
	xorl	%ebx, %ebx
	cmpl	72(%r14), %ecx
	jl	LBB0_10
## %bb.1:
	movq	%rdx, %r13
	movq	%rsi, %r12
	movl	56(%r14), %ecx
	imull	%ecx, %eax
	movl	%eax, %edx
	shll	$2, %edx
	leal	7(,%rax,4), %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	sarl	$3, %eax
	movl	68(%r14), %edx
	imull	64(%r14), %edx
	movq	48(%r14), %rsi
	movq	_SBC_MODE_DUAL_CHANNEL@GOTPCREL(%rip), %r8
	xorl	%ebx, %ebx
	cmpq	(%r8), %rsi
	sete	%bl
	incl	%ebx
	imull	%edx, %ebx
	movq	_SBC_MODE_JOINT_STEREO@GOTPCREL(%rip), %rdx
	addl	$7, %ecx
	cmpq	(%rdx), %rsi
	movl	$7, %edx
	cmovel	%ecx, %edx
	leal	(%rdx,%rbx), %ecx
	addl	$7, %ecx
                                        ## kill: def $edx killed $edx killed $rdx
	addl	%ebx, %edx
	cmovnsl	%edx, %ecx
	sarl	$3, %ecx
	leal	(%rax,%rcx), %edx
	addl	$4, %edx
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	48(%r14), %r15
	movl	56(%r14), %ecx
	cmpl	$8, %ecx
	jne	LBB0_5
## %bb.4:
	movl	24(%r14), %edx
	movl	28(%r14), %edi
	movq	8(%r13), %rax
	movl	(%rax), %esi
	movl	64(%r14), %ecx
	shll	$3, %ecx
	movl	60(%r14), %r8d
	callq	*40(%r14)
	jmp	LBB0_6
LBB0_2:
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_5:
	movl	24(%r14), %edx
	movl	28(%r14), %edi
	movq	8(%r13), %rax
	movl	(%rax), %esi
	imull	64(%r14), %ecx
	movl	60(%r14), %r8d
	callq	*32(%r14)
LBB0_6:
	movl	%eax, 28(%r14)
	leaq	8(%r14), %rdi
	movq	%r15, %rsi
	callq	_sbc_analyze_audio
	movq	48(%r14), %rax
	movq	_JOINT_STEREO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movl	80(%r14), %edi
	movl	76(%r14), %esi
	movl	56(%r14), %ecx
	movl	64(%r14), %edx
	callq	*8(%r14)
	movl	%eax, %r13d
	jmp	LBB0_9
LBB0_8:
	movl	80(%r14), %edi
	movl	76(%r14), %esi
	movl	64(%r14), %edx
	movl	56(%r14), %r8d
	movl	60(%r14), %ecx
	callq	*16(%r14)
	xorl	%r13d, %r13d
LBB0_9:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_emms_c
	movl	(%r14), %ecx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_sbc_pack_frame
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SBC_MODE_JOINT_STEREO,8,3      ## @SBC_MODE_JOINT_STEREO
	.comm	_SBC_MODE_DUAL_CHANNEL,8,3      ## @SBC_MODE_DUAL_CHANNEL
	.comm	_JOINT_STEREO,8,3               ## @JOINT_STEREO
	.no_dead_strip	_sbc_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbc_encode_frame
_sbc_encode_frame:                      ; @sbc_encode_frame
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x23, [x0]
	ldr	w8, [x23, #60]
	ldr	w9, [x2]
	mul	w9, w8, w9
	ldr	w10, [x23, #72]
	cmp	w10, w9, lsl #1
	b.le	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_10
LBB0_2:
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	ldr	w9, [x23, #56]
	mul	w8, w8, w9
	lsl	w8, w8, #2
	add	w10, w8, #7
	cmp	w8, #0
	csel	w8, w10, w8, lt
	asr	w8, w8, #3
	ldp	w10, w11, [x23, #64]
	mul	w10, w11, w10
Lloh0:
	adrp	x11, _SBC_MODE_DUAL_CHANNEL@GOTPAGE
Lloh1:
	ldr	x11, [x11, _SBC_MODE_DUAL_CHANNEL@GOTPAGEOFF]
	ldr	x12, [x23, #48]
Lloh2:
	ldr	x11, [x11]
	cmp	x12, x11
	mov	w11, #1
Lloh3:
	adrp	x13, _SBC_MODE_JOINT_STEREO@GOTPAGE
Lloh4:
	ldr	x13, [x13, _SBC_MODE_JOINT_STEREO@GOTPAGEOFF]
	cinc	w11, w11, eq
Lloh5:
	ldr	x13, [x13]
	add	w9, w9, #7
	cmp	x12, x13
	mov	w12, #7
	csel	w9, w9, w12, eq
	madd	w9, w10, w11, w9
	add	w10, w9, #7
	cmp	w9, #0
	csel	w9, w10, w9, lt
	add	w8, w8, w9, asr #3
	add	w2, w8, #4
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_10
; %bb.3:
	add	x21, x23, #48
	ldr	w8, [x23, #56]
	cmp	w8, #8
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x23, #40]
	ldr	x9, [x22, #8]
	ldr	w1, [x9]
	ldp	w2, w0, [x23, #24]
	ldp	w4, w9, [x23, #60]
	lsl	w3, w9, #3
	blr	x8
	b	LBB0_6
LBB0_5:
	ldr	x9, [x23, #32]
	ldr	x10, [x22, #8]
	ldr	w1, [x10]
	ldp	w2, w0, [x23, #24]
	ldp	w4, w10, [x23, #60]
	mul	w3, w10, w8
	blr	x9
LBB0_6:
	str	w0, [x23, #28]
	add	x0, x23, #8
	mov	x1, x21
	bl	_sbc_analyze_audio
	ldr	x8, [x23, #48]
Lloh6:
	adrp	x9, _JOINT_STEREO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _JOINT_STEREO@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x23, #8]
	ldp	w1, w0, [x23, #76]
	ldr	w2, [x23, #64]
	ldr	w3, [x23, #56]
	blr	x8
	mov	x22, x0
	b	LBB0_9
LBB0_8:
	ldr	x8, [x23, #16]
	ldp	w1, w0, [x23, #76]
	ldp	w3, w2, [x23, #60]
	ldr	w4, [x23, #56]
	blr	x8
	mov	w22, #0
LBB0_9:
	bl	_emms_c
	ldr	w3, [x23]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_sbc_pack_frame
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
LBB0_10:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SBC_MODE_JOINT_STEREO,8,3      ; @SBC_MODE_JOINT_STEREO
	.comm	_SBC_MODE_DUAL_CHANNEL,8,3      ; @SBC_MODE_DUAL_CHANNEL
	.comm	_JOINT_STEREO,8,3               ; @JOINT_STEREO
	.no_dead_strip	_sbc_encode_frame
.subsections_via_symbols
