	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msi_create_source
_msi_create_source:                     ## @msi_create_source
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_msi_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	movq	_msi_last_irq@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_num_msi_irqs@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_1
## %bb.2:
	movq	_first_msi_irq@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rbx
	addq	%rcx, %rbx
	incq	%rcx
	movq	%rcx, (%rax)
	movq	_msi_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock
	movq	_M_MSI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$16, %edi
	callq	_malloc
	movq	_msi_pic@GOTPCREL(%rip), %rcx
	movq	%rcx, (%rax)
	movq	%rbx, 8(%rax)
	movq	%rax, %rdi
	callq	_intr_register_source
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_nexus_add_irq                  ## TAILCALL
LBB0_1:
	movq	_msi_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mtx_unlock                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_msi_lock,4,2                   ## @msi_lock
	.comm	_msi_last_irq,8,3               ## @msi_last_irq
	.comm	_num_msi_irqs,8,3               ## @num_msi_irqs
	.comm	_first_msi_irq,8,3              ## @first_msi_irq
	.comm	_M_MSI,4,2                      ## @M_MSI
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_msi_pic,4,2                    ## @msi_pic
	.no_dead_strip	_msi_create_source
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msi_create_source
_msi_create_source:                     ; @msi_create_source
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x0, _msi_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _msi_lock@GOTPAGEOFF]
	bl	_mtx_lock
Lloh2:
	adrp	x8, _msi_last_irq@GOTPAGE
Lloh3:
	ldr	x8, [x8, _msi_last_irq@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh4:
	adrp	x10, _num_msi_irqs@GOTPAGE
Lloh5:
	ldr	x10, [x10, _num_msi_irqs@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ge	LBB0_2
; %bb.1:
Lloh7:
	adrp	x10, _first_msi_irq@GOTPAGE
Lloh8:
	ldr	x10, [x10, _first_msi_irq@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	add	x19, x10, x9
	add	x9, x9, #1
	str	x9, [x8]
Lloh10:
	adrp	x0, _msi_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _msi_lock@GOTPAGEOFF]
	bl	_mtx_unlock
Lloh12:
	adrp	x8, _M_MSI@GOTPAGE
Lloh13:
	ldr	x8, [x8, _M_MSI@GOTPAGEOFF]
Lloh14:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	ldr	w8, [x9]
Lloh18:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh19:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #16
	bl	_malloc
Lloh21:
	adrp	x8, _msi_pic@GOTPAGE
Lloh22:
	ldr	x8, [x8, _msi_pic@GOTPAGEOFF]
	stp	x8, x19, [x0]
	bl	_intr_register_source
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_nexus_add_irq
LBB0_2:
Lloh23:
	adrp	x0, _msi_lock@GOTPAGE
Lloh24:
	ldr	x0, [x0, _msi_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mtx_unlock
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_msi_lock,4,2                   ; @msi_lock
	.comm	_msi_last_irq,8,3               ; @msi_last_irq
	.comm	_num_msi_irqs,8,3               ; @num_msi_irqs
	.comm	_first_msi_irq,8,3              ; @first_msi_irq
	.comm	_M_MSI,4,2                      ; @M_MSI
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_msi_pic,4,2                    ; @msi_pic
	.no_dead_strip	_msi_create_source
.subsections_via_symbols
