	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cfhsi_rx_desc_len
_cfhsi_rx_desc_len:                     ## @cfhsi_rx_desc_len
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	(%rdi), %esi
	movq	_CFHSI_PIGGY_DESC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	8(%rdi), %rdx
	testl	%eax, %esi
	jne	LBB0_2
## %bb.1:
	movq	_CFHSI_MAX_EMB_FRM_SZ@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jg	LBB0_2
## %bb.3:
	movq	_CFHSI_MAX_PKTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.5:
	movq	16(%rdi), %rcx
	xorl	%edx, %edx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	addl	%esi, %ebx
	incq	%rdx
	cmpl	%edx, %eax
	jne	LBB0_6
LBB0_8:
	testb	$3, %bl
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EPROTO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	%r14d, %ebx
	jmp	LBB0_10
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EPROTO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CFHSI_PIGGY_DESC,4,2           ## @CFHSI_PIGGY_DESC
	.comm	_CFHSI_MAX_EMB_FRM_SZ,8,3       ## @CFHSI_MAX_EMB_FRM_SZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid descriptor. %x %x\n"

	.comm	_EPROTO,4,2                     ## @EPROTO
	.comm	_CFHSI_MAX_PKTS,4,2             ## @CFHSI_MAX_PKTS
L_.str.1:                               ## @.str.1
	.asciz	"Invalid payload len: %d, ignored.\n"

	.no_dead_strip	_cfhsi_rx_desc_len
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cfhsi_rx_desc_len
_cfhsi_rx_desc_len:                     ; @cfhsi_rx_desc_len
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w1, [x0]
Lloh0:
	adrp	x8, _CFHSI_PIGGY_DESC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CFHSI_PIGGY_DESC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bic	w9, w1, w8
	ldr	x8, [x0, #8]
Lloh3:
	adrp	x10, _CFHSI_MAX_EMB_FRM_SZ@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CFHSI_MAX_EMB_FRM_SZ@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	w9, #0
	ccmp	x8, x10, #0, eq
	b.le	LBB0_2
; %bb.1:
	str	x8, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_2:
Lloh8:
	adrp	x8, _CFHSI_MAX_PKTS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CFHSI_MAX_PKTS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	w1, #0
	ldr	x9, [x0, #16]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbz	x10, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w1, w1, w10
	add	x9, x9, #8
	subs	w8, w8, #1
	b.ne	LBB0_4
LBB0_6:
	tst	w1, #0x3
	b.eq	LBB0_10
; %bb.7:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_pr_err
Lloh13:
	adrp	x8, _EPROTO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EPROTO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w1, w8
	b	LBB0_10
LBB0_9:
	mov	w1, #0
LBB0_10:
	mov	x0, x1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_CFHSI_PIGGY_DESC,4,2           ; @CFHSI_PIGGY_DESC
	.comm	_CFHSI_MAX_EMB_FRM_SZ,8,3       ; @CFHSI_MAX_EMB_FRM_SZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid descriptor. %x %x\n"

	.comm	_EPROTO,4,2                     ; @EPROTO
	.comm	_CFHSI_MAX_PKTS,4,2             ; @CFHSI_MAX_PKTS
l_.str.1:                               ; @.str.1
	.asciz	"Invalid payload len: %d, ignored.\n"

	.no_dead_strip	_cfhsi_rx_desc_len
.subsections_via_symbols
