	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_irq_dispatch            ## -- Begin function amdgpu_irq_dispatch
	.p2align	4, 0x90
_amdgpu_irq_dispatch:                   ## @amdgpu_irq_dispatch
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %eax
	sarl	$2, %eax
	cltq
	shlq	$2, %rax
	addq	8(%rsi), %rax
	movq	%rax, -32(%rbp)
	leaq	-40(%rbp), %r15
	movq	%r15, %rsi
	callq	_amdgpu_ih_decode_iv
	subq	%r14, %rbx
	addq	$-24, %rbx
	shrq	$4, %rbx
	movl	%ebx, %edi
	movq	%r15, %rsi
	callq	_trace_amdgpu_iv
	movl	-40(%rbp), %esi
	movq	_AMDGPU_IRQ_CLIENTID_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jae	LBB0_1
## %bb.2:
	movl	-36(%rbp), %edx
	movq	_AMDGPU_MAX_IRQ_SRC_ID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jae	LBB0_3
## %bb.4:
	movq	16(%r14), %rax
	cmpq	$0, (%rax,%rdx,8)
	je	LBB0_6
## %bb.5:
	movl	8(%r14), %edi
	movl	%edx, %esi
	callq	_irq_find_mapping
	movl	%eax, %edi
	callq	_generic_handle_irq
	jmp	LBB0_15
LBB0_1:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	jmp	LBB0_14
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
LBB0_13:
	movl	%edx, %esi
LBB0_14:
	xorl	%eax, %eax
	callq	_DRM_DEBUG
LBB0_15:
	movq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_amdgpu_amdkfd_interrupt
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r14), %rax
	movq	(%rax,%rsi,8), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	(%rax,%rdx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.9:
	movq	(%rsi), %rax
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	jne	LBB0_16
	jmp	LBB0_15
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	jmp	LBB0_15
LBB0_12:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_13
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_IRQ_CLIENTID_MAX,4,2    ## @AMDGPU_IRQ_CLIENTID_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid client_id in IV: %d\n"

	.comm	_AMDGPU_MAX_IRQ_SRC_ID,4,2      ## @AMDGPU_MAX_IRQ_SRC_ID
L_.str.1:                               ## @.str.1
	.asciz	"Invalid src_id in IV: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unregistered interrupt client_id: %d src_id: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"error processing interrupt (%d)\n"

L_.str.4:                               ## @.str.4
	.asciz	"Unhandled interrupt src_id: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_irq_dispatch            ; -- Begin function amdgpu_irq_dispatch
	.p2align	2
_amdgpu_irq_dispatch:                   ; @amdgpu_irq_dispatch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x1]
	asr	w8, w8, #2
	ldr	x9, [x1, #8]
	add	x8, x9, w8, sxtw #2
	str	x8, [sp, #24]
	add	x1, sp, #16
	bl	_amdgpu_ih_decode_iv
	sub	x8, x20, x19
	sub	x8, x8, #24
	lsr	x0, x8, #4
	add	x1, sp, #16
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_trace_amdgpu_iv
	ldr	w8, [sp, #16]
Lloh0:
	adrp	x9, _AMDGPU_IRQ_CLIENTID_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AMDGPU_IRQ_CLIENTID_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.hs	LBB0_4
; %bb.1:
	ldr	w1, [sp, #20]
Lloh3:
	adrp	x9, _AMDGPU_MAX_IRQ_SRC_ID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AMDGPU_MAX_IRQ_SRC_ID@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w1, w9
	b.hs	LBB0_5
; %bb.2:
	ldr	x9, [x19, #16]
	ldr	x9, [x9, x1, lsl #3]
	cbz	x9, LBB0_10
; %bb.3:
	ldr	w0, [x19, #8]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_irq_find_mapping
	bl	_generic_handle_irq
	b	LBB0_8
LBB0_4:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x8
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
                                        ; kill: def $w1 killed $w1 killed $x1
LBB0_7:
	bl	_DRM_DEBUG
LBB0_8:
	ldr	x1, [sp, #24]
	mov	x0, x19
	bl	_amdgpu_amdkfd_interrupt
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	ldr	x9, [x19]
	ldr	x9, [x9, x8, lsl #3]
	cbz	x9, LBB0_14
; %bb.11:
	ldr	x8, [x9, x1, lsl #3]
	cbz	x8, LBB0_15
; %bb.12:
	ldr	x9, [x8]
	ldr	x9, [x9]
	add	x2, sp, #16
	mov	x0, x19
	mov	x1, x8
	blr	x9
	mov	x1, x0
	tbnz	w0, #31, LBB0_16
; %bb.13:
	cbnz	w1, LBB0_9
	b	LBB0_8
LBB0_14:
	str	x1, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x8
	b	LBB0_7
LBB0_15:
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_6
LBB0_16:
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_IRQ_CLIENTID_MAX,4,2    ; @AMDGPU_IRQ_CLIENTID_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid client_id in IV: %d\n"

	.comm	_AMDGPU_MAX_IRQ_SRC_ID,4,2      ; @AMDGPU_MAX_IRQ_SRC_ID
l_.str.1:                               ; @.str.1
	.asciz	"Invalid src_id in IV: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unregistered interrupt client_id: %d src_id: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"error processing interrupt (%d)\n"

l_.str.4:                               ; @.str.4
	.asciz	"Unhandled interrupt src_id: %d\n"

.subsections_via_symbols
