	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_nic_reset_subtask
_hns_nic_reset_subtask:                 ## @hns_nic_reset_subtask
	.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, %r14
	movq	8(%rdi), %rax
	movl	(%rax), %r15d
	movq	_NIC_STATE2_RESET_REQUESTED@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	4(%r14), %rbx
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	movq	_NIC_STATE_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	movq	_NIC_STATE_REMOVING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_NIC_STATE_RESETTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	callq	_hns_nic_dump
	movl	(%r14), %edi
	movq	_HNAE_PORT_DEBUG@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	callq	_netdev_info
	xorl	%eax, %eax
	callq	_rtnl_lock
	movl	(%r14), %edi
	callq	_netif_trans_update
	movl	(%r14), %edi
	callq	_hns_nic_net_reinit
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtnl_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NIC_STATE2_RESET_REQUESTED,4,2 ## @NIC_STATE2_RESET_REQUESTED
	.comm	_NIC_STATE_DOWN,4,2             ## @NIC_STATE_DOWN
	.comm	_NIC_STATE_REMOVING,4,2         ## @NIC_STATE_REMOVING
	.comm	_NIC_STATE_RESETTING,4,2        ## @NIC_STATE_RESETTING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"try to reset %s port!\n"

	.comm	_HNAE_PORT_DEBUG,4,2            ## @HNAE_PORT_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"debug"

L_.str.2:                               ## @.str.2
	.asciz	"service"

	.no_dead_strip	_hns_nic_reset_subtask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_nic_reset_subtask
_hns_nic_reset_subtask:                 ; @hns_nic_reset_subtask
	.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	x19, x0
	ldr	x8, [x0, #8]
	ldr	w21, [x8]
Lloh0:
	adrp	x22, _NIC_STATE2_RESET_REQUESTED@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NIC_STATE2_RESET_REQUESTED@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x20, x19, #4
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w0, [x22]
	mov	x1, x20
	bl	_clear_bit
Lloh2:
	adrp	x8, _NIC_STATE_DOWN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NIC_STATE_DOWN@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbnz	x0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, _NIC_STATE_REMOVING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NIC_STATE_REMOVING@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbnz	x0, LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _NIC_STATE_RESETTING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NIC_STATE_RESETTING@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_5
LBB0_4:
	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_5:
	mov	x0, x19
	bl	_hns_nic_dump
	ldr	w0, [x19]
Lloh11:
	adrp	x8, _HNAE_PORT_DEBUG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HNAE_PORT_DEBUG@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, l_.str.2@PAGE
Lloh15:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh16:
	adrp	x10, l_.str.1@PAGE
Lloh17:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	w21, w8
	csel	x2, x10, x9, eq
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_info
	bl	_rtnl_lock
	ldr	w0, [x19]
	bl	_netif_trans_update
	ldr	w0, [x19]
	bl	_hns_nic_net_reinit
	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	_rtnl_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_NIC_STATE2_RESET_REQUESTED,4,2 ; @NIC_STATE2_RESET_REQUESTED
	.comm	_NIC_STATE_DOWN,4,2             ; @NIC_STATE_DOWN
	.comm	_NIC_STATE_REMOVING,4,2         ; @NIC_STATE_REMOVING
	.comm	_NIC_STATE_RESETTING,4,2        ; @NIC_STATE_RESETTING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"try to reset %s port!\n"

	.comm	_HNAE_PORT_DEBUG,4,2            ; @HNAE_PORT_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"debug"

l_.str.2:                               ; @.str.2
	.asciz	"service"

	.no_dead_strip	_hns_nic_reset_subtask
.subsections_via_symbols
