	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gem_pci_interrupt
_gem_pci_interrupt:                     ## @gem_pci_interrupt
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_GREG_PCIESTAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rsi), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	(%r14), %rax
	movq	(%rax), %rcx
	movq	_PCI_VENDOR_ID_SUN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.1:
	movq	8(%rax), %rax
	movq	_PCI_DEVICE_ID_SUN_GEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	movq	_GREG_PCIESTAT_BADACK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_cont
LBB0_4:
	movq	_GREG_PCIESTAT_DTRTO@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_cont
LBB0_6:
	movq	_GREG_PCIESTAT_OTHER@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_cont
LBB0_8:
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_cont
	jmp	LBB0_10
LBB0_9:
	movq	_GREG_PCIESTAT_OTHER@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
LBB0_10:
	movq	_GREG_PCIESTAT_OTHER@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_24
## %bb.11:
	movq	(%r14), %rdi
	movq	_PCI_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_pci_read_config_word
	movl	-44(%rbp), %edx
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movl	-44(%rbp), %eax
	movq	_PCI_STATUS_PARITY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.12:
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movl	-44(%rbp), %eax
LBB0_13:
	movq	_PCI_STATUS_SIG_TARGET_ABORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.14:
	leaq	L_.str.8(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movl	-44(%rbp), %eax
LBB0_15:
	movq	_PCI_STATUS_REC_TARGET_ABORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.16:
	leaq	L_.str.9(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movl	-44(%rbp), %eax
LBB0_17:
	movq	_PCI_STATUS_REC_MASTER_ABORT@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_19
## %bb.18:
	leaq	L_.str.10(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movl	-44(%rbp), %eax
LBB0_19:
	movq	_PCI_STATUS_SIG_SYSTEM_ERROR@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	je	LBB0_21
## %bb.20:
	leaq	L_.str.11(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movl	-44(%rbp), %eax
LBB0_21:
	movq	_PCI_STATUS_DETECTED_PARITY@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	testl	%eax, %ecx
	je	LBB0_23
## %bb.22:
	leaq	L_.str.12(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movl	(%r12), %ecx
	movl	-44(%rbp), %eax
LBB0_23:
	movq	_PCI_STATUS_SIG_TARGET_ABORT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_PCI_STATUS_PARITY@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movq	_PCI_STATUS_REC_TARGET_ABORT@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	orl	(%r13), %edx
	orl	(%rbx), %edx
	orl	%ecx, %edx
	andl	%eax, %edx
	movl	%edx, -44(%rbp)
	movq	(%r14), %rdi
	movq	_PCI_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pci_write_config_word
LBB0_24:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GREG_PCIESTAT,8,3              ## @GREG_PCIESTAT
	.comm	_PCI_VENDOR_ID_SUN,8,3          ## @PCI_VENDOR_ID_SUN
	.comm	_PCI_DEVICE_ID_SUN_GEM,8,3      ## @PCI_DEVICE_ID_SUN_GEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCI error [%04x]"

	.comm	_GREG_PCIESTAT_BADACK,4,2       ## @GREG_PCIESTAT_BADACK
L_.str.1:                               ## @.str.1
	.asciz	" <No ACK64# during ABS64 cycle>"

	.comm	_GREG_PCIESTAT_DTRTO,4,2        ## @GREG_PCIESTAT_DTRTO
L_.str.2:                               ## @.str.2
	.asciz	" <Delayed transaction timeout>"

	.comm	_GREG_PCIESTAT_OTHER,4,2        ## @GREG_PCIESTAT_OTHER
L_.str.3:                               ## @.str.3
	.asciz	" <other>"

L_.str.4:                               ## @.str.4
	.asciz	"\n"

L_.str.5:                               ## @.str.5
	.asciz	"PCI error\n"

	.comm	_PCI_STATUS,4,2                 ## @PCI_STATUS
L_.str.6:                               ## @.str.6
	.asciz	"Read PCI cfg space status [%04x]\n"

	.comm	_PCI_STATUS_PARITY,4,2          ## @PCI_STATUS_PARITY
L_.str.7:                               ## @.str.7
	.asciz	"PCI parity error detected\n"

	.comm	_PCI_STATUS_SIG_TARGET_ABORT,4,2 ## @PCI_STATUS_SIG_TARGET_ABORT
L_.str.8:                               ## @.str.8
	.asciz	"PCI target abort\n"

	.comm	_PCI_STATUS_REC_TARGET_ABORT,4,2 ## @PCI_STATUS_REC_TARGET_ABORT
L_.str.9:                               ## @.str.9
	.asciz	"PCI master acks target abort\n"

	.comm	_PCI_STATUS_REC_MASTER_ABORT,4,2 ## @PCI_STATUS_REC_MASTER_ABORT
L_.str.10:                              ## @.str.10
	.asciz	"PCI master abort\n"

	.comm	_PCI_STATUS_SIG_SYSTEM_ERROR,4,2 ## @PCI_STATUS_SIG_SYSTEM_ERROR
L_.str.11:                              ## @.str.11
	.asciz	"PCI system error SERR#\n"

	.comm	_PCI_STATUS_DETECTED_PARITY,4,2 ## @PCI_STATUS_DETECTED_PARITY
L_.str.12:                              ## @.str.12
	.asciz	"PCI parity error\n"

	.no_dead_strip	_gem_pci_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gem_pci_interrupt
_gem_pci_interrupt:                     ; @gem_pci_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x1, #8]
Lloh0:
	adrp	x9, _GREG_PCIESTAT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GREG_PCIESTAT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	x8, [x19]
	ldr	x9, [x8]
Lloh3:
	adrp	x10, _PCI_VENDOR_ID_SUN@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PCI_VENDOR_ID_SUN@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x22, _GREG_PCIESTAT_OTHER@GOTPAGE
Lloh7:
	ldr	x22, [x22, _GREG_PCIESTAT_OTHER@GOTPAGEOFF]
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.1:
	ldr	x8, [x8, #8]
Lloh8:
	adrp	x9, _PCI_DEVICE_ID_SUN_GEM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PCI_DEVICE_ID_SUN_GEM@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.2:
	str	x21, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
Lloh13:
	adrp	x8, _GREG_PCIESTAT_BADACK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GREG_PCIESTAT_BADACK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.3:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_cont
LBB0_4:
Lloh18:
	adrp	x8, _GREG_PCIESTAT_DTRTO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GREG_PCIESTAT_DTRTO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_cont
LBB0_6:
	ldr	w8, [x22]
	tst	w8, w21
	b.eq	LBB0_8
; %bb.7:
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_cont
LBB0_8:
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_cont
	b	LBB0_10
LBB0_9:
	ldr	w8, [x22]
	orr	w21, w8, w21
Lloh27:
	adrp	x1, l_.str.5@PAGE
Lloh28:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
LBB0_10:
	ldr	w8, [x22]
	tst	w8, w21
	b.eq	LBB0_24
; %bb.11:
	ldr	x0, [x19]
Lloh29:
	adrp	x21, _PCI_STATUS@GOTPAGE
Lloh30:
	ldr	x21, [x21, _PCI_STATUS@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
	str	x8, [sp]
Lloh31:
	adrp	x1, l_.str.6@PAGE
Lloh32:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	ldr	w8, [sp, #12]
Lloh33:
	adrp	x22, _PCI_STATUS_PARITY@GOTPAGE
Lloh34:
	ldr	x22, [x22, _PCI_STATUS_PARITY@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
Lloh35:
	adrp	x1, l_.str.7@PAGE
Lloh36:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	ldr	w8, [sp, #12]
LBB0_13:
Lloh37:
	adrp	x23, _PCI_STATUS_SIG_TARGET_ABORT@GOTPAGE
Lloh38:
	ldr	x23, [x23, _PCI_STATUS_SIG_TARGET_ABORT@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
Lloh39:
	adrp	x1, l_.str.8@PAGE
Lloh40:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	ldr	w8, [sp, #12]
LBB0_15:
Lloh41:
	adrp	x24, _PCI_STATUS_REC_TARGET_ABORT@GOTPAGE
Lloh42:
	ldr	x24, [x24, _PCI_STATUS_REC_TARGET_ABORT@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.16:
Lloh43:
	adrp	x1, l_.str.9@PAGE
Lloh44:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	ldr	w8, [sp, #12]
LBB0_17:
Lloh45:
	adrp	x25, _PCI_STATUS_REC_MASTER_ABORT@GOTPAGE
Lloh46:
	ldr	x25, [x25, _PCI_STATUS_REC_MASTER_ABORT@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.18:
Lloh47:
	adrp	x1, l_.str.10@PAGE
Lloh48:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	ldr	w8, [sp, #12]
LBB0_19:
Lloh49:
	adrp	x26, _PCI_STATUS_SIG_SYSTEM_ERROR@GOTPAGE
Lloh50:
	ldr	x26, [x26, _PCI_STATUS_SIG_SYSTEM_ERROR@GOTPAGEOFF]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.20:
Lloh51:
	adrp	x1, l_.str.11@PAGE
Lloh52:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	ldr	w8, [sp, #12]
LBB0_21:
Lloh53:
	adrp	x27, _PCI_STATUS_DETECTED_PARITY@GOTPAGE
Lloh54:
	ldr	x27, [x27, _PCI_STATUS_DETECTED_PARITY@GOTPAGEOFF]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_23
; %bb.22:
Lloh55:
	adrp	x1, l_.str.12@PAGE
Lloh56:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	ldr	w9, [x27]
	ldr	w8, [sp, #12]
LBB0_23:
	ldr	w10, [x22]
	ldr	w11, [x23]
	orr	w10, w11, w10
	ldr	w11, [x24]
	orr	w10, w10, w11
	ldr	w11, [x25]
	orr	w10, w10, w11
	ldr	w11, [x26]
	orr	w10, w10, w11
	orr	w9, w10, w9
	and	w2, w8, w9
	str	w2, [sp, #12]
	ldr	x0, [x19]
	ldr	w1, [x21]
	bl	_pci_write_config_word
LBB0_24:
	mov	w0, #1
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpAdd	Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_GREG_PCIESTAT,8,3              ; @GREG_PCIESTAT
	.comm	_PCI_VENDOR_ID_SUN,8,3          ; @PCI_VENDOR_ID_SUN
	.comm	_PCI_DEVICE_ID_SUN_GEM,8,3      ; @PCI_DEVICE_ID_SUN_GEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCI error [%04x]"

	.comm	_GREG_PCIESTAT_BADACK,4,2       ; @GREG_PCIESTAT_BADACK
l_.str.1:                               ; @.str.1
	.asciz	" <No ACK64# during ABS64 cycle>"

	.comm	_GREG_PCIESTAT_DTRTO,4,2        ; @GREG_PCIESTAT_DTRTO
l_.str.2:                               ; @.str.2
	.asciz	" <Delayed transaction timeout>"

	.comm	_GREG_PCIESTAT_OTHER,4,2        ; @GREG_PCIESTAT_OTHER
l_.str.3:                               ; @.str.3
	.asciz	" <other>"

l_.str.4:                               ; @.str.4
	.asciz	"\n"

l_.str.5:                               ; @.str.5
	.asciz	"PCI error\n"

	.comm	_PCI_STATUS,4,2                 ; @PCI_STATUS
l_.str.6:                               ; @.str.6
	.asciz	"Read PCI cfg space status [%04x]\n"

	.comm	_PCI_STATUS_PARITY,4,2          ; @PCI_STATUS_PARITY
l_.str.7:                               ; @.str.7
	.asciz	"PCI parity error detected\n"

	.comm	_PCI_STATUS_SIG_TARGET_ABORT,4,2 ; @PCI_STATUS_SIG_TARGET_ABORT
l_.str.8:                               ; @.str.8
	.asciz	"PCI target abort\n"

	.comm	_PCI_STATUS_REC_TARGET_ABORT,4,2 ; @PCI_STATUS_REC_TARGET_ABORT
l_.str.9:                               ; @.str.9
	.asciz	"PCI master acks target abort\n"

	.comm	_PCI_STATUS_REC_MASTER_ABORT,4,2 ; @PCI_STATUS_REC_MASTER_ABORT
l_.str.10:                              ; @.str.10
	.asciz	"PCI master abort\n"

	.comm	_PCI_STATUS_SIG_SYSTEM_ERROR,4,2 ; @PCI_STATUS_SIG_SYSTEM_ERROR
l_.str.11:                              ; @.str.11
	.asciz	"PCI system error SERR#\n"

	.comm	_PCI_STATUS_DETECTED_PARITY,4,2 ; @PCI_STATUS_DETECTED_PARITY
l_.str.12:                              ; @.str.12
	.asciz	"PCI parity error\n"

	.no_dead_strip	_gem_pci_interrupt
.subsections_via_symbols
