	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netxen_nic_validate_fw
_netxen_nic_validate_fw:                ## @netxen_nic_validate_fw
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	8(%rcx), %r12
	leaq	(%r12,%rax,4), %rax
	movq	_NX_UNI_FIRMWARE_IDX_OFF@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_cpu_to_le32
	movl	%eax, %r15d
	movq	_NX_UNI_DIR_SECT_FW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_nx_get_table_desc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, %r13d
	movl	4(%rbx), %edi
	callq	_cpu_to_le32
	leal	1(%r15), %ecx
	imull	%eax, %ecx
	addl	%r13d, %ecx
	movslq	%ecx, %rax
	movq	8(%r14), %rcx
	cmpq	%rax, (%rcx)
	jb	LBB0_3
## %bb.2:
	movl	(%rbx), %edi
	callq	_cpu_to_le32
	movl	%eax, %r13d
	movl	4(%rbx), %edi
	callq	_cpu_to_le32
	imull	%r15d, %eax
	addl	%r13d, %eax
	movslq	%eax, %rbx
	movl	(%r12,%rbx,4), %edi
	callq	_cpu_to_le32
	movl	%eax, %r15d
	movl	4(%r12,%rbx,4), %edi
	callq	_cpu_to_le32
	addl	%r15d, %eax
	movslq	%eax, %rcx
	movq	8(%r14), %rdx
	xorl	%eax, %eax
	cmpq	%rcx, (%rdx)
	jae	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NX_UNI_FIRMWARE_IDX_OFF,4,2    ## @NX_UNI_FIRMWARE_IDX_OFF
	.comm	_NX_UNI_DIR_SECT_FW,4,2         ## @NX_UNI_DIR_SECT_FW
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_netxen_nic_validate_fw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netxen_nic_validate_fw
_netxen_nic_validate_fw:                ; @netxen_nic_validate_fw
	.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	x19, x0
	ldp	x9, x8, [x0]
	ldr	x20, [x8, #8]
	add	x8, x20, x9, lsl #2
Lloh0:
	adrp	x9, _NX_UNI_FIRMWARE_IDX_OFF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NX_UNI_FIRMWARE_IDX_OFF@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	ldr	w0, [x8, x9, lsl #2]
	bl	_cpu_to_le32
	mov	x21, x0
Lloh3:
	adrp	x8, _NX_UNI_DIR_SECT_FW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NX_UNI_DIR_SECT_FW@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nx_get_table_desc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	ldr	w0, [x0]
	bl	_cpu_to_le32
	mov	x23, x0
	ldr	w0, [x22, #4]
	bl	_cpu_to_le32
	madd	w8, w0, w21, w0
	add	w8, w8, w23
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
	cmp	x9, w8, sxtw
	b.lo	LBB0_3
; %bb.2:
	ldr	w0, [x22]
	bl	_cpu_to_le32
	mov	x23, x0
	ldr	w0, [x22, #4]
	bl	_cpu_to_le32
	madd	w8, w0, w21, w23
	add	x21, x20, w8, sxtw #2
	ldr	w0, [x21]
	bl	_cpu_to_le32
	mov	x20, x0
	ldr	w0, [x21, #4]
	bl	_cpu_to_le32
	add	w8, w0, w20
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
	cmp	x9, w8, sxtw
	b.hs	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
LBB0_5:
	mov	w0, #0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NX_UNI_FIRMWARE_IDX_OFF,4,2    ; @NX_UNI_FIRMWARE_IDX_OFF
	.comm	_NX_UNI_DIR_SECT_FW,4,2         ; @NX_UNI_DIR_SECT_FW
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_netxen_nic_validate_fw
.subsections_via_symbols
