	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netxen_check_flash_fw_compatibility ## -- Begin function netxen_check_flash_fw_compatibility
	.p2align	4, 0x90
_netxen_check_flash_fw_compatibility:   ## @netxen_check_flash_fw_compatibility
	.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
	movl	8(%rdi), %edi
	callq	_NX_IS_REVISION_P2
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	movq	_NX_FW_VERSION_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	callq	_netxen_rom_fast_read
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	-32(%rbp), %rdi
	callq	_NETXEN_DECODE_VERSION
	movq	%rax, -32(%rbp)
	movq	_NETXEN_MIN_P3_FW_SUPP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_6
## %bb.4:
	movq	(%r14), %r14
	movq	%rax, %rdi
	callq	__major
	movl	%eax, %r15d
	movq	-32(%rbp), %rdi
	callq	__minor
	movl	%eax, %ebx
	movq	-32(%rbp), %rdi
	callq	__build
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_dev_info
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NX_FW_VERSION_OFFSET,4,2       ## @NX_FW_VERSION_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to read flash fwversion\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_NETXEN_MIN_P3_FW_SUPP,8,3      ## @NETXEN_MIN_P3_FW_SUPP
L_.str.1:                               ## @.str.1
	.asciz	"Flash fw[%d.%d.%d] is < min fw supported[4.0.505]. Please update firmware on flash\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netxen_check_flash_fw_compatibility ; -- Begin function netxen_check_flash_fw_compatibility
	.p2align	2
_netxen_check_flash_fw_compatibility:   ; @netxen_check_flash_fw_compatibility
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_NX_IS_REVISION_P2
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_7
LBB0_2:
Lloh0:
	adrp	x8, _NX_FW_VERSION_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NX_FW_VERSION_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_netxen_rom_fast_read
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	x0, [sp, #8]
	bl	_NETXEN_DECODE_VERSION
	str	x0, [sp, #8]
Lloh7:
	adrp	x8, _NETXEN_MIN_P3_FW_SUPP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NETXEN_MIN_P3_FW_SUPP@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_1
; %bb.5:
	ldr	x19, [x19]
	bl	__major
	mov	x20, x0
	ldr	x0, [sp, #8]
	bl	__minor
	mov	x21, x0
	ldr	x0, [sp, #8]
	bl	__build
	mov	x4, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_dev_info
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NX_FW_VERSION_OFFSET,4,2       ; @NX_FW_VERSION_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to read flash fwversion\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_NETXEN_MIN_P3_FW_SUPP,8,3      ; @NETXEN_MIN_P3_FW_SUPP
l_.str.1:                               ; @.str.1
	.asciz	"Flash fw[%d.%d.%d] is < min fw supported[4.0.505]. Please update firmware on flash\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
