	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dw_pcie_msi_init               ## -- Begin function dw_pcie_msi_init
	.p2align	4, 0x90
_dw_pcie_msi_init:                      ## @dw_pcie_msi_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_dw_pcie_from_pp
	movq	(%rax), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_alloc_page
	movq	%rax, 8(%rbx)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	%r14, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_dma_map_page
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	8(%rbx), %rdi
	callq	___free_page
	movq	$0, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%rbx), %r14
	movq	_PCIE_MSI_ADDR_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_lower_32_bits
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	$4, %edx
	movl	%eax, %ecx
	callq	_dw_pcie_wr_own_conf
	movq	_PCIE_MSI_ADDR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_upper_32_bits
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	$4, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dw_pcie_wr_own_conf            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to map MSI data\n"

	.comm	_PCIE_MSI_ADDR_LO,4,2           ## @PCIE_MSI_ADDR_LO
	.comm	_PCIE_MSI_ADDR_HI,4,2           ## @PCIE_MSI_ADDR_HI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dw_pcie_msi_init               ; -- Begin function dw_pcie_msi_init
	.p2align	2
_dw_pcie_msi_init:                      ; @dw_pcie_msi_init
	.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, x0
	bl	_to_dw_pcie_from_pp
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_alloc_page
	mov	x1, x0
	str	x0, [x19, #8]
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_dma_map_page
	mov	x1, x0
	str	x0, [x19]
	mov	x0, x20
	bl	_dma_mapping_error
	cbz	x0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #8]
	bl	___free_page
	str	xzr, [x19, #8]
	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
LBB0_2:
	ldr	x20, [x19]
Lloh11:
	adrp	x8, _PCIE_MSI_ADDR_LO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PCIE_MSI_ADDR_LO@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_lower_32_bits
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	w2, #4
	bl	_dw_pcie_wr_own_conf
Lloh14:
	adrp	x8, _PCIE_MSI_ADDR_HI@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCIE_MSI_ADDR_HI@GOTPAGEOFF]
Lloh16:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_upper_32_bits
	mov	x3, x0
	mov	x0, x19
	mov	x1, x21
	mov	w2, #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
	b	_dw_pcie_wr_own_conf
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to map MSI data\n"

	.comm	_PCIE_MSI_ADDR_LO,4,2           ; @PCIE_MSI_ADDR_LO
	.comm	_PCIE_MSI_ADDR_HI,4,2           ; @PCIE_MSI_ADDR_HI
.subsections_via_symbols
