	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks_pcie_handle_error_irq
_ks_pcie_handle_error_irq:              ## @ks_pcie_handle_error_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movq	_ERR_IRQ_STATUS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_ks_pcie_app_readl
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movq	_ERR_SYS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_4:
	movq	_ERR_FATAL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_6:
	movq	_ERR_NONFATAL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
LBB0_8:
	movq	_ERR_CORR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
LBB0_10:
	cmpq	$0, (%r14)
	jne	LBB0_13
## %bb.11:
	movq	_ERR_AXI@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_13
## %bb.12:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_13:
	movq	_ERR_AER@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_14
LBB0_16:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_17:
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_ks_pcie_app_writel
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	cmpq	$0, (%r14)
	je	LBB0_17
## %bb.15:
	movq	_AM6_ERR_AER@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_16
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_IRQ_STATUS,4,2             ## @ERR_IRQ_STATUS
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_ERR_SYS,4,2                    ## @ERR_SYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"System Error\n"

	.comm	_ERR_FATAL,4,2                  ## @ERR_FATAL
L_.str.1:                               ## @.str.1
	.asciz	"Fatal Error\n"

	.comm	_ERR_NONFATAL,4,2               ## @ERR_NONFATAL
L_.str.2:                               ## @.str.2
	.asciz	"Non Fatal Error\n"

	.comm	_ERR_CORR,4,2                   ## @ERR_CORR
L_.str.3:                               ## @.str.3
	.asciz	"Correctable Error\n"

	.comm	_ERR_AXI,4,2                    ## @ERR_AXI
L_.str.4:                               ## @.str.4
	.asciz	"AXI tag lookup fatal Error\n"

	.comm	_ERR_AER,4,2                    ## @ERR_AER
	.comm	_AM6_ERR_AER,4,2                ## @AM6_ERR_AER
L_.str.5:                               ## @.str.5
	.asciz	"ECRC Error\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_ks_pcie_handle_error_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_handle_error_irq
_ks_pcie_handle_error_irq:              ; @ks_pcie_handle_error_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	x8, [x0, #8]
	ldr	x21, [x8]
Lloh0:
	adrp	x22, _ERR_IRQ_STATUS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ERR_IRQ_STATUS@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_ks_pcie_app_readl
	cbz	w0, LBB0_15
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x8, _ERR_SYS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERR_SYS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_3:
Lloh7:
	adrp	x8, _ERR_FATAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERR_FATAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_5:
Lloh12:
	adrp	x8, _ERR_NONFATAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERR_NONFATAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_7
; %bb.6:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
LBB0_7:
Lloh17:
	adrp	x8, _ERR_CORR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERR_CORR@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_9
; %bb.8:
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
LBB0_9:
	ldr	x8, [x19]
	cbnz	x8, LBB0_12
; %bb.10:
Lloh22:
	adrp	x8, _ERR_AXI@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ERR_AXI@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.11:
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_12:
Lloh27:
	adrp	x8, _ERR_AER@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ERR_AER@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_17
LBB0_13:
Lloh30:
	adrp	x1, l_.str.5@PAGE
Lloh31:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_14:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_ks_pcie_app_writel
Lloh32:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh33:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh34:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [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
	ret
LBB0_17:
	ldr	x8, [x19]
	cbz	x8, LBB0_14
; %bb.18:
Lloh36:
	adrp	x8, _AM6_ERR_AER@GOTPAGE
Lloh37:
	ldr	x8, [x8, _AM6_ERR_AER@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_13
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_IRQ_STATUS,4,2             ; @ERR_IRQ_STATUS
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_ERR_SYS,4,2                    ; @ERR_SYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"System Error\n"

	.comm	_ERR_FATAL,4,2                  ; @ERR_FATAL
l_.str.1:                               ; @.str.1
	.asciz	"Fatal Error\n"

	.comm	_ERR_NONFATAL,4,2               ; @ERR_NONFATAL
l_.str.2:                               ; @.str.2
	.asciz	"Non Fatal Error\n"

	.comm	_ERR_CORR,4,2                   ; @ERR_CORR
l_.str.3:                               ; @.str.3
	.asciz	"Correctable Error\n"

	.comm	_ERR_AXI,4,2                    ; @ERR_AXI
l_.str.4:                               ; @.str.4
	.asciz	"AXI tag lookup fatal Error\n"

	.comm	_ERR_AER,4,2                    ; @ERR_AER
	.comm	_AM6_ERR_AER,4,2                ; @AM6_ERR_AER
l_.str.5:                               ; @.str.5
	.asciz	"ECRC Error\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_ks_pcie_handle_error_irq
.subsections_via_symbols
