	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ael2020_reset
_ael2020_reset:                         ## @ael2020_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_MDIO_MMD_PMAPMD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_MDIO_PMA_LASI_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-20(%rbp), %rcx
	callq	_t3_mdio_read
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	$125, %edx
	callq	_t3_phy_reset
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	movl	$100, %edi
	callq	_msleep
	movq	_edc_none@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_ael2020_reset_regs@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_set_phy_regs
	testl	%eax, %eax
	je	LBB0_3
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ael2020_get_module_type
	testl	%eax, %eax
	js	LBB0_11
## %bb.4:
	movl	%eax, %ecx
	movq	%rcx, (%r14)
	movq	_phy_modtype_twinax@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.5:
	movq	_phy_modtype_twinax_long@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.7:
	movq	%r14, %rdi
	callq	_ael2020_setup_sr_edc
	jmp	LBB0_8
LBB0_6:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ael2020_setup_twinax_edc
LBB0_8:
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	xorl	%eax, %eax
	testb	$1, -20(%rbp)
	je	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_ael2005_intr_enable
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_MMD_PMAPMD,4,2            ## @MDIO_MMD_PMAPMD
	.comm	_MDIO_PMA_LASI_CTRL,4,2         ## @MDIO_PMA_LASI_CTRL
	.comm	_edc_none,4,2                   ## @edc_none
	.comm	_ael2020_reset_regs,4,2         ## @ael2020_reset_regs
	.comm	_phy_modtype_twinax,4,2         ## @phy_modtype_twinax
	.comm	_phy_modtype_twinax_long,4,2    ## @phy_modtype_twinax_long
	.no_dead_strip	_ael2020_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ael2020_reset
_ael2020_reset:                         ; @ael2020_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _MDIO_MMD_PMAPMD@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MDIO_MMD_PMAPMD@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _MDIO_PMA_LASI_CTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MDIO_PMA_LASI_CTRL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x3, sp, #12
	bl	_t3_mdio_read
	mov	x1, x0
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #125
	bl	_t3_phy_reset
	mov	x1, x0
	cbnz	w0, LBB0_3
; %bb.2:
	mov	w0, #100
	bl	_msleep
Lloh5:
	adrp	x8, _edc_none@GOTPAGE
Lloh6:
	ldr	x8, [x8, _edc_none@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #8]
Lloh8:
	adrp	x8, _ael2020_reset_regs@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ael2020_reset_regs@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_set_phy_regs
	mov	x1, x0
	cbz	w0, LBB0_4
LBB0_3:
	mov	x0, x1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	mov	x0, x19
	bl	_ael2020_get_module_type
	mov	x1, x0
	tbnz	w0, #31, LBB0_3
; %bb.5:
	mov	w8, w1
	str	x8, [x19]
Lloh11:
	adrp	x8, _phy_modtype_twinax@GOTPAGE
Lloh12:
	ldr	x8, [x8, _phy_modtype_twinax@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _phy_modtype_twinax_long@GOTPAGE
Lloh15:
	ldr	x9, [x9, _phy_modtype_twinax_long@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w1, w8
	mov	x0, x19
	ccmp	w1, w9, #4, ne
	b.ne	LBB0_7
; %bb.6:
	bl	_ael2020_setup_twinax_edc
	b	LBB0_8
LBB0_7:
	bl	_ael2020_setup_sr_edc
LBB0_8:
	mov	x1, x0
	cbnz	w0, LBB0_3
; %bb.9:
	ldrb	w8, [sp, #12]
	tbnz	w8, #0, LBB0_11
; %bb.10:
	mov	w1, #0
	b	LBB0_3
LBB0_11:
	mov	x0, x19
	bl	_ael2005_intr_enable
	mov	x1, x0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_MMD_PMAPMD,4,2            ; @MDIO_MMD_PMAPMD
	.comm	_MDIO_PMA_LASI_CTRL,4,2         ; @MDIO_PMA_LASI_CTRL
	.comm	_edc_none,4,2                   ; @edc_none
	.comm	_ael2020_reset_regs,4,2         ; @ael2020_reset_regs
	.comm	_phy_modtype_twinax,4,2         ; @phy_modtype_twinax
	.comm	_phy_modtype_twinax_long,4,2    ; @phy_modtype_twinax_long
	.no_dead_strip	_ael2020_reset
.subsections_via_symbols
