	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ael2005_reset
_ael2005_reset:                         ## @ael2005_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_MDIO_PMA_LASI_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-12(%rbp), %rcx
	movl	$128, %esi
	callq	_t3_mdio_read
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movq	%rbx, %rdi
	movl	$128, %esi
	xorl	%edx, %edx
	callq	_t3_phy_reset
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movl	$125, %edi
	callq	_msleep
	movq	_edc_none@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	leaq	_ael2005_reset.regs0(%rip), %rsi
	movq	%rbx, %rdi
	callq	_set_phy_regs
	testl	%eax, %eax
	je	LBB0_3
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movl	$50, %edi
	callq	_msleep
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ael2005_get_module_type
	testl	%eax, %eax
	js	LBB0_12
## %bb.4:
	movl	%eax, (%rbx)
	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	%rbx, %rdi
	callq	_ael2005_setup_sr_edc
	jmp	LBB0_8
LBB0_6:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ael2005_setup_twinax_edc
LBB0_8:
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	leaq	_ael2005_reset.regs1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_set_phy_regs
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	xorl	%eax, %eax
	testb	$1, -12(%rbp)
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	_ael2005_intr_enable
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @ael2005_reset.regs0
_ael2005_reset.regs0:
	.long	128                             ## 0x80
	.long	49153                           ## 0xc001
	.long	0                               ## 0x0
	.long	32                              ## 0x20
	.long	128                             ## 0x80
	.long	49175                           ## 0xc017
	.long	0                               ## 0x0
	.long	32                              ## 0x20
	.long	128                             ## 0x80
	.long	49171                           ## 0xc013
	.long	65535                           ## 0xffff
	.long	62273                           ## 0xf341
	.long	128                             ## 0x80
	.long	49680                           ## 0xc210
	.long	65535                           ## 0xffff
	.long	32768                           ## 0x8000
	.long	128                             ## 0x80
	.long	49680                           ## 0xc210
	.long	65535                           ## 0xffff
	.long	33024                           ## 0x8100
	.long	128                             ## 0x80
	.long	49680                           ## 0xc210
	.long	65535                           ## 0xffff
	.long	32768                           ## 0x8000
	.long	128                             ## 0x80
	.long	49680                           ## 0xc210
	.long	65535                           ## 0xffff
	.long	0                               ## 0x0
	.space	16

	.p2align	4                               ## @ael2005_reset.regs1
_ael2005_reset.regs1:
	.long	128                             ## 0x80
	.long	51712                           ## 0xca00
	.long	65535                           ## 0xffff
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.long	51730                           ## 0xca12
	.long	65535                           ## 0xffff
	.long	0                               ## 0x0
	.space	16

	.comm	_MDIO_PMA_LASI_CTRL,4,2         ## @MDIO_PMA_LASI_CTRL
	.comm	_edc_none,4,2                   ## @edc_none
	.comm	_phy_modtype_twinax,4,2         ## @phy_modtype_twinax
	.comm	_phy_modtype_twinax_long,4,2    ## @phy_modtype_twinax_long
	.no_dead_strip	_ael2005_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ael2005_reset
_ael2005_reset:                         ; @ael2005_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	x8, _MDIO_PMA_LASI_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDIO_PMA_LASI_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	w1, #128
	bl	_t3_mdio_read
	mov	x1, x0
	cbnz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	mov	w1, #128
	mov	w2, #0
	bl	_t3_phy_reset
	mov	x1, x0
	cbnz	w0, LBB0_3
; %bb.2:
	mov	w0, #125
	bl	_msleep
Lloh3:
	adrp	x8, _edc_none@GOTPAGE
Lloh4:
	ldr	x8, [x8, _edc_none@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #4]
Lloh6:
	adrp	x1, _ael2005_reset.regs0@PAGE
Lloh7:
	add	x1, x1, _ael2005_reset.regs0@PAGEOFF
	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	w0, #50
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	bl	_ael2005_get_module_type
	mov	x1, x0
	tbnz	w0, #31, LBB0_3
; %bb.5:
	str	w1, [x19]
Lloh8:
	adrp	x8, _phy_modtype_twinax@GOTPAGE
Lloh9:
	ldr	x8, [x8, _phy_modtype_twinax@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _phy_modtype_twinax_long@GOTPAGE
Lloh12:
	ldr	x9, [x9, _phy_modtype_twinax_long@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w1, w8
	mov	x0, x19
	ccmp	w1, w9, #4, ne
	b.ne	LBB0_7
; %bb.6:
	bl	_ael2005_setup_twinax_edc
	b	LBB0_8
LBB0_7:
	bl	_ael2005_setup_sr_edc
LBB0_8:
	mov	x1, x0
	cbnz	w0, LBB0_3
; %bb.9:
Lloh14:
	adrp	x1, _ael2005_reset.regs1@PAGE
Lloh15:
	add	x1, x1, _ael2005_reset.regs1@PAGEOFF
	mov	x0, x19
	bl	_set_phy_regs
	mov	x1, x0
	cbnz	w0, LBB0_3
; %bb.10:
	ldrb	w8, [sp, #12]
	tbnz	w8, #0, LBB0_12
; %bb.11:
	mov	w1, #0
	b	LBB0_3
LBB0_12:
	mov	x0, x19
	bl	_ael2005_intr_enable
	mov	x1, x0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @ael2005_reset.regs0
_ael2005_reset.regs0:
	.long	128                             ; 0x80
	.long	49153                           ; 0xc001
	.long	0                               ; 0x0
	.long	32                              ; 0x20
	.long	128                             ; 0x80
	.long	49175                           ; 0xc017
	.long	0                               ; 0x0
	.long	32                              ; 0x20
	.long	128                             ; 0x80
	.long	49171                           ; 0xc013
	.long	65535                           ; 0xffff
	.long	62273                           ; 0xf341
	.long	128                             ; 0x80
	.long	49680                           ; 0xc210
	.long	65535                           ; 0xffff
	.long	32768                           ; 0x8000
	.long	128                             ; 0x80
	.long	49680                           ; 0xc210
	.long	65535                           ; 0xffff
	.long	33024                           ; 0x8100
	.long	128                             ; 0x80
	.long	49680                           ; 0xc210
	.long	65535                           ; 0xffff
	.long	32768                           ; 0x8000
	.long	128                             ; 0x80
	.long	49680                           ; 0xc210
	.long	65535                           ; 0xffff
	.long	0                               ; 0x0
	.space	16

	.p2align	2                               ; @ael2005_reset.regs1
_ael2005_reset.regs1:
	.long	128                             ; 0x80
	.long	51712                           ; 0xca00
	.long	65535                           ; 0xffff
	.long	128                             ; 0x80
	.long	128                             ; 0x80
	.long	51730                           ; 0xca12
	.long	65535                           ; 0xffff
	.long	0                               ; 0x0
	.space	16

	.comm	_MDIO_PMA_LASI_CTRL,4,2         ; @MDIO_PMA_LASI_CTRL
	.comm	_edc_none,4,2                   ; @edc_none
	.comm	_phy_modtype_twinax,4,2         ; @phy_modtype_twinax
	.comm	_phy_modtype_twinax_long,4,2    ; @phy_modtype_twinax_long
	.no_dead_strip	_ael2005_reset
.subsections_via_symbols
