	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_endpoint_test_msi_irq
_pci_endpoint_test_msi_irq:             ## @pci_endpoint_test_msi_irq
	.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	%rsi, %r14
	movq	%rdi, %r13
	movq	16(%rdi), %r15
	movq	_PCI_ENDPOINT_TEST_IRQ_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%edx, %edx
	movq	_IRQ_TYPE_MSIX@GOTPCREL(%rip), %rax
	cmoveq	_IRQ_TYPE_MSI@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_COMMAND_RAISE_MSIX_IRQ@GOTPCREL(%rip), %rbx
	cmoveq	_COMMAND_RAISE_MSI_IRQ@GOTPCREL(%rip), %rbx
	callq	_pci_endpoint_test_writel
	movq	_PCI_ENDPOINT_TEST_IRQ_NUMBER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_pci_endpoint_test_writel
	movq	_PCI_ENDPOINT_TEST_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	movq	%r13, %rdi
	callq	_pci_endpoint_test_writel
	leaq	8(%r13), %r12
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	decq	%r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_pci_irq_vector
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpq	(%r13), %rcx
	sete	%al
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_ENDPOINT_TEST_IRQ_TYPE,4,2 ## @PCI_ENDPOINT_TEST_IRQ_TYPE
	.comm	_IRQ_TYPE_MSI,8,3               ## @IRQ_TYPE_MSI
	.comm	_IRQ_TYPE_MSIX,8,3              ## @IRQ_TYPE_MSIX
	.comm	_PCI_ENDPOINT_TEST_IRQ_NUMBER,4,2 ## @PCI_ENDPOINT_TEST_IRQ_NUMBER
	.comm	_PCI_ENDPOINT_TEST_COMMAND,4,2  ## @PCI_ENDPOINT_TEST_COMMAND
	.comm	_COMMAND_RAISE_MSI_IRQ,8,3      ## @COMMAND_RAISE_MSI_IRQ
	.comm	_COMMAND_RAISE_MSIX_IRQ,8,3     ## @COMMAND_RAISE_MSIX_IRQ
	.no_dead_strip	_pci_endpoint_test_msi_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_endpoint_test_msi_irq
_pci_endpoint_test_msi_irq:             ; @pci_endpoint_test_msi_irq
	.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	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #16]
Lloh0:
	adrp	x8, _PCI_ENDPOINT_TEST_IRQ_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_ENDPOINT_TEST_IRQ_TYPE@GOTPAGEOFF]
Lloh2:
	adrp	x9, _IRQ_TYPE_MSI@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IRQ_TYPE_MSI@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _IRQ_TYPE_MSIX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IRQ_TYPE_MSIX@GOTPAGEOFF]
	cmp	w2, #0
	csel	x8, x9, x8, eq
	ldr	x2, [x8]
Lloh7:
	adrp	x8, _COMMAND_RAISE_MSI_IRQ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _COMMAND_RAISE_MSI_IRQ@GOTPAGEOFF]
Lloh9:
	adrp	x9, _COMMAND_RAISE_MSIX_IRQ@GOTPAGE
Lloh10:
	ldr	x9, [x9, _COMMAND_RAISE_MSIX_IRQ@GOTPAGEOFF]
	csel	x22, x8, x9, eq
	bl	_pci_endpoint_test_writel
Lloh11:
	adrp	x8, _PCI_ENDPOINT_TEST_IRQ_NUMBER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PCI_ENDPOINT_TEST_IRQ_NUMBER@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_pci_endpoint_test_writel
Lloh14:
	adrp	x8, _PCI_ENDPOINT_TEST_COMMAND@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCI_ENDPOINT_TEST_COMMAND@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	x2, [x22]
	mov	x0, x19
	bl	_pci_endpoint_test_writel
	add	x22, x19, #8
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x22
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_2
; %bb.1:
	sub	x1, x20, #1
	mov	x0, x21
	bl	_pci_irq_vector
	ldr	x8, [x19]
	cmp	x0, x8
	cset	w0, eq
LBB0_2:
	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	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_ENDPOINT_TEST_IRQ_TYPE,4,2 ; @PCI_ENDPOINT_TEST_IRQ_TYPE
	.comm	_IRQ_TYPE_MSI,8,3               ; @IRQ_TYPE_MSI
	.comm	_IRQ_TYPE_MSIX,8,3              ; @IRQ_TYPE_MSIX
	.comm	_PCI_ENDPOINT_TEST_IRQ_NUMBER,4,2 ; @PCI_ENDPOINT_TEST_IRQ_NUMBER
	.comm	_PCI_ENDPOINT_TEST_COMMAND,4,2  ; @PCI_ENDPOINT_TEST_COMMAND
	.comm	_COMMAND_RAISE_MSI_IRQ,8,3      ; @COMMAND_RAISE_MSI_IRQ
	.comm	_COMMAND_RAISE_MSIX_IRQ,8,3     ; @COMMAND_RAISE_MSIX_IRQ
	.no_dead_strip	_pci_endpoint_test_msi_irq
.subsections_via_symbols
