	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ax88772a_hw_reset
_ax88772a_hw_reset:                     ## @ax88772a_hw_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	%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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	$0, -44(%rbp)
	movq	_AX_GPIO_RSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$5, %edx
	movl	%r14d, %ecx
	callq	_asix_write_gpio
	testl	%eax, %eax
	js	LBB0_39
## %bb.1:
	movl	8(%r15), %eax
	andl	$31, %eax
	xorl	%edx, %edx
	cmpl	$16, %eax
	sete	%dl
	movq	_AX_CMD_SW_PHY_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AX_PHYSEL_SSEN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%r14d, (%rsp)
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_asix_write_cmd
	testl	%eax, %eax
	js	LBB0_13
## %bb.2:
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	movq	_AX_SWRESET_IPPD@GOTPCREL(%rip), %rax
	movq	_AX_SWRESET_IPRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	orl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_asix_sw_reset
	testl	%eax, %eax
	js	LBB0_39
## %bb.3:
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_asix_sw_reset
	testl	%eax, %eax
	js	LBB0_39
## %bb.4:
	movl	$160, %edi
	callq	_msleep
	movq	_AX_SWRESET_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_asix_sw_reset
	testl	%eax, %eax
	js	LBB0_39
## %bb.5:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_asix_sw_reset
	testl	%eax, %eax
	js	LBB0_39
## %bb.6:
	movl	$200, %edi
	callq	_msleep
	testl	%r14d, %r14d
	je	LBB0_8
## %bb.7:
	movq	(%r15), %rdi
	movl	8(%r15), %esi
	movq	_MII_PHYSID1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_asix_mdio_read_nopm
	testl	%eax, %eax
	je	LBB0_34
LBB0_8:
	movq	_AX_CMD_STATMNGSTS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, (%rsp)
	leaq	-44(%rbp), %r9
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_asix_read_cmd
	testl	%eax, %eax
	js	LBB0_39
## %bb.9:
	movq	_AX_CHIPCODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax
	movq	_AX_AX88772B_CHIPCODE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_21
## %bb.10:
	movq	_AX_QCTCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, (%rsp)
	movq	%r15, %rdi
	movl	$32768, %edx                    ## imm = 0x8000
	movl	$32769, %ecx                    ## imm = 0x8001
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_asix_write_cmd
	testl	%eax, %eax
	jns	LBB0_28
## %bb.11:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_14
LBB0_13:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
LBB0_14:
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_netdev_dbg
	jmp	LBB0_40
LBB0_21:
	movq	_AX_AX88772A_CHIPCODE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_28
## %bb.22:
	movq	(%r15), %rdi
	movl	8(%r15), %esi
	movq	_AX88772A_PHY14H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_asix_mdio_read_nopm
	movl	%eax, %ebx
	movq	(%r15), %rdi
	movl	8(%r15), %esi
	movq	_AX88772A_PHY15H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_asix_mdio_read_nopm
	movl	%eax, %r13d
	movq	(%r15), %rdi
	movl	8(%r15), %esi
	movq	_AX88772A_PHY16H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_asix_mdio_read_nopm
	movl	%eax, %r12d
	movq	(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_netdev_dbg
	movq	_AX88772A_PHY14H_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %ebx
	je	LBB0_24
## %bb.23:
	movq	(%r15), %rdi
	movl	8(%r15), %esi
	movq	_AX88772A_PHY14H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_asix_mdio_write_nopm
LBB0_24:
	movq	_AX88772A_PHY15H_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r13d
	je	LBB0_26
## %bb.25:
	movq	(%r15), %rdi
	movl	8(%r15), %esi
	movq	_AX88772A_PHY15H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_asix_mdio_write_nopm
LBB0_26:
	movq	_AX88772A_PHY16H_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r12d
	je	LBB0_28
## %bb.27:
	movq	(%r15), %rdi
	movl	8(%r15), %esi
	movq	_AX88772A_PHY16H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_asix_mdio_write_nopm
LBB0_28:
	movq	_AX_CMD_WRITE_IPG0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AX88772_IPG0_DEFAULT@GOTPCREL(%rip), %rax
	movq	_AX88772_IPG1_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_AX88772_IPG2_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, (%rsp)
	movq	%r15, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_asix_write_cmd
	testl	%eax, %eax
	js	LBB0_35
## %bb.29:
	movq	(%r15), %rax
	movq	12(%r15), %rdi
	movl	(%rax), %esi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	callq	_memcpy
	movq	_AX_CMD_WRITE_NODE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %r8d
	movq	12(%r15), %r9
	movl	%r14d, (%rsp)
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_asix_write_cmd
	testl	%eax, %eax
	js	LBB0_39
## %bb.30:
	movq	_AX_DEFAULT_RX_CTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_asix_write_rx_ctl
	testl	%eax, %eax
	js	LBB0_39
## %bb.31:
	movq	_AX88772_MEDIUM_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_asix_write_medium_mode
	testl	%eax, %eax
	js	LBB0_39
## %bb.32:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_asix_write_rx_ctl
	testl	%eax, %eax
	js	LBB0_39
## %bb.33:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_asix_read_rx_ctl
	movq	(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_netdev_dbg
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_asix_read_medium_status
	movq	(%r15), %rdi
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_14
LBB0_39:
	movl	%eax, %ebx
LBB0_40:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_34:
	movl	$-1, %ebx
	jmp	LBB0_40
LBB0_35:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_AX_GPIO_RSE,4,2                ## @AX_GPIO_RSE
	.comm	_AX_CMD_SW_PHY_SELECT,4,2       ## @AX_CMD_SW_PHY_SELECT
	.comm	_AX_PHYSEL_SSEN,4,2             ## @AX_PHYSEL_SSEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Select PHY #1 failed: %d\n"

	.comm	_AX_SWRESET_IPPD,4,2            ## @AX_SWRESET_IPPD
	.comm	_AX_SWRESET_IPRL,4,2            ## @AX_SWRESET_IPRL
	.comm	_AX_SWRESET_CLEAR,4,2           ## @AX_SWRESET_CLEAR
	.comm	_MII_PHYSID1,4,2                ## @MII_PHYSID1
	.comm	_AX_CMD_STATMNGSTS_REG,4,2      ## @AX_CMD_STATMNGSTS_REG
	.comm	_AX_CHIPCODE_MASK,4,2           ## @AX_CHIPCODE_MASK
	.comm	_AX_AX88772B_CHIPCODE,4,2       ## @AX_AX88772B_CHIPCODE
	.comm	_AX_QCTCTRL,4,2                 ## @AX_QCTCTRL
L_.str.1:                               ## @.str.1
	.asciz	"Write BQ setting failed: %d\n"

	.comm	_AX_AX88772A_CHIPCODE,4,2       ## @AX_AX88772A_CHIPCODE
	.comm	_AX88772A_PHY14H,4,2            ## @AX88772A_PHY14H
	.comm	_AX88772A_PHY15H,4,2            ## @AX88772A_PHY15H
	.comm	_AX88772A_PHY16H,4,2            ## @AX88772A_PHY16H
L_.str.2:                               ## @.str.2
	.asciz	"772a_hw_reset: MR20=0x%x MR21=0x%x MR22=0x%x\n"

	.comm	_AX88772A_PHY14H_DEFAULT,4,2    ## @AX88772A_PHY14H_DEFAULT
	.comm	_AX88772A_PHY15H_DEFAULT,4,2    ## @AX88772A_PHY15H_DEFAULT
	.comm	_AX88772A_PHY16H_DEFAULT,4,2    ## @AX88772A_PHY16H_DEFAULT
	.comm	_AX_CMD_WRITE_IPG0,4,2          ## @AX_CMD_WRITE_IPG0
	.comm	_AX88772_IPG0_DEFAULT,4,2       ## @AX88772_IPG0_DEFAULT
	.comm	_AX88772_IPG1_DEFAULT,4,2       ## @AX88772_IPG1_DEFAULT
	.comm	_AX88772_IPG2_DEFAULT,4,2       ## @AX88772_IPG2_DEFAULT
L_.str.3:                               ## @.str.3
	.asciz	"Write IPG,IPG1,IPG2 failed: %d\n"

	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_AX_CMD_WRITE_NODE_ID,4,2       ## @AX_CMD_WRITE_NODE_ID
	.comm	_AX_DEFAULT_RX_CTL,4,2          ## @AX_DEFAULT_RX_CTL
	.comm	_AX88772_MEDIUM_DEFAULT,4,2     ## @AX88772_MEDIUM_DEFAULT
L_.str.4:                               ## @.str.4
	.asciz	"RX_CTL is 0x%04x after all initializations\n"

L_.str.5:                               ## @.str.5
	.asciz	"Medium Status is 0x%04x after all initializations\n"

	.no_dead_strip	_ax88772a_hw_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ax88772a_hw_reset
_ax88772a_hw_reset:                     ; @ax88772a_hw_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	str	wzr, [sp, #28]
Lloh0:
	adrp	x8, _AX_GPIO_RSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AX_GPIO_RSE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #5
	mov	x3, x20
	bl	_asix_write_gpio
	tbnz	w0, #31, LBB0_27
; %bb.1:
	ldr	w8, [x19, #8]
	and	w8, w8, #0x1f
	cmp	w8, #16
Lloh3:
	adrp	x8, _AX_CMD_SW_PHY_SELECT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AX_CMD_SW_PHY_SELECT@GOTPAGEOFF]
	cset	w9, eq
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _AX_PHYSEL_SSEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AX_PHYSEL_SSEN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w2, w8, w9
	mov	x0, x19
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	mov	x6, x20
	bl	_asix_write_cmd
	tbnz	w0, #31, LBB0_12
; %bb.2:
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
Lloh9:
	adrp	x8, _AX_SWRESET_IPPD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AX_SWRESET_IPPD@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x22, _AX_SWRESET_IPRL@GOTPAGE
Lloh13:
	ldr	x22, [x22, _AX_SWRESET_IPRL@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w1, w9, w8
	mov	x0, x19
	mov	x2, x20
	bl	_asix_sw_reset
	tbnz	w0, #31, LBB0_27
; %bb.3:
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_asix_sw_reset
	tbnz	w0, #31, LBB0_27
; %bb.4:
	mov	w0, #160
	bl	_msleep
Lloh14:
	adrp	x8, _AX_SWRESET_CLEAR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AX_SWRESET_CLEAR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_asix_sw_reset
	tbnz	w0, #31, LBB0_27
; %bb.5:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_asix_sw_reset
	tbnz	w0, #31, LBB0_27
; %bb.6:
	mov	w0, #200
	bl	_msleep
	cbz	w20, LBB0_8
; %bb.7:
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
Lloh17:
	adrp	x8, _MII_PHYSID1@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MII_PHYSID1@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	bl	_asix_mdio_read_nopm
	cbz	w0, LBB0_29
LBB0_8:
Lloh20:
	adrp	x8, _AX_CMD_STATMNGSTS_REG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AX_CMD_STATMNGSTS_REG@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x5, sp, #28
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #1
	mov	x6, x20
	bl	_asix_read_cmd
	tbnz	w0, #31, LBB0_27
; %bb.9:
	ldr	w8, [sp, #28]
Lloh23:
	adrp	x9, _AX_CHIPCODE_MASK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _AX_CHIPCODE_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh26:
	adrp	x9, _AX_AX88772B_CHIPCODE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _AX_AX88772B_CHIPCODE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.10:
Lloh29:
	adrp	x8, _AX_QCTCTRL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AX_QCTCTRL@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #32768
	mov	w3, #32769
	mov	w4, #0
	mov	x5, #0
	mov	x6, x20
	bl	_asix_write_cmd
	tbz	w0, #31, LBB0_21
; %bb.11:
	mov	x21, x0
	ldr	x0, [x19]
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_12:
	mov	x21, x0
	ldr	x0, [x19]
Lloh34:
	adrp	x1, l_.str@PAGE
Lloh35:
	add	x1, x1, l_.str@PAGEOFF
LBB0_13:
	mov	x2, x21
	bl	_netdev_dbg
	b	LBB0_28
LBB0_14:
Lloh36:
	adrp	x9, _AX_AX88772A_CHIPCODE@GOTPAGE
Lloh37:
	ldr	x9, [x9, _AX_AX88772A_CHIPCODE@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_21
; %bb.15:
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
Lloh39:
	adrp	x26, _AX88772A_PHY14H@GOTPAGE
Lloh40:
	ldr	x26, [x26, _AX88772A_PHY14H@GOTPAGEOFF]
	ldr	w2, [x26]
	bl	_asix_mdio_read_nopm
	mov	x23, x0
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
Lloh41:
	adrp	x25, _AX88772A_PHY15H@GOTPAGE
Lloh42:
	ldr	x25, [x25, _AX88772A_PHY15H@GOTPAGEOFF]
	ldr	w2, [x25]
	bl	_asix_mdio_read_nopm
	mov	x22, x0
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
Lloh43:
	adrp	x24, _AX88772A_PHY16H@GOTPAGE
Lloh44:
	ldr	x24, [x24, _AX88772A_PHY16H@GOTPAGEOFF]
	ldr	w2, [x24]
	bl	_asix_mdio_read_nopm
	mov	x21, x0
	ldr	x0, [x19]
	stp	x22, x21, [sp]
Lloh45:
	adrp	x1, l_.str.2@PAGE
Lloh46:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	bl	_netdev_dbg
Lloh47:
	adrp	x8, _AX88772A_PHY14H_DEFAULT@GOTPAGE
Lloh48:
	ldr	x8, [x8, _AX88772A_PHY14H_DEFAULT@GOTPAGEOFF]
Lloh49:
	ldr	w3, [x8]
	cmp	w23, w3
	b.eq	LBB0_17
; %bb.16:
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
	ldr	w2, [x26]
	bl	_asix_mdio_write_nopm
LBB0_17:
Lloh50:
	adrp	x8, _AX88772A_PHY15H_DEFAULT@GOTPAGE
Lloh51:
	ldr	x8, [x8, _AX88772A_PHY15H_DEFAULT@GOTPAGEOFF]
Lloh52:
	ldr	w3, [x8]
	cmp	w22, w3
	b.eq	LBB0_19
; %bb.18:
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
	ldr	w2, [x25]
	bl	_asix_mdio_write_nopm
LBB0_19:
Lloh53:
	adrp	x8, _AX88772A_PHY16H_DEFAULT@GOTPAGE
Lloh54:
	ldr	x8, [x8, _AX88772A_PHY16H_DEFAULT@GOTPAGEOFF]
Lloh55:
	ldr	w3, [x8]
	cmp	w21, w3
	b.eq	LBB0_21
; %bb.20:
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
	ldr	w2, [x24]
	bl	_asix_mdio_write_nopm
LBB0_21:
Lloh56:
	adrp	x8, _AX_CMD_WRITE_IPG0@GOTPAGE
Lloh57:
	ldr	x8, [x8, _AX_CMD_WRITE_IPG0@GOTPAGEOFF]
Lloh58:
	ldr	w1, [x8]
Lloh59:
	adrp	x8, _AX88772_IPG0_DEFAULT@GOTPAGE
Lloh60:
	ldr	x8, [x8, _AX88772_IPG0_DEFAULT@GOTPAGEOFF]
Lloh61:
	adrp	x9, _AX88772_IPG1_DEFAULT@GOTPAGE
Lloh62:
	ldr	x9, [x9, _AX88772_IPG1_DEFAULT@GOTPAGEOFF]
Lloh63:
	ldr	w8, [x8]
Lloh64:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh65:
	adrp	x8, _AX88772_IPG2_DEFAULT@GOTPAGE
Lloh66:
	ldr	x8, [x8, _AX88772_IPG2_DEFAULT@GOTPAGEOFF]
Lloh67:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w4, #0
	mov	x5, #0
	mov	x6, x20
	bl	_asix_write_cmd
	tbnz	w0, #31, LBB0_30
; %bb.22:
	ldur	x0, [x19, #12]
	ldr	x8, [x19]
	ldr	w1, [x8]
Lloh68:
	adrp	x21, _ETH_ALEN@GOTPAGE
Lloh69:
	ldr	x21, [x21, _ETH_ALEN@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_memcpy
Lloh70:
	adrp	x8, _AX_CMD_WRITE_NODE_ID@GOTPAGE
Lloh71:
	ldr	x8, [x8, _AX_CMD_WRITE_NODE_ID@GOTPAGEOFF]
Lloh72:
	ldr	w1, [x8]
	ldr	w4, [x21]
	ldur	x5, [x19, #12]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	x6, x20
	bl	_asix_write_cmd
	tbnz	w0, #31, LBB0_27
; %bb.23:
Lloh73:
	adrp	x22, _AX_DEFAULT_RX_CTL@GOTPAGE
Lloh74:
	ldr	x22, [x22, _AX_DEFAULT_RX_CTL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_asix_write_rx_ctl
	tbnz	w0, #31, LBB0_27
; %bb.24:
Lloh75:
	adrp	x8, _AX88772_MEDIUM_DEFAULT@GOTPAGE
Lloh76:
	ldr	x8, [x8, _AX88772_MEDIUM_DEFAULT@GOTPAGEOFF]
Lloh77:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_asix_write_medium_mode
	tbnz	w0, #31, LBB0_27
; %bb.25:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_asix_write_rx_ctl
	tbnz	w0, #31, LBB0_27
; %bb.26:
	mov	x0, x19
	mov	x1, x20
	bl	_asix_read_rx_ctl
	mov	x2, x0
	ldr	x0, [x19]
Lloh78:
	adrp	x1, l_.str.4@PAGE
Lloh79:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_netdev_dbg
	mov	x0, x19
	mov	x1, x20
	bl	_asix_read_medium_status
	mov	x2, x0
	ldr	x0, [x19]
Lloh80:
	adrp	x1, l_.str.5@PAGE
Lloh81:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_netdev_dbg
	mov	w21, #0
	b	LBB0_28
LBB0_27:
	mov	x21, x0
LBB0_28:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_29:
	mov	w21, #-1
	b	LBB0_28
LBB0_30:
	mov	x21, x0
	ldr	x0, [x19]
Lloh82:
	adrp	x1, l_.str.3@PAGE
Lloh83:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh63
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGot	Lloh68, Lloh69
	.loh AdrpLdrGot	Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpAdd	Lloh78, Lloh79
	.loh AdrpAdd	Lloh82, Lloh83
	.cfi_endproc
                                        ; -- End function
	.comm	_AX_GPIO_RSE,4,2                ; @AX_GPIO_RSE
	.comm	_AX_CMD_SW_PHY_SELECT,4,2       ; @AX_CMD_SW_PHY_SELECT
	.comm	_AX_PHYSEL_SSEN,4,2             ; @AX_PHYSEL_SSEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Select PHY #1 failed: %d\n"

	.comm	_AX_SWRESET_IPPD,4,2            ; @AX_SWRESET_IPPD
	.comm	_AX_SWRESET_IPRL,4,2            ; @AX_SWRESET_IPRL
	.comm	_AX_SWRESET_CLEAR,4,2           ; @AX_SWRESET_CLEAR
	.comm	_MII_PHYSID1,4,2                ; @MII_PHYSID1
	.comm	_AX_CMD_STATMNGSTS_REG,4,2      ; @AX_CMD_STATMNGSTS_REG
	.comm	_AX_CHIPCODE_MASK,4,2           ; @AX_CHIPCODE_MASK
	.comm	_AX_AX88772B_CHIPCODE,4,2       ; @AX_AX88772B_CHIPCODE
	.comm	_AX_QCTCTRL,4,2                 ; @AX_QCTCTRL
l_.str.1:                               ; @.str.1
	.asciz	"Write BQ setting failed: %d\n"

	.comm	_AX_AX88772A_CHIPCODE,4,2       ; @AX_AX88772A_CHIPCODE
	.comm	_AX88772A_PHY14H,4,2            ; @AX88772A_PHY14H
	.comm	_AX88772A_PHY15H,4,2            ; @AX88772A_PHY15H
	.comm	_AX88772A_PHY16H,4,2            ; @AX88772A_PHY16H
l_.str.2:                               ; @.str.2
	.asciz	"772a_hw_reset: MR20=0x%x MR21=0x%x MR22=0x%x\n"

	.comm	_AX88772A_PHY14H_DEFAULT,4,2    ; @AX88772A_PHY14H_DEFAULT
	.comm	_AX88772A_PHY15H_DEFAULT,4,2    ; @AX88772A_PHY15H_DEFAULT
	.comm	_AX88772A_PHY16H_DEFAULT,4,2    ; @AX88772A_PHY16H_DEFAULT
	.comm	_AX_CMD_WRITE_IPG0,4,2          ; @AX_CMD_WRITE_IPG0
	.comm	_AX88772_IPG0_DEFAULT,4,2       ; @AX88772_IPG0_DEFAULT
	.comm	_AX88772_IPG1_DEFAULT,4,2       ; @AX88772_IPG1_DEFAULT
	.comm	_AX88772_IPG2_DEFAULT,4,2       ; @AX88772_IPG2_DEFAULT
l_.str.3:                               ; @.str.3
	.asciz	"Write IPG,IPG1,IPG2 failed: %d\n"

	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_AX_CMD_WRITE_NODE_ID,4,2       ; @AX_CMD_WRITE_NODE_ID
	.comm	_AX_DEFAULT_RX_CTL,4,2          ; @AX_DEFAULT_RX_CTL
	.comm	_AX88772_MEDIUM_DEFAULT,4,2     ; @AX88772_MEDIUM_DEFAULT
l_.str.4:                               ; @.str.4
	.asciz	"RX_CTL is 0x%04x after all initializations\n"

l_.str.5:                               ; @.str.5
	.asciz	"Medium Status is 0x%04x after all initializations\n"

	.no_dead_strip	_ax88772a_hw_reset
.subsections_via_symbols
