	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun7i_gmac_probe
_sun7i_gmac_probe:                      ## @sun7i_gmac_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	-40(%rbp), %rsi
	callq	_stmmac_get_platform_resources
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	leaq	-40(%rbp), %rsi
	movq	%r12, %rdi
	callq	_stmmac_probe_config_dt
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movl	(%r12), %edi
	callq	_of_get_phy_mode
	movl	%eax, 16(%r15)
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_clk_get
	movq	%rax, 8(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	8(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_devm_regulator_get_optional
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	addl	(%rax), %ecx
	je	LBB0_14
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_info
	movq	$0, (%r15)
LBB0_10:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%r14)
	movq	%r15, 16(%r14)
	movq	_sun7i_gmac_init@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r14)
	movq	_sun7i_gmac_exit@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r14)
	movq	_sun7i_fix_speed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_sun7i_gmac_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.11:
	leaq	-40(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_stmmac_dvr_probe
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	%eax, %ebx
	movq	16(%r14), %rsi
	movq	%r12, %rdi
	callq	_sun7i_gmac_exit
LBB0_14:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_stmmac_remove_config_dt
LBB0_15:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.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	"allwinner_gmac_tx"

L_.str.1:                               ## @.str.1
	.asciz	"could not get tx clock\n"

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

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

	.comm	_sun7i_fix_speed,4,2            ## @sun7i_fix_speed
	.no_dead_strip	_sun7i_gmac_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun7i_gmac_probe
_sun7i_gmac_probe:                      ; @sun7i_gmac_probe
	.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	x19, x0
	add	x1, sp, #8
	bl	_stmmac_get_platform_resources
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	bl	_stmmac_probe_config_dt
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_14
LBB0_3:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.4:
	mov	x21, x0
	ldr	w0, [x19]
	bl	_of_get_phy_mode
	str	w0, [x21, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x21, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.5:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x21, #8]
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_13
LBB0_6:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_7:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_devm_regulator_get_optional
	str	x0, [x21]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.8:
	ldr	x0, [x21]
	bl	_PTR_ERR
	mov	x22, x0
Lloh12:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_13
; %bb.9:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	str	xzr, [x21]
LBB0_10:
	movi.2s	v0, #1
	str	d0, [x20]
Lloh17:
	adrp	x8, _sun7i_gmac_init@GOTPAGE
Lloh18:
	ldr	x8, [x8, _sun7i_gmac_init@GOTPAGEOFF]
Lloh19:
	adrp	x9, _sun7i_gmac_exit@GOTPAGE
Lloh20:
	ldr	x9, [x9, _sun7i_gmac_exit@GOTPAGEOFF]
	stp	x8, x21, [x20, #8]
	str	x9, [x20, #32]
Lloh21:
	adrp	x8, _sun7i_fix_speed@GOTPAGE
Lloh22:
	ldr	x8, [x8, _sun7i_fix_speed@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x20, #24]
	mov	x0, x19
	mov	x1, x21
	bl	_sun7i_gmac_init
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.11:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_stmmac_dvr_probe
	mov	x22, x0
	cbz	w0, LBB0_14
; %bb.12:
	ldr	x1, [x20, #16]
	mov	x0, x19
	bl	_sun7i_gmac_exit
LBB0_13:
	mov	x0, x19
	mov	x1, x20
	bl	_stmmac_remove_config_dt
LBB0_14:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.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	"allwinner_gmac_tx"

l_.str.1:                               ; @.str.1
	.asciz	"could not get tx clock\n"

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

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

	.comm	_sun7i_fix_speed,4,2            ; @sun7i_fix_speed
	.no_dead_strip	_sun7i_gmac_probe
.subsections_via_symbols
