	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spear13xx_pcie_probe
_spear13xx_pcie_probe:                  ## @spear13xx_pcie_probe
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movq	%r13, 16(%rax)
	movq	_dw_pcie_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r12)
	movq	%r12, 16(%r14)
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_devm_phy_get
	movl	%eax, 12(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	12(%r14), %edi
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	addl	(%rax), %ecx
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_info
	jmp	LBB0_17
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_8:
	callq	_phy_init
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movl	%eax, 4(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.18:
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	4(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_7
LBB0_9:
	movl	4(%r14), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
LBB0_7:
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r13, %rdi
	callq	_platform_get_resource_byname
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_devm_pci_remap_cfg_resource
	movl	%eax, (%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.6(%rip), %rsi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r12), %edi
	callq	_PTR_ERR
LBB0_16:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_17
LBB0_13:
	movl	$8192, %eax                     ## imm = 0x2000
	addl	(%r12), %eax
	movl	%eax, 8(%r14)
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_property_read_bool
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	$1, (%r14)
LBB0_15:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_spear13xx_add_pcie_port
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_17
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_dw_pcie_ops,4,2                ## @dw_pcie_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pcie-phy"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.1:                               ## @.str.1
	.asciz	"probe deferred\n"

L_.str.2:                               ## @.str.2
	.asciz	"couldn't get pcie-phy\n"

L_.str.3:                               ## @.str.3
	.asciz	"couldn't get clk for pcie\n"

L_.str.4:                               ## @.str.4
	.asciz	"couldn't enable clk for pcie\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.5:                               ## @.str.5
	.asciz	"dbi"

L_.str.6:                               ## @.str.6
	.asciz	"couldn't remap dbi base %p\n"

L_.str.7:                               ## @.str.7
	.asciz	"st,pcie-is-gen1"

	.no_dead_strip	_spear13xx_pcie_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spear13xx_pcie_probe
_spear13xx_pcie_probe:                  ; @spear13xx_pcie_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	w2, [x22]
	mov	x0, x19
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x22, x0
Lloh2:
	adrp	x8, _dw_pcie_ops@GOTPAGE
Lloh3:
	ldr	x8, [x8, _dw_pcie_ops@GOTPAGEOFF]
	stp	x8, x19, [x0, #8]
	str	x0, [x20, #16]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_phy_get
	str	w0, [x20, #12]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x20, #12]
	cbz	x8, LBB0_6
; %bb.3:
	bl	_PTR_ERR
	mov	x23, x0
Lloh6:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_8
; %bb.4:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	b	LBB0_12
LBB0_5:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_12
LBB0_6:
	bl	_phy_init
	mov	x0, x19
	mov	x1, #0
	bl	_devm_clk_get
	str	w0, [x20, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.7:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #4]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_8:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_9:
	ldr	w0, [x20, #4]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_13
; %bb.10:
	mov	x23, x0
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_dev_err
LBB0_12:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_13:
Lloh20:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x2, l_.str.5@PAGE
Lloh24:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_platform_get_resource_byname
	mov	x23, x0
	mov	x0, x19
	mov	x1, x23
	bl	_devm_pci_remap_cfg_resource
	str	w0, [x22]
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.14:
	str	x23, [sp]
Lloh25:
	adrp	x1, l_.str.6@PAGE
Lloh26:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x22]
	bl	_PTR_ERR
LBB0_15:
	mov	x23, x0
	ldr	w0, [x20, #4]
	bl	_clk_disable_unprepare
	b	LBB0_12
LBB0_16:
	ldr	w8, [x22]
	add	w8, w8, #2, lsl #12             ; =8192
	str	w8, [x20, #8]
Lloh27:
	adrp	x1, l_.str.7@PAGE
Lloh28:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x21
	bl	_of_property_read_bool
	cbz	x0, LBB0_18
; %bb.17:
	mov	w8, #1
	str	w8, [x20]
LBB0_18:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x20
	mov	x1, x19
	bl	_spear13xx_add_pcie_port
	tbnz	w0, #31, LBB0_15
; %bb.19:
	mov	w23, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_dw_pcie_ops,4,2                ; @dw_pcie_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pcie-phy"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.1:                               ; @.str.1
	.asciz	"probe deferred\n"

l_.str.2:                               ; @.str.2
	.asciz	"couldn't get pcie-phy\n"

l_.str.3:                               ; @.str.3
	.asciz	"couldn't get clk for pcie\n"

l_.str.4:                               ; @.str.4
	.asciz	"couldn't enable clk for pcie\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.5:                               ; @.str.5
	.asciz	"dbi"

l_.str.6:                               ; @.str.6
	.asciz	"couldn't remap dbi base %p\n"

l_.str.7:                               ; @.str.7
	.asciz	"st,pcie-is-gen1"

	.no_dead_strip	_spear13xx_pcie_probe
.subsections_via_symbols
