	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks_pcie_am654_raise_legacy_irq
_ks_pcie_am654_raise_legacy_irq:        ## @ks_pcie_am654_raise_legacy_irq
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	movq	_PCI_INTERRUPT_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dw_pcie_readb_dbi
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	cmpl	$4, %eax
	jg	LBB0_2
## %bb.3:
	movl	%ebx, %edi
	callq	_PCIE_LEGACY_IRQ_ENABLE_SET
	movq	_INT_ENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ks_pcie_app_writel
	movq	_PCIE_EP_IRQ_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_ks_pcie_app_writel
	movl	$1, %edi
	callq	_mdelay
	movq	_PCIE_EP_IRQ_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_ks_pcie_app_writel
	movl	%ebx, %edi
	callq	_PCIE_LEGACY_IRQ_ENABLE_CLR
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ks_pcie_app_writel             ## TAILCALL
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_INTERRUPT_PIN,4,2          ## @PCI_INTERRUPT_PIN
	.comm	_INT_ENABLE,4,2                 ## @INT_ENABLE
	.comm	_PCIE_EP_IRQ_SET,4,2            ## @PCIE_EP_IRQ_SET
	.comm	_PCIE_EP_IRQ_CLR,4,2            ## @PCIE_EP_IRQ_CLR
	.no_dead_strip	_ks_pcie_am654_raise_legacy_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks_pcie_am654_raise_legacy_irq
_ks_pcie_am654_raise_legacy_irq:        ; @ks_pcie_am654_raise_legacy_irq
	.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	x19, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x8, _PCI_INTERRUPT_PIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_INTERRUPT_PIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_dw_pcie_readb_dbi
	cmp	w0, #0
	ccmp	w0, #4, #0, ne
	b.le	LBB0_2
; %bb.1:
	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_2:
	mov	x20, x0
	bl	_PCIE_LEGACY_IRQ_ENABLE_SET
	mov	x1, x0
Lloh3:
	adrp	x21, _INT_ENABLE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _INT_ENABLE@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ks_pcie_app_writel
Lloh5:
	adrp	x8, _PCIE_EP_IRQ_SET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCIE_EP_IRQ_SET@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ks_pcie_app_writel
	mov	w0, #1
	bl	_mdelay
Lloh8:
	adrp	x8, _PCIE_EP_IRQ_CLR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PCIE_EP_IRQ_CLR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_ks_pcie_app_writel
	mov	x0, x20
	bl	_PCIE_LEGACY_IRQ_ENABLE_CLR
	mov	x1, x0
	ldr	w2, [x21]
	mov	x0, x19
	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	_ks_pcie_app_writel
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_INTERRUPT_PIN,4,2          ; @PCI_INTERRUPT_PIN
	.comm	_INT_ENABLE,4,2                 ; @INT_ENABLE
	.comm	_PCIE_EP_IRQ_SET,4,2            ; @PCIE_EP_IRQ_SET
	.comm	_PCIE_EP_IRQ_CLR,4,2            ; @PCIE_EP_IRQ_CLR
	.no_dead_strip	_ks_pcie_am654_raise_legacy_irq
.subsections_via_symbols
