	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_test_nvram
_bnx2_test_nvram:                       ## @bnx2_test_nvram
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_NVRAM_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$2, %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	movl	$4, %ecx
	callq	_bnx2_nvram_read
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movl	(%rbx), %edi
	callq	_be32_to_cpu
	cmpl	$1721324970, %eax               ## imm = 0x669955AA
	jne	LBB0_5
## %bb.2:
	movl	(%r15), %ecx
	movq	%r14, %rdi
	movl	$256, %esi                      ## imm = 0x100
	movq	%rbx, %rdx
	callq	_bnx2_nvram_read
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movl	$256, %edi                      ## imm = 0x100
	movq	%rbx, %rsi
	callq	_ether_crc_le
	movq	_CRC32_RESIDUAL@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jne	LBB0_5
## %bb.4:
	addq	$1024, %rbx                     ## imm = 0x400
	movl	$256, %edi                      ## imm = 0x100
	movq	%rbx, %rsi
	callq	_ether_crc_le
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	(%r14), %ecx
	je	LBB0_6
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NVRAM_SIZE,4,2                 ## @NVRAM_SIZE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CRC32_RESIDUAL,4,2             ## @CRC32_RESIDUAL
	.no_dead_strip	_bnx2_test_nvram
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_test_nvram
_bnx2_test_nvram:                       ; @bnx2_test_nvram
	.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
	sub	sp, sp, #16
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x21, _NVRAM_SIZE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _NVRAM_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	lsl	x9, x8, #2
	add	x8, x9, #15
	and	x8, x8, #0x7fffffff0
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x19, x9, x8
	mov	sp, x19
	mov	w1, #0
	mov	x2, x19
	mov	w3, #4
	bl	_bnx2_nvram_read
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	w0, [x19]
	bl	_be32_to_cpu
	mov	w8, #21930
	movk	w8, #26265, lsl #16
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.2:
	ldr	w3, [x21]
	mov	x0, x20
	mov	w1, #256
	mov	x2, x19
	bl	_bnx2_nvram_read
	cbnz	w0, LBB0_7
; %bb.3:
	mov	w0, #256
	mov	x1, x19
	bl	_ether_crc_le
Lloh7:
	adrp	x20, _CRC32_RESIDUAL@GOTPAGE
Lloh8:
	ldr	x20, [x20, _CRC32_RESIDUAL@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.4:
	add	x1, x19, #1024
	mov	w0, #256
	bl	_ether_crc_le
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	sub	sp, x29, #32
	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_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_NVRAM_SIZE,4,2                 ; @NVRAM_SIZE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CRC32_RESIDUAL,4,2             ; @CRC32_RESIDUAL
	.no_dead_strip	_bnx2_test_nvram
.subsections_via_symbols
