	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pxav2_reset
_pxav2_reset:                           ## @pxav2_reset
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	callq	_mmc_dev
	movl	%eax, %edi
	callq	_to_platform_device
	movq	(%rax), %r15
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_sdhci_reset
	movq	_SDHCI_RESET_ALL@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_8
## %bb.1:
	testq	%r15, %r15
	je	LBB0_6
## %bb.2:
	cmpl	$1, (%r15)
	jne	LBB0_4
## %bb.3:
	movq	_SD_CLOCK_BURST_SIZE_SETUP@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%r14), %rdi
	callq	_readw
	movq	_SDCLK_DELAY_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_SDCLK_DELAY_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%edx, %esi
	shll	%cl, %esi
	andl	4(%r15), %edx
	shll	%cl, %edx
	notl	%esi
	movq	_SDCLK_SEL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_SDCLK_SEL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%edi, %ebx
	shll	%cl, %ebx
	andl	%eax, %esi
	orl	%esi, %edx
	notl	%ebx
	andl	%edx, %ebx
	andl	$1, %edi
	shll	%cl, %edi
	orl	%ebx, %edi
	movq	(%r12), %rsi
	addq	(%r14), %rsi
	callq	_writew
LBB0_4:
	movq	_PXA_FLAG_ENABLE_CLOCK_GATING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	je	LBB0_6
## %bb.5:
	movq	_SD_FIFO_PARAM@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_readw
	movq	_CLK_GATE_SETTING_BITS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	jmp	LBB0_7
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_SD_FIFO_PARAM@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r14), %rdi
	callq	_readw
	movl	%eax, %edi
	movq	_CLK_GATE_SETTING_BITS@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
LBB0_7:
	movq	_SD_FIFO_PARAM@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writew                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_RESET_ALL,8,3            ## @SDHCI_RESET_ALL
	.comm	_SD_CLOCK_BURST_SIZE_SETUP,8,3  ## @SD_CLOCK_BURST_SIZE_SETUP
	.comm	_SDCLK_DELAY_MASK,4,2           ## @SDCLK_DELAY_MASK
	.comm	_SDCLK_DELAY_SHIFT,4,2          ## @SDCLK_DELAY_SHIFT
	.comm	_SDCLK_SEL_MASK,4,2             ## @SDCLK_SEL_MASK
	.comm	_SDCLK_SEL_SHIFT,4,2            ## @SDCLK_SEL_SHIFT
	.comm	_PXA_FLAG_ENABLE_CLOCK_GATING,4,2 ## @PXA_FLAG_ENABLE_CLOCK_GATING
	.comm	_SD_FIFO_PARAM,8,3              ## @SD_FIFO_PARAM
	.comm	_CLK_GATE_SETTING_BITS,4,2      ## @CLK_GATE_SETTING_BITS
	.no_dead_strip	_pxav2_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pxav2_reset
_pxav2_reset:                           ; @pxav2_reset
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_mmc_dev
	bl	_to_platform_device
	ldr	x21, [x0]
	mov	x0, x19
	mov	x1, x20
	bl	_sdhci_reset
Lloh0:
	adrp	x8, _SDHCI_RESET_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDHCI_RESET_ALL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_6
; %bb.1:
Lloh3:
	adrp	x20, _SD_FIFO_PARAM@GOTPAGE
Lloh4:
	ldr	x20, [x20, _SD_FIFO_PARAM@GOTPAGEOFF]
	cbz	x21, LBB0_7
; %bb.2:
	ldr	w8, [x21]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19]
Lloh5:
	adrp	x22, _SD_CLOCK_BURST_SIZE_SETUP@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SD_CLOCK_BURST_SIZE_SETUP@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readw
Lloh7:
	adrp	x8, _SDCLK_DELAY_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SDCLK_DELAY_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _SDCLK_DELAY_SHIFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SDCLK_DELAY_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	lsl	w10, w8, w9
	bic	w10, w0, w10
	ldr	w11, [x21, #4]
	and	w8, w11, w8
	lsl	w8, w8, w9
	orr	w8, w8, w10
Lloh13:
	adrp	x9, _SDCLK_SEL_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SDCLK_SEL_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _SDCLK_SEL_SHIFT@GOTPAGE
Lloh17:
	ldr	x10, [x10, _SDCLK_SEL_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	lsl	w11, w9, w10
	bic	w8, w8, w11
	and	w9, w9, #0x1
	lsl	w9, w9, w10
	orr	w0, w8, w9
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writew
LBB0_4:
	ldr	w8, [x21, #8]
Lloh19:
	adrp	x9, _PXA_FLAG_ENABLE_CLOCK_GATING@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PXA_FLAG_ENABLE_CLOCK_GATING@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.5:
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readw
Lloh22:
	adrp	x8, _CLK_GATE_SETTING_BITS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CLK_GATE_SETTING_BITS@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	bic	w0, w0, w8
	b	LBB0_8
LBB0_6:
	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
	ret
LBB0_7:
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readw
Lloh25:
	adrp	x8, _CLK_GATE_SETTING_BITS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CLK_GATE_SETTING_BITS@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	orr	w0, w8, w0
LBB0_8:
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	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	_writew
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_RESET_ALL,8,3            ; @SDHCI_RESET_ALL
	.comm	_SD_CLOCK_BURST_SIZE_SETUP,8,3  ; @SD_CLOCK_BURST_SIZE_SETUP
	.comm	_SDCLK_DELAY_MASK,4,2           ; @SDCLK_DELAY_MASK
	.comm	_SDCLK_DELAY_SHIFT,4,2          ; @SDCLK_DELAY_SHIFT
	.comm	_SDCLK_SEL_MASK,4,2             ; @SDCLK_SEL_MASK
	.comm	_SDCLK_SEL_SHIFT,4,2            ; @SDCLK_SEL_SHIFT
	.comm	_PXA_FLAG_ENABLE_CLOCK_GATING,4,2 ; @PXA_FLAG_ENABLE_CLOCK_GATING
	.comm	_SD_FIFO_PARAM,8,3              ; @SD_FIFO_PARAM
	.comm	_CLK_GATE_SETTING_BITS,4,2      ; @CLK_GATE_SETTING_BITS
	.no_dead_strip	_pxav2_reset
.subsections_via_symbols
