	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_pcie_ep_set_msi
_dw_pcie_ep_set_msi:                    ## @dw_pcie_ep_set_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
	movl	%edx, %r12d
	callq	_epc_get_drvdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_to_dw_pcie_from_ep
	movl	(%rbx), %r15d
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_PCI_MSI_FLAGS@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_dw_pcie_readw_dbi
	movq	_PCI_MSI_FLAGS_QMASK@GOTPCREL(%rip), %rcx
	addl	%r12d, %r12d
	xorl	%eax, %r12d
	andl	(%rcx), %r12d
	xorl	%eax, %r12d
	movq	%r14, %rdi
	callq	_dw_pcie_dbi_ro_wr_en
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_dw_pcie_writew_dbi
	movq	%r14, %rdi
	callq	_dw_pcie_dbi_ro_wr_dis
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCI_MSI_FLAGS,4,2              ## @PCI_MSI_FLAGS
	.comm	_PCI_MSI_FLAGS_QMASK,4,2        ## @PCI_MSI_FLAGS_QMASK
	.no_dead_strip	_dw_pcie_ep_set_msi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_pcie_ep_set_msi
_dw_pcie_ep_set_msi:                    ; @dw_pcie_ep_set_msi
	.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, x2
	bl	_epc_get_drvdata
	mov	x21, x0
	bl	_to_dw_pcie_from_ep
	ldr	w8, [x21]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x9, _PCI_MSI_FLAGS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_MSI_FLAGS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w21, w9, w8
	mov	x1, x21
	bl	_dw_pcie_readw_dbi
Lloh3:
	adrp	x8, _PCI_MSI_FLAGS_QMASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_MSI_FLAGS_QMASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	bic	w9, w0, w8
	and	w8, w8, w20, lsl #1
	orr	w20, w9, w8
	mov	x0, x19
	bl	_dw_pcie_dbi_ro_wr_en
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_dw_pcie_writew_dbi
	mov	x0, x19
	bl	_dw_pcie_dbi_ro_wr_dis
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCI_MSI_FLAGS,4,2              ; @PCI_MSI_FLAGS
	.comm	_PCI_MSI_FLAGS_QMASK,4,2        ; @PCI_MSI_FLAGS_QMASK
	.no_dead_strip	_dw_pcie_ep_set_msi
.subsections_via_symbols
