	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xen_msi_init                   ## -- Begin function xen_msi_init
	.p2align	4, 0x90
_xen_msi_init:                          ## @xen_msi_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_num_io_irqs@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	setg	%dil
	callq	_MPASS
	movq	(%rbx), %rax
	movq	_first_msi_irq@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	movq	_num_msi_irqs@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	_UINT_MAX@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	subq	%rax, %rdx
	cmpq	%rdx, %rcx
	jle	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_panic
	movq	(%r14), %rax
	movq	(%r15), %rcx
LBB0_2:
	addq	%rax, %rcx
	movq	%rcx, (%rbx)
	movq	_MTX_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_msi_lock@GOTPCREL(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_init                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_num_io_irqs,8,3                ## @num_io_irqs
	.comm	_first_msi_irq,8,3              ## @first_msi_irq
	.comm	_num_msi_irqs,8,3               ## @num_msi_irqs
	.comm	_UINT_MAX,8,3                   ## @UINT_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"num_msi_irqs too high"

	.comm	_msi_lock,4,2                   ## @msi_lock
L_.str.1:                               ## @.str.1
	.asciz	"msi"

	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xen_msi_init                   ; -- Begin function xen_msi_init
	.p2align	2
_xen_msi_init:                          ; @xen_msi_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x19, _num_io_irqs@GOTPAGE
Lloh1:
	ldr	x19, [x19, _num_io_irqs@GOTPAGEOFF]
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, gt
	bl	_MPASS
	ldr	x8, [x19]
Lloh2:
	adrp	x20, _first_msi_irq@GOTPAGE
Lloh3:
	ldr	x20, [x20, _first_msi_irq@GOTPAGEOFF]
	str	x8, [x20]
Lloh4:
	adrp	x21, _num_msi_irqs@GOTPAGE
Lloh5:
	ldr	x21, [x21, _num_msi_irqs@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh6:
	adrp	x10, _UINT_MAX@GOTPAGE
Lloh7:
	ldr	x10, [x10, _UINT_MAX@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	sub	x10, x10, x8
	cmp	x9, x10
	b.le	LBB0_2
; %bb.1:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
	ldr	x8, [x20]
	ldr	x9, [x21]
LBB0_2:
	add	x8, x9, x8
	str	x8, [x19]
Lloh11:
	adrp	x8, _MTX_DEF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MTX_DEF@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
Lloh14:
	adrp	x0, _msi_lock@GOTPAGE
Lloh15:
	ldr	x0, [x0, _msi_lock@GOTPAGEOFF]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mtx_init
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_num_io_irqs,8,3                ; @num_io_irqs
	.comm	_first_msi_irq,8,3              ; @first_msi_irq
	.comm	_num_msi_irqs,8,3               ; @num_msi_irqs
	.comm	_UINT_MAX,8,3                   ; @UINT_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"num_msi_irqs too high"

	.comm	_msi_lock,4,2                   ; @msi_lock
l_.str.1:                               ; @.str.1
	.asciz	"msi"

	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
.subsections_via_symbols
