	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mci_get_best_clksmpl
_dw_mci_get_best_clksmpl:               ## @dw_mci_get_best_clksmpl
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$-1, %edi
	je	LBB0_1
## %bb.2:
	movl	%edi, %r14d
	testl	%edi, %edi
	jne	LBB0_4
## %bb.3:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_4:
	bsfl	%r14d, %ebx
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_ror32
	movl	%eax, %ecx
	notl	%ecx
	bsfl	%ecx, %ecx
	cmpl	$-1, %eax
	cmovel	%eax, %ecx
	cmpl	%r15d, %ecx
	cmoval	%ebx, %r12d
	cmoval	%ecx, %r15d
	shrl	%cl, %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	bsfl	%eax, %eax
	addl	%ebx, %ecx
	addl	%eax, %ecx
	movl	%ecx, %ebx
	cmpl	$32, %ecx
	jl	LBB0_5
LBB0_7:
	shrl	%r15d
	addl	%r12d, %r15d
	andl	$31, %r15d
LBB0_8:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_dw_mci_get_best_clksmpl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_mci_get_best_clksmpl
_dw_mci_get_best_clksmpl:               ; @dw_mci_get_best_clksmpl
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x19, x0
	cbnz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_3:
	mov	w0, #0
	b	LBB0_8
LBB0_4:
	mov	w21, #0
	mov	w22, #0
	rbit	w8, w19
	clz	w20, w8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_ror32
	mvn	w8, w0
	rbit	w8, w8
	clz	w8, w8
	cmn	w0, #1
	csinv	w8, w8, wzr, ne
	cmp	w8, w21
	csel	w22, w20, w22, hi
	csel	w21, w8, w21, hi
	lsr	w9, w0, w8
	cbz	w9, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	rbit	w9, w9
	clz	w9, w9
	add	w8, w8, w20
	add	w20, w8, w9
	cmp	w20, #32
	b.lt	LBB0_5
LBB0_7:
	add	w8, w22, w21, lsr #1
	and	w0, w8, #0x1f
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_dw_mci_get_best_clksmpl
.subsections_via_symbols
