	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ax88772_hw_reset
_ax88772_hw_reset:                      ## @ax88772_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_AX_GPIO_RSE@GOTPCREL(%rip), %rcx
	movq	_AX_GPIO_GPO_2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_AX_GPIO_GPO2EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, %esi
	movl	$5, %edx
	movl	%r14d, %ecx
	callq	_asix_write_gpio
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movl	8(%r15), %ebx
	andl	$31, %ebx
	xorl	%edx, %edx
	cmpl	$16, %ebx
	sete	%dl
	movq	_AX_CMD_SW_PHY_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, (%rsp)
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_asix_write_cmd
	testl	%eax, %eax
	js	LBB0_8
## %bb.2:
	movq	_AX_SWRESET_IPPD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	$16, %ebx
	jne	LBB0_10
## %bb.3:
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_asix_sw_reset
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
	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_7
## %bb.5:
	movl	$60, %edi
	callq	_msleep
	movq	_AX_SWRESET_IPRL@GOTPCREL(%rip), %rax
	movq	_AX_SWRESET_PRL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	jmp	LBB0_6
LBB0_8:
	movl	%eax, %r13d
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
LBB0_9:
	movl	%r13d, %edx
	callq	_netdev_dbg
	jmp	LBB0_20
LBB0_10:
	movq	_AX_SWRESET_PRL@GOTPCREL(%rip), %rax
LBB0_6:
	orl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_asix_sw_reset
	testl	%eax, %eax
	js	LBB0_7
## %bb.11:
	movl	$150, %edi
	callq	_msleep
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.12:
	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_19
LBB0_13:
	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_7
## %bb.14:
	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_7
## %bb.15:
	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_21
## %bb.16:
	movq	(%r15), %rax
	movq	12(%r15), %rdi
	movl	(%rax), %esi
	callq	_ether_addr_copy
	movq	_AX_CMD_WRITE_NODE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %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_7
## %bb.17:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_asix_write_rx_ctl
	testl	%eax, %eax
	js	LBB0_7
## %bb.18:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_asix_read_rx_ctl
	movq	(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_netdev_dbg
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_asix_read_medium_status
	movq	(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	callq	_netdev_dbg
	xorl	%r13d, %r13d
	jmp	LBB0_20
LBB0_7:
	movl	%eax, %r13d
LBB0_20:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_20
LBB0_21:
	movl	%eax, %r13d
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_AX_GPIO_RSE,4,2                ## @AX_GPIO_RSE
	.comm	_AX_GPIO_GPO_2,4,2              ## @AX_GPIO_GPO_2
	.comm	_AX_GPIO_GPO2EN,4,2             ## @AX_GPIO_GPO2EN
	.comm	_AX_CMD_SW_PHY_SELECT,4,2       ## @AX_CMD_SW_PHY_SELECT
	.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_CLEAR,4,2           ## @AX_SWRESET_CLEAR
	.comm	_AX_SWRESET_IPRL,4,2            ## @AX_SWRESET_IPRL
	.comm	_AX_SWRESET_PRL,4,2             ## @AX_SWRESET_PRL
	.comm	_MII_PHYSID1,4,2                ## @MII_PHYSID1
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AX_DEFAULT_RX_CTL,4,2          ## @AX_DEFAULT_RX_CTL
	.comm	_AX88772_MEDIUM_DEFAULT,4,2     ## @AX88772_MEDIUM_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.1:                               ## @.str.1
	.asciz	"Write IPG,IPG1,IPG2 failed: %d\n"

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

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

	.no_dead_strip	_ax88772_hw_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ax88772_hw_reset
_ax88772_hw_reset:                      ; @ax88772_hw_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _AX_GPIO_RSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AX_GPIO_RSE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AX_GPIO_GPO_2@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AX_GPIO_GPO_2@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _AX_GPIO_GPO2EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AX_GPIO_GPO2EN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w2, #5
	mov	x3, x20
	bl	_asix_write_gpio
	tbnz	w0, #31, LBB0_18
; %bb.1:
	ldr	w8, [x19, #8]
	and	w22, w8, #0x1f
	cmp	w22, #16
	cset	w2, eq
Lloh9:
	adrp	x8, _AX_CMD_SW_PHY_SELECT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AX_CMD_SW_PHY_SELECT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #0
	mov	x5, #0
	mov	x6, x20
	bl	_asix_write_cmd
	tbnz	w0, #31, LBB0_6
; %bb.2:
Lloh12:
	adrp	x8, _AX_SWRESET_IPPD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AX_SWRESET_IPPD@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	cmp	w22, #16
	b.ne	LBB0_8
; %bb.3:
	mov	x0, x19
	mov	x2, x20
	bl	_asix_sw_reset
	tbnz	w0, #31, LBB0_18
; %bb.4:
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
Lloh15:
	adrp	x8, _AX_SWRESET_CLEAR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AX_SWRESET_CLEAR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_asix_sw_reset
	tbnz	w0, #31, LBB0_18
; %bb.5:
	mov	w0, #60
	bl	_msleep
Lloh18:
	adrp	x8, _AX_SWRESET_IPRL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AX_SWRESET_IPRL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _AX_SWRESET_PRL@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AX_SWRESET_PRL@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w1, w9, w8
	b	LBB0_9
LBB0_6:
	mov	x21, x0
	ldr	x0, [x19]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
LBB0_7:
	mov	x2, x21
	bl	_netdev_dbg
	b	LBB0_19
LBB0_8:
Lloh26:
	adrp	x8, _AX_SWRESET_PRL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AX_SWRESET_PRL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	orr	w1, w8, w1
LBB0_9:
	mov	x0, x19
	mov	x2, x20
	bl	_asix_sw_reset
	tbnz	w0, #31, LBB0_18
; %bb.10:
	mov	w0, #150
	bl	_msleep
	cbz	w20, LBB0_12
; %bb.11:
	ldr	x0, [x19]
	ldr	w1, [x19, #8]
Lloh29:
	adrp	x8, _MII_PHYSID1@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MII_PHYSID1@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	bl	_asix_mdio_read_nopm
	cbz	w0, LBB0_20
LBB0_12:
Lloh32:
	adrp	x22, _AX_DEFAULT_RX_CTL@GOTPAGE
Lloh33:
	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_18
; %bb.13:
Lloh34:
	adrp	x8, _AX88772_MEDIUM_DEFAULT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _AX88772_MEDIUM_DEFAULT@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_asix_write_medium_mode
	tbnz	w0, #31, LBB0_18
; %bb.14:
Lloh37:
	adrp	x8, _AX_CMD_WRITE_IPG0@GOTPAGE
Lloh38:
	ldr	x8, [x8, _AX_CMD_WRITE_IPG0@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
Lloh40:
	adrp	x8, _AX88772_IPG0_DEFAULT@GOTPAGE
Lloh41:
	ldr	x8, [x8, _AX88772_IPG0_DEFAULT@GOTPAGEOFF]
Lloh42:
	adrp	x9, _AX88772_IPG1_DEFAULT@GOTPAGE
Lloh43:
	ldr	x9, [x9, _AX88772_IPG1_DEFAULT@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
Lloh45:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh46:
	adrp	x8, _AX88772_IPG2_DEFAULT@GOTPAGE
Lloh47:
	ldr	x8, [x8, _AX88772_IPG2_DEFAULT@GOTPAGEOFF]
Lloh48:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w4, #0
	mov	x5, #0
	mov	x6, x20
	bl	_asix_write_cmd
	tbnz	w0, #31, LBB0_21
; %bb.15:
	ldur	x0, [x19, #12]
	ldr	x8, [x19]
	ldr	w1, [x8]
	bl	_ether_addr_copy
Lloh49:
	adrp	x8, _AX_CMD_WRITE_NODE_ID@GOTPAGE
Lloh50:
	ldr	x8, [x8, _AX_CMD_WRITE_NODE_ID@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
Lloh52:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh53:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh54:
	ldr	w4, [x8]
	ldur	x5, [x19, #12]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	x6, x20
	bl	_asix_write_cmd
	tbnz	w0, #31, LBB0_18
; %bb.16:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_asix_write_rx_ctl
	tbnz	w0, #31, LBB0_18
; %bb.17:
	mov	x0, x19
	mov	x1, x20
	bl	_asix_read_rx_ctl
	mov	x2, x0
	ldr	x0, [x19]
Lloh55:
	adrp	x1, l_.str.2@PAGE
Lloh56:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_dbg
	mov	x0, x19
	mov	x1, x20
	bl	_asix_read_medium_status
	mov	x2, x0
	ldr	x0, [x19]
Lloh57:
	adrp	x1, l_.str.3@PAGE
Lloh58:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_netdev_dbg
	mov	w21, #0
	b	LBB0_19
LBB0_18:
	mov	x21, x0
LBB0_19:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_20:
Lloh59:
	adrp	x8, _EIO@GOTPAGE
Lloh60:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh61:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_19
LBB0_21:
	mov	x21, x0
	ldr	x0, [x19]
Lloh62:
	adrp	x1, l_.str.1@PAGE
Lloh63:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh44
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpAdd	Lloh62, Lloh63
	.cfi_endproc
                                        ; -- End function
	.comm	_AX_GPIO_RSE,4,2                ; @AX_GPIO_RSE
	.comm	_AX_GPIO_GPO_2,4,2              ; @AX_GPIO_GPO_2
	.comm	_AX_GPIO_GPO2EN,4,2             ; @AX_GPIO_GPO2EN
	.comm	_AX_CMD_SW_PHY_SELECT,4,2       ; @AX_CMD_SW_PHY_SELECT
	.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_CLEAR,4,2           ; @AX_SWRESET_CLEAR
	.comm	_AX_SWRESET_IPRL,4,2            ; @AX_SWRESET_IPRL
	.comm	_AX_SWRESET_PRL,4,2             ; @AX_SWRESET_PRL
	.comm	_MII_PHYSID1,4,2                ; @MII_PHYSID1
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AX_DEFAULT_RX_CTL,4,2          ; @AX_DEFAULT_RX_CTL
	.comm	_AX88772_MEDIUM_DEFAULT,4,2     ; @AX88772_MEDIUM_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.1:                               ; @.str.1
	.asciz	"Write IPG,IPG1,IPG2 failed: %d\n"

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

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

	.no_dead_strip	_ax88772_hw_reset
.subsections_via_symbols
