	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mci_ctrl_thld
_dw_mci_ctrl_thld:                      ## @dw_mci_ctrl_thld
	.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
	movq	(%rdi), %rax
	movq	_DW_MMC_240A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_14
## %bb.1:
	movq	%rdi, %rbx
	movl	(%rsi), %edi
	movq	_DW_MMC_280A@GOTPCREL(%rip), %rcx
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	4(%rsi), %edx
	cmpq	(%rcx), %rax
	jge	LBB0_3
## %bb.2:
	testl	%edx, %edx
	je	LBB0_3
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	8(%rbx), %rax
	movq	_MMC_TIMING_MMC_HS400@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testl	%edx, %edx
	je	LBB0_4
## %bb.5:
	cmpq	%rcx, %rax
	jne	LBB0_12
## %bb.6:
	movq	_SDMMC_CARD_WR_THR_EN@GOTPCREL(%rip), %rdx
	movq	%rax, %rcx
	jmp	LBB0_7
LBB0_4:
	movq	_SDMMC_CARD_RD_THR_EN@GOTPCREL(%rip), %rdx
LBB0_7:
	movl	(%rdx), %esi
	movq	_MMC_TIMING_MMC_HS200@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_10
## %bb.8:
	movq	_MMC_TIMING_UHS_SDR104@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_10
## %bb.9:
	cmpq	%rcx, %rax
	jne	LBB0_12
LBB0_10:
	movb	16(%rbx), %cl
	movl	%edi, %eax
	shrl	%cl, %eax
	cmpl	20(%rbx), %eax
	jbe	LBB0_11
LBB0_12:
	movq	_CDTHRCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
LBB0_13:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mci_writel                     ## TAILCALL
LBB0_11:
	movq	_CDTHRCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	callq	_SDMMC_SET_THLD
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_DW_MMC_240A,8,3                ## @DW_MMC_240A
	.comm	_DW_MMC_280A,8,3                ## @DW_MMC_280A
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_MMC_TIMING_MMC_HS400,8,3       ## @MMC_TIMING_MMC_HS400
	.comm	_SDMMC_CARD_WR_THR_EN,4,2       ## @SDMMC_CARD_WR_THR_EN
	.comm	_SDMMC_CARD_RD_THR_EN,4,2       ## @SDMMC_CARD_RD_THR_EN
	.comm	_MMC_TIMING_MMC_HS200,8,3       ## @MMC_TIMING_MMC_HS200
	.comm	_MMC_TIMING_UHS_SDR104,8,3      ## @MMC_TIMING_UHS_SDR104
	.comm	_CDTHRCTL,4,2                   ## @CDTHRCTL
	.no_dead_strip	_dw_mci_ctrl_thld
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_mci_ctrl_thld
_dw_mci_ctrl_thld:                      ; @dw_mci_ctrl_thld
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _DW_MMC_240A@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DW_MMC_240A@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_5
; %bb.1:
Lloh3:
	adrp	x9, _DW_MMC_280A@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DW_MMC_280A@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w10, [x1, #4]
Lloh6:
	adrp	x11, _MMC_DATA_WRITE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	and	w11, w11, w10
	cmp	x8, x9
	ccmp	w11, #0, #4, lt
	b.ne	LBB0_5
; %bb.2:
	mov	x19, x0
	ldr	w0, [x1]
	ldr	x9, [x19, #8]
Lloh9:
	adrp	x8, _MMC_TIMING_MMC_HS400@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMC_TIMING_MMC_HS400@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x8]
	cbz	w11, LBB0_6
; %bb.3:
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.4:
Lloh12:
	adrp	x8, _SDMMC_CARD_WR_THR_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SDMMC_CARD_WR_THR_EN@GOTPAGEOFF]
	mov	x10, x9
	b	LBB0_7
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh14:
	adrp	x8, _SDMMC_CARD_RD_THR_EN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SDMMC_CARD_RD_THR_EN@GOTPAGEOFF]
LBB0_7:
Lloh16:
	adrp	x11, _MMC_TIMING_MMC_HS200@GOTPAGE
Lloh17:
	ldr	x11, [x11, _MMC_TIMING_MMC_HS200@GOTPAGEOFF]
Lloh18:
	ldr	x11, [x11]
Lloh19:
	adrp	x12, _MMC_TIMING_UHS_SDR104@GOTPAGE
Lloh20:
	ldr	x12, [x12, _MMC_TIMING_UHS_SDR104@GOTPAGEOFF]
Lloh21:
	ldr	x12, [x12]
	cmp	x9, x11
	ccmp	x9, x12, #4, ne
	ccmp	x9, x10, #4, ne
	b.ne	LBB0_9
; %bb.8:
	ldp	w9, w10, [x19, #16]
	lsr	w9, w0, w9
	cmp	w9, w10
	b.ls	LBB0_11
LBB0_9:
Lloh22:
	adrp	x8, _CDTHRCTL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CDTHRCTL@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mci_writel
LBB0_11:
	ldr	w1, [x8]
Lloh25:
	adrp	x8, _CDTHRCTL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CDTHRCTL@GOTPAGEOFF]
Lloh27:
	ldr	w20, [x8]
	bl	_SDMMC_SET_THLD
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_DW_MMC_240A,8,3                ; @DW_MMC_240A
	.comm	_DW_MMC_280A,8,3                ; @DW_MMC_280A
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_MMC_TIMING_MMC_HS400,8,3       ; @MMC_TIMING_MMC_HS400
	.comm	_SDMMC_CARD_WR_THR_EN,4,2       ; @SDMMC_CARD_WR_THR_EN
	.comm	_SDMMC_CARD_RD_THR_EN,4,2       ; @SDMMC_CARD_RD_THR_EN
	.comm	_MMC_TIMING_MMC_HS200,8,3       ; @MMC_TIMING_MMC_HS200
	.comm	_MMC_TIMING_UHS_SDR104,8,3      ; @MMC_TIMING_UHS_SDR104
	.comm	_CDTHRCTL,4,2                   ; @CDTHRCTL
	.no_dead_strip	_dw_mci_ctrl_thld
.subsections_via_symbols
