	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_nelly_get_sample_bits       ## -- Begin function ff_nelly_get_sample_bits
	.p2align	4, 0x90
_ff_nelly_get_sample_bits:              ## @ff_nelly_get_sample_bits
	.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	$296, %rsp                      ## imm = 0x128
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -336(%rbp)                ## 8-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_NELLY_FILL_LEN@GOTPCREL(%rip), %r13
	xorl	%r12d, %r12d
	cmpl	$0, (%r13)
	movl	$0, %eax
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%r14,%rbx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movl	%eax, %edi
	callq	_FFMAX
	incq	%rbx
	movslq	(%r13), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_2
LBB0_3:
	movl	%eax, -324(%rbp)
	leaq	-324(%rbp), %rdi
	callq	_headroom
	movq	%rax, -312(%rbp)                ## 8-byte Spill
	cmpl	$0, (%r13)
	jle	LBB0_6
## %bb.4:
	movq	-312(%rbp), %rax                ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	addl	$-16, %eax
	xorl	%r12d, %r12d
	movswl	%ax, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%r14,%rbx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movl	%r15d, %edi
	callq	_signed_shift
	cwtl
	leal	(%rax,%rax,2), %eax
	shrl	$2, %eax
	movw	%ax, -304(%rbp,%rbx,2)
	cwtl
	addl	%eax, %r12d
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	-312(%rbp), %rax                ## 8-byte Reload
	leal	-5(%rax), %ecx
	movq	_NELLY_DETAIL_BITS@GOTPCREL(%rip), %rbx
	movswl	(%rbx), %eax
	shll	%cl, %eax
	movswl	%cx, %r13d
	subl	%eax, %r12d
	movl	%r12d, -320(%rbp)
	leaq	-320(%rbp), %rdi
	callq	_headroom
	movq	_NELLY_BASE_OFF@GOTPCREL(%rip), %r15
	movswl	-318(%rbp), %ecx
	imull	(%r15), %ecx
	sarl	$15, %ecx
	movq	_NELLY_BASE_SHIFT@GOTPCREL(%rip), %rdx
	addw	(%rdx), %ax
	movl	$31, %edx
	subl	%eax, %edx
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ecx, %xmm0
	movswl	%dx, %edi
	callq	_signed_shift
	movq	%rax, %r14
	leaq	-304(%rbp), %rdi
	movl	%r13d, -316(%rbp)               ## 4-byte Spill
	movl	%r13d, %esi
	movl	%r14d, %edx
	callq	_sum_bits
	movswl	(%rbx), %ecx
	movl	%eax, %ebx
	subl	%ecx, %ebx
	jne	LBB0_8
## %bb.7:
	movl	%eax, -312(%rbp)                ## 4-byte Spill
	jmp	LBB0_19
LBB0_8:
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_FFABS
	xorl	%r12d, %r12d
	cmpl	$16383, %eax                    ## imm = 0x3FFF
	jg	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	addl	%ebx, %ebx
	movl	%ebx, %edi
	callq	_FFABS
	decl	%r12d
	cmpl	$16384, %eax                    ## imm = 0x4000
	jl	LBB0_9
LBB0_10:
	imull	(%r15), %ebx
	sarl	$15, %ebx
	addl	-312(%rbp), %r12d               ## 4-byte Folded Reload
	movq	_NELLY_BASE_SHIFT@GOTPCREL(%rip), %rax
	subw	(%rax), %r12w
	addl	$10, %r12d
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ebx, %xmm0
	movswl	%r12w, %edi
	callq	_signed_shift
	movq	%rax, %rbx
	movl	$1, %r15d
	movl	%r13d, %esi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%esi, %r12d
	movl	%r14d, %r13d
	leal	(%rbx,%r13), %r14d
	leaq	-304(%rbp), %rdi
	movl	-316(%rbp), %esi                ## 4-byte Reload
	movl	%r14d, %edx
	callq	_sum_bits
	movl	%eax, %esi
	movq	_NELLY_DETAIL_BITS@GOTPCREL(%rip), %rax
	movswl	(%rax), %ecx
	movl	%esi, %eax
	subl	%ecx, %eax
	movl	%r12d, %edx
	subl	%ecx, %edx
	imull	%eax, %edx
	testl	%edx, %edx
	jle	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	incl	%r15d
	cmpl	$20, %r15d
	jne	LBB0_11
## %bb.13:
	movl	$20, %r15d
LBB0_14:
	addl	%r13d, %ebx
	movl	%esi, %edx
	cmpl	%ecx, %esi
	cmovgl	%r12d, %edx
	cmovgl	%esi, %r12d
	movl	%r13d, %r14d
	cmovgl	%ebx, %r14d
	cmovgl	%r13d, %ebx
	je	LBB0_18
## %bb.15:
	cmpl	$19, %r15d
	ja	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
                                        ## kill: def $ebx killed $ebx killed $rbx def $rbx
	movq	%rbx, -312(%rbp)                ## 8-byte Spill
	addl	%r14d, %ebx
	sarl	%ebx
	movl	%r12d, %r13d
	movq	%r14, %r12
	movl	%edx, %r14d
	leaq	-304(%rbp), %rdi
	movl	-316(%rbp), %esi                ## 4-byte Reload
	movl	%ebx, %edx
	callq	_sum_bits
	movl	%r14d, %edx
	movq	%r12, %r14
	movl	%r13d, %r12d
	movq	_NELLY_DETAIL_BITS@GOTPCREL(%rip), %rcx
	movswl	(%rcx), %ecx
	cmpl	%ecx, %eax
	cmovlel	%eax, %edx
	cmovgl	%eax, %r12d
	cmovgl	%ebx, %r14d
	cmovgl	-312(%rbp), %ebx                ## 4-byte Folded Reload
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	leal	1(%r15), %eax
	cmpl	$19, %r15d
	movl	%eax, %r15d
	jb	LBB0_16
LBB0_18:
	movl	%edx, %r13d
	movl	%r12d, %edi
	subl	%ecx, %edi
	callq	_abs
	movq	%rax, %r15
	movq	_NELLY_DETAIL_BITS@GOTPCREL(%rip), %rax
	movswl	(%rax), %eax
	movl	%r13d, %edi
	subl	%eax, %edi
	callq	_abs
	cmpq	%rax, %r15
	cmovll	%r12d, %r13d
	cmovgel	%ebx, %r14d
	movl	%r13d, -312(%rbp)               ## 4-byte Spill
LBB0_19:
	movq	-336(%rbp), %r12                ## 8-byte Reload
	movq	_NELLY_FILL_LEN@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	movl	-316(%rbp), %r15d               ## 4-byte Reload
	jle	LBB0_22
## %bb.20:
	decl	%r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movswl	-304(%rbp,%rbx,2), %edi
	subl	%r14d, %edi
	movl	%r15d, %ecx
	sarl	%cl, %edi
	incl	%edi
	sarl	%edi
	movq	_NELLY_BIT_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_av_clip
	movl	%eax, (%r12,%rbx,4)
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_21
LBB0_22:
	movq	_NELLY_DETAIL_BITS@GOTPCREL(%rip), %rax
	movswl	(%rax), %eax
	cmpl	%eax, -312(%rbp)                ## 4-byte Folded Reload
	jle	LBB0_28
## %bb.23:
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	testw	%ax, %ax
	jle	LBB0_25
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	addl	(%r12,%rcx,4), %edx
	incq	%rcx
	cmpl	%eax, %edx
	jl	LBB0_24
LBB0_25:
	subl	%edx, %eax
	movslq	%ecx, %rdx
	addl	%eax, -4(%r12,%rdx,4)
	cmpl	(%r13), %edx
	jge	LBB0_28
## %bb.26:
	movl	%ecx, %eax
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movl	$0, (%r12,%rax,4)
	incq	%rax
	cmpl	%eax, (%r13)
	jg	LBB0_27
LBB0_28:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_30
## %bb.29:
	addq	$296, %rsp                      ## imm = 0x128
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NELLY_FILL_LEN,4,2             ## @NELLY_FILL_LEN
	.comm	_NELLY_DETAIL_BITS,2,1          ## @NELLY_DETAIL_BITS
	.comm	_NELLY_BASE_OFF,4,2             ## @NELLY_BASE_OFF
	.comm	_NELLY_BASE_SHIFT,2,1           ## @NELLY_BASE_SHIFT
	.comm	_NELLY_BIT_CAP,4,2              ## @NELLY_BIT_CAP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_nelly_get_sample_bits       ; -- Begin function ff_nelly_get_sample_bits
	.p2align	2
_ff_nelly_get_sample_bits:              ; @ff_nelly_get_sample_bits
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #384
	.cfi_def_cfa_offset 384
	stp	x28, x27, [sp, #288]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #304]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #320]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #336]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #352]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #368]            ; 16-byte Folded Spill
	add	x29, sp, #368
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	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, #-96]
Lloh3:
	adrp	x25, _NELLY_FILL_LEN@GOTPAGE
Lloh4:
	ldr	x25, [x25, _NELLY_FILL_LEN@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
	mov	w0, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x20, x21, lsl #2]
	bl	_FFMAX
	add	x21, x21, #1
	ldrsw	x8, [x25]
	cmp	x21, x8
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	str	w0, [sp, #12]
	add	x0, sp, #12
	bl	_headroom
	mov	x23, x0
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w22, #0
	mov	x24, #0
	sub	w8, w23, #16
	sxth	w21, w8
	add	x26, sp, #16
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x20, x24, lsl #2]
	mov	x0, x21
	bl	_signed_shift
	sxth	w8, w0
	add	w8, w8, w0, sxth #1
	lsr	w8, w8, #2
	strh	w8, [x26, x24, lsl #1]
	add	w22, w22, w8, sxth
	add	x24, x24, #1
	ldrsw	x8, [x25]
	cmp	x24, x8
	b.lt	LBB0_6
	b	LBB0_8
LBB0_7:
	mov	w22, #0
LBB0_8:
Lloh5:
	adrp	x26, _NELLY_DETAIL_BITS@GOTPAGE
Lloh6:
	ldr	x26, [x26, _NELLY_DETAIL_BITS@GOTPAGEOFF]
	sub	w8, w23, #5
	ldrsh	w9, [x26]
	sxth	w20, w8
	lsl	w8, w9, w20
	sub	w8, w22, w8
	str	w8, [sp, #8]
	add	x0, sp, #8
	bl	_headroom
Lloh7:
	adrp	x27, _NELLY_BASE_OFF@GOTPAGE
Lloh8:
	ldr	x27, [x27, _NELLY_BASE_OFF@GOTPAGEOFF]
	ldr	w8, [x27]
	ldrsh	w9, [sp, #10]
	mul	w8, w9, w8
	asr	w8, w8, #15
Lloh9:
	adrp	x28, _NELLY_BASE_SHIFT@GOTPAGE
Lloh10:
	ldr	x28, [x28, _NELLY_BASE_SHIFT@GOTPAGEOFF]
	ldrh	w9, [x28]
	mov	w10, #31
	add	w9, w9, w0
	sub	w9, w10, w9
	scvtf	s0, w8
	sxth	w0, w9
	bl	_signed_shift
	mov	x22, x0
	add	x0, sp, #16
	mov	x1, x20
	mov	x2, x22
	bl	_sum_bits
	mov	x21, x0
	ldrsh	w8, [x26]
	subs	w24, w0, w8
	b.eq	LBB0_20
; %bb.9:
	mov	x0, x24
	bl	_FFABS
	cmp	w0, #4, lsl #12                 ; =16384
	b.ge	LBB0_13
; %bb.10:
	mov	w27, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x28, x27
	lsl	w24, w24, #1
	add	w27, w27, #1
	mov	x0, x24
	bl	_FFABS
	cmp	w0, #4, lsl #12                 ; =16384
	b.lt	LBB0_11
; %bb.12:
	mvn	w8, w28
Lloh11:
	adrp	x27, _NELLY_BASE_OFF@GOTPAGE
Lloh12:
	ldr	x27, [x27, _NELLY_BASE_OFF@GOTPAGEOFF]
Lloh13:
	adrp	x28, _NELLY_BASE_SHIFT@GOTPAGE
Lloh14:
	ldr	x28, [x28, _NELLY_BASE_SHIFT@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
	mov	w8, #0
LBB0_14:
	ldr	w9, [x27]
	mul	w9, w9, w24
	asr	w9, w9, #15
	ldrh	w10, [x28]
	add	w8, w23, w8
	sub	w8, w8, w10
	add	w8, w8, #10
	scvtf	s0, w9
	sxth	w0, w8
	bl	_signed_shift
	mov	x23, x0
	mov	w24, #1
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x27, x21
	mov	x28, x22
	add	w22, w22, w23
	add	x0, sp, #16
	mov	x1, x20
	mov	x2, x22
	bl	_sum_bits
	mov	x21, x0
	ldrsh	w8, [x26]
	sub	w9, w0, w8
	sub	w10, w27, w8
	mul	w9, w9, w10
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w24, w24, #1
	cmp	w24, #20
	b.ne	LBB0_15
LBB0_17:
	cmp	w21, w8
	csel	w22, w27, w21, gt
	csel	w27, w21, w27, gt
	add	w9, w23, w28
	csel	w23, w9, w28, gt
	csel	w28, w28, w9, gt
	ccmp	w24, #19, #2, ne
	b.hi	LBB0_19
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	add	w8, w28, w23
	asr	w21, w8, #1
	add	x0, sp, #16
	mov	x1, x20
	mov	x2, x21
	bl	_sum_bits
	ldrsh	w8, [x26]
	cmp	w0, w8
	csel	w22, w22, w0, gt
	csel	w27, w0, w27, gt
	csel	w23, w21, w23, gt
	csel	w28, w28, w21, gt
	ccmp	w24, #19, #2, ne
	add	w24, w24, #1
	b.lo	LBB0_18
LBB0_19:
	sub	w0, w27, w8
	bl	_abs
	mov	x21, x0
	ldrsh	w8, [x26]
	sub	w0, w22, w8
	bl	_abs
	cmp	x21, x0
	csel	w21, w27, w22, lt
	csel	w22, w23, w28, lt
LBB0_20:
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.21:
	mov	x23, #0
	sub	w20, w20, #1
	add	x24, sp, #16
Lloh15:
	adrp	x27, _NELLY_BIT_CAP@GOTPAGE
Lloh16:
	ldr	x27, [x27, _NELLY_BIT_CAP@GOTPAGEOFF]
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldrsh	w8, [x24, x23, lsl #1]
	sub	w8, w8, w22
	asr	w8, w8, w20
	add	w8, w8, #1
	asr	w0, w8, #1
	ldr	w2, [x27]
	mov	w1, #0
	bl	_av_clip
	str	w0, [x19, x23, lsl #2]
	add	x23, x23, #1
	ldrsw	x8, [x25]
	cmp	x23, x8
	b.lt	LBB0_22
LBB0_23:
	ldrsh	w8, [x26]
	cmp	w21, w8
	b.le	LBB0_31
; %bb.24:
	cmp	w8, #1
	b.lt	LBB0_27
; %bb.25:
	mov	x9, #0
	mov	w10, #0
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x19, x9, lsl #2]
	add	x9, x9, #1
	add	w10, w11, w10
	cmp	w10, w8
	b.lt	LBB0_26
	b	LBB0_28
LBB0_27:
	mov	w9, #0
	mov	w10, #0
LBB0_28:
	sub	w11, w9, #1
	sbfiz	x11, x11, #2, #32
	ldr	w12, [x19, x11]
	sub	w8, w8, w10
	add	w8, w8, w12
	str	w8, [x19, x11]
	ldr	w8, [x25]
	cmp	w9, w8
	b.ge	LBB0_31
; %bb.29:
	mov	w8, w9
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	str	wzr, [x19, x8, lsl #2]
	add	x8, x8, #1
	ldr	w9, [x25]
	cmp	w9, w8
	b.gt	LBB0_30
LBB0_31:
	ldur	x8, [x29, #-96]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_33
; %bb.32:
	ldp	x29, x30, [sp, #368]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #352]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #336]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #320]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #304]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #288]            ; 16-byte Folded Reload
	add	sp, sp, #384
	ret
LBB0_33:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_NELLY_FILL_LEN,4,2             ; @NELLY_FILL_LEN
	.comm	_NELLY_DETAIL_BITS,2,1          ; @NELLY_DETAIL_BITS
	.comm	_NELLY_BASE_OFF,4,2             ; @NELLY_BASE_OFF
	.comm	_NELLY_BASE_SHIFT,2,1           ; @NELLY_BASE_SHIFT
	.comm	_NELLY_BIT_CAP,4,2              ; @NELLY_BIT_CAP
.subsections_via_symbols
