	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a5xx_cp_err_irq
_a5xx_cp_err_irq:                       ## @a5xx_cp_err_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, %rbx
	movq	_REG_A5XX_CP_INTERRUPT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_gpu_read
	movl	%eax, %r14d
	movq	_A5XX_CP_INT_CP_OPCODE_ERROR@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_REG_A5XX_CP_PFP_STAT_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_gpu_write
	movq	_REG_A5XX_CP_PFP_STAT_DATA@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_gpu_read
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	(%rbx), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err_ratelimited
LBB0_2:
	movq	_A5XX_CP_INT_CP_HW_FAULT_ERROR@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_4
## %bb.3:
	movq	(%rbx), %rax
	movl	(%rax), %r15d
	movq	_REG_A5XX_CP_HW_FAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gpu_read
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err_ratelimited
LBB0_4:
	movq	_A5XX_CP_INT_CP_DMA_ERROR@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err_ratelimited
LBB0_6:
	movq	_A5XX_CP_INT_CP_REGISTER_PROTECTION_ERROR@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_REG_A5XX_CP_PROTECT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	(%rbx), %rcx
	movl	(%rcx), %edi
	testl	$16777216, %eax                 ## imm = 0x1000000
	leaq	L_.str.5(%rip), %rcx
	leaq	L_.str.4(%rip), %rdx
	cmoveq	%rcx, %rdx
	movl	%eax, %ecx
	shrl	$2, %ecx
	andl	$262143, %ecx                   ## imm = 0x3FFFF
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_dev_err_ratelimited
LBB0_8:
	movq	_A5XX_CP_INT_CP_AHB_ERROR@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_9
## %bb.10:
	movq	_REG_A5XX_CP_AHB_FAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	(%rbx), %rcx
	movl	(%rcx), %edi
	movl	%eax, %ecx
	movl	%eax, %r8d
	movl	%eax, %edx
	andl	$1048575, %edx                  ## imm = 0xFFFFF
	shrl	$24, %ecx
	andl	$15, %ecx
	leaq	l___const.a5xx_cp_err_irq.access(%rip), %rsi
	movq	(%rsi,%rcx,8), %rcx
	andl	$-2147483648, %r8d              ## imm = 0x80000000
	leaq	L_.str.16(%rip), %rsi
	movl	%eax, %r9d
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err_ratelimited            ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_A5XX_CP_INTERRUPT_STATUS,4,2 ## @REG_A5XX_CP_INTERRUPT_STATUS
	.comm	_A5XX_CP_INT_CP_OPCODE_ERROR,4,2 ## @A5XX_CP_INT_CP_OPCODE_ERROR
	.comm	_REG_A5XX_CP_PFP_STAT_ADDR,4,2  ## @REG_A5XX_CP_PFP_STAT_ADDR
	.comm	_REG_A5XX_CP_PFP_STAT_DATA,4,2  ## @REG_A5XX_CP_PFP_STAT_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CP | opcode error | possible opcode=0x%8.8X\n"

	.comm	_A5XX_CP_INT_CP_HW_FAULT_ERROR,4,2 ## @A5XX_CP_INT_CP_HW_FAULT_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"CP | HW fault | status=0x%8.8X\n"

	.comm	_REG_A5XX_CP_HW_FAULT,4,2       ## @REG_A5XX_CP_HW_FAULT
	.comm	_A5XX_CP_INT_CP_DMA_ERROR,4,2   ## @A5XX_CP_INT_CP_DMA_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"CP | DMA error\n"

	.comm	_A5XX_CP_INT_CP_REGISTER_PROTECTION_ERROR,4,2 ## @A5XX_CP_INT_CP_REGISTER_PROTECTION_ERROR
	.comm	_REG_A5XX_CP_PROTECT_STATUS,4,2 ## @REG_A5XX_CP_PROTECT_STATUS
L_.str.3:                               ## @.str.3
	.asciz	"CP | protected mode error | %s | addr=0x%8.8X | status=0x%8.8X\n"

L_.str.4:                               ## @.str.4
	.asciz	"WRITE"

L_.str.5:                               ## @.str.5
	.asciz	"READ"

	.comm	_A5XX_CP_INT_CP_AHB_ERROR,4,2   ## @A5XX_CP_INT_CP_AHB_ERROR
	.comm	_REG_A5XX_CP_AHB_FAULT,4,2      ## @REG_A5XX_CP_AHB_FAULT
L_.str.6:                               ## @.str.6
	.asciz	"reserved"

L_.str.7:                               ## @.str.7
	.asciz	"timestamp lo"

L_.str.8:                               ## @.str.8
	.asciz	"timestamp hi"

L_.str.9:                               ## @.str.9
	.asciz	"pfp read"

L_.str.10:                              ## @.str.10
	.asciz	"pfp write"

L_.str.11:                              ## @.str.11
	.space	1

L_.str.12:                              ## @.str.12
	.asciz	"me read"

L_.str.13:                              ## @.str.13
	.asciz	"me write"

L_.str.14:                              ## @.str.14
	.asciz	"crashdump read"

L_.str.15:                              ## @.str.15
	.asciz	"crashdump write"

	.section	__DATA,__const
	.p2align	4                               ## @__const.a5xx_cp_err_irq.access
l___const.a5xx_cp_err_irq.access:
	.quad	L_.str.6
	.quad	L_.str.6
	.quad	L_.str.7
	.quad	L_.str.8
	.quad	L_.str.9
	.quad	L_.str.10
	.quad	L_.str.11
	.quad	L_.str.11
	.quad	L_.str.12
	.quad	L_.str.13
	.quad	L_.str.11
	.quad	L_.str.11
	.quad	L_.str.14
	.quad	L_.str.15
	.quad	0
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
L_.str.16:                              ## @.str.16
	.asciz	"CP | AHB error | addr=%X access=%s error=%d | status=0x%8.8X\n"

	.no_dead_strip	_a5xx_cp_err_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a5xx_cp_err_irq
_a5xx_cp_err_irq:                       ; @a5xx_cp_err_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, _REG_A5XX_CP_INTERRUPT_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_A5XX_CP_INTERRUPT_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_gpu_read
	mov	x20, x0
Lloh3:
	adrp	x8, _A5XX_CP_INT_CP_OPCODE_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _A5XX_CP_INT_CP_OPCODE_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _REG_A5XX_CP_PFP_STAT_ADDR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_A5XX_CP_PFP_STAT_ADDR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_gpu_write
Lloh9:
	adrp	x21, _REG_A5XX_CP_PFP_STAT_DATA@GOTPAGE
Lloh10:
	ldr	x21, [x21, _REG_A5XX_CP_PFP_STAT_DATA@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_gpu_read
	ldr	w1, [x21]
	mov	x0, x19
	bl	_gpu_read
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x19]
	ldr	w8, [x8]
	str	x0, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_dev_err_ratelimited
LBB0_2:
Lloh13:
	adrp	x8, _A5XX_CP_INT_CP_HW_FAULT_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _A5XX_CP_INT_CP_HW_FAULT_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x19]
	ldr	w21, [x8]
Lloh16:
	adrp	x8, _REG_A5XX_CP_HW_FAULT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _REG_A5XX_CP_HW_FAULT@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_read
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err_ratelimited
LBB0_4:
Lloh21:
	adrp	x8, _A5XX_CP_INT_CP_DMA_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _A5XX_CP_INT_CP_DMA_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err_ratelimited
LBB0_6:
Lloh26:
	adrp	x8, _A5XX_CP_INT_CP_REGISTER_PROTECTION_ERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _A5XX_CP_INT_CP_REGISTER_PROTECTION_ERROR@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.7:
Lloh29:
	adrp	x8, _REG_A5XX_CP_PROTECT_STATUS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _REG_A5XX_CP_PROTECT_STATUS@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_read
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x19]
Lloh32:
	adrp	x9, l_.str.4@PAGE
Lloh33:
	add	x9, x9, l_.str.4@PAGEOFF
	ldr	w8, [x8]
Lloh34:
	adrp	x10, l_.str.5@PAGE
Lloh35:
	add	x10, x10, l_.str.5@PAGEOFF
	tst	w0, #0x1000000
	csel	x9, x10, x9, eq
	ubfx	w10, w0, #2, #18
	stp	x10, x0, [sp, #8]
	str	x9, [sp]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x8
	bl	_dev_err_ratelimited
LBB0_8:
Lloh38:
	adrp	x8, _A5XX_CP_INT_CP_AHB_ERROR@GOTPAGE
Lloh39:
	ldr	x8, [x8, _A5XX_CP_INT_CP_AHB_ERROR@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.9:
Lloh41:
	adrp	x8, _REG_A5XX_CP_AHB_FAULT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _REG_A5XX_CP_AHB_FAULT@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_read
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x19]
	ldr	w8, [x8]
	and	w9, w0, #0xfffff
	ubfx	w10, w0, #24, #4
Lloh44:
	adrp	x11, l___const.a5xx_cp_err_irq.access@PAGE
Lloh45:
	add	x11, x11, l___const.a5xx_cp_err_irq.access@PAGEOFF
	ldr	x10, [x11, w10, uxtw #3]
	and	w11, w0, #0x80000000
	stp	x11, x0, [sp, #16]
	stp	x9, x10, [sp]
Lloh46:
	adrp	x1, l_.str.16@PAGE
Lloh47:
	add	x1, x1, l_.str.16@PAGEOFF
	mov	x0, x8
	bl	_dev_err_ratelimited
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_A5XX_CP_INTERRUPT_STATUS,4,2 ; @REG_A5XX_CP_INTERRUPT_STATUS
	.comm	_A5XX_CP_INT_CP_OPCODE_ERROR,4,2 ; @A5XX_CP_INT_CP_OPCODE_ERROR
	.comm	_REG_A5XX_CP_PFP_STAT_ADDR,4,2  ; @REG_A5XX_CP_PFP_STAT_ADDR
	.comm	_REG_A5XX_CP_PFP_STAT_DATA,4,2  ; @REG_A5XX_CP_PFP_STAT_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CP | opcode error | possible opcode=0x%8.8X\n"

	.comm	_A5XX_CP_INT_CP_HW_FAULT_ERROR,4,2 ; @A5XX_CP_INT_CP_HW_FAULT_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"CP | HW fault | status=0x%8.8X\n"

	.comm	_REG_A5XX_CP_HW_FAULT,4,2       ; @REG_A5XX_CP_HW_FAULT
	.comm	_A5XX_CP_INT_CP_DMA_ERROR,4,2   ; @A5XX_CP_INT_CP_DMA_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"CP | DMA error\n"

	.comm	_A5XX_CP_INT_CP_REGISTER_PROTECTION_ERROR,4,2 ; @A5XX_CP_INT_CP_REGISTER_PROTECTION_ERROR
	.comm	_REG_A5XX_CP_PROTECT_STATUS,4,2 ; @REG_A5XX_CP_PROTECT_STATUS
l_.str.3:                               ; @.str.3
	.asciz	"CP | protected mode error | %s | addr=0x%8.8X | status=0x%8.8X\n"

l_.str.4:                               ; @.str.4
	.asciz	"WRITE"

l_.str.5:                               ; @.str.5
	.asciz	"READ"

	.comm	_A5XX_CP_INT_CP_AHB_ERROR,4,2   ; @A5XX_CP_INT_CP_AHB_ERROR
	.comm	_REG_A5XX_CP_AHB_FAULT,4,2      ; @REG_A5XX_CP_AHB_FAULT
l_.str.6:                               ; @.str.6
	.asciz	"reserved"

l_.str.7:                               ; @.str.7
	.asciz	"timestamp lo"

l_.str.8:                               ; @.str.8
	.asciz	"timestamp hi"

l_.str.9:                               ; @.str.9
	.asciz	"pfp read"

l_.str.10:                              ; @.str.10
	.asciz	"pfp write"

l_.str.11:                              ; @.str.11
	.space	1

l_.str.12:                              ; @.str.12
	.asciz	"me read"

l_.str.13:                              ; @.str.13
	.asciz	"me write"

l_.str.14:                              ; @.str.14
	.asciz	"crashdump read"

l_.str.15:                              ; @.str.15
	.asciz	"crashdump write"

	.section	__DATA,__const
	.p2align	3                               ; @__const.a5xx_cp_err_irq.access
l___const.a5xx_cp_err_irq.access:
	.quad	l_.str.6
	.quad	l_.str.6
	.quad	l_.str.7
	.quad	l_.str.8
	.quad	l_.str.9
	.quad	l_.str.10
	.quad	l_.str.11
	.quad	l_.str.11
	.quad	l_.str.12
	.quad	l_.str.13
	.quad	l_.str.11
	.quad	l_.str.11
	.quad	l_.str.14
	.quad	l_.str.15
	.quad	0
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
l_.str.16:                              ; @.str.16
	.asciz	"CP | AHB error | addr=%X access=%s error=%d | status=0x%8.8X\n"

	.no_dead_strip	_a5xx_cp_err_irq
.subsections_via_symbols
