	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fm10k_sm_mbx_validate_fifo_hdr
_fm10k_sm_mbx_validate_fifo_hdr:        ## @fm10k_sm_mbx_validate_fifo_hdr
	.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, %r15
	movl	16(%rdi), %edi
	movq	_SM_TAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_FM10K_MSG_HDR_FIELD_GET
	movl	%eax, %r14d
	movl	16(%r15), %edi
	movq	_SM_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_FM10K_MSG_HDR_FIELD_GET
	movl	%eax, %ebx
	movl	16(%r15), %edi
	movq	_SM_HEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_FM10K_MSG_HDR_FIELD_GET
                                        ## kill: def $eax killed $eax def $rax
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.1:
	cmpl	$128, %ebx
	jne	LBB0_12
## %bb.2:
	testl	%eax, %eax
	je	LBB0_11
## %bb.3:
	movq	_FM10K_SM_MBX_FIFO_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jg	LBB0_11
## %bb.4:
	testl	%r14d, %r14d
	je	LBB0_15
## %bb.5:
	cmpl	%ecx, %r14d
	jg	LBB0_15
## %bb.6:
	movl	(%r15), %edx
	cmpl	%eax, %edx
	jge	LBB0_8
## %bb.7:
	movl	8(%r15), %ecx
	addl	%ecx, %eax
	decl	%eax
LBB0_8:
	cmpl	4(%r15), %r14d
	jge	LBB0_10
## %bb.9:
	movl	8(%r15), %ecx
	addl	%ecx, %r14d
	decl	%r14d
LBB0_10:
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_fm10k_mbx_index_len
	cmpl	12(%r15), %eax
	jle	LBB0_16
LBB0_11:
	movq	_FM10K_MBX_ERR_HEAD@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_FM10K_MBX_ERR_SRC@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	4(%r15), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_fm10k_mbx_index_len
	xorl	%ebx, %ebx
	cmpl	8(%r15), %eax
	jl	LBB0_14
LBB0_15:
	movq	_FM10K_MBX_ERR_TAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_SM_TAIL,4,2                    ## @SM_TAIL
	.comm	_SM_VER,4,2                     ## @SM_VER
	.comm	_SM_HEAD,4,2                    ## @SM_HEAD
	.comm	_FM10K_SM_MBX_FIFO_LEN,4,2      ## @FM10K_SM_MBX_FIFO_LEN
	.comm	_FM10K_MBX_ERR_HEAD,4,2         ## @FM10K_MBX_ERR_HEAD
	.comm	_FM10K_MBX_ERR_TAIL,4,2         ## @FM10K_MBX_ERR_TAIL
	.comm	_FM10K_MBX_ERR_SRC,4,2          ## @FM10K_MBX_ERR_SRC
	.no_dead_strip	_fm10k_sm_mbx_validate_fifo_hdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fm10k_sm_mbx_validate_fifo_hdr
_fm10k_sm_mbx_validate_fifo_hdr:        ; @fm10k_sm_mbx_validate_fifo_hdr
	.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
	mov	x19, x0
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x8, _SM_TAIL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SM_TAIL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_FM10K_MSG_HDR_FIELD_GET
	mov	x20, x0
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x8, _SM_VER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SM_VER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_FM10K_MSG_HDR_FIELD_GET
	mov	x21, x0
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x8, _SM_HEAD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SM_HEAD@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_FM10K_MSG_HDR_FIELD_GET
	cbz	w21, LBB0_14
; %bb.1:
	cmp	w21, #128
	b.ne	LBB0_6
; %bb.2:
	mov	x1, x0
	cbz	w0, LBB0_12
; %bb.3:
Lloh9:
	adrp	x8, _FM10K_SM_MBX_FIFO_LEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FM10K_SM_MBX_FIFO_LEN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w1, w8
	b.gt	LBB0_12
; %bb.4:
	cmp	w20, #0
	ccmp	w20, w8, #0, ne
	b.le	LBB0_7
; %bb.5:
Lloh12:
	adrp	x8, _FM10K_MBX_ERR_TAIL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FM10K_MBX_ERR_TAIL@GOTPAGEOFF]
	b	LBB0_13
LBB0_6:
Lloh14:
	adrp	x8, _FM10K_MBX_ERR_SRC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FM10K_MBX_ERR_SRC@GOTPAGEOFF]
	b	LBB0_13
LBB0_7:
	ldr	w2, [x19]
	cmp	w2, w1
	b.ge	LBB0_9
; %bb.8:
	ldr	w8, [x19, #8]
	add	w8, w1, w8
	sub	w1, w8, #1
LBB0_9:
	ldr	w8, [x19, #4]
	cmp	w20, w8
	b.ge	LBB0_11
; %bb.10:
	ldr	w8, [x19, #8]
	add	w8, w20, w8
	sub	w20, w8, #1
LBB0_11:
	mov	x0, x19
	bl	_fm10k_mbx_index_len
	ldr	w8, [x19, #12]
	cmp	w0, w8
	b.le	LBB0_15
LBB0_12:
Lloh16:
	adrp	x8, _FM10K_MBX_ERR_HEAD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FM10K_MBX_ERR_HEAD@GOTPAGEOFF]
LBB0_13:
	ldr	w21, [x8]
LBB0_14:
	mov	x0, x21
	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_15:
	ldr	w1, [x19, #4]
	mov	x0, x19
	mov	x2, x20
	bl	_fm10k_mbx_index_len
	ldr	w8, [x19, #8]
Lloh18:
	adrp	x9, _FM10K_MBX_ERR_TAIL@GOTPAGE
Lloh19:
	ldr	x9, [x9, _FM10K_MBX_ERR_TAIL@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	cmp	w0, w8
	csel	w21, wzr, w9, lt
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SM_TAIL,4,2                    ; @SM_TAIL
	.comm	_SM_VER,4,2                     ; @SM_VER
	.comm	_SM_HEAD,4,2                    ; @SM_HEAD
	.comm	_FM10K_SM_MBX_FIFO_LEN,4,2      ; @FM10K_SM_MBX_FIFO_LEN
	.comm	_FM10K_MBX_ERR_HEAD,4,2         ; @FM10K_MBX_ERR_HEAD
	.comm	_FM10K_MBX_ERR_TAIL,4,2         ; @FM10K_MBX_ERR_TAIL
	.comm	_FM10K_MBX_ERR_SRC,4,2          ; @FM10K_MBX_ERR_SRC
	.no_dead_strip	_fm10k_sm_mbx_validate_fifo_hdr
.subsections_via_symbols
