	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_mmc_erase_timeout
_mmc_mmc_erase_timeout:                 ## @mmc_mmc_erase_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edx, %r8d
	movq	_MMC_DISCARD_ARG@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_1
LBB0_3:
	movl	12(%rdi), %ebx
LBB0_12:
	movq	_MMC_SECURE_ARGS@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_16
## %bb.13:
	movq	_MMC_SECURE_ERASE_ARG@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_15
## %bb.14:
	imull	24(%rdi), %ebx
	jmp	LBB0_16
LBB0_1:
	movq	_MMC_TRIM_ARG@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_4
## %bb.2:
	cmpl	$6, 8(%rdi)
	jge	LBB0_3
## %bb.6:
	testb	$1, 16(%rdi)
	jne	LBB0_3
	jmp	LBB0_7
LBB0_15:
	imull	28(%rdi), %ebx
LBB0_16:
	imull	%r8d, %ebx
	movq	(%rdi), %rdi
	callq	_mmc_host_is_spi
	cmpl	$1000, %ebx                     ## imm = 0x3E8
	movl	$1000, %ecx                     ## imm = 0x3E8
	cmovael	%ebx, %ecx
	testq	%rax, %rax
	cmovel	%ebx, %ecx
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_4:
	testb	$1, 16(%rdi)
	jne	LBB0_5
LBB0_7:
	movb	32(%rdi), %cl
	movl	$10, %eax
	shll	%cl, %eax
	movl	36(%rdi), %edx
	movl	40(%rdi), %ecx
	cmpl	$999999, %ecx                   ## imm = 0xF423F
	jg	LBB0_9
## %bb.8:
	imull	%eax, %ecx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	shrq	$38, %rcx
	jmp	LBB0_10
LBB0_5:
	movl	20(%rdi), %ebx
	jmp	LBB0_12
LBB0_9:
	movl	%ecx, %ecx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	shrq	$38, %rcx
	imull	%eax, %ecx
LBB0_10:
	imull	%edx, %eax
	imull	$2000, %eax, %eax               ## imm = 0x7D0
	movq	(%rdi), %rdx
	movslq	(%rdx), %rdx
	imulq	$274877907, %rdx, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rbx
	addl	%edx, %ebx
	xorl	%edx, %edx
	divl	%ebx
	addl	%ecx, %eax
	movl	$1, %ebx
	cmpl	$1000, %eax                     ## imm = 0x3E8
	jb	LBB0_12
## %bb.11:
	movl	%eax, %eax
	imulq	$274877907, %rax, %rbx          ## imm = 0x10624DD3
	shrq	$38, %rbx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_DISCARD_ARG,4,2            ## @MMC_DISCARD_ARG
	.comm	_MMC_TRIM_ARG,4,2               ## @MMC_TRIM_ARG
	.comm	_MMC_SECURE_ARGS,4,2            ## @MMC_SECURE_ARGS
	.comm	_MMC_SECURE_ERASE_ARG,4,2       ## @MMC_SECURE_ERASE_ARG
	.no_dead_strip	_mmc_mmc_erase_timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_mmc_erase_timeout
_mmc_mmc_erase_timeout:                 ; @mmc_mmc_erase_timeout
	.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
Lloh0:
	adrp	x8, _MMC_DISCARD_ARG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMC_DISCARD_ARG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.eq	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _MMC_TRIM_ARG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMC_TRIM_ARG@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x0, #8]
	cmp	w8, #6
	b.ge	LBB0_4
; %bb.3:
	ldrb	w8, [x0, #16]
	tbz	w8, #0, LBB0_6
LBB0_4:
	ldr	w8, [x0, #12]
	b	LBB0_8
LBB0_5:
	ldrb	w8, [x0, #16]
	tbnz	w8, #0, LBB0_7
LBB0_6:
	mov	w8, #10
	ldp	w9, w10, [x0, #32]
	lsl	w8, w8, w9
	ldr	w9, [x0, #40]
	mov	w11, #16959
	movk	w11, #15, lsl #16
	mov	w12, #19923
	movk	w12, #4194, lsl #16
	umull	x13, w9, w12
	lsr	x13, x13, #38
	mul	w13, w13, w8
	mul	w14, w9, w8
	umull	x14, w14, w12
	lsr	x14, x14, #38
	cmp	w9, w11
	csel	w9, w13, w14, gt
	mul	w8, w8, w10
	mov	w10, #2000
	mul	w8, w8, w10
	ldr	x10, [x0]
	ldrsw	x10, [x10]
	mul	x10, x10, x12
	lsr	x11, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w11
	udiv	w8, w8, w10
	add	w8, w8, w9
	umull	x9, w8, w12
	lsr	x9, x9, #38
	cmp	w8, #1000
	csinc	w8, w9, wzr, hs
	b	LBB0_8
LBB0_7:
	ldr	w8, [x0, #20]
LBB0_8:
Lloh6:
	adrp	x9, _MMC_SECURE_ARGS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMC_SECURE_ARGS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w1
	b.eq	LBB0_13
; %bb.9:
Lloh9:
	adrp	x9, _MMC_SECURE_ERASE_ARG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MMC_SECURE_ERASE_ARG@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w9, w1
	b.ne	LBB0_11
; %bb.10:
	ldr	w9, [x0, #24]
	b	LBB0_12
LBB0_11:
	ldr	w9, [x0, #28]
LBB0_12:
	mul	w8, w9, w8
LBB0_13:
	mul	w19, w8, w2
	ldr	x0, [x0]
	bl	_mmc_host_is_spi
	cmp	w19, #1000
	ccmp	x0, #0, #4, lo
	mov	w8, #1000
	csel	w0, w8, w19, ne
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_DISCARD_ARG,4,2            ; @MMC_DISCARD_ARG
	.comm	_MMC_TRIM_ARG,4,2               ; @MMC_TRIM_ARG
	.comm	_MMC_SECURE_ARGS,4,2            ; @MMC_SECURE_ARGS
	.comm	_MMC_SECURE_ERASE_ARG,4,2       ; @MMC_SECURE_ERASE_ARG
	.no_dead_strip	_mmc_mmc_erase_timeout
.subsections_via_symbols
