	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function choosePivot
_choosePivot:                           ## @choosePivot
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %eax
                                        ## kill: def $edi killed $edi def $rdi
	movl	%esi, %ecx
	subl	%edi, %ecx
	leal	3(%rcx), %ebx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %ebx
	sarl	$2, %ebx
	leal	(%rbx,%rbx), %ecx
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	addl	%ebx, %edi
	leal	(%rdx,%rdi), %r14d
	cmpl	%r14d, %edi
	setle	%al
	subl	%ebx, %esi
	cmpl	%esi, %r14d
	setle	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_lua_assert
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_choosePivot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function choosePivot
_choosePivot:                           ; @choosePivot
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	sub	w8, w1, w0
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	lsl	w9, w8, #1
	udiv	w10, w2, w9
	msub	w9, w10, w9, w2
	add	w10, w8, w0
	add	w19, w9, w10
	sub	w8, w1, w8
	cmp	w10, w19
	ccmp	w19, w8, #0, le
	cset	w0, le
	bl	_lua_assert
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_choosePivot
.subsections_via_symbols
