	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netxen_nic_validate_header
_netxen_nic_validate_header:            ## @netxen_nic_validate_header
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movq	_QLCNIC_FILEHEADER_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r15
	jl	LBB0_2
## %bb.1:
	movq	8(%rax), %r12
	movl	8(%r12), %edi
	callq	_cpu_to_le32
	movq	%rax, %r14
	movl	4(%r12), %edi
	callq	_cpu_to_le32
	movq	%rax, %rbx
	movl	(%r12), %edi
	callq	_cpu_to_le32
	imull	%r14d, %ebx
	movslq	%ebx, %rcx
	addq	%rax, %rcx
	xorl	%eax, %eax
	cmpq	%rcx, %r15
	jge	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QLCNIC_FILEHEADER_SIZE,8,3     ## @QLCNIC_FILEHEADER_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_netxen_nic_validate_header
.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_header
_netxen_nic_validate_header:            ; @netxen_nic_validate_header
	.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
	ldr	x8, [x0]
	ldr	x21, [x8]
Lloh0:
	adrp	x9, _QLCNIC_FILEHEADER_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QLCNIC_FILEHEADER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x21, x9
	b.lt	LBB0_2
; %bb.1:
	ldr	x22, [x8, #8]
	ldr	w0, [x22, #8]
	bl	_cpu_to_le32
	mov	x19, x0
	ldr	w0, [x22, #4]
	bl	_cpu_to_le32
	mov	x20, x0
	ldr	w0, [x22]
	bl	_cpu_to_le32
	mul	w8, w19, w20
	add	x8, x0, w8, sxtw
	cmp	x21, x8
	b.ge	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_QLCNIC_FILEHEADER_SIZE,8,3     ; @QLCNIC_FILEHEADER_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_netxen_nic_validate_header
.subsections_via_symbols
