	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_mmc_oclk_onoff
_sunxi_mmc_oclk_onoff:                  ## @sunxi_mmc_oclk_onoff
	.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, %r15d
	movq	%rdi, %r14
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	$750, %edi                      ## imm = 0x2EE
	callq	_msecs_to_jiffies
	movq	%rax, %r12
	movl	8(%r14), %edi
	callq	_mmc_dev
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rcx, %rdx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	_REG_CLKCR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_mmc_readl
	testl	%r15d, %r15d
	movq	_SDXC_CARD_CLOCK_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmovnel	%ecx, %r15d
	addq	%r13, %r12
	movq	_SDXC_LOW_POWER_ON@GOTPCREL(%rip), %rdx
	movq	_SDXC_MASK_DATA0@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %ecx
	orl	%esi, %ecx
	notl	%ecx
	andl	%eax, %ecx
	movq	(%r14), %rax
	xorl	%edx, %edx
	cmpq	$0, (%rax)
	cmovnel	%esi, %edx
	orl	%r15d, %edx
	orl	%ecx, %edx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_mmc_writel
	movq	_SDXC_START@GOTPCREL(%rip), %r15
	movq	_SDXC_UPCLK_ONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r15), %edx
	movq	_SDXC_WAIT_PRE_OVER@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_REG_CMDR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_mmc_writel
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_mmc_readl
	movl	%eax, %ebx
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r12, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %eax
	andl	%ebx, %eax
	jne	LBB0_1
LBB0_3:
	movq	_REG_RINTR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_mmc_readl
	movq	_SDXC_SDIO_INTERRUPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_mmc_writel
	testl	%ebx, (%r15)
	je	LBB0_5
## %bb.4:
	movl	8(%r14), %edi
	callq	_mmc_dev
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	movq	(%r14), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.6:
	movq	_REG_CLKCR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_mmc_readl
	movl	(%r15), %esi
	movq	_SDXC_MASK_DATA0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r14, %rdi
	callq	_mmc_writel
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%sabling the clock\n"

L_.str.1:                               ## @.str.1
	.asciz	"en"

L_.str.2:                               ## @.str.2
	.asciz	"dis"

	.comm	_REG_CLKCR,4,2                  ## @REG_CLKCR
	.comm	_SDXC_CARD_CLOCK_ON,4,2         ## @SDXC_CARD_CLOCK_ON
	.comm	_SDXC_LOW_POWER_ON,4,2          ## @SDXC_LOW_POWER_ON
	.comm	_SDXC_MASK_DATA0,4,2            ## @SDXC_MASK_DATA0
	.comm	_SDXC_START,4,2                 ## @SDXC_START
	.comm	_SDXC_UPCLK_ONLY,4,2            ## @SDXC_UPCLK_ONLY
	.comm	_SDXC_WAIT_PRE_OVER,4,2         ## @SDXC_WAIT_PRE_OVER
	.comm	_REG_CMDR,4,2                   ## @REG_CMDR
	.comm	_REG_RINTR,4,2                  ## @REG_RINTR
	.comm	_SDXC_SDIO_INTERRUPT,4,2        ## @SDXC_SDIO_INTERRUPT
L_.str.3:                               ## @.str.3
	.asciz	"fatal err update clk timeout\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sunxi_mmc_oclk_onoff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_mmc_oclk_onoff
_sunxi_mmc_oclk_onoff:                  ; @sunxi_mmc_oclk_onoff
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _jiffies@GOTPAGE
Lloh1:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x24, [x23]
	mov	w0, #750
	bl	_msecs_to_jiffies
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_mmc_dev
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh4:
	adrp	x9, l_.str.2@PAGE
Lloh5:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w21, #0
	csel	x2, x9, x8, eq
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh8:
	adrp	x22, _REG_CLKCR@GOTPAGE
Lloh9:
	ldr	x22, [x22, _REG_CLKCR@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mmc_readl
	add	x20, x20, x24
Lloh10:
	adrp	x8, _SDXC_CARD_CLOCK_ON@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SDXC_CARD_CLOCK_ON@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _SDXC_LOW_POWER_ON@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SDXC_LOW_POWER_ON@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w9, w9, w8
Lloh16:
	adrp	x24, _SDXC_MASK_DATA0@GOTPAGE
Lloh17:
	ldr	x24, [x24, _SDXC_MASK_DATA0@GOTPAGEOFF]
	ldr	w10, [x24]
	orr	w9, w9, w10
	bic	w9, w0, w9
	cmp	w21, #0
	csel	w8, wzr, w8, eq
	orr	w8, w9, w8
	ldr	x9, [x19]
	ldr	x9, [x9]
	cmp	x9, #0
	csel	w9, wzr, w10, eq
	orr	w2, w8, w9
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mmc_writel
Lloh18:
	adrp	x25, _SDXC_START@GOTPAGE
Lloh19:
	ldr	x25, [x25, _SDXC_START@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh20:
	adrp	x9, _SDXC_UPCLK_ONLY@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SDXC_UPCLK_ONLY@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	adrp	x10, _SDXC_WAIT_PRE_OVER@GOTPAGE
Lloh24:
	ldr	x10, [x10, _SDXC_WAIT_PRE_OVER@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh25:
	ldr	w9, [x10]
	orr	w2, w8, w9
Lloh26:
	adrp	x26, _REG_CMDR@GOTPAGE
Lloh27:
	ldr	x26, [x26, _REG_CMDR@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x19
	bl	_mmc_writel
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	bl	_mmc_readl
	mov	x21, x0
	ldr	x0, [x23]
	mov	x1, x20
	bl	_time_before
	ldr	w8, [x25]
	and	w8, w8, w21
	cmp	x0, #0
	ccmp	w8, #0, #4, ne
	b.ne	LBB0_1
; %bb.2:
Lloh28:
	adrp	x8, _REG_RINTR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _REG_RINTR@GOTPAGEOFF]
Lloh30:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_mmc_readl
Lloh31:
	adrp	x8, _SDXC_SDIO_INTERRUPT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SDXC_SDIO_INTERRUPT@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	bic	w2, w0, w8
	mov	x0, x19
	mov	x1, x20
	bl	_mmc_writel
	ldr	w8, [x25]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
	bl	_mmc_dev
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
Lloh36:
	adrp	x8, _EIO@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_4:
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mmc_readl
	ldr	w1, [x22]
	ldr	w8, [x24]
	bic	w2, w0, w8
	mov	x0, x19
	bl	_mmc_writel
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%sabling the clock\n"

l_.str.1:                               ; @.str.1
	.asciz	"en"

l_.str.2:                               ; @.str.2
	.asciz	"dis"

	.comm	_REG_CLKCR,4,2                  ; @REG_CLKCR
	.comm	_SDXC_CARD_CLOCK_ON,4,2         ; @SDXC_CARD_CLOCK_ON
	.comm	_SDXC_LOW_POWER_ON,4,2          ; @SDXC_LOW_POWER_ON
	.comm	_SDXC_MASK_DATA0,4,2            ; @SDXC_MASK_DATA0
	.comm	_SDXC_START,4,2                 ; @SDXC_START
	.comm	_SDXC_UPCLK_ONLY,4,2            ; @SDXC_UPCLK_ONLY
	.comm	_SDXC_WAIT_PRE_OVER,4,2         ; @SDXC_WAIT_PRE_OVER
	.comm	_REG_CMDR,4,2                   ; @REG_CMDR
	.comm	_REG_RINTR,4,2                  ; @REG_RINTR
	.comm	_SDXC_SDIO_INTERRUPT,4,2        ; @SDXC_SDIO_INTERRUPT
l_.str.3:                               ; @.str.3
	.asciz	"fatal err update clk timeout\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sunxi_mmc_oclk_onoff
.subsections_via_symbols
