	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msi_capability_init
_msi_capability_init:                   ## @msi_capability_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	%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
	movq	%rdx, %r14
	movl	%esi, %r13d
	movq	%rdi, %rbx
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_pci_msi_set_enable
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movq	%r14, %rdx
	callq	_msi_setup_entry
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	8(%rax), %edi
	callq	_msi_mask
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	%eax, %edx
	callq	_msi_mask_irq
	movq	%r12, %rbx
	addq	$4, %rbx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	leaq	8(%r15), %rdi
	callq	_dev_to_msi_list
	movq	%rbx, %rdi
	movq	%r15, %rbx
	movl	%eax, %esi
	callq	_list_add_tail
	movq	_PCI_CAP_ID_MSI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_pci_msi_setup_msi_irqs
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_msi_verify_entries
	testl	%eax, %eax
	jne	LBB0_3
## %bb.5:
	movq	%rbx, %rdi
	callq	_populate_msi_sysfs
	testl	%eax, %eax
	je	LBB0_6
LBB0_3:
	movl	%eax, %r15d
	movl	%r14d, %edx
	notl	%edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_msi_mask_irq
	movq	%rbx, %rdi
	callq	_free_msi_irqs
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pci_intx_for_msi
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_pci_msi_set_enable
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_pcibios_free_irq
	movl	(%r12), %eax
	movl	%eax, 4(%rbx)
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PCI_CAP_ID_MSI,4,2             ## @PCI_CAP_ID_MSI
	.no_dead_strip	_msi_capability_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msi_capability_init
_msi_capability_init:                   ; @msi_capability_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w1, #0
	bl	_pci_msi_set_enable
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_msi_setup_entry
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	w0, [x0, #8]
	bl	_msi_mask
	mov	x22, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x22
	bl	_msi_mask_irq
	add	x23, x20, #4
	add	x0, x19, #8
	bl	_dev_to_msi_list
	mov	x1, x0
	mov	x0, x23
	bl	_list_add_tail
Lloh0:
	adrp	x8, _PCI_CAP_ID_MSI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_CAP_ID_MSI@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_pci_msi_setup_msi_irqs
	cbnz	w0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_msi_verify_entries
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_populate_msi_sysfs
	cbz	w0, LBB0_7
LBB0_4:
	mov	x21, x0
	mvn	w2, w22
	mov	x0, x20
	mov	x1, x22
	bl	_msi_mask_irq
	mov	x0, x19
	bl	_free_msi_irqs
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	bl	_pci_intx_for_msi
	mov	w21, #1
	mov	x0, x19
	mov	w1, #1
	bl	_pci_msi_set_enable
	str	w21, [x19]
	mov	x0, x19
	bl	_pcibios_free_irq
	mov	w21, #0
	ldr	w8, [x20]
	str	w8, [x19, #4]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PCI_CAP_ID_MSI,4,2             ; @PCI_CAP_ID_MSI
	.no_dead_strip	_msi_capability_init
.subsections_via_symbols
