	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function panfrost_gpu_irq_handler
_panfrost_gpu_irq_handler:              ## @panfrost_gpu_irq_handler
	.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, %rbx
	movq	_GPU_INT_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gpu_read
	movl	%eax, %r14d
	movq	_GPU_FAULT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gpu_read
	testl	%r14d, %r14d
	je	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	movq	_GPU_IRQ_MASK_ERROR@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_6
## %bb.3:
	movq	_GPU_FAULT_ADDRESS_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gpu_read
	movq	_GPU_FAULT_ADDRESS_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_gpu_read
	movl	(%rbx), %r12d
	movzbl	%r15b, %r13d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_panfrost_exception_name
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edi
	movl	%r13d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_GPU_IRQ_MULTIPLE_FAULT@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_5
## %bb.4:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_warn
LBB0_5:
	movq	_GPU_INT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_gpu_write
LBB0_6:
	movq	_GPU_IRQ_PERFCNT_SAMPLE_COMPLETED@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_panfrost_perfcnt_sample_done
LBB0_8:
	movq	_GPU_IRQ_CLEAN_CACHES_COMPLETED@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	_panfrost_perfcnt_clean_cache_done
LBB0_10:
	movq	_GPU_INT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_gpu_write
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GPU_INT_STAT,4,2               ## @GPU_INT_STAT
	.comm	_GPU_FAULT_STATUS,4,2           ## @GPU_FAULT_STATUS
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_GPU_IRQ_MASK_ERROR,4,2         ## @GPU_IRQ_MASK_ERROR
	.comm	_GPU_FAULT_ADDRESS_HI,4,2       ## @GPU_FAULT_ADDRESS_HI
	.comm	_GPU_FAULT_ADDRESS_LO,4,2       ## @GPU_FAULT_ADDRESS_LO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GPU Fault 0x%08x (%s) at 0x%016llx\n"

	.comm	_GPU_IRQ_MULTIPLE_FAULT,4,2     ## @GPU_IRQ_MULTIPLE_FAULT
L_.str.1:                               ## @.str.1
	.asciz	"There were multiple GPU faults - some have not been reported\n"

	.comm	_GPU_INT_MASK,4,2               ## @GPU_INT_MASK
	.comm	_GPU_IRQ_PERFCNT_SAMPLE_COMPLETED,4,2 ## @GPU_IRQ_PERFCNT_SAMPLE_COMPLETED
	.comm	_GPU_IRQ_CLEAN_CACHES_COMPLETED,4,2 ## @GPU_IRQ_CLEAN_CACHES_COMPLETED
	.comm	_GPU_INT_CLEAR,4,2              ## @GPU_INT_CLEAR
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_panfrost_gpu_irq_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function panfrost_gpu_irq_handler
_panfrost_gpu_irq_handler:              ; @panfrost_gpu_irq_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
Lloh0:
	adrp	x8, _GPU_INT_STAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPU_INT_STAT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_read
	mov	x20, x0
Lloh3:
	adrp	x8, _GPU_FAULT_STATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPU_FAULT_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_read
	cbz	w20, LBB0_10
; %bb.1:
Lloh6:
	adrp	x8, _GPU_IRQ_MASK_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GPU_IRQ_MASK_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.2:
	mov	x21, x0
Lloh9:
	adrp	x8, _GPU_FAULT_ADDRESS_HI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GPU_FAULT_ADDRESS_HI@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_read
Lloh12:
	adrp	x8, _GPU_FAULT_ADDRESS_LO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GPU_FAULT_ADDRESS_LO@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_read
	ldr	w22, [x19]
	and	w23, w21, #0xff
	mov	x0, x19
	mov	x1, x21
	bl	_panfrost_exception_name
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x23, x0, [sp]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_warn
Lloh17:
	adrp	x8, _GPU_IRQ_MULTIPLE_FAULT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GPU_IRQ_MULTIPLE_FAULT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
LBB0_4:
Lloh22:
	adrp	x8, _GPU_INT_MASK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GPU_INT_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_gpu_write
LBB0_5:
Lloh25:
	adrp	x8, _GPU_IRQ_PERFCNT_SAMPLE_COMPLETED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GPU_IRQ_PERFCNT_SAMPLE_COMPLETED@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_panfrost_perfcnt_sample_done
LBB0_7:
Lloh28:
	adrp	x8, _GPU_IRQ_CLEAN_CACHES_COMPLETED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GPU_IRQ_CLEAN_CACHES_COMPLETED@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_panfrost_perfcnt_clean_cache_done
LBB0_9:
Lloh31:
	adrp	x8, _GPU_INT_CLEAR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _GPU_INT_CLEAR@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_gpu_write
Lloh34:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh36:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_GPU_INT_STAT,4,2               ; @GPU_INT_STAT
	.comm	_GPU_FAULT_STATUS,4,2           ; @GPU_FAULT_STATUS
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_GPU_IRQ_MASK_ERROR,4,2         ; @GPU_IRQ_MASK_ERROR
	.comm	_GPU_FAULT_ADDRESS_HI,4,2       ; @GPU_FAULT_ADDRESS_HI
	.comm	_GPU_FAULT_ADDRESS_LO,4,2       ; @GPU_FAULT_ADDRESS_LO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPU Fault 0x%08x (%s) at 0x%016llx\n"

	.comm	_GPU_IRQ_MULTIPLE_FAULT,4,2     ; @GPU_IRQ_MULTIPLE_FAULT
l_.str.1:                               ; @.str.1
	.asciz	"There were multiple GPU faults - some have not been reported\n"

	.comm	_GPU_INT_MASK,4,2               ; @GPU_INT_MASK
	.comm	_GPU_IRQ_PERFCNT_SAMPLE_COMPLETED,4,2 ; @GPU_IRQ_PERFCNT_SAMPLE_COMPLETED
	.comm	_GPU_IRQ_CLEAN_CACHES_COMPLETED,4,2 ; @GPU_IRQ_CLEAN_CACHES_COMPLETED
	.comm	_GPU_INT_CLEAR,4,2              ; @GPU_INT_CLEAR
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_panfrost_gpu_irq_handler
.subsections_via_symbols
