	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdns_pcie_ep_write_header
_cdns_pcie_ep_write_header:             ## @cdns_pcie_ep_write_header
	.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	%rdx, %r15
	movl	%esi, %ebx
	callq	_epc_get_drvdata
	movq	%rax, %r14
	movq	_PCI_DEVICE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_cdns_pcie_ep_fn_writew
	movq	_PCI_REVISION_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	36(%r15), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_cdns_pcie_ep_fn_writeb
	movq	_PCI_CLASS_PROG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	32(%r15), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_cdns_pcie_ep_fn_writeb
	movq	_PCI_CLASS_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%r15), %ecx
	shll	$8, %ecx
	orl	4(%r15), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_cdns_pcie_ep_fn_writew
	movq	_PCI_CACHE_LINE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	28(%r15), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_cdns_pcie_ep_fn_writeb
	movq	_PCI_SUBSYSTEM_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	12(%r15), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_cdns_pcie_ep_fn_writew
	movq	_PCI_INTERRUPT_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	24(%r15), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_cdns_pcie_ep_fn_writeb
	testl	%ebx, %ebx
	jne	LBB0_2
## %bb.1:
	movl	20(%r15), %edi
	callq	_CDNS_PCIE_LM_ID_VENDOR
	movl	%eax, %ebx
	movl	16(%r15), %edi
	callq	_CDNS_PCIE_LM_ID_SUBSYS
	orl	%eax, %ebx
	movq	_CDNS_PCIE_LM_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_cdns_pcie_writel
LBB0_2:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DEVICE_ID,4,2              ## @PCI_DEVICE_ID
	.comm	_PCI_REVISION_ID,4,2            ## @PCI_REVISION_ID
	.comm	_PCI_CLASS_PROG,4,2             ## @PCI_CLASS_PROG
	.comm	_PCI_CLASS_DEVICE,4,2           ## @PCI_CLASS_DEVICE
	.comm	_PCI_CACHE_LINE_SIZE,4,2        ## @PCI_CACHE_LINE_SIZE
	.comm	_PCI_SUBSYSTEM_ID,4,2           ## @PCI_SUBSYSTEM_ID
	.comm	_PCI_INTERRUPT_PIN,4,2          ## @PCI_INTERRUPT_PIN
	.comm	_CDNS_PCIE_LM_ID,4,2            ## @CDNS_PCIE_LM_ID
	.no_dead_strip	_cdns_pcie_ep_write_header
.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_write_header
_cdns_pcie_ep_write_header:             ; @cdns_pcie_ep_write_header
	.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
	mov	x21, x1
	bl	_epc_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x8, _PCI_DEVICE_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_DEVICE_ID@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	x1, x21
	bl	_cdns_pcie_ep_fn_writew
Lloh3:
	adrp	x8, _PCI_REVISION_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_REVISION_ID@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldr	w3, [x20, #36]
	mov	x0, x19
	mov	x1, x21
	bl	_cdns_pcie_ep_fn_writeb
Lloh6:
	adrp	x8, _PCI_CLASS_PROG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_CLASS_PROG@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	ldr	w3, [x20, #32]
	mov	x0, x19
	mov	x1, x21
	bl	_cdns_pcie_ep_fn_writeb
Lloh9:
	adrp	x8, _PCI_CLASS_DEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCI_CLASS_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	ldp	w8, w9, [x20, #4]
	orr	w3, w8, w9, lsl #8
	mov	x0, x19
	mov	x1, x21
	bl	_cdns_pcie_ep_fn_writew
Lloh12:
	adrp	x8, _PCI_CACHE_LINE_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_CACHE_LINE_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	ldr	w3, [x20, #28]
	mov	x0, x19
	mov	x1, x21
	bl	_cdns_pcie_ep_fn_writeb
Lloh15:
	adrp	x8, _PCI_SUBSYSTEM_ID@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCI_SUBSYSTEM_ID@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	ldr	w3, [x20, #12]
	mov	x0, x19
	mov	x1, x21
	bl	_cdns_pcie_ep_fn_writew
Lloh18:
	adrp	x8, _PCI_INTERRUPT_PIN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCI_INTERRUPT_PIN@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	ldr	w3, [x20, #24]
	mov	x0, x19
	mov	x1, x21
	bl	_cdns_pcie_ep_fn_writeb
	cbnz	w21, LBB0_2
; %bb.1:
	ldr	w0, [x20, #20]
	bl	_CDNS_PCIE_LM_ID_VENDOR
	mov	x21, x0
	ldr	w0, [x20, #16]
	bl	_CDNS_PCIE_LM_ID_SUBSYS
	orr	w2, w0, w21
Lloh21:
	adrp	x8, _CDNS_PCIE_LM_ID@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CDNS_PCIE_LM_ID@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cdns_pcie_writel
LBB0_2:
	mov	w0, #0
	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	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DEVICE_ID,4,2              ; @PCI_DEVICE_ID
	.comm	_PCI_REVISION_ID,4,2            ; @PCI_REVISION_ID
	.comm	_PCI_CLASS_PROG,4,2             ; @PCI_CLASS_PROG
	.comm	_PCI_CLASS_DEVICE,4,2           ; @PCI_CLASS_DEVICE
	.comm	_PCI_CACHE_LINE_SIZE,4,2        ; @PCI_CACHE_LINE_SIZE
	.comm	_PCI_SUBSYSTEM_ID,4,2           ; @PCI_SUBSYSTEM_ID
	.comm	_PCI_INTERRUPT_PIN,4,2          ; @PCI_INTERRUPT_PIN
	.comm	_CDNS_PCIE_LM_ID,4,2            ; @CDNS_PCIE_LM_ID
	.no_dead_strip	_cdns_pcie_ep_write_header
.subsections_via_symbols
