	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function irq_handler
_irq_handler:                           ## @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, %r13
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_VIVS_HI_INTR_ACKNOWLEDGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_gpu_read
	testl	%eax, %eax
	je	LBB0_15
## %bb.1:
	movl	%eax, %r14d
	movl	24(%r13), %edi
	callq	_pm_runtime_mark_last_busy
	movl	24(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_dbg
	movq	_VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR@GOTPCREL(%rip), %rbx
	testl	%r14d, (%rbx)
	je	LBB0_3
## %bb.2:
	movl	24(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, %r14d
LBB0_3:
	movq	_VIVS_HI_INTR_ACKNOWLEDGE_MMU_EXCEPTION@GOTPCREL(%rip), %rbx
	testl	%r14d, (%rbx)
	je	LBB0_5
## %bb.4:
	movq	%r13, %rdi
	callq	_dump_mmu_fault
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, %r14d
LBB0_5:
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.6:
	leaq	16(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	callq	_dma_fence_signal
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_event_free
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	testl	%r14d, %r14d
	je	LBB0_14
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	bsfl	%r14d, %r15d
	movl	24(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_dbg
	movq	8(%r13), %rax
	movq	%r15, %rbx
	shlq	$4, %rbx
	cmpq	$0, 8(%rax,%rbx)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%r15d, (%r13)
	movl	20(%r13), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_queue_work
	movq	8(%r13), %rax
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	btrl	%r15d, %r14d
	movq	(%rax,%rbx), %r12
	testq	%r12, %r12
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	addq	%rbx, %rax
	movq	$0, (%rax)
	movl	(%r12), %edi
	movl	4(%r13), %esi
	callq	_fence_after
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r12), %eax
	movl	%eax, 4(%r13)
	jmp	LBB0_12
LBB0_14:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_VIVS_HI_INTR_ACKNOWLEDGE,4,2   ## @VIVS_HI_INTR_ACKNOWLEDGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"intr 0x%08x\n"

	.comm	_VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR,4,2 ## @VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"AXI bus error\n"

	.comm	_VIVS_HI_INTR_ACKNOWLEDGE_MMU_EXCEPTION,4,2 ## @VIVS_HI_INTR_ACKNOWLEDGE_MMU_EXCEPTION
L_.str.2:                               ## @.str.2
	.asciz	"event %u\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_irq_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function irq_handler
_irq_handler:                           ; @irq_handler
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
Lloh0:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _VIVS_HI_INTR_ACKNOWLEDGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VIVS_HI_INTR_ACKNOWLEDGE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_read
	cbz	w0, LBB0_15
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19, #24]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19, #24]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
Lloh8:
	adrp	x21, _VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR@GOTPAGE
Lloh9:
	ldr	x21, [x21, _VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w20
	b.eq	LBB0_3
; %bb.2:
	ldr	w0, [x19, #24]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	ldr	w8, [x21]
	bic	w20, w20, w8
LBB0_3:
Lloh12:
	adrp	x21, _VIVS_HI_INTR_ACKNOWLEDGE_MMU_EXCEPTION@GOTPAGE
Lloh13:
	ldr	x21, [x21, _VIVS_HI_INTR_ACKNOWLEDGE_MMU_EXCEPTION@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_dump_mmu_fault
	ldr	w8, [x21]
	bic	w20, w20, w8
LBB0_5:
	cbz	w20, LBB0_14
; %bb.6:
	add	x21, x19, #16
	mov	w25, #1
Lloh14:
	adrp	x22, l_.str.2@PAGE
Lloh15:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x24
	bl	_dma_fence_signal
	mov	x0, x19
	mov	x1, x23
	bl	_event_free
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	lsl	w8, w25, w23
	bic	w20, w20, w8
	cbz	w20, LBB0_14
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	rbit	w8, w20
	clz	w23, w8
	ldr	w0, [x19, #24]
	mov	x1, x22
	mov	x2, x23
	bl	_dev_dbg
	ldr	x8, [x19, #8]
	add	x9, x8, w23, uxtw #4
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	str	w23, [x19]
	ldr	w0, [x19, #20]
	mov	x1, x21
	bl	_queue_work
	ldr	x8, [x19, #8]
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x8, x23, lsl #4
	ldr	x24, [x8]
	cbz	x24, LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	str	xzr, [x8]
	ldr	w0, [x24]
	ldr	w1, [x19, #4]
	bl	_fence_after
	cbz	x0, LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x24]
	str	w8, [x19, #4]
	b	LBB0_7
LBB0_14:
Lloh16:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_VIVS_HI_INTR_ACKNOWLEDGE,4,2   ; @VIVS_HI_INTR_ACKNOWLEDGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"intr 0x%08x\n"

	.comm	_VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR,4,2 ; @VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"AXI bus error\n"

	.comm	_VIVS_HI_INTR_ACKNOWLEDGE_MMU_EXCEPTION,4,2 ; @VIVS_HI_INTR_ACKNOWLEDGE_MMU_EXCEPTION
l_.str.2:                               ; @.str.2
	.asciz	"event %u\n"

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