	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function csr_crc16
_csr_crc16:                             ## @csr_crc16
	.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
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movl	%esi, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r12d
	shrl	$12, %r12d
	movl	(%r14,%r13,4), %edi
	callq	_be32_to_cpu
	movl	%eax, %r15d
	shrl	$28, %r15d
	xorl	%r12d, %r15d
	shll	$4, %ebx
	movl	%r15d, %eax
	shll	$12, %eax
	xorl	%ebx, %eax
	movl	%r15d, %ebx
	shll	$5, %ebx
	xorl	%eax, %ebx
	orl	%ebx, %r15d
	shrl	$12, %ebx
	movl	(%r14,%r13,4), %edi
	callq	_be32_to_cpu
	shrl	$24, %eax
	xorl	%ebx, %eax
	andl	$15, %eax
	shll	$4, %r15d
	movl	%eax, %r12d
	shll	$12, %r12d
	xorl	%r15d, %r12d
	movl	%eax, %ebx
	shll	$5, %ebx
	xorl	%r12d, %ebx
	orl	%eax, %ebx
	shrl	$12, %r12d
	movl	(%r14,%r13,4), %edi
	callq	_be32_to_cpu
	shrl	$20, %eax
	xorl	%r12d, %eax
	andl	$15, %eax
	shll	$4, %ebx
	movl	%eax, %r15d
	shll	$12, %r15d
	xorl	%ebx, %r15d
	movl	%eax, %ebx
	shll	$5, %ebx
	xorl	%r15d, %ebx
	orl	%eax, %ebx
	shrl	$12, %r15d
	movl	(%r14,%r13,4), %edi
	callq	_be32_to_cpu
	shrl	$16, %eax
	xorl	%r15d, %eax
	andl	$15, %eax
	shll	$4, %ebx
	movl	%eax, %r15d
	shll	$12, %r15d
	xorl	%ebx, %r15d
	movl	%eax, %ebx
	shll	$5, %ebx
	xorl	%r15d, %ebx
	orl	%eax, %ebx
	movl	(%r14,%r13,4), %edi
	callq	_be32_to_cpu
	xorl	%r15d, %eax
	shrl	$12, %eax
	andl	$15, %eax
	shll	$4, %ebx
	movl	%eax, %r15d
	shll	$12, %r15d
	xorl	%ebx, %r15d
	movl	%eax, %ebx
	shll	$5, %ebx
	xorl	%r15d, %ebx
	orl	%eax, %ebx
	shrl	$12, %r15d
	movl	(%r14,%r13,4), %edi
	callq	_be32_to_cpu
	shrl	$8, %eax
	xorl	%r15d, %eax
	andl	$15, %eax
	shll	$4, %ebx
	movl	%eax, %r15d
	shll	$12, %r15d
	xorl	%ebx, %r15d
	movl	%eax, %r12d
	shll	$5, %r12d
	xorl	%r15d, %r12d
	orl	%eax, %r12d
	shrl	$12, %r15d
	movl	(%r14,%r13,4), %edi
	callq	_be32_to_cpu
	shrl	$4, %eax
	xorl	%r15d, %eax
	andl	$15, %eax
	shll	$4, %r12d
	movl	%eax, %r15d
	shll	$5, %r15d
	xorl	%r12d, %r15d
	orl	%eax, %r15d
	movl	%eax, %ebx
	shll	$12, %ebx
	xorl	%r12d, %ebx
	shrl	$12, %ebx
	movl	(%r14,%r13,4), %edi
	callq	_be32_to_cpu
	xorl	%ebx, %eax
	andl	$15, %eax
	shll	$4, %r15d
	movl	%eax, %ecx
	shll	$12, %ecx
	movl	%eax, %edx
	shll	$5, %edx
	movzwl	%r15w, %ebx
	xorl	%ecx, %ebx
	xorl	%edx, %ebx
	orl	%eax, %ebx
	incq	%r13
	cmpl	%r13d, -48(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%ebx, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_csr_crc16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function csr_crc16
_csr_crc16:                             ; @csr_crc16
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	w1, LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	w21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_be32_to_cpu
	lsr	w8, w0, #28
	eor	w8, w8, w21, lsr #12
	lsl	w9, w8, #12
	eor	w9, w9, w21, lsl #4
	eor	w21, w9, w8, lsl #5
	orr	w22, w21, w8
	ldr	w0, [x20]
	bl	_be32_to_cpu
	lsr	w8, w0, #24
	eor	w8, w8, w21, lsr #12
	and	w9, w8, #0xf
	lsl	w10, w9, #12
	eor	w21, w10, w22, lsl #4
	eor	w22, w21, w9, lsl #5
	bfxil	w22, w8, #0, #4
	ldr	w0, [x20]
	bl	_be32_to_cpu
	lsr	w8, w0, #20
	eor	w8, w8, w21, lsr #12
	and	w9, w8, #0xf
	lsl	w10, w9, #12
	eor	w21, w10, w22, lsl #4
	eor	w22, w21, w9, lsl #5
	bfxil	w22, w8, #0, #4
	ldr	w0, [x20]
	bl	_be32_to_cpu
	lsr	w8, w0, #16
	eor	w8, w8, w21, lsr #12
	and	w9, w8, #0xf
	lsl	w10, w9, #12
	eor	w21, w10, w22, lsl #4
	eor	w22, w21, w9, lsl #5
	bfxil	w22, w8, #0, #4
	ldr	w0, [x20]
	bl	_be32_to_cpu
	eor	w8, w0, w21
	ubfx	w9, w8, #12, #4
	lsl	w10, w9, #12
	eor	w21, w10, w22, lsl #4
	eor	w22, w21, w9, lsl #5
	bfxil	w22, w8, #12, #4
	ldr	w0, [x20]
	bl	_be32_to_cpu
	lsr	w8, w0, #8
	eor	w8, w8, w21, lsr #12
	and	w9, w8, #0xf
	lsl	w10, w9, #12
	eor	w21, w10, w22, lsl #4
	eor	w22, w21, w9, lsl #5
	bfxil	w22, w8, #0, #4
	ldr	w0, [x20]
	bl	_be32_to_cpu
	lsr	w8, w0, #4
	eor	w8, w8, w21, lsr #12
	and	w9, w8, #0xf
	lsl	w10, w22, #4
	eor	w21, w10, w9, lsl #12
	eor	w22, w10, w9, lsl #5
	bfxil	w22, w8, #0, #4
	ldr	w0, [x20], #4
	bl	_be32_to_cpu
	eor	w8, w0, w21, lsr #12
	and	w9, w8, #0xf
	ubfiz	w10, w22, #4, #12
	eor	w10, w10, w9, lsl #12
	eor	w21, w10, w9, lsl #5
	bfxil	w21, w8, #0, #4
	subs	w19, w19, #1
	b.ne	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w21, #0
LBB0_4:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_csr_crc16
.subsections_via_symbols
