	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arasan_select_phy_clock
_arasan_select_phy_clock:               ## @arasan_select_phy_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pci_priv
	movq	(%rbx), %rcx
	movl	(%rcx), %edx
	cmpl	%edx, (%rax)
	je	LBB0_6
## %bb.1:
	movl	%edx, (%rax)
	xorl	%esi, %esi
	cmpl	$100000000, %edx                ## imm = 0x5F5E100
	sete	%sil
	addl	%esi, %esi
	cmpl	$50000000, %edx                 ## imm = 0x2FAF080
	movl	$1, %eax
	cmovnel	%esi, %eax
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.2:
	movq	_ENHSTRB_MODE@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %esi
	movq	_DLLTRM_ICP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
LBB0_4:
	xorl	%r8d, %r8d
LBB0_5:
	callq	_arasan_phy_set
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	movl	4(%rcx), %edx
	addl	$-128, %edx
	cmpl	$7, %edx
	ja	LBB0_6
## %bb.8:
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rdx,4), %rdx
	addq	%rsi, %rdx
	jmpq	*%rdx
LBB0_9:
	movq	_HS200_MODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	8(%rcx), %ecx
	movq	_DLLTRM_ICP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movl	$2, %edx
	jmp	LBB0_4
LBB0_10:
	movq	_DDR50_MODE@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_11:
	movq	_HISPD_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_DLLTRM_ICP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movl	$3, %edx
	xorl	%ecx, %ecx
	movl	$2, %r8d
	jmp	LBB0_5
LBB0_12:
	movq	_HS400_MODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	8(%rcx), %ecx
	movq	_DLLTRM_ICP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r9d
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	$10, %r8d
	jmp	LBB0_5
LBB0_13:
	movq	_LEGACY_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$0, (%rsp)
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	jmp	LBB0_5
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_9
	.long	L0_0_set_11
	.long	L0_0_set_10
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_ENHSTRB_MODE,4,2               ## @ENHSTRB_MODE
	.comm	_DLLTRM_ICP,4,2                 ## @DLLTRM_ICP
	.comm	_LEGACY_MODE,4,2                ## @LEGACY_MODE
	.comm	_HISPD_MODE,4,2                 ## @HISPD_MODE
	.comm	_HS200_MODE,4,2                 ## @HS200_MODE
	.comm	_DDR50_MODE,4,2                 ## @DDR50_MODE
	.comm	_HS400_MODE,4,2                 ## @HS400_MODE
	.no_dead_strip	_arasan_select_phy_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arasan_select_phy_clock
_arasan_select_phy_clock:               ; @arasan_select_phy_clock
	.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
	mov	x19, x0
	bl	_sdhci_priv
	bl	_sdhci_pci_priv
	ldr	w10, [x0]
	ldr	x8, [x19]
	ldr	w9, [x8]
	cmp	w10, w9
	b.eq	LBB0_6
; %bb.1:
	str	w9, [x0]
	mov	w10, #57600
	movk	w10, #1525, lsl #16
	cmp	w9, w10
	cset	w10, eq
	lsl	w10, w10, #1
	mov	w11, #61568
	movk	w11, #762, lsl #16
	cmp	w9, w11
	csinc	w6, w10, wzr, ne
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _ENHSTRB_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENHSTRB_MODE@GOTPAGEOFF]
LBB0_3:
	ldr	w1, [x8]
Lloh2:
	adrp	x8, _DLLTRM_ICP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DLLTRM_ICP@GOTPAGEOFF]
Lloh4:
	ldr	w5, [x8]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
LBB0_4:
	mov	w4, #0
LBB0_5:
	bl	_arasan_phy_set
LBB0_6:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w9, [x8, #4]
	sub	w9, w9, #128
	cmp	w9, #7
	b.hi	LBB0_6
; %bb.8:
Lloh5:
	adrp	x10, lJTI0_0@PAGE
Lloh6:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_9
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_9:
Lloh7:
	adrp	x9, _HS200_MODE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _HS200_MODE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x9]
	ldr	w3, [x8, #8]
Lloh10:
	adrp	x8, _DLLTRM_ICP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DLLTRM_ICP@GOTPAGEOFF]
Lloh12:
	ldr	w5, [x8]
	mov	x0, x19
	mov	w2, #2
	b	LBB0_4
LBB0_10:
Lloh13:
	adrp	x8, _DDR50_MODE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DDR50_MODE@GOTPAGEOFF]
	b	LBB0_3
LBB0_11:
Lloh15:
	adrp	x8, _HISPD_MODE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HISPD_MODE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _DLLTRM_ICP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DLLTRM_ICP@GOTPAGEOFF]
Lloh20:
	ldr	w5, [x8]
	mov	x0, x19
	mov	w2, #3
	mov	w3, #0
	mov	w4, #2
	b	LBB0_5
LBB0_12:
Lloh21:
	adrp	x9, _HS400_MODE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _HS400_MODE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x9]
	ldr	w3, [x8, #8]
Lloh24:
	adrp	x8, _DLLTRM_ICP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DLLTRM_ICP@GOTPAGEOFF]
Lloh26:
	ldr	w5, [x8]
	mov	x0, x19
	mov	w2, #1
	mov	w4, #10
	b	LBB0_5
LBB0_13:
Lloh27:
	adrp	x8, _LEGACY_MODE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _LEGACY_MODE@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_10-LBB0_9)>>2
	.byte	(LBB0_11-LBB0_9)>>2
	.byte	(LBB0_12-LBB0_9)>>2
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_11-LBB0_9)>>2
	.byte	(LBB0_10-LBB0_9)>>2
	.byte	(LBB0_13-LBB0_9)>>2
                                        ; -- End function
	.comm	_ENHSTRB_MODE,4,2               ; @ENHSTRB_MODE
	.comm	_DLLTRM_ICP,4,2                 ; @DLLTRM_ICP
	.comm	_LEGACY_MODE,4,2                ; @LEGACY_MODE
	.comm	_HISPD_MODE,4,2                 ; @HISPD_MODE
	.comm	_HS200_MODE,4,2                 ; @HS200_MODE
	.comm	_DDR50_MODE,4,2                 ; @DDR50_MODE
	.comm	_HS400_MODE,4,2                 ; @HS400_MODE
	.no_dead_strip	_arasan_select_phy_clock
.subsections_via_symbols
