	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtsx_pci_process_ocp
_rtsx_pci_process_ocp:                  ## @rtsx_pci_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_1:
	cmpl	$0, 4(%rbx)
	je	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_rtsx_pci_get_ocpstat
	movq	_SD_OC_NOW@GOTPCREL(%rip), %rax
	movq	_SD_OC_EVER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_4
## %bb.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
	movl	$0, (%rbx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	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	_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	_rtsx_pci_process_ocp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtsx_pci_process_ocp
_rtsx_pci_process_ocp:                  ; @rtsx_pci_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
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x1, [x8]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x1
LBB0_2:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x19
	bl	_rtsx_pci_get_ocpstat
	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.eq	LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _RTSX_SD_CARD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RTSX_SD_CARD@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rtsx_pci_card_power_off
Lloh9:
	adrp	x8, _CARD_OE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CARD_OE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _SD_OUTPUT_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SD_OUTPUT_EN@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_rtsx_pci_write_register
	mov	x0, x19
	bl	_rtsx_pci_clear_ocpstat
	str	wzr, [x19]
LBB0_5:
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SD_OC_NOW,4,2                  ; @SD_OC_NOW
	.comm	_SD_OC_EVER,4,2                 ; @SD_OC_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	_rtsx_pci_process_ocp
.subsections_via_symbols
