	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_nic_self_test
_hns_nic_self_test:                     ## @hns_nic_self_test
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r13
	callq	_netdev_priv
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_netif_running
	movl	%eax, %r14d
	movl	(%rbx), %eax
	movq	_ETH_TEST_FL_OFFLINE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_18
## %bb.1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_MAC_INTERNALLOOP_MAC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	8(%r12), %rax
	movq	(%rax), %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	_PHY_INTERFACE_MODE_XGMII@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	_MAC_INTERNALLOOP_SERDES@GOTPCREL(%rip), %rcx
	movq	%r12, %rsi
	movl	(%rcx), %r12d
	movq	_MAC_INTERNALLOOP_PHY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	8(%rax), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	_NIC_STATE_TESTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	callq	_set_bit
	movl	%r14d, -72(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movq	%r13, %rdi
	callq	_dev_close
LBB0_3:
	xorl	%ebx, %ebx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -88(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_8
## %bb.4:
	movq	%r13, %rdi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	___lb_up
	movq	%rax, (%r15)
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	___lb_run_test
	movq	%rax, (%r15)
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	___lb_down
	cmpq	$0, (%r15)
	je	LBB0_7
LBB0_6:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
LBB0_7:
	movl	$1, %ebx
LBB0_8:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	___lb_up
	movq	%r15, %rcx
	movl	%ebx, %r15d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, (%rcx,%r15,8)
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	___lb_run_test
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, (%rbx,%r15,8)
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	___lb_down
	cmpq	$0, (%rbx,%r15,8)
	je	LBB0_11
LBB0_10:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
LBB0_11:
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	movl	-72(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_16
## %bb.12:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -88(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_16
## %bb.13:
	movq	%r13, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	___lb_up
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx,%r15,8)
	testq	%rax, %rax
	jne	LBB0_15
## %bb.14:
	incq	%r15
	movq	%r13, %rdi
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	callq	___lb_run_test
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, (%rbx,%r15,8)
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	___lb_down
	cmpq	$0, (%rbx,%r15,8)
	je	LBB0_16
LBB0_15:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
LBB0_16:
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx), %edi
	callq	_hns_nic_net_reset
	movq	_NIC_STATE_TESTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	testl	%r14d, %r14d
	je	LBB0_18
## %bb.17:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_dev_open
LBB0_18:
	movl	$4000, %edi                     ## imm = 0xFA0
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msleep_interruptible           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_INTERNALLOOP_MAC,4,2       ## @MAC_INTERNALLOOP_MAC
	.comm	_PHY_INTERFACE_MODE_XGMII,8,3   ## @PHY_INTERFACE_MODE_XGMII
	.comm	_MAC_INTERNALLOOP_SERDES,4,2    ## @MAC_INTERNALLOOP_SERDES
	.comm	_MAC_INTERNALLOOP_PHY,4,2       ## @MAC_INTERNALLOOP_PHY
	.comm	_ETH_TEST_FL_OFFLINE,4,2        ## @ETH_TEST_FL_OFFLINE
	.comm	_NIC_STATE_TESTING,4,2          ## @NIC_STATE_TESTING
	.comm	_ETH_TEST_FL_FAILED,4,2         ## @ETH_TEST_FL_FAILED
	.comm	_SELF_TEST_TPYE_NUM,4,2         ## @SELF_TEST_TPYE_NUM
	.no_dead_strip	_hns_nic_self_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_nic_self_test
_hns_nic_self_test:                     ; @hns_nic_self_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	mov	x0, x19
	bl	_netif_running
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _ETH_TEST_FL_OFFLINE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ETH_TEST_FL_OFFLINE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x8, _MAC_INTERNALLOOP_MAC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAC_INTERNALLOOP_MAC@GOTPAGEOFF]
Lloh5:
	ldr	w26, [x8]
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _PHY_INTERFACE_MODE_XGMII@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_XGMII@GOTPAGEOFF]
	ldr	x27, [x8]
Lloh8:
	ldr	x28, [x9]
Lloh9:
	adrp	x9, _MAC_INTERNALLOOP_SERDES@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAC_INTERNALLOOP_SERDES@GOTPAGEOFF]
Lloh11:
	adrp	x10, _MAC_INTERNALLOOP_PHY@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MAC_INTERNALLOOP_PHY@GOTPAGEOFF]
Lloh13:
	ldr	w25, [x9]
Lloh14:
	ldr	w9, [x10]
	str	w9, [sp, #8]                    ; 4-byte Folded Spill
	ldr	w24, [x8, #8]
Lloh15:
	adrp	x8, _NIC_STATE_TESTING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NIC_STATE_TESTING@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_set_bit
	cbz	w21, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_dev_close
LBB0_3:
	cmp	x27, x28
	str	w24, [sp, #12]                  ; 4-byte Folded Spill
	b.ne	LBB0_5
; %bb.4:
	mov	w24, #0
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	mov	x1, x26
	bl	___lb_up
	str	x0, [x23]
	cbnz	x0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x26
	bl	___lb_run_test
	str	x0, [x23]
	mov	x0, x19
	mov	x1, x26
	bl	___lb_down
	ldr	x8, [x23]
	cbz	x8, LBB0_8
LBB0_7:
Lloh18:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
LBB0_8:
	mov	w24, #1
LBB0_9:
	mov	x0, x19
	mov	x1, x25
	bl	___lb_up
	mov	w26, w24
	str	x0, [x23, w24, uxtw #3]
	cbnz	x0, LBB0_11
; %bb.10:
	mov	x0, x19
	mov	x1, x25
	bl	___lb_run_test
	lsl	x24, x26, #3
	str	x0, [x23, x24]
	mov	x0, x19
	mov	x1, x25
	bl	___lb_down
	ldr	x8, [x23, x24]
	cbz	x8, LBB0_12
LBB0_11:
Lloh21:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
LBB0_12:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_17
; %bb.13:
	cmp	x27, x28
	b.eq	LBB0_17
; %bb.14:
	add	w24, w26, #1
	mov	x0, x19
	ldr	w1, [sp, #8]                    ; 4-byte Folded Reload
	bl	___lb_up
	str	x0, [x23, w24, uxtw #3]
	cbnz	x0, LBB0_16
; %bb.15:
	mov	x0, x19
	ldr	w25, [sp, #8]                   ; 4-byte Folded Reload
	mov	x1, x25
	bl	___lb_run_test
	lsl	x24, x24, #3
	str	x0, [x23, x24]
	mov	x0, x19
	mov	x1, x25
	bl	___lb_down
	ldr	x8, [x23, x24]
	cbz	x8, LBB0_17
LBB0_16:
Lloh24:
	adrp	x8, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
LBB0_17:
	ldr	w0, [x20, #4]
	bl	_hns_nic_net_reset
Lloh27:
	adrp	x8, _NIC_STATE_TESTING@GOTPAGE
Lloh28:
	ldr	x8, [x8, _NIC_STATE_TESTING@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_clear_bit
	cbz	w21, LBB0_19
; %bb.18:
	mov	x0, x19
	mov	x1, #0
	bl	_dev_open
LBB0_19:
	mov	w0, #4000
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_msleep_interruptible
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_INTERNALLOOP_MAC,4,2       ; @MAC_INTERNALLOOP_MAC
	.comm	_PHY_INTERFACE_MODE_XGMII,8,3   ; @PHY_INTERFACE_MODE_XGMII
	.comm	_MAC_INTERNALLOOP_SERDES,4,2    ; @MAC_INTERNALLOOP_SERDES
	.comm	_MAC_INTERNALLOOP_PHY,4,2       ; @MAC_INTERNALLOOP_PHY
	.comm	_ETH_TEST_FL_OFFLINE,4,2        ; @ETH_TEST_FL_OFFLINE
	.comm	_NIC_STATE_TESTING,4,2          ; @NIC_STATE_TESTING
	.comm	_ETH_TEST_FL_FAILED,4,2         ; @ETH_TEST_FL_FAILED
	.comm	_SELF_TEST_TPYE_NUM,4,2         ; @SELF_TEST_TPYE_NUM
	.no_dead_strip	_hns_nic_self_test
.subsections_via_symbols
