	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a6xx_irq
_a6xx_irq:                              ## @a6xx_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_REG_A6XX_RBBM_INT_0_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_gpu_read
	movl	%eax, %ebx
	movq	_REG_A6XX_RBBM_INT_CLEAR_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_gpu_write
	movq	_A6XX_RBBM_INT_0_MASK_RBBM_HANG_DETECT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_a6xx_fault_detect_irq
LBB0_2:
	movq	_A6XX_RBBM_INT_0_MASK_CP_AHB_ERROR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err_ratelimited
LBB0_4:
	movq	_A6XX_RBBM_INT_0_MASK_CP_HW_ERROR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_a6xx_cp_hw_err_irq
LBB0_6:
	movq	_A6XX_RBBM_INT_0_MASK_RBBM_ATB_ASYNCFIFO_OVERFLOW@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.7:
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err_ratelimited
LBB0_8:
	movq	_A6XX_RBBM_INT_0_MASK_RBBM_ATB_BUS_OVERFLOW@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_10
## %bb.9:
	movq	(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err_ratelimited
LBB0_10:
	movq	_A6XX_RBBM_INT_0_MASK_UCHE_OOB_ACCESS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_12
## %bb.11:
	movq	(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err_ratelimited
LBB0_12:
	movq	_A6XX_RBBM_INT_0_MASK_CP_CACHE_FLUSH_TS@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	_msm_gpu_retire
LBB0_14:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_A6XX_RBBM_INT_0_STATUS,4,2 ## @REG_A6XX_RBBM_INT_0_STATUS
	.comm	_REG_A6XX_RBBM_INT_CLEAR_CMD,4,2 ## @REG_A6XX_RBBM_INT_CLEAR_CMD
	.comm	_A6XX_RBBM_INT_0_MASK_RBBM_HANG_DETECT,4,2 ## @A6XX_RBBM_INT_0_MASK_RBBM_HANG_DETECT
	.comm	_A6XX_RBBM_INT_0_MASK_CP_AHB_ERROR,4,2 ## @A6XX_RBBM_INT_0_MASK_CP_AHB_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CP | AHB bus error\n"

	.comm	_A6XX_RBBM_INT_0_MASK_CP_HW_ERROR,4,2 ## @A6XX_RBBM_INT_0_MASK_CP_HW_ERROR
	.comm	_A6XX_RBBM_INT_0_MASK_RBBM_ATB_ASYNCFIFO_OVERFLOW,4,2 ## @A6XX_RBBM_INT_0_MASK_RBBM_ATB_ASYNCFIFO_OVERFLOW
L_.str.1:                               ## @.str.1
	.asciz	"RBBM | ATB ASYNC overflow\n"

	.comm	_A6XX_RBBM_INT_0_MASK_RBBM_ATB_BUS_OVERFLOW,4,2 ## @A6XX_RBBM_INT_0_MASK_RBBM_ATB_BUS_OVERFLOW
L_.str.2:                               ## @.str.2
	.asciz	"RBBM | ATB bus overflow\n"

	.comm	_A6XX_RBBM_INT_0_MASK_UCHE_OOB_ACCESS,4,2 ## @A6XX_RBBM_INT_0_MASK_UCHE_OOB_ACCESS
L_.str.3:                               ## @.str.3
	.asciz	"UCHE | Out of bounds access\n"

	.comm	_A6XX_RBBM_INT_0_MASK_CP_CACHE_FLUSH_TS,4,2 ## @A6XX_RBBM_INT_0_MASK_CP_CACHE_FLUSH_TS
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_a6xx_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a6xx_irq
_a6xx_irq:                              ; @a6xx_irq
	.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
Lloh0:
	adrp	x8, _REG_A6XX_RBBM_INT_0_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_A6XX_RBBM_INT_0_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_gpu_read
	mov	x20, x0
Lloh3:
	adrp	x8, _REG_A6XX_RBBM_INT_CLEAR_CMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_A6XX_RBBM_INT_CLEAR_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_gpu_write
Lloh6:
	adrp	x8, _A6XX_RBBM_INT_0_MASK_RBBM_HANG_DETECT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _A6XX_RBBM_INT_0_MASK_RBBM_HANG_DETECT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_a6xx_fault_detect_irq
LBB0_2:
Lloh9:
	adrp	x8, _A6XX_RBBM_INT_0_MASK_CP_AHB_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _A6XX_RBBM_INT_0_MASK_CP_AHB_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	ldr	x0, [x19]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err_ratelimited
LBB0_4:
Lloh14:
	adrp	x8, _A6XX_RBBM_INT_0_MASK_CP_HW_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _A6XX_RBBM_INT_0_MASK_CP_HW_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_a6xx_cp_hw_err_irq
LBB0_6:
Lloh17:
	adrp	x8, _A6XX_RBBM_INT_0_MASK_RBBM_ATB_ASYNCFIFO_OVERFLOW@GOTPAGE
Lloh18:
	ldr	x8, [x8, _A6XX_RBBM_INT_0_MASK_RBBM_ATB_ASYNCFIFO_OVERFLOW@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.7:
	ldr	x0, [x19]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err_ratelimited
LBB0_8:
Lloh22:
	adrp	x8, _A6XX_RBBM_INT_0_MASK_RBBM_ATB_BUS_OVERFLOW@GOTPAGE
Lloh23:
	ldr	x8, [x8, _A6XX_RBBM_INT_0_MASK_RBBM_ATB_BUS_OVERFLOW@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.9:
	ldr	x0, [x19]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err_ratelimited
LBB0_10:
Lloh27:
	adrp	x8, _A6XX_RBBM_INT_0_MASK_UCHE_OOB_ACCESS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _A6XX_RBBM_INT_0_MASK_UCHE_OOB_ACCESS@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.11:
	ldr	x0, [x19]
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err_ratelimited
LBB0_12:
Lloh32:
	adrp	x8, _A6XX_RBBM_INT_0_MASK_CP_CACHE_FLUSH_TS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _A6XX_RBBM_INT_0_MASK_CP_CACHE_FLUSH_TS@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_msm_gpu_retire
LBB0_14:
Lloh35:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh36:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, 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 AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_A6XX_RBBM_INT_0_STATUS,4,2 ; @REG_A6XX_RBBM_INT_0_STATUS
	.comm	_REG_A6XX_RBBM_INT_CLEAR_CMD,4,2 ; @REG_A6XX_RBBM_INT_CLEAR_CMD
	.comm	_A6XX_RBBM_INT_0_MASK_RBBM_HANG_DETECT,4,2 ; @A6XX_RBBM_INT_0_MASK_RBBM_HANG_DETECT
	.comm	_A6XX_RBBM_INT_0_MASK_CP_AHB_ERROR,4,2 ; @A6XX_RBBM_INT_0_MASK_CP_AHB_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CP | AHB bus error\n"

	.comm	_A6XX_RBBM_INT_0_MASK_CP_HW_ERROR,4,2 ; @A6XX_RBBM_INT_0_MASK_CP_HW_ERROR
	.comm	_A6XX_RBBM_INT_0_MASK_RBBM_ATB_ASYNCFIFO_OVERFLOW,4,2 ; @A6XX_RBBM_INT_0_MASK_RBBM_ATB_ASYNCFIFO_OVERFLOW
l_.str.1:                               ; @.str.1
	.asciz	"RBBM | ATB ASYNC overflow\n"

	.comm	_A6XX_RBBM_INT_0_MASK_RBBM_ATB_BUS_OVERFLOW,4,2 ; @A6XX_RBBM_INT_0_MASK_RBBM_ATB_BUS_OVERFLOW
l_.str.2:                               ; @.str.2
	.asciz	"RBBM | ATB bus overflow\n"

	.comm	_A6XX_RBBM_INT_0_MASK_UCHE_OOB_ACCESS,4,2 ; @A6XX_RBBM_INT_0_MASK_UCHE_OOB_ACCESS
l_.str.3:                               ; @.str.3
	.asciz	"UCHE | Out of bounds access\n"

	.comm	_A6XX_RBBM_INT_0_MASK_CP_CACHE_FLUSH_TS,4,2 ; @A6XX_RBBM_INT_0_MASK_CP_CACHE_FLUSH_TS
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_a6xx_irq
.subsections_via_symbols
