	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_hdlc
_encode_hdlc:                           ## @encode_hdlc
	.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
	cmpl	$0, 8(%rdi)
	jg	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	movq	32(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_7
## %bb.2:
	movq	$0, 32(%rbx)
	movl	(%r12), %r14d
	leal	-1(%r14), %esi
	movq	16(%rbx), %r15
	movq	8(%r12), %rdi
	incq	%rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	callq	_calc_crc_ccitt
	movw	%ax, -50(%rbp)
	movb	$126, (%r15)
	incq	%r15
	testl	%r14d, %r14d
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	js	LBB0_3
## %bb.8:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	-44(%rbp), %r12d                ## 4-byte Reload
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$0, -88(%rbp)                   ## 4-byte Folded Reload
	js	LBB0_4
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
                                        ##     Child Loop BB0_17 Depth 2
                                        ## kill: def $edx killed $edx def $rdx
	shrl	$8, %r12d
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movzbl	(%rax), %eax
	movl	%eax, %ecx
	shll	$8, %ecx
	orl	%ecx, %r12d
	movl	%ebx, %ecx
	shll	%cl, %eax
	orl	%eax, %r13d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	notl	%r12d
	movq	%rdx, %rax
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	leal	-1(%rdx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=2
	incl	%r14d
	cmpl	$8, %r14d
	je	LBB0_14
LBB0_11:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, %eax
	movl	%r14d, %ecx
	shrl	%cl, %eax
	xorl	%edi, %edi
	testl	$496, %eax                      ## imm = 0x1F0
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	$256, %eax                      ## imm = 0x100
	movl	%r14d, %ecx
	shll	%cl, %eax
	notl	%eax
	movl	$2, %edx
	shll	%cl, %edx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	andl	%eax, %r12d
	movl	%ebx, %ecx
	shll	%cl, %edx
	leal	-1(%rdx), %eax
	andl	%r13d, %eax
	negl	%edx
	andl	%r13d, %edx
	addl	%edx, %edx
	orl	%eax, %edx
	incl	%ebx
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	notl	%r12d
	movl	%edx, %r13d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	testl	%edx, %edx
	leaq	-50(%rbp), %rcx
	cmoveq	%rcx, %rax
	subl	$-8, %ebx
	jae	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movb	%r13b, (%r15)
	incq	%r15
	shrl	$8, %r13d
	addl	$-8, %ebx
	cmpl	$7, %ebx
	ja	LBB0_17
	jmp	LBB0_9
LBB0_3:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
LBB0_4:
	movl	$32382, %eax                    ## imm = 0x7E7E
	movl	%ebx, %ecx
	shll	%cl, %eax
	orl	%r13d, %eax
	addl	$16, %ebx
	movq	%r15, %rcx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movb	%al, (%rcx)
	incq	%rcx
	shrl	$8, %eax
	addl	$-8, %ebx
	incl	%r15d
	cmpl	$7, %ebx
	ja	LBB0_5
## %bb.6:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rax
	movq	%rax, 24(%rbx)
	subl	%eax, %r15d
	movl	%r15d, 8(%rbx)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_kfree_skb
	movq	(%rbx), %rax
	incl	(%rax)
LBB0_7:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_encode_hdlc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_hdlc
_encode_hdlc:                           ; @encode_hdlc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	ldr	w8, [x0, #8]
	cmp	w8, #0
	b.gt	LBB0_13
; %bb.1:
	mov	x21, x0
	ldr	x22, [x0, #32]
	cbz	x22, LBB0_13
; %bb.2:
	str	xzr, [x21, #32]
	ldr	w19, [x22]
	sub	w1, w19, #1
	ldr	x23, [x21, #16]
	ldr	x8, [x22, #8]
	add	x28, x8, #1
	mov	x0, x28
	mov	x20, x1
	bl	_calc_crc_ccitt
	strh	w0, [sp, #30]
	mov	w8, #126
	strb	w8, [x23], #1
	stp	x22, x21, [sp, #8]              ; 16-byte Folded Spill
	tbnz	w19, #31, LBB0_9
; %bb.3:
	mov	w8, #0
	mov	w24, #0
	mov	w25, #0
	mov	w26, #256
	mov	w27, #2
	mov	x22, x20
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w10, [sp, #24]                  ; 4-byte Folded Reload
	tbnz	w10, #31, LBB0_10
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_8 Depth 2
	mov	w19, #0
	mov	x20, x28
	ldrb	w9, [x28]
	lsl	w10, w9, #8
	orr	w25, w10, w25, lsr #8
	lsl	w9, w9, w8
	orr	w24, w9, w24
	mvn	w28, w25
	str	w22, [sp, #24]                  ; 4-byte Folded Spill
	sub	w22, w22, #1
	mov	x21, x8
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsr	w8, w28, w19
	tst	w8, #0x1f0
	cset	w0, eq
	bl	_unlikely
	lsl	w8, w26, w19
	bic	w8, w25, w8
	lsl	w9, w27, w19
	lsl	w9, w9, w21
	sub	w10, w9, #1
	and	w10, w10, w24
	neg	w9, w9
	and	w9, w24, w9
	orr	w9, w10, w9, lsl #1
	cmp	x0, #0
	csel	w25, w25, w8, eq
	csinv	w28, w28, w8, eq
	csel	w24, w24, w9, eq
	cinc	w21, w21, ne
	add	w19, w19, #1
	cmp	w19, #8
	b.ne	LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w22, #0
	mov	x28, x20
	add	x8, sp, #30
	csinc	x28, x8, x20, eq
	add	w8, w21, #8
	cmn	w21, #9
	b.hi	LBB0_4
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	strb	w24, [x23], #1
	lsr	w24, w24, #8
	sub	w8, w8, #8
	cmp	w8, #7
	b.hi	LBB0_8
	b	LBB0_4
LBB0_9:
	mov	w24, #0
	mov	w8, #0
LBB0_10:
	mov	w9, #32382
	lsl	w9, w9, w8
	orr	w9, w9, w24
	add	w8, w8, #16
	mov	x10, x23
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	strb	w9, [x10], #1
	lsr	w9, w9, #8
	sub	w8, w8, #8
	add	w23, w23, #1
	cmp	w8, #7
	b.hi	LBB0_11
; %bb.12:
	ldp	x0, x19, [sp, #8]               ; 16-byte Folded Reload
	ldr	x8, [x19, #16]
	str	x8, [x19, #24]
	sub	w8, w23, w8
	str	w8, [x19, #8]
	bl	_dev_kfree_skb
	ldr	x8, [x19]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_encode_hdlc
.subsections_via_symbols
