	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk_gmac_setup
_rk_gmac_setup:                         ## @rk_gmac_setup
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	$0, -56(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$72, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r12
	movl	(%r14), %edi
	callq	_of_get_phy_mode
	movl	%eax, 64(%r12)
	movq	%rbx, 56(%r12)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_regulator_get_optional
	movq	%rax, 48(%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	48(%r12), %rdi
	callq	_PTR_ERR
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %r13
	addl	(%r13), %eax
	jne	LBB0_6
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	subl	(%r13), %ebx
	movl	%ebx, %edi
	jmp	LBB0_5
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	$0, 48(%r12)
LBB0_7:
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	leaq	-56(%rbp), %rdx
	callq	_of_property_read_string
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_11:
	movl	$1, (%r12)
	jmp	LBB0_12
LBB0_9:
	movq	-56(%rbp), %rdx
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movq	-56(%rbp), %rdi
	leaq	L_.str.6(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	$0, (%r12)
LBB0_12:
	movl	(%r14), %edi
	leaq	L_.str.7(%rip), %rsi
	leaq	-44(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	$48, 4(%r12)
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	4(%r12), %edx
	leaq	L_.str.9(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_15
LBB0_14:
	movl	-44(%rbp), %edx
	leaq	L_.str.10(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movl	-44(%rbp), %eax
	movl	%eax, 4(%r12)
LBB0_15:
	movl	(%r14), %edi
	leaq	L_.str.11(%rip), %rsi
	leaq	-44(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	$16, 8(%r12)
	leaq	L_.str.12(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	8(%r12), %edx
	leaq	L_.str.13(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_18
LBB0_17:
	movl	-44(%rbp), %edx
	leaq	L_.str.14(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movl	-44(%rbp), %eax
	movl	%eax, 8(%r12)
LBB0_18:
	movl	(%r14), %edi
	leaq	L_.str.15(%rip), %rsi
	callq	_syscon_regmap_lookup_by_phandle
	movl	%eax, 40(%r12)
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.19:
	leaq	L_.str.16(%rip), %rsi
	callq	_of_property_read_bool
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_22
## %bb.20:
	movq	(%r15), %rdi
	xorl	%esi, %esi
	callq	_of_reset_control_get
	movq	%rax, 32(%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	leaq	L_.str.17(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	$0, 32(%r12)
LBB0_22:
	cmpq	$0, 24(%r12)
	leaq	L_.str.20(%rip), %rax
	leaq	L_.str.19(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.18(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movq	%r14, 16(%r12)
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.1:                               ## @.str.1
	.asciz	"phy regulator is not available yet, deferred probing\n"

L_.str.2:                               ## @.str.2
	.asciz	"no regulator found\n"

L_.str.3:                               ## @.str.3
	.asciz	"clock_in_out"

L_.str.4:                               ## @.str.4
	.asciz	"Can not read property: clock_in_out.\n"

L_.str.5:                               ## @.str.5
	.asciz	"clock input or output? (%s).\n"

L_.str.6:                               ## @.str.6
	.asciz	"input"

L_.str.7:                               ## @.str.7
	.asciz	"tx_delay"

L_.str.8:                               ## @.str.8
	.asciz	"Can not read property: tx_delay."

L_.str.9:                               ## @.str.9
	.asciz	"set tx_delay to 0x%x\n"

L_.str.10:                              ## @.str.10
	.asciz	"TX delay(0x%x).\n"

L_.str.11:                              ## @.str.11
	.asciz	"rx_delay"

L_.str.12:                              ## @.str.12
	.asciz	"Can not read property: rx_delay."

L_.str.13:                              ## @.str.13
	.asciz	"set rx_delay to 0x%x\n"

L_.str.14:                              ## @.str.14
	.asciz	"RX delay(0x%x).\n"

L_.str.15:                              ## @.str.15
	.asciz	"rockchip,grf"

L_.str.16:                              ## @.str.16
	.asciz	"phy-is-integrated"

L_.str.17:                              ## @.str.17
	.asciz	"No PHY reset control found.\n"

L_.str.18:                              ## @.str.18
	.asciz	"integrated PHY? (%s).\n"

L_.str.19:                              ## @.str.19
	.asciz	"yes"

L_.str.20:                              ## @.str.20
	.asciz	"no"

	.no_dead_strip	_rk_gmac_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk_gmac_setup
_rk_gmac_setup:                         ; @rk_gmac_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	str	xzr, [sp, #24]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #72
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19]
	bl	_of_get_phy_mode
	str	w0, [x20, #64]
	str	x22, [x20, #56]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_regulator_get_optional
	str	x0, [x20, #48]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.2:
	ldr	x0, [x20, #48]
	bl	_PTR_ERR
Lloh5:
	adrp	x22, _EPROBE_DEFER@GOTPAGE
Lloh6:
	ldr	x22, [x22, _EPROBE_DEFER@GOTPAGEOFF]
	ldr	w8, [x22]
	cmn	w0, w8
	b.ne	LBB0_6
; %bb.3:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w8, [x22]
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
LBB0_5:
	neg	w0, w8
	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
	add	sp, sp, #80
	b	_ERR_PTR
LBB0_6:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	str	xzr, [x20, #48]
LBB0_7:
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #24
	bl	_of_property_read_string
	cbz	w0, LBB0_10
; %bb.8:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_9:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_12
LBB0_10:
	ldr	x8, [sp, #24]
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	x0, [sp, #24]
Lloh20:
	adrp	x1, l_.str.6@PAGE
Lloh21:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_9
; %bb.11:
	str	wzr, [x20]
LBB0_12:
	ldr	w0, [x19]
Lloh22:
	adrp	x1, l_.str.7@PAGE
Lloh23:
	add	x1, x1, l_.str.7@PAGEOFF
	add	x2, sp, #20
	bl	_of_property_read_u32
	cbz	w0, LBB0_14
; %bb.13:
	mov	w8, #48
	str	w8, [x20, #4]
Lloh24:
	adrp	x1, l_.str.8@PAGE
Lloh25:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w8, [x20, #4]
	str	x8, [sp]
Lloh26:
	adrp	x1, l_.str.9@PAGE
Lloh27:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_15
LBB0_14:
	ldr	w8, [sp, #20]
	str	x8, [sp]
Lloh28:
	adrp	x1, l_.str.10@PAGE
Lloh29:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	w8, [sp, #20]
	str	w8, [x20, #4]
LBB0_15:
	ldr	w0, [x19]
Lloh30:
	adrp	x1, l_.str.11@PAGE
Lloh31:
	add	x1, x1, l_.str.11@PAGEOFF
	add	x2, sp, #20
	bl	_of_property_read_u32
	cbz	w0, LBB0_17
; %bb.16:
	mov	w8, #16
	str	w8, [x20, #8]
Lloh32:
	adrp	x1, l_.str.12@PAGE
Lloh33:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w8, [x20, #8]
	str	x8, [sp]
Lloh34:
	adrp	x1, l_.str.13@PAGE
Lloh35:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_18
LBB0_17:
	ldr	w8, [sp, #20]
	str	x8, [sp]
Lloh36:
	adrp	x1, l_.str.14@PAGE
Lloh37:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	w8, [sp, #20]
	str	w8, [x20, #8]
LBB0_18:
	ldr	w0, [x19]
Lloh38:
	adrp	x1, l_.str.15@PAGE
Lloh39:
	add	x1, x1, l_.str.15@PAGEOFF
	bl	_syscon_regmap_lookup_by_phandle
	str	w0, [x20, #40]
	ldr	x0, [x21]
	cbz	x0, LBB0_22
; %bb.19:
Lloh40:
	adrp	x1, l_.str.16@PAGE
Lloh41:
	add	x1, x1, l_.str.16@PAGEOFF
	bl	_of_property_read_bool
	str	x0, [x20, #24]
	cbz	x0, LBB0_22
; %bb.20:
	ldr	x0, [x21]
	mov	x1, #0
	bl	_of_reset_control_get
	str	x0, [x20, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_22
; %bb.21:
Lloh42:
	adrp	x1, l_.str.17@PAGE
Lloh43:
	add	x1, x1, l_.str.17@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	str	xzr, [x20, #32]
LBB0_22:
	ldr	x8, [x20, #24]
Lloh44:
	adrp	x9, l_.str.19@PAGE
Lloh45:
	add	x9, x9, l_.str.19@PAGEOFF
Lloh46:
	adrp	x10, l_.str.20@PAGE
Lloh47:
	add	x10, x10, l_.str.20@PAGEOFF
	cmp	x8, #0
	csel	x8, x10, x9, eq
	str	x8, [sp]
Lloh48:
	adrp	x1, l_.str.18@PAGE
Lloh49:
	add	x1, x1, l_.str.18@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	str	x19, [x20, #16]
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.1:                               ; @.str.1
	.asciz	"phy regulator is not available yet, deferred probing\n"

l_.str.2:                               ; @.str.2
	.asciz	"no regulator found\n"

l_.str.3:                               ; @.str.3
	.asciz	"clock_in_out"

l_.str.4:                               ; @.str.4
	.asciz	"Can not read property: clock_in_out.\n"

l_.str.5:                               ; @.str.5
	.asciz	"clock input or output? (%s).\n"

l_.str.6:                               ; @.str.6
	.asciz	"input"

l_.str.7:                               ; @.str.7
	.asciz	"tx_delay"

l_.str.8:                               ; @.str.8
	.asciz	"Can not read property: tx_delay."

l_.str.9:                               ; @.str.9
	.asciz	"set tx_delay to 0x%x\n"

l_.str.10:                              ; @.str.10
	.asciz	"TX delay(0x%x).\n"

l_.str.11:                              ; @.str.11
	.asciz	"rx_delay"

l_.str.12:                              ; @.str.12
	.asciz	"Can not read property: rx_delay."

l_.str.13:                              ; @.str.13
	.asciz	"set rx_delay to 0x%x\n"

l_.str.14:                              ; @.str.14
	.asciz	"RX delay(0x%x).\n"

l_.str.15:                              ; @.str.15
	.asciz	"rockchip,grf"

l_.str.16:                              ; @.str.16
	.asciz	"phy-is-integrated"

l_.str.17:                              ; @.str.17
	.asciz	"No PHY reset control found.\n"

l_.str.18:                              ; @.str.18
	.asciz	"integrated PHY? (%s).\n"

l_.str.19:                              ; @.str.19
	.asciz	"yes"

l_.str.20:                              ; @.str.20
	.asciz	"no"

	.no_dead_strip	_rk_gmac_setup
.subsections_via_symbols
