	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imxmci_start_clock
_imxmci_start_clock:                    ## @imxmci_start_clock
	.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
	movq	%rdi, %r15
	movq	_MMC_REG_STR_STP_CLK@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r15), %rdi
	callq	_readw
	movq	_STR_STP_CLK_STOP_CLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%rbx), %rsi
	addq	8(%r15), %rsi
	callq	_writew
	movq	_IMXMCI_PEND_STARTED_b@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r15), %r14
	movq	%r14, %rsi
	callq	_clear_bit
	movq	(%rbx), %rdi
	addq	8(%r15), %rdi
	callq	_readw
	movq	_STR_STP_CLK_START_CLK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	8(%r15), %rsi
	movl	%eax, %edi
	callq	_writew
	xorl	%eax, %eax
	movq	_MMC_REG_STATUS@GOTPCREL(%rip), %rbx
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movq	%rbx, %r13
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$-129, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incl	%r12d
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	%r13, %rbx
	movq	(%r13), %rdi
	addq	8(%r15), %rdi
	callq	_readw
	movq	_STATUS_CARD_BUS_CLK_RUN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	(%rbx), %rdi
	addq	8(%r15), %rdi
	callq	_readw
	movq	_STATUS_CARD_BUS_CLK_RUN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=2
	xorl	%ebx, %ebx
	testl	%eax, %ecx
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	_IMXMCI_PEND_STARTED_b@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	callq	_local_irq_save
	movq	_IMXMCI_PEND_STARTED_b@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	movq	%r13, %rbx
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_MMC_REG_STR_STP_CLK@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r15), %rdi
	callq	_readw
	movq	_STR_STP_CLK_START_CLK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	movq	%r13, %rbx
	addq	8(%r15), %rsi
	movl	%eax, %edi
	callq	_writew
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	callq	_local_irq_restore
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cmpl	$256, %eax                      ## imm = 0x100
	jne	LBB0_1
## %bb.10:
	movl	(%r15), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movl	$-1, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_REG_STR_STP_CLK,8,3        ## @MMC_REG_STR_STP_CLK
	.comm	_STR_STP_CLK_STOP_CLK,4,2       ## @STR_STP_CLK_STOP_CLK
	.comm	_IMXMCI_PEND_STARTED_b,4,2      ## @IMXMCI_PEND_STARTED_b
	.comm	_STR_STP_CLK_START_CLK,4,2      ## @STR_STP_CLK_START_CLK
	.comm	_MMC_REG_STATUS,8,3             ## @MMC_REG_STATUS
	.comm	_STATUS_CARD_BUS_CLK_RUN,4,2    ## @STATUS_CARD_BUS_CLK_RUN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"imxmci_start_clock blocked, no luck\n"

	.no_dead_strip	_imxmci_start_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imxmci_start_clock
_imxmci_start_clock:                    ; @imxmci_start_clock
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x21, _MMC_REG_STR_STP_CLK@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MMC_REG_STR_STP_CLK@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readw
Lloh2:
	adrp	x8, _STR_STP_CLK_STOP_CLK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STR_STP_CLK_STOP_CLK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w0, w0, w8
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writew
Lloh5:
	adrp	x22, _IMXMCI_PEND_STARTED_b@GOTPAGE
Lloh6:
	ldr	x22, [x22, _IMXMCI_PEND_STARTED_b@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x20, x19, #16
	mov	x1, x20
	bl	_clear_bit
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readw
Lloh7:
	adrp	x23, _STR_STP_CLK_START_CLK@GOTPAGE
Lloh8:
	ldr	x23, [x23, _STR_STP_CLK_START_CLK@GOTPAGEOFF]
	ldr	w8, [x23]
	orr	w0, w8, w0
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writew
	mov	w24, #0
Lloh9:
	adrp	x25, _MMC_REG_STATUS@GOTPAGE
Lloh10:
	ldr	x25, [x25, _MMC_REG_STATUS@GOTPAGEOFF]
Lloh11:
	adrp	x26, _STATUS_CARD_BUS_CLK_RUN@GOTPAGE
Lloh12:
	ldr	x26, [x26, _STATUS_CARD_BUS_CLK_RUN@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
	mov	w27, #-129
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	adds	w27, w27, #1
	b.hs	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readw
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readw
	ldr	w8, [x26]
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=2
	tst	w8, w0
	b.ne	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	w0, [x22]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_2
	b	LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
	bl	_local_irq_save
	ldr	w0, [x22]
	mov	x1, x20
	bl	_test_bit
	cbnz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readw
	ldr	w8, [x23]
	orr	w0, w8, w0
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writew
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
	bl	_local_irq_restore
	add	w24, w24, #1
	cmp	w24, #256
	b.ne	LBB0_1
; %bb.10:
	ldr	w0, [x19]
	bl	_mmc_dev
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w0, #-1
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_REG_STR_STP_CLK,8,3        ; @MMC_REG_STR_STP_CLK
	.comm	_STR_STP_CLK_STOP_CLK,4,2       ; @STR_STP_CLK_STOP_CLK
	.comm	_IMXMCI_PEND_STARTED_b,4,2      ; @IMXMCI_PEND_STARTED_b
	.comm	_STR_STP_CLK_START_CLK,4,2      ; @STR_STP_CLK_START_CLK
	.comm	_MMC_REG_STATUS,8,3             ; @MMC_REG_STATUS
	.comm	_STATUS_CARD_BUS_CLK_RUN,4,2    ; @STATUS_CARD_BUS_CLK_RUN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"imxmci_start_clock blocked, no luck\n"

	.no_dead_strip	_imxmci_start_clock
.subsections_via_symbols
