	.file	"extr_exr.c_huf_build_dec_table.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	huf_build_dec_table, @function
huf_build_dec_table:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	esi, edx
	jg	.L20
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movsx	r13, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, 1
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L27:
	sub	edx, ecx
	mov	ecx, edx
	sar	ebx, cl
	movsx	rbx, ebx
	sal	rbx, 4
	add	rbx, rbp
	mov	r8d, DWORD PTR [rbx]
	test	r8d, r8d
	jne	.L10
	mov	eax, DWORD PTR 4[rbx]
	mov	rdi, QWORD PTR 8[rbx]
	lea	esi, 1[rax]
	mov	DWORD PTR 4[rbx], esi
	sal	esi, 2
	call	av_realloc@PLT
	mov	QWORD PTR 8[rbx], rax
	test	rax, rax
	je	.L25
	movsx	rdx, DWORD PTR 4[rbx]
	mov	DWORD PTR -4[rax+rdx*4], r13d
.L8:
	add	r13, 1
	cmp	r15d, r13d
	jl	.L26
.L13:
	mov	ecx, DWORD PTR [r14+r13*4]
	mov	esi, r13d
	mov	ebx, ecx
	mov	edx, ecx
	sar	ebx, 6
	and	edx, 63
	mov	eax, ebx
	sar	eax, cl
	test	eax, eax
	jne	.L10
	mov	ecx, DWORD PTR HUF_DECBITS[rip]
	cmp	ecx, edx
	jl	.L27
	test	edx, edx
	je	.L8
	sub	ecx, edx
	mov	edi, r12d
	sal	ebx, cl
	sal	edi, cl
	movsx	rax, ebx
	mov	ecx, edi
	sal	rax, 4
	add	rax, rbp
	test	edi, edi
	jle	.L8
	sub	ecx, 1
	add	rcx, 1
	sal	rcx, 4
	add	rcx, rax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L28:
	cmp	QWORD PTR 8[rax], 0
	jne	.L10
	mov	DWORD PTR [rax], edx
	add	rax, 16
	mov	DWORD PTR -12[rax], esi
	cmp	rax, rcx
	je	.L8
.L12:
	mov	edi, DWORD PTR [rax]
	test	edi, edi
	je	.L28
.L10:
	mov	eax, DWORD PTR AVERROR_INVALIDDATA[rip]
	add	rsp, 8
	.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
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L25:
	.cfi_restore_state
	mov	edi, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_restore 15
	.cfi_def_cfa_offset 8
	jmp	AVERROR@PLT
.L20:
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	huf_build_dec_table, .-huf_build_dec_table
	.comm	HUF_DECBITS,4,4
	.comm	ENOMEM,4,4
	.comm	AVERROR_INVALIDDATA,4,4
	.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_exr.c_huf_build_dec_table.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	huf_build_dec_table, %function
huf_build_dec_table:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, r2
	bgt	.L20
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	sub	r6, r1, #-1073741823
	mov	r5, r1
	mov	r9, r2
	mov	r7, r3
	mov	r8, #1
	ldr	r10, .L29
	add	r6, r0, r6, lsl #2
	b	.L13
.L27:
	sub	r0, r3, r0
	asr	r4, r4, r0
	add	r4, r4, r4, lsl #1
	ldr	r3, [r7, r4, lsl #2]
	add	r4, r7, r4, lsl #2
	cmp	r3, #0
	bne	.L10
	ldr	r1, [r4, #4]
	ldr	r0, [r4, #8]
	add	r1, r1, #1
	str	r1, [r4, #4]
	lsl	r1, r1, #2
	bl	av_realloc
	cmp	r0, #0
	str	r0, [r4, #8]
	beq	.L25
	ldr	r3, [r4, #4]
	sub	r3, r3, #-1073741823
	str	r5, [r0, r3, lsl #2]
.L8:
	add	r5, r5, #1
	cmp	r9, r5
	blt	.L26
.L13:
	ldr	r3, [r6, #4]!
	asr	r4, r3, #6
	and	r3, r3, #63
	asrs	r2, r4, r3
	bne	.L10
	ldr	r0, [r10]
	cmp	r0, r3
	blt	.L27
	cmp	r3, #0
	beq	.L8
	sub	r0, r0, r3
	lsl	r2, r8, r0
	cmp	r2, #0
	lsl	r0, r4, r0
	ble	.L8
	add	r0, r0, #1
	add	r0, r0, r0, lsl #1
	add	r0, r7, r0, lsl #2
	b	.L12
.L28:
	ldr	r1, [r0, #-4]
	cmp	r1, #0
	bne	.L10
	subs	r2, r2, #1
	str	r3, [r0, #-12]
	str	r5, [r0, #-8]
	add	r0, r0, #12
	beq	.L8
.L12:
	ldr	r1, [r0, #-12]
	cmp	r1, #0
	beq	.L28
.L10:
	ldr	r3, .L29+4
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L26:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L25:
	ldr	r3, .L29+8
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r0, [r3]
	b	AVERROR
.L20:
	mov	r0, #0
	bx	lr
.L30:
	.align	2
.L29:
	.word	HUF_DECBITS
	.word	AVERROR_INVALIDDATA
	.word	ENOMEM
	.size	huf_build_dec_table, .-huf_build_dec_table
	.comm	HUF_DECBITS,4,4
	.comm	ENOMEM,4,4
	.comm	AVERROR_INVALIDDATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
