	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function panfrost_mmu_irq_handler_thread
_panfrost_mmu_irq_handler_thread:       ## @panfrost_mmu_irq_handler_thread
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rdi
	movq	_MMU_INT_RAWSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mmu_read
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r14d
	shrl	$8, %r14d
	andl	$3, %r14d
	movl	%r12d, %r13d
	sarl	$16, %r13d
	movl	(%rbx), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	testl	$1024, %r12d                    ## imm = 0x400
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.3(%rip), %rax
	cmoveq	%rax, %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_panfrost_exception_name
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_access_type_name
                                        ## kill: def $eax killed $eax def $rax
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	leaq	L_.str.1(%rip), %r8
	movl	%r12d, %r9d
	pushq	%r13
	pushq	%rax
	pushq	%r14
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	-80(%rbp)                       ## 8-byte Folded Reload
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	callq	_dev_err
	addq	$48, %rsp
	movq	_MMU_INT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_mmu_write
	notl	%ebx
	andl	%ebx, -44(%rbp)                 ## 4-byte Folded Spill
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	callq	_BIT
	movl	%eax, %ebx
	leal	16(%r15), %edi
	callq	_BIT
	orl	%ebx, %eax
	movl	%eax, %ebx
	andl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%r15d, %edi
	callq	_AS_FAULTSTATUS
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_mmu_read
	movl	%eax, %r14d
	movl	%r15d, %edi
	callq	_AS_FAULTADDRESS_LO
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_mmu_read
	movl	%r15d, %edi
	callq	_AS_FAULTADDRESS_HI
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_mmu_read
	movl	%r14d, %r12d
	movzbl	%r14b, %r14d
	movl	%r15d, %edi
	callq	_BIT
	cmpl	%eax, %ebx
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-197(%r14), %eax
	xorl	%edi, %edi
	cmpl	$-4, %eax
	setb	%dil
	callq	_WARN_ON
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_panfrost_mmu_map_fault_addr
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MMU_INT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_BIT
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mmu_write
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	notl	%eax
	andl	%eax, -44(%rbp)                 ## 4-byte Folded Spill
	jmp	LBB0_7
LBB0_8:
	movq	_MMU_INT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$-1, %edx
	callq	_mmu_write
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMU_INT_RAWSTAT,4,2            ## @MMU_INT_RAWSTAT
	.comm	_MMU_INT_CLEAR,4,2              ## @MMU_INT_CLEAR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unhandled Page fault in AS%d at VA 0x%016llX\nReason: %s\nraw fault status: 0x%X\ndecoded fault status: %s\nexception type 0x%X: %s\naccess type 0x%X: %s\nsource id 0x%X\n"

L_.str.1:                               ## @.str.1
	.asciz	"TODO"

L_.str.2:                               ## @.str.2
	.asciz	"DECODER FAULT"

L_.str.3:                               ## @.str.3
	.asciz	"SLAVE FAULT"

	.comm	_MMU_INT_MASK,4,2               ## @MMU_INT_MASK
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_panfrost_mmu_irq_handler_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function panfrost_mmu_irq_handler_thread
_panfrost_mmu_irq_handler_thread:       ; @panfrost_mmu_irq_handler_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, _MMU_INT_RAWSTAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMU_INT_RAWSTAT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mmu_read
	cbz	w0, LBB0_9
; %bb.1:
	mov	x28, x0
	mov	w21, #0
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ubfx	w23, w25, #8, #2
	asr	w20, w25, #16
	ldr	w27, [x19]
	tst	w25, #0x400
Lloh3:
	adrp	x8, l_.str.2@PAGE
Lloh4:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh5:
	adrp	x9, l_.str.3@PAGE
Lloh6:
	add	x9, x9, l_.str.3@PAGEOFF
	csel	x8, x9, x8, eq
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	mov	x0, x19
	mov	x1, x26
	bl	_panfrost_exception_name
	mov	x22, x0
	mov	x0, x19
	mov	x1, x25
	bl	_access_type_name
	stp	w0, w20, [sp, #8]
	stp	w22, w23, [sp]
	mov	x0, x27
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
Lloh9:
	adrp	x4, l_.str.1@PAGE
Lloh10:
	add	x4, x4, l_.str.1@PAGEOFF
	mov	x5, x25
	ldr	x6, [sp, #24]                   ; 8-byte Folded Reload
	mov	x7, x26
	bl	_dev_err
Lloh11:
	adrp	x8, _MMU_INT_CLEAR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MMU_INT_CLEAR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x24
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_mmu_write
	bic	w28, w28, w24
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w21, w21, #1
	cbz	w28, LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_BIT
	mov	x24, x0
	add	w0, w21, #16
	bl	_BIT
	orr	w24, w0, w24
	ands	w22, w24, w28
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_AS_FAULTSTATUS
	mov	x1, x0
	mov	x0, x19
	bl	_mmu_read
	mov	x25, x0
	mov	x0, x21
	bl	_AS_FAULTADDRESS_LO
	mov	x1, x0
	mov	x0, x19
	bl	_mmu_read
	mov	x0, x21
	bl	_AS_FAULTADDRESS_HI
	mov	x1, x0
	mov	x0, x19
	bl	_mmu_read
	and	w26, w25, #0xff
	mov	x0, x21
	bl	_BIT
	cmp	w22, w0
	b.ne	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w8, w26, #197
	cmn	w8, #4
	cset	w0, lo
	bl	_WARN_ON
	mov	x0, x19
	mov	x1, x21
	bl	_panfrost_mmu_map_fault_addr
	cbnz	w0, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh14:
	adrp	x8, _MMU_INT_CLEAR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MMU_INT_CLEAR@GOTPAGEOFF]
Lloh16:
	ldr	w25, [x8]
	mov	x0, x21
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x25
	b	LBB0_3
LBB0_9:
Lloh17:
	adrp	x8, _MMU_INT_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MMU_INT_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_mmu_write
Lloh20:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MMU_INT_RAWSTAT,4,2            ; @MMU_INT_RAWSTAT
	.comm	_MMU_INT_CLEAR,4,2              ; @MMU_INT_CLEAR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unhandled Page fault in AS%d at VA 0x%016llX\nReason: %s\nraw fault status: 0x%X\ndecoded fault status: %s\nexception type 0x%X: %s\naccess type 0x%X: %s\nsource id 0x%X\n"

l_.str.1:                               ; @.str.1
	.asciz	"TODO"

l_.str.2:                               ; @.str.2
	.asciz	"DECODER FAULT"

l_.str.3:                               ; @.str.3
	.asciz	"SLAVE FAULT"

	.comm	_MMU_INT_MASK,4,2               ; @MMU_INT_MASK
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_panfrost_mmu_irq_handler_thread
.subsections_via_symbols
