	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rts5260_process_ocp
_rts5260_process_ocp:                   ## @rts5260_process_ocp
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	$0, 8(%rdi)
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movq	%rdi, %rsi
	callq	_rtsx_pci_get_ocpstat
	leaq	4(%rbx), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_rts5260_get_ocpstat2
	movq	_SD_OC_NOW@GOTPCREL(%rip), %rax
	movq	_SD_OC_EVER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%rbx)
	jne	LBB0_3
## %bb.2:
	movq	_DV3318_OCP_NOW@GOTPCREL(%rip), %rax
	movq	_DV3318_OCP_EVER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%r14)
	je	LBB0_4
LBB0_3:
	movq	_RTSX_SD_CARD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rtsx_pci_card_power_off
	movq	_CARD_OE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SD_OUTPUT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_rtsx_pci_write_register
	movq	%rbx, %rdi
	callq	_rtsx_pci_clear_ocpstat
	movq	$0, (%rbx)
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SD_OC_NOW,4,2                  ## @SD_OC_NOW
	.comm	_SD_OC_EVER,4,2                 ## @SD_OC_EVER
	.comm	_DV3318_OCP_NOW,4,2             ## @DV3318_OCP_NOW
	.comm	_DV3318_OCP_EVER,4,2            ## @DV3318_OCP_EVER
	.comm	_RTSX_SD_CARD,4,2               ## @RTSX_SD_CARD
	.comm	_CARD_OE,4,2                    ## @CARD_OE
	.comm	_SD_OUTPUT_EN,4,2               ## @SD_OUTPUT_EN
	.no_dead_strip	_rts5260_process_ocp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rts5260_process_ocp
_rts5260_process_ocp:                   ; @rts5260_process_ocp
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	x1, x0
	bl	_rtsx_pci_get_ocpstat
	add	x20, x19, #4
	mov	x0, x19
	mov	x1, x20
	bl	_rts5260_get_ocpstat2
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _SD_OC_NOW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SD_OC_NOW@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _SD_OC_EVER@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SD_OC_EVER@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _DV3318_OCP_NOW@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DV3318_OCP_NOW@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _DV3318_OCP_EVER@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DV3318_OCP_EVER@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_4
LBB0_3:
Lloh12:
	adrp	x8, _RTSX_SD_CARD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RTSX_SD_CARD@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rtsx_pci_card_power_off
Lloh15:
	adrp	x8, _CARD_OE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CARD_OE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _SD_OUTPUT_EN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SD_OUTPUT_EN@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_rtsx_pci_write_register
	mov	x0, x19
	bl	_rtsx_pci_clear_ocpstat
	str	xzr, [x19]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SD_OC_NOW,4,2                  ; @SD_OC_NOW
	.comm	_SD_OC_EVER,4,2                 ; @SD_OC_EVER
	.comm	_DV3318_OCP_NOW,4,2             ; @DV3318_OCP_NOW
	.comm	_DV3318_OCP_EVER,4,2            ; @DV3318_OCP_EVER
	.comm	_RTSX_SD_CARD,4,2               ; @RTSX_SD_CARD
	.comm	_CARD_OE,4,2                    ; @CARD_OE
	.comm	_SD_OUTPUT_EN,4,2               ; @SD_OUTPUT_EN
	.no_dead_strip	_rts5260_process_ocp
.subsections_via_symbols
