	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function panfrost_job_irq_handler
_panfrost_job_irq_handler:              ## @panfrost_job_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	_JOB_INT_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_job_read
	movl	%eax, %r14d
	movl	8(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_dbg
	testl	%r14d, %r14d
	je	LBB0_1
## %bb.2:
	movl	8(%r12), %edi
	callq	_pm_runtime_mark_last_busy
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rdi
	callq	_spin_unlock
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	notl	%r13d
	andl	%r13d, %r14d
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	addq	$4, %r15
	testl	%r14d, %r14d
	je	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_MK_JS_MASK
	testl	%r14d, %eax
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r13d
	movq	_JOB_INT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_job_write
	movl	%ebx, %edi
	callq	_JOB_INT_MASK_ERR
	testl	%r14d, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	callq	_JS_COMMAND_NEXT
	movq	_JS_COMMAND_NOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_job_write
	movl	8(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_JS_STATUS
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_job_read
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_panfrost_exception_name
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_JS_HEAD_LO
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_job_read
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	callq	_JS_TAIL_LO
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_job_read
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	%eax, %r9d
	callq	_dev_err
	movq	(%r12), %rax
	movq	8(%rax), %rdi
	addq	%r15, %rdi
	callq	_drm_sched_fault
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	callq	_JOB_INT_MASK_DONE
	testl	%r14d, %eax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	(%r12), %rdi
	callq	_spin_lock
	movq	16(%r12), %rax
	movq	(%rax,%rbx,8), %r14
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, (%rax,%rbx,8)
	movq	8(%r14), %rsi
	movq	%r12, %rdi
	callq	_panfrost_mmu_as_put
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_panfrost_devfreq_record_transition
	movl	(%r14), %edi
	callq	_dma_fence_signal_locked
	movl	8(%r12), %edi
	callq	_pm_runtime_put_autosuspend
	jmp	LBB0_9
LBB0_12:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JOB_INT_STAT,4,2               ## @JOB_INT_STAT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"jobslot irq status=%x\n"

	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_JOB_INT_CLEAR,4,2              ## @JOB_INT_CLEAR
	.comm	_JS_COMMAND_NOP,4,2             ## @JS_COMMAND_NOP
L_.str.1:                               ## @.str.1
	.asciz	"js fault, js=%d, status=%s, head=0x%x, tail=0x%x"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_panfrost_job_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_job_irq_handler
_panfrost_job_irq_handler:              ; @panfrost_job_irq_handler
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
Lloh0:
	adrp	x8, _JOB_INT_STAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JOB_INT_STAT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_job_read
	mov	x20, x0
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	cbz	w20, LBB0_12
; %bb.1:
	ldr	w0, [x19, #8]
	bl	_pm_runtime_mark_last_busy
	mov	x28, #0
	mov	x21, #0
Lloh5:
	adrp	x27, _JOB_INT_CLEAR@GOTPAGE
Lloh6:
	ldr	x27, [x27, _JOB_INT_CLEAR@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str.1@PAGE
Lloh8:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x19]
	bl	_spin_unlock
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	bic	w20, w20, w23
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	add	x28, x28, #4
	cbz	w20, LBB0_11
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_MK_JS_MASK
	tst	w0, w20
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
	ldr	w1, [x27]
	mov	x0, x19
	mov	x2, x23
	bl	_job_write
	mov	x0, x21
	bl	_JOB_INT_MASK_ERR
	tst	w0, w20
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_JS_COMMAND_NEXT
	mov	x1, x0
Lloh9:
	adrp	x8, _JS_COMMAND_NOP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _JS_COMMAND_NOP@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_job_write
	ldr	w24, [x19, #8]
	mov	x0, x21
	bl	_JS_STATUS
	mov	x1, x0
	mov	x0, x19
	bl	_job_read
	mov	x1, x0
	mov	x0, x19
	bl	_panfrost_exception_name
	mov	x25, x0
	mov	x0, x21
	bl	_JS_HEAD_LO
	mov	x1, x0
	mov	x0, x19
	bl	_job_read
	mov	x26, x0
	mov	x0, x21
	bl	_JS_TAIL_LO
	mov	x1, x0
	mov	x0, x19
	bl	_job_read
	mov	x5, x0
	mov	x0, x24
	mov	x1, x22
	mov	x2, x21
	mov	x3, x25
	mov	x4, x26
	bl	_dev_err
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	add	x0, x8, x28
	bl	_drm_sched_fault
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_JOB_INT_MASK_DONE
	tst	w0, w20
	b.eq	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x19]
	bl	_spin_lock
	ldr	x8, [x19, #16]
	ldr	x24, [x8, x21, lsl #3]
	cbz	x24, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [x8, x21, lsl #3]
	ldr	x1, [x24, #8]
	mov	x0, x19
	bl	_panfrost_mmu_as_put
	mov	x0, x19
	mov	x1, x21
	bl	_panfrost_devfreq_record_transition
	ldr	w0, [x24]
	bl	_dma_fence_signal_locked
	ldr	w0, [x19, #8]
	bl	_pm_runtime_put_autosuspend
	b	LBB0_2
LBB0_11:
Lloh12:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh14:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_13:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_JOB_INT_STAT,4,2               ; @JOB_INT_STAT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"jobslot irq status=%x\n"

	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_JOB_INT_CLEAR,4,2              ; @JOB_INT_CLEAR
	.comm	_JS_COMMAND_NOP,4,2             ; @JS_COMMAND_NOP
l_.str.1:                               ; @.str.1
	.asciz	"js fault, js=%d, status=%s, head=0x%x, tail=0x%x"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_panfrost_job_irq_handler
.subsections_via_symbols
