	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_pcie_ep_send_msi_irq
_cdns_pcie_ep_send_msi_irq:             ## @cdns_pcie_ep_send_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r15
	leaq	20(%rdi), %rbx
	movq	_CDNS_PCIE_EP_FUNC_MSI_CAP_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_PCI_MSI_FLAGS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%r12, %rdx
	movq	%rbx, %rdi
	callq	_cdns_pcie_ep_fn_readw
	movq	_PCI_MSI_FLAGS_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_PCI_MSI_FLAGS_QSIZE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	shrl	$4, %eax
	movl	$1, %r15d
	movl	%eax, %ecx
	shll	%cl, %r15d
	testl	%r13d, %r13d
	je	LBB0_1
## %bb.3:
	cmpl	%r13d, %r15d
	jl	LBB0_1
## %bb.4:
	leal	-1(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_PCI_MSI_DATA_64@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%r12, %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_cdns_pcie_ep_fn_readw
	negl	%r15d
	andl	%eax, %r15d
	decl	%r13d
	andl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	orl	%r15d, %r13d
	movq	%rbx, %r15
	movq	_PCI_MSI_ADDRESS_HI@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%r12, %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_cdns_pcie_ep_fn_readl
	movq	_PCI_MSI_ADDRESS_LO@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_cdns_pcie_ep_fn_readl
	movl	$63, %edi
	movl	$2, %esi
	callq	_GENMASK_ULL
	xorl	%edi, %edi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	cmpl	%r14d, 4(%rbx)
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	16(%rbx), %r8d
	movl	$256, (%rsp)                    ## imm = 0x100
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_cdns_pcie_set_outbound_region
	movl	%r14d, 4(%rbx)
LBB0_6:
	movl	%r13d, %edi
	callq	_writel
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CDNS_PCIE_EP_FUNC_MSI_CAP_OFFSET,8,3 ## @CDNS_PCIE_EP_FUNC_MSI_CAP_OFFSET
	.comm	_PCI_MSI_FLAGS,8,3              ## @PCI_MSI_FLAGS
	.comm	_PCI_MSI_FLAGS_ENABLE,4,2       ## @PCI_MSI_FLAGS_ENABLE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCI_MSI_FLAGS_QSIZE,4,2        ## @PCI_MSI_FLAGS_QSIZE
	.comm	_PCI_MSI_DATA_64,8,3            ## @PCI_MSI_DATA_64
	.comm	_PCI_MSI_ADDRESS_HI,8,3         ## @PCI_MSI_ADDRESS_HI
	.comm	_PCI_MSI_ADDRESS_LO,8,3         ## @PCI_MSI_ADDRESS_LO
	.no_dead_strip	_cdns_pcie_ep_send_msi_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdns_pcie_ep_send_msi_irq
_cdns_pcie_ep_send_msi_irq:             ; @cdns_pcie_ep_send_msi_irq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _CDNS_PCIE_EP_FUNC_MSI_CAP_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CDNS_PCIE_EP_FUNC_MSI_CAP_OFFSET@GOTPAGEOFF]
	add	x21, x0, #20
Lloh2:
	ldr	x23, [x8]
Lloh3:
	adrp	x8, _PCI_MSI_FLAGS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_MSI_FLAGS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x2, x8, x23
	mov	x0, x21
	bl	_cdns_pcie_ep_fn_readw
Lloh6:
	adrp	x8, _PCI_MSI_FLAGS_ENABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_MSI_FLAGS_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.1:
	cbz	w22, LBB0_6
; %bb.2:
Lloh9:
	adrp	x8, _PCI_MSI_FLAGS_QSIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_MSI_FLAGS_QSIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w8, w8, w0
	asr	w8, w8, #4
	mov	w9, #1
	lsl	w24, w9, w8
	cmp	w24, w22
	b.lt	LBB0_6
; %bb.3:
	sub	w25, w24, #1
Lloh12:
	adrp	x8, _PCI_MSI_DATA_64@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_MSI_DATA_64@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	add	x2, x8, x23
	mov	x0, x21
	mov	x1, x19
	bl	_cdns_pcie_ep_fn_readw
	neg	w8, w24
	and	w8, w0, w8
	sub	w9, w22, #1
	and	w9, w25, w9
	orr	w22, w8, w9
Lloh15:
	adrp	x8, _PCI_MSI_ADDRESS_HI@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCI_MSI_ADDRESS_HI@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	add	x2, x8, x23
	mov	x0, x21
	mov	x1, x19
	bl	_cdns_pcie_ep_fn_readl
Lloh18:
	adrp	x8, _PCI_MSI_ADDRESS_LO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCI_MSI_ADDRESS_LO@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	add	x2, x8, x23
	mov	x0, x21
	mov	x1, x19
	bl	_cdns_pcie_ep_fn_readl
	mov	w0, #63
	mov	w1, #2
	bl	_GENMASK_ULL
	ldr	w8, [x20, #4]
	cmp	w8, w19
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w4, [x20, #16]
	mov	x0, x21
	mov	x1, x19
	mov	w2, #0
	mov	w3, #0
	mov	w6, #256
	bl	_cdns_pcie_set_outbound_region
	str	w19, [x20, #4]
LBB0_5:
	mov	x0, x22
	bl	_writel
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_CDNS_PCIE_EP_FUNC_MSI_CAP_OFFSET,8,3 ; @CDNS_PCIE_EP_FUNC_MSI_CAP_OFFSET
	.comm	_PCI_MSI_FLAGS,8,3              ; @PCI_MSI_FLAGS
	.comm	_PCI_MSI_FLAGS_ENABLE,4,2       ; @PCI_MSI_FLAGS_ENABLE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCI_MSI_FLAGS_QSIZE,4,2        ; @PCI_MSI_FLAGS_QSIZE
	.comm	_PCI_MSI_DATA_64,8,3            ; @PCI_MSI_DATA_64
	.comm	_PCI_MSI_ADDRESS_HI,8,3         ; @PCI_MSI_ADDRESS_HI
	.comm	_PCI_MSI_ADDRESS_LO,8,3         ; @PCI_MSI_ADDRESS_LO
	.no_dead_strip	_cdns_pcie_ep_send_msi_irq
.subsections_via_symbols
