	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs_calc_sum                    ## -- Begin function cs_calc_sum
	.p2align	4, 0x90
_cs_calc_sum:                           ## @cs_calc_sum
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BUFLEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_fseek
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r13, %rcx
	callq	_fread
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r12, %rcx
	incq	%rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r8d, %r8d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r8, %r15
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	addq	%r9, %r14
	movq	%r12, %rdi
	movl	$1, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%r13, %rcx
	callq	_fread
	movq	%r15, %r8
	testq	%rax, %rax
	je	LBB0_14
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	%r14, %rcx
	addq	%rax, %rcx
	jb	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_BUFLEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdx
	leaq	-8(%rax), %r9
	cmpq	%rdx, %rax
	cmoveq	%rax, %r9
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	cmoveq	%rax, %r9
	testq	%r9, %r9
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_crctab@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testb	$1, %r9b
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
                                        ## implicit-def: $r15
	movq	%r12, %rbx
	movq	%r9, %r10
	cmpq	$1, %r9
	je	LBB0_13
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	-1(%r9), %r10
	movq	%r8, %r15
	shlq	$8, %r15
	shrl	$24, %r8d
	movzbl	(%r12), %edi
	xorq	%r8, %rdi
	xorq	(%rax,%rdi,8), %r15
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%r15, %r8
	cmpq	$1, %r9
	je	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edi, %edi
	movq	%r8, %r15
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rcx
	shlq	$8, %rcx
	shrl	$24, %r15d
	movzbl	(%rbx,%rdi), %esi
	xorq	%r15, %rsi
	xorq	(%rax,%rsi,8), %rcx
	movq	%rcx, %r15
	shlq	$8, %r15
	shrl	$24, %ecx
	movzbl	1(%rbx,%rdi), %esi
	xorq	%rcx, %rsi
	xorq	(%rax,%rsi,8), %r15
	addq	$2, %rdi
	cmpq	%rdi, %r10
	jne	LBB0_12
	jmp	LBB0_13
LBB0_1:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
LBB0_14:
	movq	%r13, %rdi
	callq	_ferror
	testq	%rax, %rax
	movl	$0, %eax
	jne	LBB0_20
## %bb.15:
	testq	%r14, %r14
	je	LBB0_16
## %bb.17:
	movq	_crctab@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r14, %rdx
	movq	%r15, %rax
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	shlq	$8, %rax
	shrl	$24, %r15d
	xorl	%r14d, %r15d
	movzbl	%r15b, %esi
	xorq	(%rcx,%rsi,8), %rax
	shrq	$8, %rdx
	movq	%rax, %r15
	cmpq	$255, %r14
	movq	%rdx, %r14
	ja	LBB0_18
	jmp	LBB0_19
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_16:
	movq	%r15, %rax
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
LBB0_19:
	notl	%eax
	movq	%rax, (%rdi)
	movl	$1, %eax
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_22
## %bb.21:
                                        ## kill: def $eax killed $eax killed $rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFLEN,4,2                     ## @BUFLEN
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_crctab,8,3                     ## @crctab
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs_calc_sum                    ; -- Begin function cs_calc_sum
	.p2align	2
_cs_calc_sum:                           ; @cs_calc_sum
	.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
	sub	sp, sp, #16
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x25, _BUFLEN@GOTPAGE
Lloh4:
	ldr	x25, [x25, _BUFLEN@GOTPAGEOFF]
	ldr	w8, [x25]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
Lloh7:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_fseek
	ldr	w2, [x25]
	mov	x0, x22
	mov	w1, #1
	mov	x3, x20
	bl	_fread
	cbz	x0, LBB0_7
; %bb.1:
	mov	x24, #0
	mov	x23, #0
Lloh10:
	adrp	x26, _crctab@GOTPAGE
Lloh11:
	ldr	x26, [x26, _crctab@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x8, x24
	mov	x0, x22
	mov	w1, #1
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x20
	bl	_fread
	cbz	x0, LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cmn	x24, x0
	b.hs	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x2, [x25]
	sub	x8, x0, #8
	cmp	x0, x2
	ccmp	w21, #0, #4, ne
	csel	x8, x8, x0, ne
	cbz	x8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x26]
	mov	x10, x22
	mov	x11, x8
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w12, [x10], #1
	ubfx	x13, x23, #24, #8
	eor	x12, x13, x12
	ldr	x12, [x9, x12, lsl #3]
	eor	x23, x12, x23, lsl #8
	subs	x11, x11, #1
	b.ne	LBB0_6
	b	LBB0_2
LBB0_7:
	mov	x23, #0
	mov	x24, #0
LBB0_8:
	mov	x0, x20
	bl	_ferror
	cbz	x0, LBB0_10
LBB0_9:
	mov	w0, #0
	b	LBB0_14
LBB0_10:
	cbz	x24, LBB0_13
; %bb.11:
Lloh12:
	adrp	x8, _crctab@GOTPAGE
Lloh13:
	ldr	x8, [x8, _crctab@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	eor	w9, w24, w23, lsr #24
	and	x9, x9, #0xff
	ldr	x9, [x8, x9, lsl #3]
	eor	x23, x9, x23, lsl #8
	lsr	x9, x24, #8
	cmp	x24, #255
	mov	x24, x9
	b.hi	LBB0_12
LBB0_13:
	mvn	w8, w23
	str	x8, [x19]
	mov	w0, #1
LBB0_14:
	ldur	x8, [x29, #-72]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	sub	sp, x29, #64
	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
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFLEN,4,2                     ; @BUFLEN
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_crctab,8,3                     ; @crctab
.subsections_via_symbols
