	.file	"extr_jpeglsdec.c_ls_get_code_runterm.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ls_get_code_runterm, @function
ls_get_code_runterm:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, edx
	mov	rax, QWORD PTR [rsi]
	mov	edx, ecx
	lea	r12d, 365[rbx]
	movsx	r13, r12d
	mov	r8d, DWORD PTR [rax+r13*4]
	mov	rax, QWORD PTR 8[rsi]
	lea	rbp, 0[0+r13*4]
	mov	r9d, DWORD PTR [rax+r13*4]
	test	ebx, ebx
	je	.L2
	mov	eax, r9d
	not	edx
	mov	r10d, DWORD PTR 36[rsi]
	add	edx, DWORD PTR 16[rsi]
	sar	eax
	add	r8d, eax
	cmp	r9d, r8d
	jge	.L22
.L3:
	xor	esi, esi
	.p2align 4,,10
	.p2align 3
.L6:
	add	esi, 1
	mov	eax, r9d
	mov	ecx, esi
	sal	eax, cl
	cmp	eax, r8d
	jl	.L6
	mov	ecx, r10d
	xor	r13d, r13d
	call	get_ur_golomb_jpegls@PLT
	mov	edx, ebx
.L12:
	add	eax, edx
	test	al, 1
	je	.L8
	lea	edx, 1[rax]
	mov	rax, QWORD PTR 24[r14]
	sar	edx
	add	rax, rbp
	sub	r13d, edx
	add	DWORD PTR [rax], 1
.L9:
	mov	edi, r13d
	call	FFABS@PLT
	cmp	eax, 65535
	jg	.L13
	mov	edi, r13d
	call	FFABS@PLT
	add	rbp, QWORD PTR [r14]
	mov	esi, r12d
	mov	rdi, r14
	sub	eax, ebx
	add	DWORD PTR 0[rbp], eax
	imul	r13d, DWORD PTR 32[r14]
	call	ff_jpegls_downscale_state@PLT
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	not	edx
	mov	r10d, DWORD PTR 36[rsi]
	add	edx, DWORD PTR 16[rsi]
	cmp	r9d, r8d
	jl	.L3
	xor	esi, esi
	mov	ecx, r10d
	call	get_ur_golomb_jpegls@PLT
	test	eax, eax
	jne	.L11
.L8:
	sar	eax
	mov	r13d, eax
	jmp	.L9
.L22:
	mov	ecx, r10d
	xor	esi, esi
	call	get_ur_golomb_jpegls@PLT
.L11:
	mov	rdx, QWORD PTR 24[r14]
	mov	rcx, QWORD PTR 8[r14]
	mov	edx, DWORD PTR [rdx+r13*4]
	add	edx, edx
	cmp	edx, DWORD PTR [rcx+r13*4]
	setl	r13b
	movzx	r13d, r13b
	lea	edx, [rbx+r13]
	jmp	.L12
.L13:
	mov	r13d, -65536
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ls_get_code_runterm, .-ls_get_code_runterm
	.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_jpeglsdec.c_ls_get_code_runterm.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ls_get_code_runterm, %function
ls_get_code_runterm:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	ip, [r1]
	mov	r5, r1
	add	r6, r2, #364
	ldr	r1, [r1, #4]
	add	r6, r6, #1
	cmp	r2, #0
	mov	r7, r2
	mov	r4, r0
	ldr	ip, [ip, r6, lsl #2]
	ldr	lr, [r1, r6, lsl #2]
	beq	.L2
	ldr	r1, [r5, #8]
	add	ip, ip, lr, asr #1
	sub	r2, r1, r3
	cmp	lr, ip
	ldr	r3, [r5, #20]
	sub	r2, r2, #1
	bge	.L22
.L3:
	mov	r1, #0
.L6:
	add	r1, r1, #1
	cmp	ip, lr, lsl r1
	bgt	.L6
	mov	r0, r4
	bl	get_ur_golomb_jpegls
	mov	r4, #0
	mov	r3, r7
.L12:
	add	r0, r0, r3
	tst	r0, #1
	beq	.L8
	ldr	r2, [r5, #12]
	add	r0, r0, #1
	ldr	r3, [r2, r6, lsl #2]
	sub	r4, r4, r0, asr #1
	add	r3, r3, #1
	str	r3, [r2, r6, lsl #2]
.L9:
	mov	r0, r4
	bl	FFABS
	cmp	r0, #65536
	bge	.L13
	mov	r0, r4
	bl	FFABS
	ldr	r3, [r5]
	sub	r0, r0, r7
	ldr	r7, [r3, r6, lsl #2]
	mov	r1, r6
	add	r7, r7, r0
	str	r7, [r3, r6, lsl #2]
	ldr	r3, [r5, #16]
	mov	r0, r5
	mul	r4, r3, r4
	bl	ff_jpegls_downscale_state
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r2, [r5, #8]
	cmp	lr, ip
	sub	r2, r2, r3
	sub	r2, r2, #1
	ldr	r3, [r5, #20]
	blt	.L3
	mov	r1, r7
	bl	get_ur_golomb_jpegls
	cmp	r0, #0
	bne	.L11
.L8:
	asr	r4, r0, #1
	b	.L9
.L22:
	mov	r1, #0
	bl	get_ur_golomb_jpegls
.L11:
	ldr	r2, [r5, #12]
	ldr	r3, [r5, #4]
	ldr	r2, [r2, r6, lsl #2]
	ldr	r3, [r3, r6, lsl #2]
	cmp	r3, r2, lsl #1
	movgt	r4, #1
	movle	r4, #0
	add	r3, r7, r4
	b	.L12
.L13:
	ldr	r4, .L23
	b	.L1
.L24:
	.align	2
.L23:
	.word	-65536
	.size	ls_get_code_runterm, .-ls_get_code_runterm
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
