	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cik_event_interrupt_wq
_cik_event_interrupt_wq:                ## @cik_event_interrupt_wq
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	4(%rsi), %ebx
	cmpl	$65536, %ebx                    ## imm = 0x10000
	jae	LBB0_1
LBB0_15:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rsi, %rax
	movl	(%rsi), %ecx
	movl	%ecx, %esi
	andl	$268435455, %esi                ## imm = 0xFFFFFFF
	movl	%ebx, %r8d
	shrl	$16, %r8d
	movq	8(%rax), %rax
	movq	_CIK_INTSRC_CP_END_OF_PIPE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_2
## %bb.4:
	movq	_CIK_INTSRC_SDMA_TRAP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_5
LBB0_2:
	movl	%r8d, %edi
	movl	$28, %edx
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfd_signal_event_interrupt     ## TAILCALL
LBB0_5:
	movq	_CIK_INTSRC_SQ_INTERRUPT_MSG@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_7
## %bb.6:
	movzbl	%cl, %esi
	movl	%r8d, %edi
	movl	$8, %edx
	jmp	LBB0_3
LBB0_7:
	movq	_CIK_INTSRC_CP_BAD_OPCODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.16:
	movl	%r8d, %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfd_signal_hw_exception_event  ## TAILCALL
LBB0_8:
	movq	%rdi, %r15
	movq	_CIK_INTSRC_GFX_PAGE_INV_FAULT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	movq	_CIK_INTSRC_GFX_MEM_PROT_FAULT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
LBB0_10:
	movl	4(%r15), %edi
	movl	%r8d, %r12d
	movl	%r8d, %esi
	callq	_kfd_process_vm_fault
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_amdgpu_amdkfd_gpuvm_get_vm_fault_info
	movl	-40(%rbp), %eax
	orl	-44(%rbp), %eax
	je	LBB0_15
## %bb.11:
	movzbl	%bh, %eax
	cmpl	%eax, -48(%rbp)
	movl	%r12d, %esi
	jne	LBB0_13
## %bb.12:
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	jmp	LBB0_14
LBB0_13:
	movq	%r15, %rdi
	xorl	%edx, %edx
LBB0_14:
	callq	_kfd_signal_vm_fault_event
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_CIK_INTSRC_CP_END_OF_PIPE,8,3  ## @CIK_INTSRC_CP_END_OF_PIPE
	.comm	_CIK_INTSRC_SDMA_TRAP,8,3       ## @CIK_INTSRC_SDMA_TRAP
	.comm	_CIK_INTSRC_SQ_INTERRUPT_MSG,8,3 ## @CIK_INTSRC_SQ_INTERRUPT_MSG
	.comm	_CIK_INTSRC_CP_BAD_OPCODE,8,3   ## @CIK_INTSRC_CP_BAD_OPCODE
	.comm	_CIK_INTSRC_GFX_PAGE_INV_FAULT,8,3 ## @CIK_INTSRC_GFX_PAGE_INV_FAULT
	.comm	_CIK_INTSRC_GFX_MEM_PROT_FAULT,8,3 ## @CIK_INTSRC_GFX_MEM_PROT_FAULT
	.no_dead_strip	_cik_event_interrupt_wq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cik_event_interrupt_wq
_cik_event_interrupt_wq:                ; @cik_event_interrupt_wq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	w21, [x1, #4]
	cmp	w21, #16, lsl #12               ; =65536
	b.hs	LBB0_2
LBB0_1:
	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
	add	sp, sp, #64
	ret
LBB0_2:
	mov	x8, x1
	ldr	w9, [x1]
	and	w1, w9, #0xfffffff
	lsr	w19, w21, #16
	ldr	x8, [x8, #8]
Lloh0:
	adrp	x10, _CIK_INTSRC_CP_END_OF_PIPE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CIK_INTSRC_CP_END_OF_PIPE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x8, x10
	b.eq	LBB0_4
; %bb.3:
Lloh3:
	adrp	x10, _CIK_INTSRC_SDMA_TRAP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CIK_INTSRC_SDMA_TRAP@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_6
LBB0_4:
	mov	x0, x19
	mov	w2, #28
LBB0_5:
	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
	add	sp, sp, #64
	b	_kfd_signal_event_interrupt
LBB0_6:
Lloh6:
	adrp	x10, _CIK_INTSRC_SQ_INTERRUPT_MSG@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CIK_INTSRC_SQ_INTERRUPT_MSG@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_8
; %bb.7:
	and	w1, w9, #0xff
	mov	x0, x19
	mov	w2, #8
	b	LBB0_5
LBB0_8:
Lloh9:
	adrp	x9, _CIK_INTSRC_CP_BAD_OPCODE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CIK_INTSRC_CP_BAD_OPCODE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_kfd_signal_hw_exception_event
LBB0_10:
Lloh12:
	adrp	x9, _CIK_INTSRC_GFX_PAGE_INV_FAULT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CIK_INTSRC_GFX_PAGE_INV_FAULT@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x10, _CIK_INTSRC_GFX_MEM_PROT_FAULT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _CIK_INTSRC_GFX_MEM_PROT_FAULT@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_1
; %bb.11:
	mov	x20, x0
	ldr	w0, [x0, #4]
	mov	x1, x19
	bl	_kfd_process_vm_fault
	mov	x0, sp
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	ldr	w0, [x20]
	mov	x1, sp
	bl	_amdgpu_amdkfd_gpuvm_get_vm_fault_info
	ldp	w9, w8, [sp, #4]
	orr	w8, w8, w9
	cbz	w8, LBB0_1
; %bb.12:
	ubfx	w8, w21, #8, #8
	ldr	w9, [sp]
	cmp	w9, w8
	b.ne	LBB0_14
; %bb.13:
	mov	x2, sp
	mov	x0, x20
	mov	x1, x19
	b	LBB0_15
LBB0_14:
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
LBB0_15:
	bl	_kfd_signal_vm_fault_event
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CIK_INTSRC_CP_END_OF_PIPE,8,3  ; @CIK_INTSRC_CP_END_OF_PIPE
	.comm	_CIK_INTSRC_SDMA_TRAP,8,3       ; @CIK_INTSRC_SDMA_TRAP
	.comm	_CIK_INTSRC_SQ_INTERRUPT_MSG,8,3 ; @CIK_INTSRC_SQ_INTERRUPT_MSG
	.comm	_CIK_INTSRC_CP_BAD_OPCODE,8,3   ; @CIK_INTSRC_CP_BAD_OPCODE
	.comm	_CIK_INTSRC_GFX_PAGE_INV_FAULT,8,3 ; @CIK_INTSRC_GFX_PAGE_INV_FAULT
	.comm	_CIK_INTSRC_GFX_MEM_PROT_FAULT,8,3 ; @CIK_INTSRC_GFX_MEM_PROT_FAULT
	.no_dead_strip	_cik_event_interrupt_wq
.subsections_via_symbols
