	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cap_msi
_cap_msi:                               ## @cap_msi
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PCIR_MSI_CTRL@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	movl	$2, %ecx
	callq	_read_config
	movl	%eax, %ebx
	movq	_PCIM_MSICTRL_MMC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movl	%eax, %ecx
	shrl	%ecx
	movl	$1, %r14d
	movl	$1, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	cmpl	$2, %eax
	leaq	L_.str.1(%rip), %r12
	leaq	L_.str.2(%rip), %r15
	movq	%r15, %rdx
	cmovbq	%r12, %rdx
	movq	_PCIM_MSICTRL_64BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	leaq	L_.str.3(%rip), %rcx
	cmoveq	%r12, %rcx
	movq	_PCIM_MSICTRL_VECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	leaq	L_.str.4(%rip), %r8
	cmoveq	%r12, %r8
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	_PCIM_MSICTRL_MSI_ENABLE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_PCIM_MSICTRL_MME_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	%ebx, %ecx
	shrl	$4, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	cmpl	$16, %ebx
	cmovbq	%r12, %r15
	leaq	L_.str.5(%rip), %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_printf                         ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIR_MSI_CTRL,8,3              ## @PCIR_MSI_CTRL
	.comm	_PCIM_MSICTRL_MMC_MASK,4,2      ## @PCIM_MSICTRL_MMC_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MSI supports %d message%s%s%s "

L_.str.1:                               ## @.str.1
	.space	1

L_.str.2:                               ## @.str.2
	.asciz	"s"

	.comm	_PCIM_MSICTRL_64BIT,4,2         ## @PCIM_MSICTRL_64BIT
L_.str.3:                               ## @.str.3
	.asciz	", 64 bit"

	.comm	_PCIM_MSICTRL_VECTOR,4,2        ## @PCIM_MSICTRL_VECTOR
L_.str.4:                               ## @.str.4
	.asciz	", vector masks"

	.comm	_PCIM_MSICTRL_MSI_ENABLE,4,2    ## @PCIM_MSICTRL_MSI_ENABLE
	.comm	_PCIM_MSICTRL_MME_MASK,4,2      ## @PCIM_MSICTRL_MME_MASK
L_.str.5:                               ## @.str.5
	.asciz	"enabled with %d message%s"

	.no_dead_strip	_cap_msi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cap_msi
_cap_msi:                               ; @cap_msi
	.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
Lloh0:
	adrp	x8, _PCIR_MSI_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCIR_MSI_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x2, x8, x2
	mov	w3, #2
	bl	_read_config
	mov	x19, x0
Lloh3:
	adrp	x8, _PCIM_MSICTRL_MMC_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCIM_MSICTRL_MMC_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
	asr	w9, w8, #1
	mov	w20, #1
	lsl	w1, w20, w9
Lloh6:
	adrp	x21, l_.str.2@PAGE
Lloh7:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh8:
	adrp	x22, l_.str.1@PAGE
Lloh9:
	add	x22, x22, l_.str.1@PAGEOFF
	cmp	w8, #2
	csel	x2, x22, x21, lo
Lloh10:
	adrp	x8, _PCIM_MSICTRL_64BIT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PCIM_MSICTRL_64BIT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, l_.str.3@PAGE
Lloh14:
	add	x9, x9, l_.str.3@PAGEOFF
	tst	w8, w0
Lloh15:
	adrp	x8, _PCIM_MSICTRL_VECTOR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCIM_MSICTRL_VECTOR@GOTPAGEOFF]
	csel	x9, x22, x9, eq
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x10, l_.str.4@PAGE
Lloh19:
	add	x10, x10, l_.str.4@PAGEOFF
	tst	w8, w0
	csel	x8, x22, x10, eq
	stp	x9, x8, [sp]
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
Lloh22:
	adrp	x8, _PCIM_MSICTRL_MSI_ENABLE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PCIM_MSICTRL_MSI_ENABLE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_2
; %bb.1:
Lloh25:
	adrp	x8, _PCIM_MSICTRL_MME_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PCIM_MSICTRL_MME_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	and	w8, w8, w19
	asr	w9, w8, #4
	lsl	w1, w20, w9
	cmp	w8, #16
	csel	x2, x22, x21, lo
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
	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	_printf
LBB0_2:
	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
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIR_MSI_CTRL,8,3              ; @PCIR_MSI_CTRL
	.comm	_PCIM_MSICTRL_MMC_MASK,4,2      ; @PCIM_MSICTRL_MMC_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MSI supports %d message%s%s%s "

l_.str.1:                               ; @.str.1
	.space	1

l_.str.2:                               ; @.str.2
	.asciz	"s"

	.comm	_PCIM_MSICTRL_64BIT,4,2         ; @PCIM_MSICTRL_64BIT
l_.str.3:                               ; @.str.3
	.asciz	", 64 bit"

	.comm	_PCIM_MSICTRL_VECTOR,4,2        ; @PCIM_MSICTRL_VECTOR
l_.str.4:                               ; @.str.4
	.asciz	", vector masks"

	.comm	_PCIM_MSICTRL_MSI_ENABLE,4,2    ; @PCIM_MSICTRL_MSI_ENABLE
	.comm	_PCIM_MSICTRL_MME_MASK,4,2      ; @PCIM_MSICTRL_MME_MASK
l_.str.5:                               ; @.str.5
	.asciz	"enabled with %d message%s"

	.no_dead_strip	_cap_msi
.subsections_via_symbols
