	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a5xx_fault_handler
_a5xx_fault_handler:                    ## @a5xx_fault_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	$4, %edi
	callq	_REG_A5XX_CP_SCRATCH_REG
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_gpu_read
	movl	%eax, %r12d
	movl	$5, %edi
	callq	_REG_A5XX_CP_SCRATCH_REG
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_gpu_read
	movl	%eax, %r13d
	movl	$6, %edi
	callq	_REG_A5XX_CP_SCRATCH_REG
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_gpu_read
	movl	%eax, %r14d
	movl	$7, %edi
	callq	_REG_A5XX_CP_SCRATCH_REG
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_gpu_read
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	movl	%r14d, %r9d
	callq	_pr_warn_ratelimited
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"*** gpu fault: iova=%08lx, flags=%d (%u,%u,%u,%u)\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_a5xx_fault_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a5xx_fault_handler
_a5xx_fault_handler:                    ; @a5xx_fault_handler
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x20, x1
	mov	x21, x0
	mov	w0, #4
	bl	_REG_A5XX_CP_SCRATCH_REG
	mov	x1, x0
	mov	x0, x21
	bl	_gpu_read
	mov	x22, x0
	mov	w0, #5
	bl	_REG_A5XX_CP_SCRATCH_REG
	mov	x1, x0
	mov	x0, x21
	bl	_gpu_read
	mov	x23, x0
	mov	w0, #6
	bl	_REG_A5XX_CP_SCRATCH_REG
	mov	x1, x0
	mov	x0, x21
	bl	_gpu_read
	mov	x24, x0
	mov	w0, #7
	bl	_REG_A5XX_CP_SCRATCH_REG
	mov	x1, x0
	mov	x0, x21
	bl	_gpu_read
	mov	x6, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	bl	_pr_warn_ratelimited
Lloh2:
	adrp	x8, _EFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"*** gpu fault: iova=%08lx, flags=%d (%u,%u,%u,%u)\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_a5xx_fault_handler
.subsections_via_symbols
