	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_calc_crc_16_ccitt              ## -- Begin function calc_crc_16_ccitt
	.p2align	4, 0x90
_calc_crc_16_ccitt:                     ## @calc_crc_16_ccitt
	.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	%rbx
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	shll	$8, %edx
	movslq	%edx, %rax
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.1:
	movq	_CHAR_BIT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	movq	_CRC_CARRY_BIT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_CRC_XOR_PATTERN@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r15
	leaq	-1(%r8), %r9
	movl	%r8d, %r10d
	andl	$3, %r10d
	movq	%r8, %r11
	andq	$-4, %r11
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	$4, %rdi
	incq	%r14
	cmpq	%rsi, %r14
	je	LBB0_18
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
	movq	%rax, %rdx
	movslq	(%rdi), %rax
	orq	%rdx, %rax
	testq	%r8, %r8
	jle	LBB0_17
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$3, %r9
	jae	LBB0_4
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	testq	%r10, %r10
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r10, %rdx
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addq	%rax, %rax
	movq	%rcx, %rbx
	andq	%rax, %rbx
	cmovneq	%r15, %rbx
	xorq	%rbx, %rax
	decq	%rdx
	jne	LBB0_16
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r11, %rbx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=2
	xorq	%rdx, %rax
	addq	$-4, %rbx
	je	LBB0_14
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addq	%rax, %rax
	movq	%rcx, %rdx
	andq	%rax, %rdx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	%r15, %rdx
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=2
	xorq	%rax, %rdx
	addq	%rdx, %rdx
	movq	%rcx, %rax
	andq	%rdx, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	%r15, %rax
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	xorq	%rdx, %rax
	addq	%rax, %rax
	movq	%rcx, %rdx
	andq	%rax, %rdx
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=2
	movq	%r15, %rdx
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=2
	xorq	%rax, %rdx
	addq	%rdx, %rdx
	movq	%rcx, %rax
	andq	%rdx, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=2
	movq	%r15, %rax
	jmp	LBB0_13
LBB0_18:
	shrq	$8, %rax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHAR_BIT,8,3                   ## @CHAR_BIT
	.comm	_CRC_CARRY_BIT,8,3              ## @CRC_CARRY_BIT
	.comm	_CRC_XOR_PATTERN,8,3            ## @CRC_XOR_PATTERN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_calc_crc_16_ccitt              ; -- Begin function calc_crc_16_ccitt
	.p2align	2
_calc_crc_16_ccitt:                     ; @calc_crc_16_ccitt
	.cfi_startproc
; %bb.0:
	lsl	w8, w2, #8
	sxtw	x8, w8
	cbz	x1, LBB0_6
; %bb.1:
	mov	x9, #0
Lloh0:
	adrp	x10, _CHAR_BIT@GOTPAGE
Lloh1:
	ldr	x10, [x10, _CHAR_BIT@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
Lloh3:
	adrp	x11, _CRC_CARRY_BIT@GOTPAGE
Lloh4:
	ldr	x11, [x11, _CRC_CARRY_BIT@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
Lloh6:
	adrp	x12, _CRC_XOR_PATTERN@GOTPAGE
Lloh7:
	ldr	x12, [x12, _CRC_XOR_PATTERN@GOTPAGEOFF]
Lloh8:
	ldr	x12, [x12]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	cmp	x9, x1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldrsw	x13, [x0], #4
	orr	x8, x8, x13
	cmp	x10, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x13, x10
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x8, x8, #1
	tst	x11, x8
	csel	x14, xzr, x12, eq
	eor	x8, x14, x8
	subs	x13, x13, #1
	b.ne	LBB0_5
	b	LBB0_2
LBB0_6:
	lsr	x0, x8, #8
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CHAR_BIT,8,3                   ; @CHAR_BIT
	.comm	_CRC_CARRY_BIT,8,3              ; @CRC_CARRY_BIT
	.comm	_CRC_XOR_PATTERN,8,3            ; @CRC_XOR_PATTERN
.subsections_via_symbols
