	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function artpec6_add_pcie_ep
_artpec6_add_pcie_ep:                   ## @artpec6_add_pcie_ep
	.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	%rsi, %r15
	movq	(%rdi), %rbx
	movq	_pcie_ep_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rbx)
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_platform_get_resource_byname
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, (%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.7:
	movl	(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	callq	_platform_get_resource_byname
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	leaq	8(%rbx), %r14
	movl	(%rax), %ecx
	movl	%ecx, 12(%rbx)
	movq	%rax, %rdi
	callq	_resource_size
	movl	%eax, 8(%rbx)
	movq	%r14, %rdi
	callq	_dw_pcie_ep_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_6
LBB0_4:
	xorl	%r14d, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pcie_ep_ops,4,2                ## @pcie_ep_ops
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dbi2"

L_.str.1:                               ## @.str.1
	.asciz	"addr_space"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"failed to initialize endpoint\n"

	.no_dead_strip	_artpec6_add_pcie_ep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function artpec6_add_pcie_ep
_artpec6_add_pcie_ep:                   ; @artpec6_add_pcie_ep
	.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, x1
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _pcie_ep_ops@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pcie_ep_ops@GOTPAGEOFF]
	str	x8, [x21, #16]
Lloh2:
	adrp	x20, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x20, [x20, _IORESOURCE_MEM@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_platform_get_resource_byname
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	w0, [x21]
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x21]
	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	_PTR_ERR
LBB0_2:
	ldr	w1, [x20]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_platform_get_resource_byname
	cbz	x0, LBB0_5
; %bb.3:
	add	x20, x21, #8
	ldr	w8, [x0]
	str	w8, [x21, #12]
	bl	_resource_size
	str	w0, [x21, #8]
	mov	x0, x20
	bl	_dw_pcie_ep_init
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.4:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x20
	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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_pcie_ep_ops,4,2                ; @pcie_ep_ops
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dbi2"

l_.str.1:                               ; @.str.1
	.asciz	"addr_space"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"failed to initialize endpoint\n"

	.no_dead_strip	_artpec6_add_pcie_ep
.subsections_via_symbols
