	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_sdio_init_card
_mmc_sdio_init_card:                    ## @mmc_sdio_init_card
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rdi, %r12
	movl	%esi, -36(%rbp)
	xorl	%edi, %edi
	testq	%r12, %r12
	sete	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	cmpl	$0, 16(%r12)
	sete	%dil
	callq	_WARN_ON
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%r12, %rdi
	callq	_mmc_send_io_op_cond
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_43:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r12, %rdi
	callq	_mmc_host_is_spi
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_use_spi_crc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mmc_spi_set_crc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_43
LBB0_3:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_mmc_alloc_card
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_43
LBB0_5:
	movl	-36(%rbp), %esi
	andl	(%r12), %esi
	movl	44(%r14), %edx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_mmc_sd_get_cid
	testl	%eax, %eax
	je	LBB0_6
## %bb.10:
	movq	_MMC_TYPE_SDIO@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%r14)
	testq	%r15, %r15
	je	LBB0_12
## %bb.11:
	movq	(%r15), %rcx
	cmpq	(%rax), %rcx
	jne	LBB0_9
	jmp	LBB0_12
LBB0_6:
	movq	_MMC_TYPE_SD_COMBO@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%r14)
	testq	%r15, %r15
	je	LBB0_12
## %bb.7:
	movq	(%r15), %rcx
	cmpq	(%rax), %rcx
	jne	LBB0_9
## %bb.8:
	movl	44(%r14), %edi
	movl	44(%r15), %esi
	movl	$4, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_12
LBB0_9:
	movq	%r14, %rdi
	callq	_mmc_remove_card
LBB0_26:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_43
LBB0_12:
	movq	%r12, %rdi
	callq	_mmc_host_is_spi
	testq	%rax, %rax
	je	LBB0_13
## %bb.15:
	testq	%r15, %r15
	jne	LBB0_19
LBB0_16:
	movq	(%r14), %rax
	movq	_MMC_TYPE_SD_COMBO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.17:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_mmc_sd_get_csd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_43
## %bb.18:
	movq	%r14, %rdi
	callq	_mmc_decode_cid
	jmp	LBB0_19
LBB0_13:
	movq	%r14, %rsi
	addq	$40, %rsi
	movq	%r12, %rdi
	callq	_mmc_send_relative_addr
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_41
## %bb.14:
	movq	_MMC_BUSMODE_PUSHPULL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mmc_set_bus_mode
	testq	%r15, %r15
	je	LBB0_16
LBB0_19:
	movq	%r12, %rdi
	callq	_mmc_host_is_spi
	testq	%rax, %rax
	je	LBB0_20
LBB0_21:
	movq	%r14, %rdi
	callq	_sdio_read_cccr
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_41
## %bb.22:
	movq	%r14, %rdi
	callq	_sdio_read_common_cis
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_41
## %bb.23:
	testq	%r15, %r15
	je	LBB0_27
## %bb.24:
	movq	24(%r14), %rax
	cmpq	24(%r15), %rax
	jne	LBB0_9
## %bb.25:
	movq	32(%r14), %r12
	movq	32(%r15), %r15
	movq	%r14, %rdi
	callq	_mmc_remove_card
	xorl	%ebx, %ebx
	cmpq	%r15, %r12
	je	LBB0_43
	jmp	LBB0_26
LBB0_20:
	movq	%r14, %rdi
	callq	_mmc_select_card
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_21
LBB0_41:
	testq	%r15, %r15
	jne	LBB0_43
LBB0_42:
	movq	%r14, %rdi
	callq	_mmc_remove_card
	jmp	LBB0_43
LBB0_27:
	movq	(%r14), %rax
	movq	_MMC_TYPE_SD_COMBO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_33
## %bb.28:
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_mmc_sd_setup_card
	testl	%eax, %eax
	je	LBB0_32
## %bb.29:
	movq	%r12, %rdi
	callq	_mmc_go_idle
	movq	%r12, %rdi
	callq	_mmc_host_is_spi
	testq	%rax, %rax
	je	LBB0_31
## %bb.30:
	movq	_use_spi_crc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mmc_spi_set_crc
LBB0_31:
	movq	_MMC_TYPE_SDIO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	jmp	LBB0_33
LBB0_32:
	movq	_sd_type@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r14)
LBB0_33:
	movq	%r14, %rdi
	callq	_sdio_disable_cd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_42
## %bb.34:
	movq	%r14, %rdi
	callq	_sdio_enable_hs
	testl	%eax, %eax
	jle	LBB0_36
## %bb.35:
	movq	%r14, %rdi
	callq	_mmc_sd_go_highspeed
LBB0_37:
	movq	%r14, %rdi
	callq	_mmc_sdio_get_max_clock
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_mmc_set_clock
	movq	%r14, %rdi
	callq	_sdio_enable_4bit_bus
	testl	%eax, %eax
	jle	LBB0_39
## %bb.38:
	movl	8(%r14), %edi
	movq	_MMC_BUS_WIDTH_4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mmc_set_bus_width
LBB0_40:
	movq	%r14, 8(%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_43
LBB0_36:
	movl	%eax, %ebx
	jne	LBB0_42
	jmp	LBB0_37
LBB0_39:
	movl	%eax, %ebx
	jne	LBB0_42
	jmp	LBB0_40
	.cfi_endproc
                                        ## -- End function
	.comm	_use_spi_crc,4,2                ## @use_spi_crc
	.comm	_MMC_TYPE_SD_COMBO,8,3          ## @MMC_TYPE_SD_COMBO
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_MMC_TYPE_SDIO,8,3              ## @MMC_TYPE_SDIO
	.comm	_MMC_BUSMODE_PUSHPULL,4,2       ## @MMC_BUSMODE_PUSHPULL
	.comm	_sd_type,4,2                    ## @sd_type
	.comm	_MMC_BUS_WIDTH_4,4,2            ## @MMC_BUS_WIDTH_4
	.no_dead_strip	_mmc_sdio_init_card
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_sdio_init_card
_mmc_sdio_init_card:                    ; @mmc_sdio_init_card
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x19, x0
	str	w1, [sp, #12]
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w8, [x19, #16]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w1, [x19]
	add	x2, sp, #12
	mov	x0, x19
	bl	_mmc_send_io_op_cond
	mov	x22, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_2:
	mov	x0, x19
	bl	_mmc_host_is_spi
	cbz	x0, LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _use_spi_crc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _use_spi_crc@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mmc_spi_set_crc
	mov	x22, x0
	cbnz	w0, LBB0_1
LBB0_4:
	mov	x0, x19
	mov	x1, #0
	bl	_mmc_alloc_card
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_1
LBB0_6:
	ldr	w8, [x19]
	ldr	w9, [sp, #12]
	and	w1, w9, w8
	ldr	w2, [x20, #44]
	mov	x0, x19
	mov	x3, #0
	bl	_mmc_sd_get_cid
	cbz	w0, LBB0_9
; %bb.7:
Lloh3:
	adrp	x8, _MMC_TYPE_SDIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMC_TYPE_SDIO@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x20]
	cbz	x21, LBB0_14
; %bb.8:
	ldr	x9, [x21]
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_12
	b	LBB0_14
LBB0_9:
Lloh5:
	adrp	x8, _MMC_TYPE_SD_COMBO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MMC_TYPE_SD_COMBO@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x20]
	cbz	x21, LBB0_14
; %bb.10:
	ldr	x9, [x21]
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	ldr	w0, [x20, #44]
	ldr	w1, [x21, #44]
	mov	w2, #4
	bl	_memcmp
	cbz	x0, LBB0_14
LBB0_12:
	mov	x0, x20
	bl	_mmc_remove_card
LBB0_13:
Lloh7:
	adrp	x8, _ENOENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_1
LBB0_14:
	mov	x0, x19
	bl	_mmc_host_is_spi
	cbz	x0, LBB0_19
; %bb.15:
	cbnz	x21, LBB0_21
LBB0_16:
	ldr	x8, [x20]
Lloh10:
	adrp	x9, _MMC_TYPE_SD_COMBO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MMC_TYPE_SD_COMBO@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.17:
	mov	x0, x19
	mov	x1, x20
	bl	_mmc_sd_get_csd
	mov	x22, x0
	cbnz	w0, LBB0_1
; %bb.18:
	mov	x0, x20
	bl	_mmc_decode_cid
	b	LBB0_21
LBB0_19:
	add	x1, x20, #40
	mov	x0, x19
	bl	_mmc_send_relative_addr
	mov	x22, x0
	cbnz	w0, LBB0_29
; %bb.20:
Lloh13:
	adrp	x8, _MMC_BUSMODE_PUSHPULL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MMC_BUSMODE_PUSHPULL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mmc_set_bus_mode
	cbz	x21, LBB0_16
LBB0_21:
	mov	x0, x19
	bl	_mmc_host_is_spi
	cbz	x0, LBB0_28
LBB0_22:
	mov	x0, x20
	bl	_sdio_read_cccr
	mov	x22, x0
	cbnz	w0, LBB0_29
; %bb.23:
	mov	x0, x20
	bl	_sdio_read_common_cis
	mov	x22, x0
	cbnz	w0, LBB0_29
; %bb.24:
	cbz	x21, LBB0_31
; %bb.25:
	ldr	x8, [x20, #24]
	ldr	x9, [x21, #24]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.26:
	ldr	x19, [x20, #32]
	ldr	x21, [x21, #32]
	mov	x0, x20
	bl	_mmc_remove_card
	cmp	x19, x21
	b.ne	LBB0_13
; %bb.27:
	mov	w22, #0
	b	LBB0_1
LBB0_28:
	mov	x0, x20
	bl	_mmc_select_card
	mov	x22, x0
	cbz	w0, LBB0_22
LBB0_29:
	cbnz	x21, LBB0_1
LBB0_30:
	mov	x0, x20
	bl	_mmc_remove_card
	b	LBB0_1
LBB0_31:
	ldr	x8, [x20]
Lloh16:
	adrp	x9, _MMC_TYPE_SD_COMBO@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MMC_TYPE_SD_COMBO@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_37
; %bb.32:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_mmc_sd_setup_card
	cbz	w0, LBB0_36
; %bb.33:
	mov	x0, x19
	bl	_mmc_go_idle
	mov	x0, x19
	bl	_mmc_host_is_spi
	cbz	x0, LBB0_35
; %bb.34:
Lloh19:
	adrp	x8, _use_spi_crc@GOTPAGE
Lloh20:
	ldr	x8, [x8, _use_spi_crc@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mmc_spi_set_crc
LBB0_35:
Lloh22:
	adrp	x8, _MMC_TYPE_SDIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MMC_TYPE_SDIO@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	str	x8, [x20]
	b	LBB0_37
LBB0_36:
Lloh25:
	adrp	x8, _sd_type@GOTPAGE
Lloh26:
	ldr	x8, [x8, _sd_type@GOTPAGEOFF]
	str	x8, [x20, #16]
LBB0_37:
	mov	x0, x20
	bl	_sdio_disable_cd
	mov	x22, x0
	cbnz	w0, LBB0_30
; %bb.38:
	mov	x0, x20
	bl	_sdio_enable_hs
	cmp	w0, #1
	b.lt	LBB0_43
; %bb.39:
	mov	x0, x20
	bl	_mmc_sd_go_highspeed
LBB0_40:
	mov	x0, x20
	bl	_mmc_sdio_get_max_clock
	mov	x1, x0
	mov	x0, x19
	bl	_mmc_set_clock
	mov	x0, x20
	bl	_sdio_enable_4bit_bus
	cmp	w0, #1
	b.lt	LBB0_44
; %bb.41:
	ldr	w0, [x20, #8]
Lloh27:
	adrp	x8, _MMC_BUS_WIDTH_4@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MMC_BUS_WIDTH_4@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_mmc_set_bus_width
LBB0_42:
	mov	w22, #0
	str	x20, [x19, #8]
	b	LBB0_1
LBB0_43:
	mov	x22, x0
	cbnz	w0, LBB0_30
	b	LBB0_40
LBB0_44:
	mov	x22, x0
	cbnz	w0, LBB0_30
	b	LBB0_42
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_use_spi_crc,4,2                ; @use_spi_crc
	.comm	_MMC_TYPE_SD_COMBO,8,3          ; @MMC_TYPE_SD_COMBO
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_MMC_TYPE_SDIO,8,3              ; @MMC_TYPE_SDIO
	.comm	_MMC_BUSMODE_PUSHPULL,4,2       ; @MMC_BUSMODE_PUSHPULL
	.comm	_sd_type,4,2                    ; @sd_type
	.comm	_MMC_BUS_WIDTH_4,4,2            ; @MMC_BUS_WIDTH_4
	.no_dead_strip	_mmc_sdio_init_card
.subsections_via_symbols
