	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_self_test
_bnx2_self_test:                        ## @bnx2_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	_BNX2_NUM_TESTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$2, %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_ETH_TEST_FL_OFFLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_18
## %bb.1:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_bnx2_netif_stop
	movq	_BNX2_DRV_MSG_CODE_DIAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bnx2_reset_chip
	movq	%rbx, %rdi
	callq	_bnx2_free_skbs
	movq	%rbx, %rdi
	callq	_bnx2_test_registers
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	$1, (%r15)
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_3:
	movq	%rbx, %rdi
	callq	_bnx2_test_memory
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	$1, 4(%r15)
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_5:
	movq	%rbx, %rdi
	callq	_bnx2_test_loopback
	movl	%eax, 8(%r15)
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_7:
	movl	8(%rbx), %edi
	callq	_netif_running
	movq	%rbx, %rdi
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	$1, %esi
	callq	_bnx2_init_nic
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_bnx2_netif_start
	cmpq	$0, (%rbx)
	jne	LBB0_18
	jmp	LBB0_11
LBB0_8:
	callq	_bnx2_shutdown_chip
	cmpq	$0, (%rbx)
	jne	LBB0_18
LBB0_11:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep_interruptible
	cmpq	$0, (%rbx)
	jne	LBB0_18
## %bb.12:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep_interruptible
	cmpq	$0, (%rbx)
	jne	LBB0_18
## %bb.13:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep_interruptible
	cmpq	$0, (%rbx)
	jne	LBB0_18
## %bb.14:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep_interruptible
	cmpq	$0, (%rbx)
	jne	LBB0_18
## %bb.15:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep_interruptible
	cmpq	$0, (%rbx)
	jne	LBB0_18
## %bb.16:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep_interruptible
	cmpq	$0, (%rbx)
	jne	LBB0_18
## %bb.17:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msleep_interruptible
LBB0_18:
	movq	%rbx, %rdi
	callq	_bnx2_test_nvram
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movl	$1, 12(%r15)
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_20:
	movq	%rbx, %rdi
	callq	_bnx2_test_intr
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movl	$1, 16(%r15)
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_22:
	movq	%rbx, %rdi
	callq	_bnx2_test_link
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movl	$1, 20(%r15)
	movq	_ETH_TEST_FL_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2_NUM_TESTS,4,2             ## @BNX2_NUM_TESTS
	.comm	_ETH_TEST_FL_OFFLINE,4,2        ## @ETH_TEST_FL_OFFLINE
	.comm	_BNX2_DRV_MSG_CODE_DIAG,4,2     ## @BNX2_DRV_MSG_CODE_DIAG
	.comm	_ETH_TEST_FL_FAILED,4,2         ## @ETH_TEST_FL_FAILED
	.no_dead_strip	_bnx2_self_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_self_test
_bnx2_self_test:                        ; @bnx2_self_test
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x19, x1
	bl	_netdev_priv
	mov	x21, x0
Lloh0:
	adrp	x8, _BNX2_NUM_TESTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BNX2_NUM_TESTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w2, w8, #2
	mov	x0, x20
	mov	w1, #0
	bl	_memset
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _ETH_TEST_FL_OFFLINE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ETH_TEST_FL_OFFLINE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x22, _ETH_TEST_FL_FAILED@GOTPAGE
Lloh7:
	ldr	x22, [x22, _ETH_TEST_FL_FAILED@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.1:
	mov	w23, #1
	mov	x0, x21
	mov	w1, #1
	bl	_bnx2_netif_stop
Lloh8:
	adrp	x8, _BNX2_DRV_MSG_CODE_DIAG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BNX2_DRV_MSG_CODE_DIAG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_bnx2_reset_chip
	mov	x0, x21
	bl	_bnx2_free_skbs
	mov	x0, x21
	bl	_bnx2_test_registers
	cbz	x0, LBB0_3
; %bb.2:
	str	w23, [x20]
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_3:
	mov	x0, x21
	bl	_bnx2_test_memory
	cbz	x0, LBB0_5
; %bb.4:
	mov	w8, #1
	str	w8, [x20, #4]
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_5:
	mov	x0, x21
	bl	_bnx2_test_loopback
	str	w0, [x20, #8]
	cbz	w0, LBB0_7
; %bb.6:
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_7:
	ldr	w0, [x21, #8]
	bl	_netif_running
	cbz	w0, LBB0_9
; %bb.8:
	mov	x0, x21
	mov	w1, #1
	bl	_bnx2_init_nic
	mov	x0, x21
	mov	w1, #1
	bl	_bnx2_netif_start
	ldr	x8, [x21]
	cbnz	x8, LBB0_17
	b	LBB0_10
LBB0_9:
	mov	x0, x21
	bl	_bnx2_shutdown_chip
	ldr	x8, [x21]
	cbnz	x8, LBB0_17
LBB0_10:
	mov	w0, #1000
	bl	_msleep_interruptible
	ldr	x8, [x21]
	cbnz	x8, LBB0_17
; %bb.11:
	mov	w0, #1000
	bl	_msleep_interruptible
	ldr	x8, [x21]
	cbnz	x8, LBB0_17
; %bb.12:
	mov	w0, #1000
	bl	_msleep_interruptible
	ldr	x8, [x21]
	cbnz	x8, LBB0_17
; %bb.13:
	mov	w0, #1000
	bl	_msleep_interruptible
	ldr	x8, [x21]
	cbnz	x8, LBB0_17
; %bb.14:
	mov	w0, #1000
	bl	_msleep_interruptible
	ldr	x8, [x21]
	cbnz	x8, LBB0_17
; %bb.15:
	mov	w0, #1000
	bl	_msleep_interruptible
	ldr	x8, [x21]
	cbnz	x8, LBB0_17
; %bb.16:
	mov	w0, #1000
	bl	_msleep_interruptible
LBB0_17:
	mov	x0, x21
	bl	_bnx2_test_nvram
	cbz	x0, LBB0_19
; %bb.18:
	mov	w8, #1
	str	w8, [x20, #12]
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_19:
	mov	x0, x21
	bl	_bnx2_test_intr
	cbz	x0, LBB0_21
; %bb.20:
	mov	w8, #1
	str	w8, [x20, #16]
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_21:
	mov	x0, x21
	bl	_bnx2_test_link
	cbz	x0, LBB0_23
; %bb.22:
	mov	w8, #1
	str	w8, [x20, #20]
	ldr	w8, [x22]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_23:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2_NUM_TESTS,4,2             ; @BNX2_NUM_TESTS
	.comm	_ETH_TEST_FL_OFFLINE,4,2        ; @ETH_TEST_FL_OFFLINE
	.comm	_BNX2_DRV_MSG_CODE_DIAG,4,2     ; @BNX2_DRV_MSG_CODE_DIAG
	.comm	_ETH_TEST_FL_FAILED,4,2         ; @ETH_TEST_FL_FAILED
	.no_dead_strip	_bnx2_self_test
.subsections_via_symbols
