	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_nway_reset
_hns3_nway_reset:                       ## @hns3_nway_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_hns3_get_handle
	movq	%rax, %r14
	movq	8(%rax), %rax
	movq	(%rax), %r12
	movq	(%rbx), %r15
	movq	%rbx, %rdi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	callq	_hns3_nic_resetting
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_netdev_err
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_2
LBB0_5:
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.6:
	movq	%r12, %rax
	cmpq	$0, 8(%r12)
	je	LBB0_7
## %bb.9:
	movq	%r14, %rdi
	callq	*%rcx
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.11:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testq	%r15, %r15
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str.2(%rip), %rcx
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_netif_dbg
	testq	%r15, %r15
	je	LBB0_12
## %bb.14:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_genphy_restart_aneg            ## TAILCALL
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_netdev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_12:
	movq	(%r14), %rax
	cmpl	$32, (%rax)
	jne	LBB0_13
LBB0_7:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r14, %rdi
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*8(%rax)                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dev resetting!"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_AUTONEG_ENABLE,4,2             ## @AUTONEG_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"Autoneg is off, don't support to restart it\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_drv,4,2                        ## @drv
L_.str.2:                               ## @.str.2
	.asciz	"nway reset (using %s)\n"

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

L_.str.4:                               ## @.str.4
	.asciz	"mac"

	.no_dead_strip	_hns3_nway_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_nway_reset
_hns3_nway_reset:                       ; @hns3_nway_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, x0
	bl	_hns3_get_handle
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x22, [x8]
	ldr	x21, [x20]
	mov	x0, x20
	bl	_netif_running
	cbz	w0, LBB0_12
; %bb.1:
	mov	x0, x20
	bl	_hns3_nic_resetting
	cbz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_11
LBB0_3:
	ldr	x8, [x22]
	cbz	x8, LBB0_10
; %bb.4:
	ldr	x9, [x22, #8]
	cbz	x9, LBB0_10
; %bb.5:
	mov	x0, x19
	blr	x8
Lloh4:
	adrp	x8, _AUTONEG_ENABLE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.6:
Lloh7:
	adrp	x8, _drv@GOTPAGE
Lloh8:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, l_.str.3@PAGE
Lloh11:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh12:
	adrp	x9, l_.str.4@PAGE
Lloh13:
	add	x9, x9, l_.str.4@PAGEOFF
	cmp	x21, #0
	csel	x4, x9, x8, eq
Lloh14:
	adrp	x3, l_.str.2@PAGE
Lloh15:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_netif_dbg
	cbz	x21, LBB0_9
; %bb.7:
	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
	b	_genphy_restart_aneg
LBB0_8:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
	ldr	x8, [x19]
	ldr	w8, [x8]
	cmp	w8, #32
	b.ne	LBB0_13
LBB0_10:
Lloh20:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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_13:
	ldr	x1, [x22, #8]
	mov	x0, x19
	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
	br	x1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dev resetting!"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_AUTONEG_ENABLE,4,2             ; @AUTONEG_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"Autoneg is off, don't support to restart it\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_drv,4,2                        ; @drv
l_.str.2:                               ; @.str.2
	.asciz	"nway reset (using %s)\n"

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

l_.str.4:                               ; @.str.4
	.asciz	"mac"

	.no_dead_strip	_hns3_nway_reset
.subsections_via_symbols
