	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netxen_nic_validate_product_offs
_netxen_nic_validate_product_offs:      ## @netxen_nic_validate_product_offs
	.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	%rdi, %rax
	movq	(%rdi), %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rax), %rax
	movq	(%rax), %r15
	callq	_NX_IS_REVISION_P2
	movl	$1, %r12d
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netxen_p3_has_mn
	movl	%eax, %r12d
LBB0_2:
	movq	_NX_UNI_DIR_SECT_PRODUCT_TBL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_nx_get_table_desc
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, %r13
	movl	4(%rbx), %edi
	callq	_cpu_to_le32
	movq	%rax, %r14
	movl	8(%rbx), %edi
	callq	_cpu_to_le32
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	imulq	%r13, %r14
	addq	%rax, %r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	cmpq	%r14, 8(%rax)
	jge	LBB0_4
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_4:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	jle	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	addq	%rax, %rax
	addq	$2, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	incq	%r13
	cmpq	%r13, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_11
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r12
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx), %edi
	callq	_cpu_to_le32
	movq	%rax, %r14
	movl	4(%rbx), %edi
	callq	_cpu_to_le32
	movq	%rax, %r15
	imulq	%r13, %r15
	addq	%r14, %r15
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,8), %rbx
	movq	_NX_UNI_FLAGS_OFF@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movl	(%rbx,%rax,4), %edi
	callq	_cpu_to_le32
	movq	%rax, %r14
	movq	_NX_UNI_CHIP_REV_OFF@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movl	(%rbx,%rax,4), %edi
	callq	_cpu_to_le32
	cmpq	%rax, %r12
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax def $rax
	andl	%r14d, %eax
	testq	%rax, %rax
	je	LBB0_10
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_NX_IS_REVISION_P3
	xorl	%r12d, %r12d
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_13
LBB0_9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, 8(%rax)
	xorl	%eax, %eax
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NX_UNI_DIR_SECT_PRODUCT_TBL,4,2 ## @NX_UNI_DIR_SECT_PRODUCT_TBL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NX_UNI_FLAGS_OFF,4,2           ## @NX_UNI_FLAGS_OFF
	.comm	_NX_UNI_CHIP_REV_OFF,4,2        ## @NX_UNI_CHIP_REV_OFF
	.no_dead_strip	_netxen_nic_validate_product_offs
.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_product_offs
_netxen_nic_validate_product_offs:      ; @netxen_nic_validate_product_offs
	.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	x19, x0
	ldr	x8, [x0, #16]
	ldr	x20, [x8]
	ldr	x0, [x0]
	bl	_NX_IS_REVISION_P2
	cbz	x0, LBB0_2
; %bb.1:
	mov	w21, #1
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_netxen_p3_has_mn
	mov	x21, x0
LBB0_3:
Lloh0:
	adrp	x8, _NX_UNI_DIR_SECT_PRODUCT_TBL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NX_UNI_DIR_SECT_PRODUCT_TBL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_nx_get_table_desc
	cbz	x0, LBB0_5
; %bb.4:
	mov	x22, x0
	ldr	w0, [x0]
	bl	_cpu_to_le32
	mov	x23, x0
	ldr	w0, [x22, #4]
	bl	_cpu_to_le32
	mov	x24, x0
	ldr	w0, [x22, #8]
	bl	_cpu_to_le32
	madd	x8, x24, x23, x0
	ldr	x9, [x19, #16]
	ldr	x9, [x9, #8]
	cmp	x9, x8
	b.ge	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	cmp	x23, #1
	b.lt	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x25, #0
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, #0
	mov	w8, #2
	mov	w9, #4
	csel	x26, x9, x8, eq
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x27, [x19]
	ldr	w0, [x22, #8]
	bl	_cpu_to_le32
	mov	x24, x0
	ldr	w0, [x22, #4]
	bl	_cpu_to_le32
	madd	x21, x0, x25, x24
	add	x28, x20, x21, lsl #3
Lloh6:
	adrp	x8, _NX_UNI_FLAGS_OFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NX_UNI_FLAGS_OFF@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
	ldr	w0, [x28, x8, lsl #2]
	bl	_cpu_to_le32
	mov	x24, x0
Lloh9:
	adrp	x8, _NX_UNI_CHIP_REV_OFF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NX_UNI_CHIP_REV_OFF@GOTPAGEOFF]
Lloh11:
	ldrsw	x8, [x8]
	ldr	w0, [x28, x8, lsl #2]
	bl	_cpu_to_le32
	and	x8, x24, x26
	cmp	x27, x0
	ccmp	x8, #0, #4, eq
	b.ne	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	add	x25, x25, #1
	cmp	x23, x25
	b.ne	LBB0_8
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x19]
	bl	_NX_IS_REVISION_P3
	mov	w21, #0
	cbnz	x0, LBB0_6
	b	LBB0_5
LBB0_12:
	mov	w0, #0
	str	x21, [x19, #8]
LBB0_13:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NX_UNI_DIR_SECT_PRODUCT_TBL,4,2 ; @NX_UNI_DIR_SECT_PRODUCT_TBL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NX_UNI_FLAGS_OFF,4,2           ; @NX_UNI_FLAGS_OFF
	.comm	_NX_UNI_CHIP_REV_OFF,4,2        ; @NX_UNI_CHIP_REV_OFF
	.no_dead_strip	_netxen_nic_validate_product_offs
.subsections_via_symbols
