	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun8i_dwmac_probe
_sun8i_dwmac_probe:                     ## @sun8i_dwmac_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, %r12
	leaq	-48(%rbp), %rsi
	callq	_stmmac_get_platform_resources
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_stmmac_probe_config_dt
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%r14, %rdi
LBB0_3:
	callq	_PTR_ERR
	movl	%eax, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_of_device_get_match_data
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_clk_get
	movq	%rax, 24(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	24(%r15), %rdi
	jmp	LBB0_3
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_11:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_regulator_get_optional
	movq	%rax, 16(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	16(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	addl	(%rax), %ecx
	je	LBB0_4
## %bb.14:
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_info
	movq	$0, 16(%r15)
LBB0_15:
	movl	(%r12), %edi
	callq	_sun8i_dwmac_get_syscon_from_dev
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movl	(%r12), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_syscon_regmap_lookup_by_phandle
	movq	%rax, %rbx
LBB0_17:
	movq	%rbx, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_21
LBB0_19:
	movq	(%r15), %rax
	movq	8(%rax), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_devm_regmap_field_alloc
	movq	%rax, 8(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_22
## %bb.20:
	movq	8(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
LBB0_21:
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_4
LBB0_22:
	movl	(%r12), %edi
	callq	_of_get_phy_mode
	testl	%eax, %eax
	js	LBB0_26
## %bb.23:
	movl	%eax, (%r14)
	movq	_STMMAC_RX_COE_TYPE2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r14)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 4(%r14)
	movq	%r15, 24(%r14)
	movq	_sun8i_dwmac_init@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r14)
	movq	_sun8i_dwmac_exit@GOTPCREL(%rip), %rax
	movq	%rax, 40(%r14)
	movq	_sun8i_dwmac_setup@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_sun8i_dwmac_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.24:
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_stmmac_dvr_probe
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_27
LBB0_25:
	movq	24(%r14), %rsi
	movq	%r12, %rdi
	callq	_sun8i_dwmac_exit
	jmp	LBB0_4
LBB0_26:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_27:
	movq	%r12, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %rdi
	callq	_netdev_priv
	movq	%rax, %r13
	movq	(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_31
## %bb.28:
	movq	%r13, %rdi
	callq	_get_ephy_nodes
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
## %bb.29:
	movq	%r13, %rdi
	callq	_sun8i_dwmac_register_mdio_mux
	testl	%eax, %eax
	je	LBB0_33
## %bb.30:
	movl	%eax, %ebx
	leaq	L_.str.8(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r15, %rdi
	callq	_sun8i_dwmac_unset_syscon
	jmp	LBB0_25
LBB0_31:
	movq	%r13, %rdi
	callq	_sun8i_dwmac_reset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_25
LBB0_33:
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.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	"Missing dwmac-sun8i variant\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"stmmaceth"

L_.str.2:                               ## @.str.2
	.asciz	"Could not get TX clock\n"

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

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.4:                               ## @.str.4
	.asciz	"No regulator found\n"

L_.str.5:                               ## @.str.5
	.asciz	"syscon"

L_.str.6:                               ## @.str.6
	.asciz	"Unable to map syscon: %d\n"

L_.str.7:                               ## @.str.7
	.asciz	"Unable to map syscon register: %d\n"

	.comm	_STMMAC_RX_COE_TYPE2,4,2        ## @STMMAC_RX_COE_TYPE2
	.comm	_sun8i_dwmac_setup,4,2          ## @sun8i_dwmac_setup
L_.str.8:                               ## @.str.8
	.asciz	"Failed to register mux\n"

	.no_dead_strip	_sun8i_dwmac_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun8i_dwmac_probe
_sun8i_dwmac_probe:                     ; @sun8i_dwmac_probe
	.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	x19, x0
	add	x1, sp, #24
	bl	_stmmac_get_platform_resources
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.1:
	add	x1, sp, #24
	mov	x0, x19
	bl	_stmmac_probe_config_dt
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x20
LBB0_3:
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_12
LBB0_4:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.5:
	mov	x21, x0
	mov	x0, x19
	bl	_of_device_get_match_data
	str	x0, [x21]
	cbz	x0, LBB0_9
; %bb.6:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x21, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.7:
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x21, #24]
	b	LBB0_3
LBB0_8:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_10:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	mov	x0, x22
	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
LBB0_13:
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_devm_regulator_get_optional
	str	x0, [x21, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.14:
	ldr	x0, [x21, #16]
	bl	_PTR_ERR
	mov	x22, x0
Lloh15:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_12
; %bb.15:
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	str	xzr, [x21, #16]
LBB0_16:
	ldr	w0, [x19]
	bl	_sun8i_dwmac_get_syscon_from_dev
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_18
; %bb.17:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_syscon_regmap_lookup_by_phandle
	mov	x22, x0
LBB0_18:
	mov	x0, x22
	bl	_IS_ERR
	cbz	x0, LBB0_20
; %bb.19:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x22, x0
	str	x22, [sp]
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_12
LBB0_20:
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_devm_regmap_field_alloc
	str	x0, [x21, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_22
; %bb.21:
	ldr	x0, [x21, #8]
	bl	_PTR_ERR
	mov	x22, x0
	str	x22, [sp]
Lloh24:
	adrp	x1, l_.str.7@PAGE
Lloh25:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_12
LBB0_22:
	ldr	w0, [x19]
	bl	_of_get_phy_mode
	tbnz	w0, #31, LBB0_10
; %bb.23:
	str	w0, [x20]
Lloh26:
	adrp	x8, _STMMAC_RX_COE_TYPE2@GOTPAGE
Lloh27:
	ldr	x8, [x8, _STMMAC_RX_COE_TYPE2@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [x20, #48]
	movi.2s	v0, #1
	stur	d0, [x20, #4]
Lloh29:
	adrp	x8, _sun8i_dwmac_init@GOTPAGE
Lloh30:
	ldr	x8, [x8, _sun8i_dwmac_init@GOTPAGEOFF]
Lloh31:
	adrp	x9, _sun8i_dwmac_exit@GOTPAGE
Lloh32:
	ldr	x9, [x9, _sun8i_dwmac_exit@GOTPAGEOFF]
	stp	x8, x21, [x20, #16]
	str	x9, [x20, #40]
Lloh33:
	adrp	x8, _sun8i_dwmac_setup@GOTPAGE
Lloh34:
	ldr	x8, [x8, _sun8i_dwmac_setup@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	str	w8, [x20, #32]
	mov	x0, x19
	mov	x1, x21
	bl	_sun8i_dwmac_init
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.24:
	add	x2, sp, #24
	mov	x0, x19
	mov	x1, x20
	bl	_stmmac_dvr_probe
	mov	x22, x0
	cbz	w0, LBB0_26
LBB0_25:
	ldr	x1, [x20, #24]
	mov	x0, x19
	bl	_sun8i_dwmac_exit
	b	LBB0_12
LBB0_26:
	mov	x0, x19
	bl	_dev_get_drvdata
	bl	_netdev_priv
	ldr	x8, [x21]
	ldr	x8, [x8]
	cbz	x8, LBB0_30
; %bb.27:
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	bl	_get_ephy_nodes
	mov	x22, x0
	cbnz	w0, LBB0_25
; %bb.28:
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_sun8i_dwmac_register_mdio_mux
	mov	x22, x0
	cbz	w0, LBB0_12
; %bb.29:
Lloh36:
	adrp	x1, l_.str.8@PAGE
Lloh37:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x21
	bl	_sun8i_dwmac_unset_syscon
	b	LBB0_25
LBB0_30:
	bl	_sun8i_dwmac_reset
	mov	x22, x0
	cbnz	w0, LBB0_25
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh36, Lloh37
	.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	"Missing dwmac-sun8i variant\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"stmmaceth"

l_.str.2:                               ; @.str.2
	.asciz	"Could not get TX clock\n"

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

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.4:                               ; @.str.4
	.asciz	"No regulator found\n"

l_.str.5:                               ; @.str.5
	.asciz	"syscon"

l_.str.6:                               ; @.str.6
	.asciz	"Unable to map syscon: %d\n"

l_.str.7:                               ; @.str.7
	.asciz	"Unable to map syscon register: %d\n"

	.comm	_STMMAC_RX_COE_TYPE2,4,2        ; @STMMAC_RX_COE_TYPE2
	.comm	_sun8i_dwmac_setup,4,2          ; @sun8i_dwmac_setup
l_.str.8:                               ; @.str.8
	.asciz	"Failed to register mux\n"

	.no_dead_strip	_sun8i_dwmac_probe
.subsections_via_symbols
