	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_omap_select_slot
_mmc_omap_select_slot:                  ## @mmc_omap_select_slot
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	16(%rdi), %r12
	testl	%esi, %esi
	jne	LBB0_5
## %bb.1:
	leaq	20(%r12), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 24(%r12)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movl	32(%r12), %edi
	xorl	%esi, %esi
	cmpq	$0, 24(%r12)
	sete	%sil
	callq	_wait_event
	jmp	LBB0_3
LBB0_4:
	movq	8(%r14), %rax
	movq	%rax, 24(%r12)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_5:
	leaq	16(%r12), %rdi
	callq	_del_timer
	movq	(%r12), %rdi
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.6:
	cmpq	%r14, %rdi
	je	LBB0_11
LBB0_7:
	callq	_mmc_omap_fclk_offdelay
	cmpq	%r14, (%r12)
	je	LBB0_11
## %bb.8:
	movq	_CON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64512, %edx                    ## imm = 0xFC00
	andl	(%r14), %edx
	movq	%r12, %rdi
	callq	_OMAP_MMC_WRITE
	movq	8(%r12), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.9:
	movq	8(%r14), %rdi
	callq	_mmc_dev
	movl	4(%r14), %esi
	movl	%eax, %edi
	callq	*%rbx
LBB0_10:
	movq	%r14, (%r12)
LBB0_11:
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.12:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_mmc_omap_fclk_enable
	movq	_CON@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_OMAP_MMC_READ
	movl	(%rbx), %esi
	movl	(%r14), %edx
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_OMAP_MMC_WRITE                 ## TAILCALL
LBB0_13:
	movq	%r12, %rdi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmc_omap_fclk_enable           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CON,4,2                        ## @CON
	.no_dead_strip	_mmc_omap_select_slot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_omap_select_slot
_mmc_omap_select_slot:                  ; @mmc_omap_select_slot
	.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	x21, x1
	mov	x20, x0
	ldr	x19, [x0, #16]
	cbnz	w1, LBB0_5
; %bb.1:
	add	x22, x19, #20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #32]
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w1, eq
	bl	_wait_event
	b	LBB0_2
LBB0_4:
	ldr	x8, [x20, #8]
	str	x8, [x19, #24]
	mov	x0, x22
	bl	_spin_unlock_irqrestore
LBB0_5:
	add	x0, x19, #16
	bl	_del_timer
	ldr	x0, [x19]
	cbz	w21, LBB0_7
; %bb.6:
	cmp	x0, x20
	b.eq	LBB0_11
LBB0_7:
	bl	_mmc_omap_fclk_offdelay
	ldr	x8, [x19]
	cmp	x8, x20
	b.eq	LBB0_11
; %bb.8:
Lloh0:
	adrp	x8, _CON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CON@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w8, [x20]
	and	w2, w8, #0xfc00
	mov	x0, x19
	bl	_OMAP_MMC_WRITE
	ldr	x8, [x19, #8]
	ldr	x22, [x8]
	cbz	x22, LBB0_10
; %bb.9:
	ldr	x0, [x20, #8]
	bl	_mmc_dev
	ldr	w1, [x20, #4]
	blr	x22
LBB0_10:
	str	x20, [x19]
LBB0_11:
	cbz	w21, LBB0_13
; %bb.12:
	mov	x0, x19
	mov	w1, #1
	bl	_mmc_omap_fclk_enable
Lloh3:
	adrp	x21, _CON@GOTPAGE
Lloh4:
	ldr	x21, [x21, _CON@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_OMAP_MMC_READ
	ldr	w1, [x21]
	ldr	w2, [x20]
	mov	x0, x19
	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
	b	_OMAP_MMC_WRITE
LBB0_13:
	mov	x0, x19
	mov	w1, #0
	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
	b	_mmc_omap_fclk_enable
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CON,4,2                        ; @CON
	.no_dead_strip	_mmc_omap_select_slot
.subsections_via_symbols
