	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_populate_msicap            ## -- Begin function pci_populate_msicap
	.p2align	4, 0x90
_pci_populate_msicap:                   ## @pci_populate_msicap
	.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
	movl	%edx, %r14d
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r15
	leal	-1(%rsi), %eax
	testl	%eax, %esi
	sete	%al
	bsfl	%esi, %ecx
	addl	%ecx, %ecx
	subl	$1, %esi
	movl	$-2, %ebx
	cmovael	%ecx, %ebx
	cmpl	$32, %esi
	setb	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	%r15, %rdi
	movl	$12, %esi
	callq	_bzero
	movq	_PCIY_MSI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movl	%r14d, (%r15)
	movq	_PCIM_MSICTRL_64BIT@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, 4(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIY_MSI,4,2                   ## @PCIY_MSI
	.comm	_PCIM_MSICTRL_64BIT,4,2         ## @PCIM_MSICTRL_64BIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_populate_msicap            ; -- Begin function pci_populate_msicap
	.p2align	2
_pci_populate_msicap:                   ; @pci_populate_msicap
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	sub	w8, w1, #1
	tst	w1, w8
	mov	w9, #32
	ccmp	w8, w9, #2, eq
	cset	w0, lo
	bl	_assert
	rbit	w8, w20
	clz	w22, w8
	mov	x0, x21
	mov	w1, #12
	bl	_bzero
Lloh0:
	adrp	x8, _PCIY_MSI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCIY_MSI@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w19, [x21]
Lloh3:
	adrp	x9, _PCIM_MSICTRL_64BIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCIM_MSICTRL_64BIT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsl	w10, w22, #1
	mov	w11, #-2
	cmp	w20, #0
	csel	w10, w11, w10, eq
	orr	w9, w9, w10
	stp	w9, w8, [x21, #4]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIY_MSI,4,2                   ; @PCIY_MSI
	.comm	_PCIM_MSICTRL_64BIT,4,2         ; @PCIM_MSICTRL_64BIT
.subsections_via_symbols
