	.file	"extr_mktitanimg.c_cs_calc_buf_sum_ds.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cs_calc_buf_sum_ds
	.type	cs_calc_buf_sum_ds, @function
cs_calc_buf_sum_ds:
.LFB0:
	.cfi_startproc
	endbr64
	lea	r8d, [rsi+rcx]
	movsx	r8, r8d
	test	esi, esi
	je	.L8
	lea	eax, -1[rsi]
	mov	r10, QWORD PTR crctab[rip]
	lea	r9, 1[rdi+rax]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L3:
	add	rdi, 1
	mov	rsi, rax
	shr	rax, 24
	xor	al, BYTE PTR -1[rdi]
	sal	rsi, 8
	movzx	eax, al
	xor	rsi, QWORD PTR [r10+rax*8]
	mov	rax, rsi
	cmp	rdi, r9
	jne	.L3
.L2:
	test	ecx, ecx
	je	.L4
	sub	ecx, 1
	mov	rdi, QWORD PTR crctab[rip]
	lea	rsi, 1[rdx+rcx]
	.p2align 4,,10
	.p2align 3
.L5:
	add	rdx, 1
	mov	rcx, rax
	shr	rax, 24
	xor	al, BYTE PTR -1[rdx]
	sal	rcx, 8
	movzx	eax, al
	xor	rcx, QWORD PTR [rdi+rax*8]
	mov	rax, rcx
	cmp	rdx, rsi
	jne	.L5
.L4:
	test	r8, r8
	je	.L6
	mov	rcx, QWORD PTR crctab[rip]
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdx, rax
	shr	rax, 24
	xor	rax, r8
	sal	rdx, 8
	movzx	eax, al
	xor	rdx, QWORD PTR [rcx+rax*8]
	shr	r8, 8
	mov	rax, rdx
	jne	.L7
.L6:
	not	eax
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	xor	eax, eax
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	cs_calc_buf_sum_ds, .-cs_calc_buf_sum_ds
	.comm	crctab,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_mktitanimg.c_cs_calc_buf_sum_ds.c"
	.text
	.align	2
	.global	cs_calc_buf_sum_ds
	.syntax unified
	.arm
	.fpu softvfp
	.type	cs_calc_buf_sum_ds, %function
cs_calc_buf_sum_ds:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	push	{r4, r5, lr}
	add	lr, r1, r3
	beq	.L8
	mov	ip, #0
	ldr	r5, .L20
	add	r4, r0, r1
	ldr	r5, [r5]
.L3:
	ldrb	r1, [r0], #1	@ zero_extendqisi2
	eor	r1, r1, ip, lsr #24
	ldr	r1, [r5, r1, lsl #2]
	cmp	r0, r4
	eor	ip, r1, ip, lsl #8
	bne	.L3
.L2:
	cmp	r3, #0
	beq	.L4
	ldr	r0, .L20
	add	r1, r2, r3
	ldr	r0, [r0]
.L5:
	ldrb	r3, [r2], #1	@ zero_extendqisi2
	eor	r3, r3, ip, lsr #24
	ldr	r3, [r0, r3, lsl #2]
	cmp	r2, r1
	eor	ip, r3, ip, lsl #8
	bne	.L5
.L4:
	cmp	lr, #0
	beq	.L6
	ldr	r3, .L20
	ldr	r2, [r3]
.L7:
	eor	r3, lr, ip, lsr #24
	and	r3, r3, #255
	ldr	r3, [r2, r3, lsl #2]
	lsrs	lr, lr, #8
	eor	ip, r3, ip, lsl #8
	bne	.L7
.L6:
	mvn	r0, ip
	pop	{r4, r5, pc}
.L8:
	mov	ip, r1
	b	.L2
.L21:
	.align	2
.L20:
	.word	crctab
	.size	cs_calc_buf_sum_ds, .-cs_calc_buf_sum_ds
	.comm	crctab,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
