	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ls1021_pcie_host_init
_ls1021_pcie_host_init:                 ## @ls1021_pcie_host_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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_to_dw_pcie_from_pp
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_to_ls_pcie
	movq	%rax, %r15
	movq	(%rbx), %rbx
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_syscon_regmap_lookup_by_phandle
	movq	%rax, 8(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	8(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	$0, 8(%r15)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_8
## %bb.2:
	movl	%r14d, %eax
	jmp	LBB0_7
LBB0_3:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdx
	movl	$2, %ecx
	callq	_of_property_read_u32_array
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	$0, 8(%r15)
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	movl	-36(%rbp), %eax
	movl	%eax, (%r15)
	movq	%r14, %rdi
	callq	_ls_pcie_host_init
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_8
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fsl,pcie-scfg"

L_.str.1:                               ## @.str.1
	.asciz	"No syscfg phandle specified\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ls1021_pcie_host_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ls1021_pcie_host_init
_ls1021_pcie_host_init:                 ; @ls1021_pcie_host_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	_to_dw_pcie_from_pp
	mov	x21, x0
	bl	_to_ls_pcie
	mov	x19, x0
	ldr	x21, [x21]
	ldr	w0, [x21]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_syscon_regmap_lookup_by_phandle
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x0, [x19, #8]
	bl	_PTR_ERR
	mov	x20, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	str	xzr, [x19, #8]
	ldr	x8, [sp, #8]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.2:
	mov	x0, x20
	b	LBB0_7
LBB0_3:
	ldr	w0, [x21]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, sp
	mov	w3, #2
	bl	_of_property_read_u32_array
	cbz	x0, LBB0_5
; %bb.4:
	str	xzr, [x19, #8]
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	ldr	w8, [sp, #4]
	str	w8, [x19]
	mov	x0, x20
	bl	_ls_pcie_host_init
LBB0_6:
	ldr	x8, [sp, #8]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fsl,pcie-scfg"

l_.str.1:                               ; @.str.1
	.asciz	"No syscfg phandle specified\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ls1021_pcie_host_init
.subsections_via_symbols
