	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_s3c_consider_clock
_sdhci_s3c_consider_clock:              ## @sdhci_s3c_consider_clock
	.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
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movl	%esi, %ecx
	movq	(%rax,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%edx, %r12d
	movl	%esi, %r14d
	callq	_clk_get_rate
	movq	%rax, %rcx
	movl	%r12d, %eax
	movl	$1, %esi
	cmpq	%rax, %rcx
	jbe	LBB0_10
## %bb.3:
	movq	%rcx, %rdx
	shrq	%rdx
	movl	$2, %esi
	cmpq	%rax, %rdx
	jbe	LBB0_10
## %bb.4:
	movq	%rcx, %rdx
	shrq	$2, %rdx
	movl	$4, %esi
	cmpq	%rax, %rdx
	jbe	LBB0_10
## %bb.5:
	movq	%rcx, %rdx
	shrq	$3, %rdx
	movl	$8, %esi
	cmpq	%rax, %rdx
	jbe	LBB0_10
## %bb.6:
	movq	%rcx, %rdx
	shrq	$4, %rdx
	movl	$16, %esi
	cmpq	%rax, %rdx
	jbe	LBB0_10
## %bb.7:
	movq	%rcx, %rdx
	shrq	$5, %rdx
	movl	$32, %esi
	cmpq	%rax, %rdx
	jbe	LBB0_10
## %bb.8:
	movq	%rcx, %rdx
	shrq	$6, %rdx
	movl	$64, %esi
	cmpq	%rax, %rdx
	jbe	LBB0_10
## %bb.9:
	movq	%rcx, %rdx
	shrq	$7, %rdx
	xorl	%esi, %esi
	cmpq	%rax, %rdx
	seta	%sil
	shlq	$7, %rsi
	subq	$-128, %rsi
LBB0_10:
	movq	(%r15), %rdi
	movq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_11
## %bb.12:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %rbx
	jmp	LBB0_13
LBB0_1:
	movq	_UINT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_14
LBB0_11:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %ebx
LBB0_13:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%r12d, %r8d
	movq	%rbx, %r9
	callq	_dev_dbg
	subl	%ebx, %r12d
LBB0_14:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UINT_MAX,4,2                   ## @UINT_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clk %d: rate %ld, want %d, got %ld\n"

	.no_dead_strip	_sdhci_s3c_consider_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_s3c_consider_clock
_sdhci_s3c_consider_clock:              ; @sdhci_s3c_consider_clock
	.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
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	x0, [x8, w1, uxtw #3]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	bl	_clk_get_rate
	mov	x3, x0
	mov	w8, w19
	cmp	x0, x8
	b.ls	LBB0_4
; %bb.2:
	mov	w9, #2
	mov	w10, #4
	mov	w11, #8
	mov	w12, #16
	mov	w13, #32
	mov	w14, #64
	cmp	x8, x3, lsr #7
	mov	w15, #128
	mov	w16, #256
	csel	x15, x16, x15, lo
	cmp	x8, x3, lsr #6
	csel	x14, x14, x15, hs
	cmp	x8, x3, lsr #5
	csel	x13, x13, x14, hs
	cmp	x8, x3, lsr #4
	csel	x12, x12, x13, hs
	cmp	x8, x3, lsr #3
	csel	x11, x11, x12, hs
	cmp	x8, x3, lsr #2
	csel	x10, x10, x11, hs
	cmp	x8, x3, lsr #1
	csel	x8, x9, x10, hs
	b	LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _UINT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UINT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_4:
	mov	w8, #1
LBB0_5:
	ldr	x0, [x21]
	udiv	x21, x3, x8
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x4, x19
	mov	x5, x21
	bl	_dev_dbg
	sub	w0, w19, w21
LBB0_6:
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_UINT_MAX,4,2                   ; @UINT_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clk %d: rate %ld, want %d, got %ld\n"

	.no_dead_strip	_sdhci_s3c_consider_clock
.subsections_via_symbols
