	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdns_pcie_init_phy             ## -- Begin function cdns_pcie_init_phy
	.p2align	4, 0x90
_cdns_pcie_init_phy:                    ## @cdns_pcie_init_phy
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_of_property_count_strings
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movq	%r13, %rdi
	movl	%eax, %r12d
	movl	%eax, %esi
	movl	$8, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movl	(%r15), %ecx
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	$8, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %r15
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movl	%r12d, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	leaq	-80(%rbp), %rcx
	callq	_of_property_read_string_index
	movq	-80(%rbp), %rsi
	movq	%r13, %rdi
	callq	_devm_phy_get
	movq	%rax, (%r14,%r12,8)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	(%r14,%r12,8), %rsi
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_DL_FLAG_STATELESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_device_link_add
	movq	%rax, (%r15,%r12,8)
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	incq	%r12
	cmpq	%r12, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_6
## %bb.11:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rdi)
	movq	%r14, 16(%rdi)
	movq	%r15, 8(%rdi)
	callq	_cdns_pcie_enable_phy
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
                                        ## kill: def $r12d killed $r12d killed $r12 def $r12
	testl	%r12d, %r12d
	jg	LBB0_15
	jmp	LBB0_18
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	movl	$0, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_7:
	movq	%rsi, %rdi
	callq	_PTR_ERR
	testl	%r12d, %r12d
	jg	LBB0_15
	jmp	LBB0_18
LBB0_9:
	movq	(%r14,%r12,8), %rsi
	movq	%r13, %rdi
	callq	_devm_phy_put
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	testl	%r12d, %r12d
	jle	LBB0_18
LBB0_15:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r12d, %ebx
	incq	%rbx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	-16(%r15,%rbx,8), %rdi
	callq	_device_link_del
	movq	-16(%r14,%rbx,8), %rsi
	movq	%r13, %rdi
	callq	_devm_phy_put
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_16
## %bb.17:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy-names"

L_.str.1:                               ## @.str.1
	.asciz	"no phy-names.  PHY will not be initialized\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DL_FLAG_STATELESS,4,2          ## @DL_FLAG_STATELESS
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdns_pcie_init_phy             ; -- Begin function cdns_pcie_init_phy
	.p2align	2
_cdns_pcie_init_phy:                    ; @cdns_pcie_init_phy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x1
	mov	x19, x0
	ldr	x23, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_of_property_count_strings
	cmp	w0, #0
	b.le	LBB0_10
; %bb.1:
	mov	x25, x0
Lloh2:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	x0, x19
	mov	x1, x25
	mov	w2, #8
	bl	_devm_kcalloc
	cbz	x0, LBB0_9
; %bb.2:
	mov	x20, x0
	ldr	w3, [x21]
	mov	x0, x19
	mov	x1, x25
	mov	w2, #8
	bl	_devm_kcalloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x21, x0
	str	x22, [sp]                       ; 8-byte Folded Spill
	mov	x24, #0
	mov	w27, w25
Lloh4:
	adrp	x28, _DL_FLAG_STATELESS@GOTPAGE
Lloh5:
	ldr	x28, [x28, _DL_FLAG_STATELESS@GOTPAGEOFF]
Lloh6:
	adrp	x26, l_.str@PAGE
Lloh7:
	add	x26, x26, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x3, sp, #8
	mov	x0, x23
	mov	x1, x26
	mov	x2, x24
	bl	_of_property_read_string_index
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_devm_phy_get
	lsl	x22, x24, #3
	str	x0, [x20, x22]
	bl	_IS_ERR
	ldr	x1, [x20, x22]
	cbnz	x0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w2, [x28]
	mov	x0, x19
	bl	_device_link_add
	str	x0, [x21, x24, lsl #3]
	cbz	x0, LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	cmp	x27, x24
	b.ne	LBB0_4
; %bb.7:
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	str	w25, [x0]
	stp	x21, x20, [x0, #8]
	bl	_cdns_pcie_enable_phy
	mov	x23, x0
	cbz	w0, LBB0_15
; %bb.8:
	mov	x24, x27
	cmp	w24, #1
	b.ge	LBB0_13
	b	LBB0_15
LBB0_9:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_15
LBB0_10:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	w23, #0
	str	wzr, [x22]
	b	LBB0_15
LBB0_11:
	mov	x0, x1
	bl	_PTR_ERR
	mov	x23, x0
	cmp	w24, #1
	b.ge	LBB0_13
	b	LBB0_15
LBB0_12:
	ldr	x1, [x20, x24, lsl #3]
	mov	x0, x19
	bl	_devm_phy_put
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w23, w8
	cmp	w24, #1
	b.lt	LBB0_15
LBB0_13:
	mov	w8, w24
	sub	x22, x8, #1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	lsl	x24, x22, #3
	ldr	x0, [x21, x24]
	bl	_device_link_del
	ldr	x1, [x20, x24]
	mov	x0, x19
	bl	_devm_phy_put
	add	x8, x22, #1
	sub	x22, x22, #1
	cmp	x8, #1
	b.hi	LBB0_14
LBB0_15:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy-names"

l_.str.1:                               ; @.str.1
	.asciz	"no phy-names.  PHY will not be initialized\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DL_FLAG_STATELESS,4,2          ; @DL_FLAG_STATELESS
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
