	.file	"extr_histogram_enc.c_HistogramBuild.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	HistogramBuild, @function
HistogramBuild:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	VP8LSubSampleSize@PLT
	mov	rdi, r14
	mov	DWORD PTR 4[rsp], eax
	mov	rax, QWORD PTR 0[r13]
	mov	QWORD PTR 8[rsp], rax
	call	VP8LRefsCursorInit@PLT
	xor	edi, edi
	test	r12d, r12d
	setg	dil
	mov	QWORD PTR 16[rsp], rax
	xor	r14d, r14d
	xor	ebx, ebx
	call	assert@PLT
	mov	rdi, r13
	lea	r13, 16[rsp]
	call	VP8LHistogramSetClear@PLT
	mov	rdi, r13
	call	VP8LRefsCursorOk@PLT
	test	rax, rax
	je	.L10
	.p2align 4,,10
	.p2align 3
.L5:
	mov	ecx, r12d
	mov	eax, r14d
	mov	edx, ebx
	mov	rsi, QWORD PTR 8[rsp]
	sar	eax, cl
	imul	eax, DWORD PTR 4[rsp]
	sar	edx, cl
	mov	r15, QWORD PTR 16[rsp]
	xor	ecx, ecx
	add	eax, edx
	xor	edx, edx
	cdqe
	mov	rdi, QWORD PTR [rsi+rax*8]
	mov	rsi, r15
	call	VP8LHistogramAddSinglePixOrCopy@PLT
	mov	rdi, r15
	call	PixOrCopyLength@PLT
	add	ebx, eax
	cmp	ebp, ebx
	jg	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	sub	ebx, ebp
	add	r14d, 1
	cmp	ebp, ebx
	jle	.L4
.L3:
	mov	rdi, r13
	call	VP8LRefsCursorNext@PLT
	mov	rdi, r13
	call	VP8LRefsCursorOk@PLT
	test	rax, rax
	jne	.L5
.L10:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	HistogramBuild, .-HistogramBuild
	.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_histogram_enc.c_HistogramBuild.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	HistogramBuild, %function
HistogramBuild:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r3
	ldr	r3, .L12
	sub	sp, sp, #8
	mov	r6, r2
	mov	r7, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r5, r0
	bl	VP8LSubSampleSize
	mov	r8, r0
	mov	r0, r6
	ldr	r9, [r4]
	bl	VP8LRefsCursorInit
	mov	r6, #0
	mov	r3, r0
	cmp	r7, r6
	movle	r0, #0
	movgt	r0, #1
	str	r3, [sp]
	bl	assert
	mov	r0, r4
	bl	VP8LHistogramSetClear
	mov	r0, sp
	bl	VP8LRefsCursorOk
	cmp	r0, #0
	mov	r4, r6
	beq	.L10
.L5:
	mov	r3, #0
	asr	r1, r4, r7
	asr	r2, r6, r7
	mla	r2, r8, r2, r1
	ldr	r10, [sp]
	ldr	r0, [r9, r2, lsl #2]
	mov	r1, r10
	mov	r2, r3
	bl	VP8LHistogramAddSinglePixOrCopy
	mov	r0, r10
	bl	PixOrCopyLength
	add	r4, r4, r0
	cmp	r5, r4
	bgt	.L3
.L4:
	sub	r4, r4, r5
	cmp	r5, r4
	add	r6, r6, #1
	ble	.L4
.L3:
	mov	r0, sp
	bl	VP8LRefsCursorNext
	mov	r0, sp
	bl	VP8LRefsCursorOk
	cmp	r0, #0
	bne	.L5
.L10:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.size	HistogramBuild, .-HistogramBuild
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
