	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_bcm_kona_sd_card_emulate
_sdhci_bcm_kona_sd_card_emulate:        ## @sdhci_bcm_kona_sd_card_emulate
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	$20, %edi
	callq	_udelay
	movq	_KONA_SDHOST_CORESTAT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_sdhci_readl
	movl	%eax, %ebx
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.1:
	movl	(%r15), %edi
	callq	_mmc_gpio_get_ro
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movq	_KONA_SDHOST_WP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	notl	%edx
	andl	%edx, %ebx
	testl	%eax, %eax
	cmovel	%eax, %ecx
	orl	%ecx, %ebx
LBB0_3:
	movq	_KONA_SDHOST_CD_SW@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	jmp	LBB0_5
LBB0_4:
	movq	_KONA_SDHOST_CD_SW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
LBB0_5:
	movl	(%r13), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_sdhci_writel
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KONA_SDHOST_CORESTAT,4,2       ## @KONA_SDHOST_CORESTAT
	.comm	_KONA_SDHOST_WP,4,2             ## @KONA_SDHOST_WP
	.comm	_KONA_SDHOST_CD_SW,4,2          ## @KONA_SDHOST_CD_SW
	.no_dead_strip	_sdhci_bcm_kona_sd_card_emulate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_bcm_kona_sd_card_emulate
_sdhci_bcm_kona_sd_card_emulate:        ; @sdhci_bcm_kona_sd_card_emulate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x1
	mov	x20, x0
	bl	_sdhci_priv
	bl	_sdhci_pltfm_priv
	mov	x19, x0
	bl	_mutex_lock
	mov	w0, #20
	bl	_udelay
Lloh0:
	adrp	x23, _KONA_SDHOST_CORESTAT@GOTPAGE
Lloh1:
	ldr	x23, [x23, _KONA_SDHOST_CORESTAT@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_sdhci_readl
	mov	x21, x0
	cbz	w22, LBB0_4
; %bb.1:
	ldr	w0, [x20]
	bl	_mmc_gpio_get_ro
	tbnz	w0, #31, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _KONA_SDHOST_WP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KONA_SDHOST_WP@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w9, w21, w8
	cmp	w0, #0
	csel	w8, wzr, w8, eq
	orr	w21, w9, w8
LBB0_3:
Lloh5:
	adrp	x8, _KONA_SDHOST_CD_SW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KONA_SDHOST_CD_SW@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w1, w8, w21
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _KONA_SDHOST_CD_SW@GOTPAGE
Lloh9:
	ldr	x8, [x8, _KONA_SDHOST_CD_SW@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	bic	w1, w21, w8
LBB0_5:
	ldr	w2, [x23]
	mov	x0, x20
	bl	_sdhci_writel
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_KONA_SDHOST_CORESTAT,4,2       ; @KONA_SDHOST_CORESTAT
	.comm	_KONA_SDHOST_WP,4,2             ; @KONA_SDHOST_WP
	.comm	_KONA_SDHOST_CD_SW,4,2          ; @KONA_SDHOST_CD_SW
	.no_dead_strip	_sdhci_bcm_kona_sd_card_emulate
.subsections_via_symbols
