	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crc16                          ## -- Begin function crc16
	.p2align	4, 0x90
_crc16:                                 ## @crc16
	.cfi_startproc
## %bb.0:
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	_POLY@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$65535, %ebx                    ## imm = 0xFFFF
	xorl	%r8d, %r8d
	xorl	%r10d, %r10d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rdi,%r10), %edx
	movl	%ebx, %eax
	xorl	%edx, %eax
	andl	$1, %eax
	negl	%eax
	sarl	%ebx
	andl	%r9d, %eax
	xorl	%ebx, %eax
	movl	%edx, %ecx
	shrl	%ecx
	xorl	%eax, %ecx
	andl	$1, %ecx
	negl	%ecx
	sarl	%eax
	andl	%r9d, %ecx
	xorl	%eax, %ecx
	movl	%edx, %eax
	shrl	$2, %eax
	xorl	%ecx, %eax
	andl	$1, %eax
	negl	%eax
	sarl	%ecx
	andl	%r9d, %eax
	xorl	%ecx, %eax
	movl	%edx, %ecx
	shrl	$3, %ecx
	xorl	%eax, %ecx
	andl	$1, %ecx
	negl	%ecx
	sarl	%eax
	andl	%r9d, %ecx
	xorl	%eax, %ecx
	movl	%edx, %eax
	shrl	$4, %eax
	xorl	%ecx, %eax
	andl	$1, %eax
	negl	%eax
	sarl	%ecx
	andl	%r9d, %eax
	xorl	%ecx, %eax
	movl	%edx, %ecx
	shrl	$5, %ecx
	xorl	%eax, %ecx
	andl	$1, %ecx
	negl	%ecx
	sarl	%eax
	andl	%r9d, %ecx
	xorl	%eax, %ecx
	movl	%edx, %eax
	shrl	$6, %eax
	xorl	%ecx, %eax
	andl	$1, %eax
	negl	%eax
	sarl	%ecx
	andl	%r9d, %eax
	xorl	%ecx, %eax
	shrl	$7, %edx
	movl	%eax, %ecx
	andl	$1, %ecx
	sarl	%eax
	cmpl	%edx, %ecx
	movl	%r9d, %ebx
	cmovel	%r8d, %ebx
	xorl	%eax, %ebx
	incq	%r10
	cmpq	%r10, %rsi
	jne	LBB0_3
## %bb.4:
	notl	%ebx
	movl	%ebx, %ecx
	shll	$8, %ecx
	movzbl	%bh, %eax
	orl	%ecx, %eax
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POLY,4,2                       ## @POLY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crc16                          ; -- Begin function crc16
	.p2align	2
_crc16:                                 ; @crc16
	.cfi_startproc
; %bb.0:
	cbz	x1, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _POLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #65535
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x0], #1
	eor	w11, w9, w10
	sbfx	w11, w11, #0, #1
	and	w11, w11, w8
	eor	w9, w11, w9, asr #1
	eor	w11, w9, w10, lsr #1
	sbfx	w11, w11, #0, #1
	and	w11, w11, w8
	eor	w9, w11, w9, asr #1
	eor	w11, w9, w10, lsr #2
	sbfx	w11, w11, #0, #1
	and	w11, w11, w8
	eor	w9, w11, w9, asr #1
	eor	w11, w9, w10, lsr #3
	sbfx	w11, w11, #0, #1
	and	w11, w11, w8
	eor	w9, w11, w9, asr #1
	eor	w11, w9, w10, lsr #4
	sbfx	w11, w11, #0, #1
	and	w11, w11, w8
	eor	w9, w11, w9, asr #1
	eor	w11, w9, w10, lsr #5
	sbfx	w11, w11, #0, #1
	and	w11, w11, w8
	eor	w9, w11, w9, asr #1
	eor	w11, w9, w10, lsr #6
	sbfx	w11, w11, #0, #1
	and	w11, w11, w8
	eor	w9, w11, w9, asr #1
	and	w11, w9, #0x1
	cmp	w11, w10, lsr #7
	csel	w10, wzr, w8, eq
	eor	w9, w10, w9, asr #1
	subs	x1, x1, #1
	b.ne	LBB0_2
; %bb.3:
	mvn	w8, w9
	lsl	w0, w8, #8
	bfxil	w0, w8, #8, #8
	ret
LBB0_4:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_POLY,4,2                       ; @POLY
.subsections_via_symbols
