	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tbnet_check_frame
_tbnet_check_frame:                     ## @tbnet_check_frame
	.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, %r12
	movl	(%rsi), %eax
	movq	_RING_DESC_CRC_ERROR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	incl	12(%r12)
	jmp	LBB0_19
LBB0_2:
	movq	_RING_DESC_BUFFER_OVERRUN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	incl	8(%r12)
	jmp	LBB0_19
LBB0_4:
	movq	%rdx, %rbx
	movq	%rsi, %rdi
	callq	_tbnet_frame_size
	cmpl	$16, %eax
	ja	LBB0_6
LBB0_5:
	incl	4(%r12)
LBB0_19:
	xorl	%eax, %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%eax, %r13d
	movl	12(%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %r14d
	movl	8(%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	movl	4(%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %edi
	callq	_le16_to_cpu
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.7:
	movl	%r13d, %edx
	movl	%r15d, %ecx
	addq	$-16, %rdx
	cmpq	%rcx, %rdx
	jb	LBB0_5
## %bb.8:
	movq	16(%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_14
## %bb.9:
	movl	24(%r12), %esi
	testl	%esi, %esi
	je	LBB0_14
## %bb.10:
	cmpl	%esi, %r14d
	jne	LBB0_5
## %bb.11:
	movl	28(%r12), %esi
	incl	%esi
	cmpl	%esi, -44(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_18
## %bb.12:
	cmpl	32(%r12), %eax
	jne	LBB0_18
## %bb.13:
	addq	(%rdx), %rcx
	movq	_TBNET_MAX_MTU@GOTPCREL(%rip), %rdx
	movl	$1, %eax
	cmpq	(%rdx), %rcx
	jg	LBB0_5
	jmp	LBB0_20
LBB0_14:
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.15:
	movq	_TBNET_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	cmpl	%ecx, %r14d
	ja	LBB0_5
## %bb.16:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_17
LBB0_18:
	incl	(%r12)
	jmp	LBB0_19
LBB0_17:
	movl	$1, %eax
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_DESC_CRC_ERROR,4,2        ## @RING_DESC_CRC_ERROR
	.comm	_RING_DESC_BUFFER_OVERRUN,4,2   ## @RING_DESC_BUFFER_OVERRUN
	.comm	_TBNET_MAX_MTU,8,3              ## @TBNET_MAX_MTU
	.comm	_TBNET_RING_SIZE,4,2            ## @TBNET_RING_SIZE
	.no_dead_strip	_tbnet_check_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tbnet_check_frame
_tbnet_check_frame:                     ; @tbnet_check_frame
	.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
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _RING_DESC_CRC_ERROR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RING_DESC_CRC_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	w0, #0
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	b	LBB0_6
LBB0_2:
Lloh3:
	adrp	x9, _RING_DESC_BUFFER_OVERRUN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RING_DESC_BUFFER_OVERRUN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	w0, #0
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	b	LBB0_6
LBB0_4:
	mov	x22, x2
	mov	x0, x1
	bl	_tbnet_frame_size
	cmp	w0, #16
	b.hi	LBB0_7
LBB0_5:
	mov	w0, #0
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
LBB0_6:
	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_7:
	mov	x23, x0
	ldr	w0, [x22, #12]
	bl	_le32_to_cpu
	mov	x20, x0
	ldr	w0, [x22, #8]
	bl	_le32_to_cpu
	mov	x24, x0
	ldr	w0, [x22, #4]
	bl	_le16_to_cpu
	mov	x21, x0
	ldr	w0, [x22]
	bl	_le16_to_cpu
	cbz	w24, LBB0_5
; %bb.8:
	mov	w9, w23
	mov	w8, w24
	sub	x9, x9, #16
	cmp	x9, x8
	b.lo	LBB0_5
; %bb.9:
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_15
; %bb.10:
	ldr	w10, [x19, #24]
	cbz	w10, LBB0_15
; %bb.11:
	cmp	w20, w10
	b.ne	LBB0_5
; %bb.12:
	ldr	w10, [x19, #28]
	add	w10, w10, #1
	cmp	w21, w10
	b.ne	LBB0_18
; %bb.13:
	ldr	w10, [x19, #32]
	cmp	w0, w10
	b.ne	LBB0_18
; %bb.14:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _TBNET_MAX_MTU@GOTPAGE
Lloh7:
	ldr	x10, [x10, _TBNET_MAX_MTU@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	add	x8, x9, x8
	cmp	x8, x10
	b.gt	LBB0_5
	b	LBB0_19
LBB0_15:
	cbz	w20, LBB0_5
; %bb.16:
Lloh9:
	adrp	x8, _TBNET_RING_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TBNET_RING_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cmp	w20, w8, asr #2
	b.hi	LBB0_5
; %bb.17:
	cbz	w21, LBB0_19
LBB0_18:
	mov	w0, #0
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_6
LBB0_19:
	mov	w0, #1
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_DESC_CRC_ERROR,4,2        ; @RING_DESC_CRC_ERROR
	.comm	_RING_DESC_BUFFER_OVERRUN,4,2   ; @RING_DESC_BUFFER_OVERRUN
	.comm	_TBNET_MAX_MTU,8,3              ; @TBNET_MAX_MTU
	.comm	_TBNET_RING_SIZE,4,2            ; @TBNET_RING_SIZE
	.no_dead_strip	_tbnet_check_frame
.subsections_via_symbols
