	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_set_data_timeout           ## -- Begin function mmc_set_data_timeout
	.p2align	4, 0x90
_mmc_set_data_timeout:                  ## @mmc_set_data_timeout
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_mmc_card_sdio
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	$1000000000, (%r14)             ## imm = 0x3B9ACA00
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	callq	_mmc_card_sd
	testq	%rax, %rax
	movl	$10, %ecx
	movl	$100, %eax
	cmovel	%ecx, %eax
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	testl	%ecx, 8(%r14)
	je	LBB0_4
## %bb.3:
	movb	8(%rbx), %cl
	shll	%cl, %eax
LBB0_4:
	movl	12(%rbx), %ecx
	imull	%eax, %ecx
	movl	%ecx, (%r14)
	imull	16(%rbx), %eax
	movl	%eax, 4(%r14)
	movq	%rbx, %rdi
	callq	_mmc_card_sd
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movslq	(%r14), %rax
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$38, %rcx
	addl	%eax, %ecx
	movq	(%rbx), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	je	LBB0_7
## %bb.6:
	imull	$1000, 4(%r14), %eax            ## imm = 0x3E8
	movslq	%edx, %rdx
	imulq	$274877907, %rdx, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rdx
	shrq	$63, %rdx
	sarq	$38, %rsi
	addl	%edx, %esi
	xorl	%edx, %edx
	divl	%esi
	addl	%ecx, %eax
	movl	%eax, %ecx
LBB0_7:
	movl	(%r15), %eax
	testl	%eax, 8(%r14)
	movl	$100000, %edx                   ## imm = 0x186A0
	movl	$3000000, %eax                  ## imm = 0x2DC6C0
	cmovel	%edx, %eax
	cmpl	%eax, %ecx
	jbe	LBB0_9
## %bb.8:
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	movl	%eax, (%r14)
	movl	$0, 4(%r14)
	jmp	LBB0_11
LBB0_9:
	testl	%ecx, %ecx
	jne	LBB0_11
## %bb.10:
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	movl	%eax, (%r14)
LBB0_11:
	movq	%rbx, %rdi
	callq	_mmc_card_long_read_time
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_14
## %bb.13:
	movq	$600000000, (%r14)              ## imm = 0x23C34600
LBB0_14:
	movq	(%rbx), %rdi
	callq	_mmc_host_is_spi
	testq	%rax, %rax
	je	LBB0_20
## %bb.15:
	movl	(%r15), %ecx
	movl	(%r14), %eax
	testl	%ecx, 8(%r14)
	je	LBB0_18
## %bb.16:
	cmpl	$999999999, %eax                ## imm = 0x3B9AC9FF
	jg	LBB0_20
## %bb.17:
	movl	$1000000000, (%r14)             ## imm = 0x3B9ACA00
	jmp	LBB0_20
LBB0_18:
	cmpl	$99999999, %eax                 ## imm = 0x5F5E0FF
	jg	LBB0_20
## %bb.19:
	movl	$100000000, (%r14)              ## imm = 0x5F5E100
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function mmc_set_data_timeout
lCPI0_0:
	.long	1000000000                      ; 0x3b9aca00
	.long	0                               ; 0x0
lCPI0_1:
	.long	600000000                       ; 0x23c34600
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_mmc_set_data_timeout
	.p2align	2
_mmc_set_data_timeout:                  ; @mmc_set_data_timeout
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_mmc_card_sdio
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
LBB0_2:
	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
LBB0_3:
	mov	x0, x20
	bl	_mmc_card_sd
	cmp	x0, #0
	mov	w8, #100
	mov	w9, #10
	csel	w8, w9, w8, eq
	ldr	w9, [x19, #8]
Lloh2:
	adrp	x21, _MMC_DATA_WRITE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MMC_DATA_WRITE@GOTPAGEOFF]
	ldr	w10, [x21]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.4:
	ldr	w9, [x20, #8]
	lsl	w8, w8, w9
LBB0_5:
	ldur	d0, [x20, #12]
	dup.2s	v1, w8
	mul.2s	v0, v0, v1
	str	d0, [x19]
	mov	x0, x20
	bl	_mmc_card_sd
	cbz	x0, LBB0_12
; %bb.6:
	ldrsw	x8, [x19]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x10, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w10
	ldr	x10, [x20]
	ldr	w10, [x10]
	cbz	w10, LBB0_8
; %bb.7:
	ldr	w11, [x19, #4]
	mov	w12, #1000
	mul	w11, w11, w12
	smull	x9, w10, w9
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	udiv	w9, w11, w9
	add	w8, w9, w8
LBB0_8:
	ldr	w9, [x19, #8]
	ldr	w10, [x21]
	tst	w10, w9
	mov	w9, #50880
	movk	w9, #45, lsl #16
	mov	w10, #34464
	movk	w10, #1, lsl #16
	csel	w9, w10, w9, eq
	cmp	w8, w9
	b.ls	LBB0_10
; %bb.9:
	mov	w8, #1000
	mul	w8, w9, w8
	stp	w8, wzr, [x19]
	b	LBB0_12
LBB0_10:
	cbnz	w8, LBB0_12
; %bb.11:
	mov	w8, #1000
	mul	w8, w9, w8
	str	w8, [x19]
LBB0_12:
	mov	x0, x20
	bl	_mmc_card_long_read_time
	cbz	x0, LBB0_15
; %bb.13:
	ldr	w8, [x19, #8]
Lloh4:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
Lloh7:
	adrp	x8, lCPI0_1@PAGE
Lloh8:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [x19]
LBB0_15:
	ldr	x0, [x20]
	bl	_mmc_host_is_spi
	cbz	x0, LBB0_2
; %bb.16:
	ldr	w9, [x19, #8]
	ldr	w10, [x21]
	ldr	w8, [x19]
	tst	w10, w9
	b.eq	LBB0_18
; %bb.17:
	mov	w9, #51712
	movk	w9, #15258, lsl #16
	cmp	w8, w9
	b.ge	LBB0_2
	b	LBB0_19
LBB0_18:
	mov	w9, #57600
	movk	w9, #1525, lsl #16
	cmp	w8, w9
	b.ge	LBB0_2
LBB0_19:
	str	w9, [x19]
	b	LBB0_2
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdr	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
.subsections_via_symbols
