	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function quantize
_quantize:                              ## @quantize
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $edx killed $edx def $rdx
	decl	%edx
	movl	%edx, %ecx
	shrl	%ecx
	movl	(%rsi,%rcx,4), %r8d
	subl	%edi, %r8d
	xorl	%eax, %eax
	cmpl	$2, %edx
	jae	LBB0_1
LBB0_5:
	movl	%edx, %ecx
	addl	(%rsi,%rcx,4), %r8d
	cmpl	%edi, %r8d
	cmovlel	%edx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %eax
	leal	(%rax,%rdx), %ecx
	shrl	%ecx
	movl	(%rsi,%rcx,4), %r8d
	subl	%edi, %r8d
	cmpl	%eax, %ecx
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r8d, %r8d
	jle	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ecx, %edx
	movl	%eax, %ecx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_quantize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function quantize
_quantize:                              ; @quantize
	.cfi_startproc
; %bb.0:
	sub	w8, w2, #1
	lsr	w11, w8, #1
	ldr	w9, [x1, w11, uxtw #2]
	sub	w9, w9, w0
	cmp	w8, #2
	b.hs	LBB0_2
; %bb.1:
	mov	w10, #0
	b	LBB0_4
LBB0_2:
	mov	w10, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w9, #0
	csel	w8, w11, w8, gt
	csel	w10, w10, w11, gt
	add	w9, w10, w8
	lsr	w11, w9, #1
	ldr	w9, [x1, w11, uxtw #2]
	sub	w9, w9, w0
	cmp	w11, w10
	b.ne	LBB0_3
LBB0_4:
	ldr	w11, [x1, w8, uxtw #2]
	add	w9, w11, w9
	cmp	w9, w0
	csel	w0, w10, w8, gt
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_quantize
.subsections_via_symbols
