	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbc_pack_frame
_sbc_pack_frame:                        ## @sbc_pack_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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -68(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.1:
	movq	_MSBC_SYNCWORD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rdi), %rsi
	movl	%eax, (%rsi)
	movq	$0, 4(%rsi)
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	jmp	LBB0_3
LBB0_2:
	movq	_SBC_SYNCWORD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rdi), %rsi
	movl	%eax, (%rsi)
	movl	(%r15), %eax
	shll	$6, %eax
	movzbl	%al, %eax
	movl	%eax, 4(%rsi)
	movl	4(%r15), %ecx
	leal	48(,%rcx,4), %ecx
	andl	$48, %ecx
	orl	%eax, %ecx
	movl	%ecx, 4(%rsi)
	movl	8(%r15), %eax
	andl	$3, %eax
	leal	(%rcx,%rax,4), %eax
	movl	%eax, 4(%rsi)
	movl	12(%r15), %ecx
	andl	$1, %ecx
	leal	(%rax,%rcx,2), %eax
	movl	%eax, 4(%rsi)
	xorl	%edx, %edx
	cmpl	$8, 16(%r15)
	sete	%dl
	orl	%eax, %edx
	movl	%edx, 4(%rsi)
	movl	20(%r15), %r9d
	movl	%r9d, 8(%rsi)
	movl	8(%r15), %eax
	movl	16(%r15), %ebx
	movq	_STEREO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%r8b
	movq	_JOINT_STEREO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%cl
	orb	%r8b, %cl
	orb	$4, %cl
	shll	%cl, %ebx
	movq	$-5, %rax
	cmpl	%ebx, 20(%r15)
	jg	LBB0_28
LBB0_3:
	movl	%edx, -96(%rbp)
	movl	%r9d, -92(%rbp)
	addq	$16, %rsi
	movq	%rdi, -176(%rbp)                ## 8-byte Spill
	movl	8(%rdi), %edx
	leaq	-164(%rbp), %rdi
	callq	_init_put_bits
	movl	8(%r15), %eax
	movq	_JOINT_STEREO@GOTPCREL(%rip), %rcx
	movl	$16, %ebx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.4:
	movl	16(%r15), %esi
	leaq	-164(%rbp), %rdi
	movl	%r12d, %edx
	callq	_put_bits
	movl	%r12d, -88(%rbp)
	movl	16(%r15), %ebx
	addl	$16, %ebx
LBB0_5:
	movl	24(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_12
## %bb.6:
	movl	16(%r15), %eax
	xorl	%r13d, %r13d
	leaq	-164(%rbp), %r12
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r13
	movslq	%ecx, %rdx
	cmpq	%rdx, %r13
	jge	LBB0_12
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	testl	%eax, %eax
	jle	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	32(%r15), %rax
	movq	(%rax,%r13,8), %rcx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rcx,%r14,4), %edx
	andl	$15, %edx
	movq	%r12, %rdi
	movl	$4, %esi
	callq	_put_bits
	movl	%ebx, %eax
	sarl	$3, %eax
	cltq
	movl	-96(%rbp,%rax,4), %edx
	shll	$4, %edx
	movq	32(%r15), %rcx
	movq	(%rcx,%r13,8), %rcx
	movl	(%rcx,%r14,4), %esi
	andl	$15, %esi
	orl	%edx, %esi
	movl	%esi, -96(%rbp,%rax,4)
	addl	$4, %ebx
	incq	%r14
	movslq	16(%r15), %rax
	cmpq	%rax, %r14
	jl	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	24(%r15), %ecx
	jmp	LBB0_11
LBB0_12:
	leal	7(%rbx), %ecx
	testl	%ebx, %ebx
	cmovnsl	%ebx, %ecx
	andl	$-8, %ecx
	movl	%ebx, %eax
	subl	%ecx, %eax
	je	LBB0_14
## %bb.13:
	movl	%ebx, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rdx
	movb	$8, %cl
	subb	%al, %cl
	shll	%cl, -96(%rbp,%rdx,4)
LBB0_14:
	movl	48(%r15), %edi
	leaq	-96(%rbp), %rsi
	movl	%ebx, %edx
	callq	_ff_sbc_crc8
	movq	-176(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	%eax, 12(%rcx)
	leaq	-160(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ff_sbc_calculate_bits
	movl	4(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_27
## %bb.15:
	movl	24(%r15), %eax
	xorl	%edx, %edx
	leaq	-164(%rbp), %r13
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	4(%r15), %ecx
	movq	-176(%rbp), %rdx                ## 8-byte Reload
LBB0_26:                                ##   in Loop: Header=BB0_16 Depth=1
	incl	%edx
	cmpl	%ecx, %edx
	jge	LBB0_27
LBB0_16:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_18 Depth 2
                                        ##       Child Loop BB0_20 Depth 3
	testl	%eax, %eax
	jle	LBB0_26
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%rdx, -176(%rbp)                ## 8-byte Spill
	movl	16(%r15), %ecx
	leaq	-160(%rbp), %rbx
	xorl	%r14d, %r14d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_18 Depth=2
	movl	24(%r15), %eax
LBB0_24:                                ##   in Loop: Header=BB0_18 Depth=2
	incq	%r14
	movslq	%eax, %rdx
	addq	$32, %rbx
	cmpq	%rdx, %r14
	jge	LBB0_25
LBB0_18:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_20 Depth 3
	testl	%ecx, %ecx
	jle	LBB0_24
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=2
	xorl	%r12d, %r12d
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=3
	incq	%r12
	movslq	%ecx, %rax
	cmpq	%rax, %r12
	jge	LBB0_23
LBB0_20:                                ##   Parent Loop BB0_16 Depth=1
                                        ##     Parent Loop BB0_18 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%rbx,%r12,4), %esi
	testl	%esi, %esi
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=3
	movq	%r13, %rdi
	callq	_put_bits
	movl	16(%r15), %ecx
	jmp	LBB0_22
LBB0_27:
	leaq	-164(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_flush_put_bits
	movq	%rbx, %rdi
	callq	_put_bits_count
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	addl	$14, %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$3, %eax
	cltq
LBB0_28:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_30
## %bb.29:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MSBC_SYNCWORD,4,2              ## @MSBC_SYNCWORD
	.comm	_SBC_SYNCWORD,4,2               ## @SBC_SYNCWORD
	.comm	_STEREO,4,2                     ## @STEREO
	.comm	_JOINT_STEREO,4,2               ## @JOINT_STEREO
	.comm	_SCALE_OUT_BITS,4,2             ## @SCALE_OUT_BITS
	.no_dead_strip	_sbc_pack_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbc_pack_frame
_sbc_pack_frame:                        ; @sbc_pack_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	str	wzr, [sp, #116]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #100]
	stur	q0, [sp, #84]
Lloh3:
	adrp	x22, _JOINT_STEREO@GOTPAGE
Lloh4:
	ldr	x22, [x22, _JOINT_STEREO@GOTPAGEOFF]
	cbz	w3, LBB0_2
; %bb.1:
	mov	w10, #0
	mov	w9, #0
Lloh5:
	adrp	x8, _MSBC_SYNCWORD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSBC_SYNCWORD@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x8]
	ldr	x8, [x20]
	stp	wzr, wzr, [x8, #4]
	str	w11, [x8]
	b	LBB0_4
LBB0_2:
Lloh8:
	adrp	x8, _SBC_SYNCWORD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SBC_SYNCWORD@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x8]
	ldr	x8, [x20]
	str	w9, [x8]
	ldr	w9, [x19]
	ubfiz	w10, w9, #6, #2
	str	w10, [x8, #4]
	ldr	w10, [x19, #4]
	lsl	w10, w10, #2
	add	w10, w10, #48
	and	w10, w10, #0x30
	bfi	w10, w9, #6, #2
	str	w10, [x8, #4]
	ldr	w9, [x19, #8]
	bfi	w10, w9, #2, #2
	str	w10, [x8, #4]
	ldr	w9, [x19, #12]
	bfi	w10, w9, #1, #1
	str	w10, [x8, #4]
	ldr	w9, [x19, #16]
	cmp	w9, #8
	cset	w9, eq
	orr	w9, w10, w9
	str	w9, [x8, #4]
	ldr	w10, [x19, #20]
	str	w10, [x8, #8]
	ldp	w12, w11, [x19, #16]
	ldr	w13, [x19, #8]
Lloh11:
	adrp	x14, _STEREO@GOTPAGE
Lloh12:
	ldr	x14, [x14, _STEREO@GOTPAGEOFF]
Lloh13:
	ldr	w14, [x14]
	ldr	w15, [x22]
	cmp	w13, w15
	ccmp	w13, w14, #4, ne
	mov	w13, #4
	cinc	w13, w13, eq
	lsl	w12, w12, w13
	cmp	w11, w12
	b.le	LBB0_4
; %bb.3:
	mov	x0, #-5
	b	LBB0_30
LBB0_4:
	stp	w9, w10, [sp, #76]
	add	x1, x8, #16
	ldr	w2, [x20, #8]
	add	x0, sp, #8
	bl	_init_put_bits
	ldr	w8, [x19, #8]
	ldr	w9, [x22]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.5:
	ldr	w1, [x19, #16]
	add	x0, sp, #8
	mov	x2, x21
	bl	_put_bits
	str	w21, [sp, #84]
	ldr	w8, [x19, #16]
	add	w21, w8, #16
	b	LBB0_7
LBB0_6:
	mov	w21, #16
LBB0_7:
	ldr	w9, [x19, #24]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.8:
	mov	x22, #0
	ldr	w8, [x19, #16]
	add	x23, sp, #76
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x22, x22, #1
	cmp	x22, w9, sxtw
	b.ge	LBB0_14
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x24, #0
	ldr	x8, [x19, #32]
	ldr	x9, [x8, x22, lsl #3]
LBB0_12:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x25, x24, #2
	ldr	w8, [x9, x25]
	and	w2, w8, #0xf
	add	x0, sp, #8
	mov	w1, #4
	bl	_put_bits
	asr	w8, w21, #3
	sbfiz	x8, x8, #2, #32
	ldr	w10, [x23, x8]
	ldr	x9, [x19, #32]
	ldr	x9, [x9, x22, lsl #3]
	ldr	w11, [x9, x25]
	bfi	w11, w10, #4, #28
	str	w11, [x23, x8]
	add	w21, w21, #4
	add	x24, x24, #1
	ldrsw	x8, [x19, #16]
	cmp	x24, x8
	b.lt	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w9, [x19, #24]
	b	LBB0_9
LBB0_14:
	negs	w8, w21
	and	w8, w8, #0x7
	and	w9, w21, #0x7
	csneg	w8, w9, w8, mi
	cbz	w8, LBB0_16
; %bb.15:
	mov	w9, #8
	sub	w8, w9, w8
	asr	w9, w21, #3
	sbfiz	x9, x9, #2, #32
	add	x10, sp, #76
	ldr	w11, [x10, x9]
	lsl	w8, w11, w8
	str	w8, [x10, x9]
LBB0_16:
	ldr	w0, [x19, #48]
	add	x1, sp, #76
	mov	x2, x21
	bl	_ff_sbc_crc8
	ldr	x8, [x20]
	str	w0, [x8, #12]
	add	x1, sp, #12
	mov	x0, x19
	bl	_ff_sbc_calculate_bits
	ldr	w9, [x19, #4]
	cmp	w9, #1
	b.lt	LBB0_29
; %bb.17:
	mov	w20, #0
	ldr	w8, [x19, #24]
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=1
	ldr	w9, [x19, #4]
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	w20, w20, #1
	cmp	w20, w9
	b.ge	LBB0_29
LBB0_20:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_24 Depth 2
                                        ;       Child Loop BB0_27 Depth 3
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x21, #0
	ldr	w9, [x19, #16]
	add	x22, sp, #12
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=2
	ldr	w8, [x19, #24]
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=2
	add	x21, x21, #1
	add	x22, x22, #32
	cmp	x21, w8, sxtw
	b.ge	LBB0_18
LBB0_24:                                ;   Parent Loop BB0_20 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_27 Depth 3
	cmp	w9, #1
	b.lt	LBB0_23
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=2
	mov	x23, #0
	b	LBB0_27
LBB0_26:                                ;   in Loop: Header=BB0_27 Depth=3
	add	x23, x23, #1
	cmp	x23, w9, sxtw
	b.ge	LBB0_22
LBB0_27:                                ;   Parent Loop BB0_20 Depth=1
                                        ;     Parent Loop BB0_24 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w1, [x22, x23, lsl #2]
	cbz	w1, LBB0_26
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=3
	add	x0, sp, #8
	bl	_put_bits
	ldr	w9, [x19, #16]
	b	LBB0_26
LBB0_29:
	add	x0, sp, #8
	bl	_flush_put_bits
	add	x0, sp, #8
	bl	_put_bits_count
	add	w8, w0, #7
	add	w9, w0, #14
	cmp	w8, #0
	csel	w8, w9, w8, lt
	sbfx	x0, x8, #3, #29
LBB0_30:
	ldur	x8, [x29, #-72]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_32
; %bb.31:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_32:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MSBC_SYNCWORD,4,2              ; @MSBC_SYNCWORD
	.comm	_SBC_SYNCWORD,4,2               ; @SBC_SYNCWORD
	.comm	_STEREO,4,2                     ; @STEREO
	.comm	_JOINT_STEREO,4,2               ; @JOINT_STEREO
	.comm	_SCALE_OUT_BITS,4,2             ; @SCALE_OUT_BITS
	.no_dead_strip	_sbc_pack_frame
.subsections_via_symbols
