	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function msi_release
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_msi_release
	.p2align	4, 0x90
_msi_release:                           ## @msi_release
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_msi_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	movl	(%r14), %edi
	callq	_intr_lookup_source
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r13
	cmpq	$0, 64(%rax)
	je	LBB0_6
LBB0_2:
	movq	_msi_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_msi_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	48(%r13), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:
	cmpq	%r13, %rax
	jne	LBB0_2
## %bb.8:
	cmpl	%r15d, (%r13)
	jne	LBB0_2
## %bb.9:
	leaq	40(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	cmpq	$0, 40(%r13)
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	cmpl	$2, %r15d
	jl	LBB0_12
## %bb.10:
	movl	%r15d, %r15d
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%r12,4), %edi
	callq	_intr_lookup_source
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpq	%r13, 48(%rax)
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	40(%rbx), %rax
	xorl	%edi, %edi
	cmpq	40(%r13), %rax
	sete	%dil
	leaq	L_.str.2(%rip), %rsi
	callq	_KASSERT
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rbx)
	movl	36(%rbx), %edi
	movq	24(%rbx), %rsi
	movl	32(%rbx), %edx
	callq	_apic_free_vector
	movq	$0, 24(%rbx)
	incq	%r12
	cmpq	%r12, %r15
	jne	LBB0_11
LBB0_12:
	xorps	%xmm0, %xmm0
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movups	%xmm0, (%rax)
	movl	36(%r13), %edi
	movq	24(%r13), %rsi
	movl	32(%r13), %edx
	callq	_apic_free_vector
	movl	$0, (%r13)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r13)
	movq	8(%r13), %rdi
	movq	_M_MSI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
	movq	$0, 8(%r13)
	movq	_msi_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_13:
	movq	_msi_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_msi_lock,4,2                   ## @msi_lock
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unowned group"

L_.str.1:                               ## @.str.1
	.asciz	"message not in group"

L_.str.2:                               ## @.str.2
	.asciz	"owner mismatch"

	.comm	_M_MSI,4,2                      ## @M_MSI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msi_release                    ; -- Begin function msi_release
	.p2align	2
_msi_release:                           ; @msi_release
	.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	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x0, _msi_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _msi_lock@GOTPAGEOFF]
	bl	_mtx_lock
	ldr	w0, [x20]
	bl	_intr_lookup_source
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #64]
	cbz	x8, LBB0_6
LBB0_2:
Lloh2:
	adrp	x0, _msi_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _msi_lock@GOTPAGEOFF]
	bl	_mtx_unlock
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x0, _msi_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _msi_lock@GOTPAGEOFF]
	bl	_mtx_unlock
Lloh8:
	adrp	x8, _ENOENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
LBB0_5:
	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
LBB0_6:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_13
; %bb.7:
	cmp	x8, x19
	b.ne	LBB0_2
; %bb.8:
	ldr	w8, [x19]
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.9:
	mov	x23, x19
	ldr	x8, [x23, #40]!
	cmp	x8, #0
	cset	w0, ne
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	cmp	w21, #2
	b.lt	LBB0_12
; %bb.10:
	mov	w8, w21
	add	x24, x20, #4
	sub	x25, x8, #1
Lloh12:
	adrp	x20, l_.str.1@PAGE
Lloh13:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh14:
	adrp	x21, l_.str.2@PAGE
Lloh15:
	add	x21, x21, l_.str.2@PAGEOFF
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24], #4
	bl	_intr_lookup_source
	mov	x22, x0
	ldr	x8, [x0, #48]
	cmp	x8, x19
	cset	w0, eq
	mov	x1, x20
	bl	_KASSERT
	ldr	x8, [x22, #40]
	ldr	x9, [x19, #40]
	cmp	x8, x9
	cset	w0, eq
	mov	x1, x21
	bl	_KASSERT
	stp	xzr, xzr, [x22, #40]
	ldr	x1, [x22, #24]
	ldp	w2, w0, [x22, #32]
	bl	_apic_free_vector
	str	xzr, [x22, #24]
	subs	x25, x25, #1
	b.ne	LBB0_11
LBB0_12:
	stp	xzr, xzr, [x23]
	ldr	x1, [x19, #24]
	ldp	w2, w0, [x19, #32]
	bl	_apic_free_vector
	str	wzr, [x19]
	stp	xzr, xzr, [x19, #16]
	ldr	x0, [x19, #8]
Lloh16:
	adrp	x8, _M_MSI@GOTPAGE
Lloh17:
	ldr	x8, [x8, _M_MSI@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_free
	str	xzr, [x19, #8]
Lloh19:
	adrp	x0, _msi_lock@GOTPAGE
Lloh20:
	ldr	x0, [x0, _msi_lock@GOTPAGEOFF]
	bl	_mtx_unlock
	mov	w0, #0
	b	LBB0_5
LBB0_13:
Lloh21:
	adrp	x0, _msi_lock@GOTPAGE
Lloh22:
	ldr	x0, [x0, _msi_lock@GOTPAGEOFF]
	bl	_mtx_unlock
Lloh23:
	adrp	x8, _ENXIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_msi_lock,4,2                   ; @msi_lock
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unowned group"

l_.str.1:                               ; @.str.1
	.asciz	"message not in group"

l_.str.2:                               ; @.str.2
	.asciz	"owner mismatch"

	.comm	_M_MSI,4,2                      ; @M_MSI
.subsections_via_symbols
