	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function HDLC_Encode
_HDLC_Encode:                           ## @HDLC_Encode
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edx killed $edx def $rdx
	movl	%esi, %r14d
	movq	_PPP_INITFCS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	8(%rdi), %r12d
	testq	%r12, %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	(%rdi), %r15
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r15,%r14), %edi
	callq	_muststuff
	cmpq	$1, %rax
	sbbl	$-1, %ebx
	movzbl	(%r15,%r14), %esi
	movl	%r13d, %edi
	callq	_crc_ccitt_byte
	movl	%eax, %r13d
	incq	%r14
	cmpl	%r14d, %r12d
	jne	LBB0_3
## %bb.4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %eax
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_1:
	xorl	%eax, %eax
	xorl	%ebx, %ebx
LBB0_5:
	addl	%r14d, %edx
	addl	%ebx, %edx
	leal	(%rax,%rdx), %edi
	addl	$6, %edi
	callq	_dev_alloc_skb
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_18
## %bb.6:
	xorl	$65535, %r13d                   ## imm = 0xFFFF
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_skb_reserve
	movl	12(%r15), %edi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	12(%r14), %esi
	movl	$2, %edx
	callq	_memcpy
	movq	_PPP_FLAG@GOTPCREL(%rip), %rax
	movb	(%rax), %bl
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_skb_put
	movb	%bl, (%rax)
	subl	$1, 8(%r14)
	jae	LBB0_7
LBB0_12:
	movzbl	%r13b, %edi
	callq	_muststuff
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	_PPP_ESCAPE@GOTPCREL(%rip), %rax
	movb	(%rax), %bl
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_skb_put
	movb	%bl, (%rax)
	movq	_PPP_TRANS@GOTPCREL(%rip), %rax
	movb	(%rax), %bl
	xorb	%r13b, %bl
	jmp	LBB0_15
LBB0_7:
	movq	_PPP_TRANS@GOTPCREL(%rip), %r12
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r14), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, (%r14)
	movzbl	(%rax), %ebx
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_skb_put
	movb	%bl, (%rax)
	subl	$1, 8(%r14)
	jb	LBB0_12
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movzbl	(%rax), %edi
	callq	_muststuff
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	_PPP_ESCAPE@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ebx
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_skb_put
	movb	%bl, (%rax)
	movq	(%r14), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, (%r14)
	movzbl	(%r12), %ebx
	xorb	(%rax), %bl
	jmp	LBB0_11
LBB0_13:
	movl	%r13d, %ebx
LBB0_15:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_skb_put
	movb	%bl, (%rax)
	shrl	$8, %r13d
	movzbl	%r13b, %edi
	callq	_muststuff
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	_PPP_ESCAPE@GOTPCREL(%rip), %rax
	movb	(%rax), %bl
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_skb_put
	movb	%bl, (%rax)
	movq	_PPP_TRANS@GOTPCREL(%rip), %rax
	xorb	(%rax), %r13b
LBB0_17:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_skb_put
	movb	%r13b, (%rax)
	movq	_PPP_FLAG@GOTPCREL(%rip), %rax
	movb	(%rax), %bl
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_skb_put
	movb	%bl, (%rax)
LBB0_18:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_kfree_skb
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPP_INITFCS,4,2                ## @PPP_INITFCS
	.comm	_PPP_FLAG,1,0                   ## @PPP_FLAG
	.comm	_PPP_ESCAPE,1,0                 ## @PPP_ESCAPE
	.comm	_PPP_TRANS,1,0                  ## @PPP_TRANS
	.no_dead_strip	_HDLC_Encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function HDLC_Encode
_HDLC_Encode:                           ; @HDLC_Encode
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PPP_INITFCS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PPP_INITFCS@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	w24, [x0, #8]
	cbz	w24, LBB0_4
; %bb.1:
	mov	w23, #0
	ldr	x25, [x19]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	w24, w24, #1
	ldrb	w0, [x25]
	bl	_muststuff
	cmp	x0, #0
	cinc	w23, w23, ne
	ldrb	w1, [x25], #1
	mov	x0, x22
	bl	_crc_ccitt_byte
	mov	x22, x0
	cbnz	w24, LBB0_2
; %bb.3:
	ldr	w8, [x19, #8]
	b	LBB0_5
LBB0_4:
	mov	w8, #0
	mov	w23, #0
LBB0_5:
	add	w9, w21, w20
	add	w9, w9, w23
	add	w8, w9, w8
	add	w0, w8, #6
	bl	_dev_alloc_skb
	mov	x20, x0
	cbz	x0, LBB0_18
; %bb.6:
	eor	w22, w22, #0xffff
	mov	x0, x20
	mov	x1, x21
	bl	_skb_reserve
	ldr	w0, [x20, #12]
	ldr	w1, [x19, #12]
	mov	w2, #2
	bl	_memcpy
Lloh3:
	adrp	x21, _PPP_FLAG@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PPP_FLAG@GOTPAGEOFF]
	ldrb	w23, [x21]
	mov	x0, x20
	mov	w1, #1
	bl	_skb_put
	strb	w23, [x0]
	ldr	w8, [x19, #8]
	sub	w9, w8, #1
	str	w9, [x19, #8]
Lloh5:
	adrp	x24, _PPP_ESCAPE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _PPP_ESCAPE@GOTPAGEOFF]
Lloh7:
	adrp	x23, _PPP_TRANS@GOTPAGE
Lloh8:
	ldr	x23, [x23, _PPP_TRANS@GOTPAGEOFF]
	cbnz	w8, LBB0_11
LBB0_7:
	and	w0, w22, #0xff
	bl	_muststuff
	cbz	x0, LBB0_13
; %bb.8:
	ldrb	w25, [x24]
	mov	x0, x20
	mov	w1, #1
	bl	_skb_put
	strb	w25, [x0]
	ldrb	w8, [x23]
	eor	w25, w8, w22
	b	LBB0_14
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x19]
	add	x9, x8, #1
	str	x9, [x19]
	ldrb	w25, [x8]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x20
	mov	w1, #1
	bl	_skb_put
	strb	w25, [x0]
	ldr	w8, [x19, #8]
	sub	w9, w8, #1
	str	w9, [x19, #8]
	cbz	w8, LBB0_7
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldrb	w0, [x8]
	bl	_muststuff
	cbz	x0, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldrb	w25, [x24]
	mov	x0, x20
	mov	w1, #1
	bl	_skb_put
	strb	w25, [x0]
	ldr	x8, [x19]
	add	x9, x8, #1
	str	x9, [x19]
	ldrb	w8, [x8]
	ldrb	w9, [x23]
	eor	w25, w9, w8
	b	LBB0_10
LBB0_13:
	mov	x25, x22
LBB0_14:
	mov	x0, x20
	mov	w1, #1
	bl	_skb_put
	strb	w25, [x0]
	ubfx	w0, w22, #8, #8
	bl	_muststuff
	cbz	x0, LBB0_16
; %bb.15:
	ldrb	w24, [x24]
	mov	x0, x20
	mov	w1, #1
	bl	_skb_put
	strb	w24, [x0]
	ldrb	w8, [x23]
	eor	w22, w8, w22, lsr #8
	b	LBB0_17
LBB0_16:
	lsr	w22, w22, #8
LBB0_17:
	mov	x0, x20
	mov	w1, #1
	bl	_skb_put
	strb	w22, [x0]
	ldrb	w21, [x21]
	mov	x0, x20
	mov	w1, #1
	bl	_skb_put
	strb	w21, [x0]
LBB0_18:
	mov	x0, x19
	bl	_dev_kfree_skb
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PPP_INITFCS,4,2                ; @PPP_INITFCS
	.comm	_PPP_FLAG,1,0                   ; @PPP_FLAG
	.comm	_PPP_ESCAPE,1,0                 ; @PPP_ESCAPE
	.comm	_PPP_TRANS,1,0                  ; @PPP_TRANS
	.no_dead_strip	_HDLC_Encode
.subsections_via_symbols
