	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function celt_bits2pulses
_celt_bits2pulses:                      ## @celt_bits2pulses
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %eax
	decl	%esi
	leal	1(%rax), %ecx
	sarl	%ecx
	movslq	%ecx, %rcx
	xorl	%edx, %edx
	cmpl	%esi, (%rdi,%rcx,4)
	cmovll	%ecx, %edx
	cmovll	%eax, %ecx
	leal	(%rdx,%rcx), %eax
	incl	%eax
	sarl	%eax
	cltq
	cmpl	%esi, (%rdi,%rax,4)
	cmovll	%eax, %edx
	cmovgel	%eax, %ecx
	leal	(%rdx,%rcx), %eax
	incl	%eax
	sarl	%eax
	cltq
	cmpl	%esi, (%rdi,%rax,4)
	cmovll	%eax, %edx
	cmovgel	%eax, %ecx
	leal	(%rdx,%rcx), %eax
	incl	%eax
	sarl	%eax
	cltq
	cmpl	%esi, (%rdi,%rax,4)
	cmovll	%eax, %edx
	cmovgel	%eax, %ecx
	leal	(%rdx,%rcx), %eax
	incl	%eax
	sarl	%eax
	cltq
	cmpl	%esi, (%rdi,%rax,4)
	cmovll	%eax, %edx
	cmovgel	%eax, %ecx
	leal	(%rdx,%rcx), %r8d
	incl	%r8d
	sarl	%r8d
	movslq	%r8d, %rax
	movl	(%rdi,%rax,4), %r9d
	cmpl	%esi, %r9d
	cmovgel	%edx, %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movslq	%eax, %rdx
	movl	(%rdi,%rdx,4), %edx
	jmp	LBB0_3
LBB0_1:
	movl	$-1, %edx
LBB0_3:
	cmpl	%esi, %r9d
	cmovll	%ecx, %r8d
	movslq	%r8d, %rcx
	movl	(%rdi,%rcx,4), %edi
	subl	%esi, %edi
	subl	%edx, %esi
	cmpl	%edi, %esi
	cmovgl	%ecx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_celt_bits2pulses
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function celt_bits2pulses
_celt_bits2pulses:                      ; @celt_bits2pulses
	.cfi_startproc
; %bb.0:
	ldr	w9, [x0]
	sub	w8, w1, #1
	add	w10, w9, #1
	asr	w10, w10, #1
	ldr	w11, [x0, w10, sxtw #2]
	cmp	w11, w8
	csel	w11, w10, wzr, lt
	csel	w9, w9, w10, lt
	add	w10, w11, w9
	add	w10, w10, #1
	asr	w10, w10, #1
	ldr	w12, [x0, w10, sxtw #2]
	cmp	w12, w8
	csel	w11, w10, w11, lt
	csel	w9, w9, w10, lt
	add	w10, w11, w9
	add	w10, w10, #1
	asr	w10, w10, #1
	ldr	w12, [x0, w10, sxtw #2]
	cmp	w12, w8
	csel	w11, w10, w11, lt
	csel	w9, w9, w10, lt
	add	w10, w11, w9
	add	w10, w10, #1
	asr	w10, w10, #1
	ldr	w12, [x0, w10, sxtw #2]
	cmp	w12, w8
	csel	w11, w10, w11, lt
	csel	w9, w9, w10, lt
	add	w10, w11, w9
	add	w10, w10, #1
	asr	w10, w10, #1
	ldr	w12, [x0, w10, sxtw #2]
	cmp	w12, w8
	csel	w13, w10, w11, lt
	csel	w9, w9, w10, lt
	add	w10, w13, w9
	add	w10, w10, #1
	asr	w11, w10, #1
	ldr	w12, [x0, w11, sxtw #2]
	cmp	w12, w8
	csel	w10, w11, w13, lt
	cbz	w10, LBB0_2
; %bb.1:
	ldr	w13, [x0, w10, sxtw #2]
	b	LBB0_3
LBB0_2:
	mov	w13, #-1
LBB0_3:
	cmp	w12, w8
	csel	w9, w9, w11, lt
	sub	w11, w8, w13
	ldr	w12, [x0, w9, sxtw #2]
	sub	w8, w12, w8
	cmp	w11, w8
	csel	w0, w9, w10, gt
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_celt_bits2pulses
.subsections_via_symbols
