	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_attach_mmc                 ## -- Begin function mmc_attach_mmc
	.p2align	4, 0x90
_mmc_attach_mmc:                        ## @mmc_attach_mmc
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	xorl	%edi, %edi
	cmpl	$0, 24(%r14)
	sete	%dil
	callq	_WARN_ON
	movq	%r14, %rdi
	callq	_mmc_host_is_spi
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_MMC_BUSMODE_OPENDRAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mmc_set_bus_mode
LBB0_2:
	leaq	-20(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mmc_send_op_cond
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:
	movq	_mmc_ops@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_mmc_attach_bus
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, 16(%r14)
LBB0_5:
	movq	%r14, %rdi
	callq	_mmc_host_is_spi
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	-20(%rbp), %rdx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_mmc_spi_read_ocr
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
LBB0_7:
	movl	-20(%rbp), %esi
	movq	%r14, %rdi
	callq	_mmc_select_voltage
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_mmc_init_card
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movq	%r14, %rdi
	callq	_mmc_release_host
	movq	(%r14), %rdi
	callq	_mmc_add_card
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	%eax, %ebx
	movq	(%r14), %rdi
	callq	_mmc_remove_card
	movq	%r14, %rdi
	callq	_mmc_claim_host
	movq	$0, (%r14)
	jmp	LBB0_13
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movq	%r14, %rdi
	callq	_mmc_detach_bus
	movq	%r14, %rdi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	callq	_pr_err
LBB0_14:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	movq	%r14, %rdi
	callq	_mmc_claim_host
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_BUSMODE_OPENDRAIN,4,2      ## @MMC_BUSMODE_OPENDRAIN
	.comm	_mmc_ops,4,2                    ## @mmc_ops
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: error %d whilst initialising MMC card\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_attach_mmc                 ; -- Begin function mmc_attach_mmc
	.p2align	2
_mmc_attach_mmc:                        ; @mmc_attach_mmc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0, #24]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	mov	x0, x19
	bl	_mmc_host_is_spi
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MMC_BUSMODE_OPENDRAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMC_BUSMODE_OPENDRAIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mmc_set_bus_mode
LBB0_2:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #0
	bl	_mmc_send_op_cond
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.3:
Lloh3:
	adrp	x1, _mmc_ops@GOTPAGE
Lloh4:
	ldr	x1, [x1, _mmc_ops@GOTPAGEOFF]
	mov	x0, x19
	bl	_mmc_attach_bus
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.4:
	str	x8, [x19, #16]
LBB0_5:
	mov	x0, x19
	bl	_mmc_host_is_spi
	cbz	x0, LBB0_7
; %bb.6:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #1
	bl	_mmc_spi_read_ocr
	mov	x20, x0
	cbnz	w0, LBB0_12
LBB0_7:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_mmc_select_voltage
	cbz	w0, LBB0_11
; %bb.8:
	mov	x1, x0
	mov	x0, x19
	mov	x2, #0
	bl	_mmc_init_card
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.9:
	mov	x0, x19
	bl	_mmc_release_host
	ldr	x0, [x19]
	bl	_mmc_add_card
	mov	x20, x0
	cbz	w0, LBB0_14
; %bb.10:
	ldr	x0, [x19]
	bl	_mmc_remove_card
	mov	x0, x19
	bl	_mmc_claim_host
	str	xzr, [x19]
	b	LBB0_12
LBB0_11:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_12:
	mov	x0, x19
	bl	_mmc_detach_bus
	mov	x0, x19
	bl	_mmc_hostname
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x20
	bl	_pr_err
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_14:
	mov	x0, x19
	bl	_mmc_claim_host
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_BUSMODE_OPENDRAIN,4,2      ; @MMC_BUSMODE_OPENDRAIN
	.comm	_mmc_ops,4,2                    ; @mmc_ops
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: error %d whilst initialising MMC card\n"

.subsections_via_symbols
