	.file	"extr_stb_image.c_process_frame_header.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Corrupt JPEG"
.LC1:
	.string	"bad SOF len"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"JPEG format not supported: 8-bit only"
	.section	.rodata.str1.1
.LC3:
	.string	"only 8-bit"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"JPEG format not supported: delayed height"
	.section	.rodata.str1.1
.LC5:
	.string	"no header height"
.LC6:
	.string	"0 width"
.LC7:
	.string	"bad component count"
.LC8:
	.string	"bad component ID"
.LC9:
	.string	"bad H"
.LC10:
	.string	"bad V"
.LC11:
	.string	"bad TQ"
.LC12:
	.string	"Image too large to decode"
.LC13:
	.string	"too large"
.LC14:
	.string	"Out of memory"
.LC15:
	.string	"outofmem"
	.text
	.p2align 4
	.type	process_frame_header, @function
process_frame_header:
.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	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rbx, QWORD PTR 32[rdi]
	mov	rdi, rbx
	call	get16@PLT
	cmp	eax, 10
	jle	.L49
	mov	rdi, rbx
	mov	r15, rax
	call	get8@PLT
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	cmp	eax, 8
	jne	.L48
	mov	rdi, rbx
	call	get16@PLT
	lea	rsi, .LC4[rip]
	lea	rdi, .LC5[rip]
	mov	DWORD PTR [rbx], eax
	test	eax, eax
	je	.L48
	mov	rdi, rbx
	call	get16@PLT
	lea	rsi, .LC0[rip]
	lea	rdi, .LC6[rip]
	mov	DWORD PTR 4[rbx], eax
	test	eax, eax
	je	.L48
	mov	rdi, rbx
	call	get8@PLT
	lea	rsi, .LC0[rip]
	lea	rdi, .LC7[rip]
	mov	edx, eax
	and	edx, -3
	cmp	edx, 1
	jne	.L48
	lea	esi, -1[rax]
	mov	rcx, QWORD PTR 24[rbp]
	mov	DWORD PTR 8[rbx], eax
	lea	edi, 8[rax+rax*2]
	lea	rax, 0[0+rsi*8]
	sub	rax, rsi
	lea	rdx, 32[rcx]
	lea	rax, 88[rcx+rax*8]
	.p2align 4,,10
	.p2align 3
.L7:
	mov	QWORD PTR 16[rdx], 0
	add	rdx, 56
	mov	QWORD PTR -56[rdx], 0
	cmp	rax, rdx
	jne	.L7
	xor	r13d, r13d
	xor	r12d, r12d
	cmp	r15d, edi
	je	.L8
	jmp	.L49
	.p2align 4,,10
	.p2align 3
.L53:
	mov	esi, DWORD PTR 8[rbx]
	cmp	r12d, esi
	jge	.L51
.L8:
	mov	rdi, rbx
	call	get8@PLT
	mov	rdx, QWORD PTR 24[rbp]
	mov	DWORD PTR [rdx+r13], eax
	mov	edx, r12d
	add	r12d, 1
	cmp	r12d, eax
	je	.L9
	cmp	edx, eax
	jne	.L52
.L9:
	mov	rdi, rbx
	call	get8@PLT
	mov	rcx, QWORD PTR 24[rbp]
	mov	edx, eax
	add	rcx, r13
	sar	edx, 4
	mov	DWORD PTR 4[rcx], edx
	je	.L31
	cmp	edx, 4
	jg	.L31
	and	eax, 15
	mov	DWORD PTR 8[rcx], eax
	je	.L32
	cmp	eax, 4
	jg	.L32
	mov	rdi, rbx
	call	get8@PLT
	mov	rcx, QWORD PTR 24[rbp]
	mov	DWORD PTR 12[rcx+r13], eax
	add	r13, 56
	cmp	eax, 3
	jle	.L53
	lea	rsi, .LC0[rip]
	lea	rdi, .LC11[rip]
.L48:
	add	rsp, 24
	.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
	jmp	e@PLT
	.p2align 4,,10
	.p2align 3
.L49:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	jmp	.L48
.L51:
	cmp	DWORD PTR SCAN_load[rip], r14d
	jne	.L1
	mov	eax, 1073741824
	mov	edi, DWORD PTR 4[rbx]
	mov	r8d, DWORD PTR [rbx]
	cdq
	idiv	edi
	cdq
	idiv	esi
	cmp	eax, r8d
	jl	.L18
	test	esi, esi
	jle	.L54
	mov	r12, rcx
	lea	rax, 4[rcx]
	lea	ecx, -1[rsi]
	mov	r15d, 1
	lea	rdx, 0[0+rcx*8]
	sub	rdx, rcx
	mov	ecx, 1
	lea	rsi, 60[r12+rdx*8]
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edx, DWORD PTR [rax]
	cmp	ecx, edx
	cmovl	ecx, edx
	mov	edx, DWORD PTR 4[rax]
	cmp	r15d, edx
	cmovl	r15d, edx
	add	rax, 56
	cmp	rsi, rax
	jne	.L21
	lea	r9d, 0[0+rcx*8]
	lea	esi, 0[0+r15*8]
	mov	DWORD PTR 0[rbp], ecx
	xor	r14d, r14d
	lea	eax, -1[r9+rdi]
	mov	DWORD PTR 8[rbp], r9d
	cdq
	mov	DWORD PTR 4[rbp], r15d
	idiv	r9d
	mov	DWORD PTR 12[rbp], esi
	mov	DWORD PTR 16[rbp], eax
	mov	r10d, eax
	lea	eax, -1[rsi+r8]
	cdq
	idiv	esi
	mov	DWORD PTR 20[rbp], eax
	mov	r9d, eax
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L23:
	add	rax, 15
	mov	QWORD PTR 32[r13], 0
	add	r14, 1
	and	rax, -16
	mov	QWORD PTR 48[r13], rax
	cmp	DWORD PTR 8[rbx], r14d
	jle	.L1
	mov	edi, DWORD PTR 4[rbx]
	mov	r8d, DWORD PTR [rbx]
	mov	r10d, DWORD PTR 16[rbp]
	mov	r9d, DWORD PTR 20[rbp]
.L29:
	lea	r13, 0[0+r14*8]
	mov	DWORD PTR 8[rsp], ecx
	sub	r13, r14
	mov	DWORD PTR 12[rsp], r14d
	sal	r13, 3
	add	r12, r13
	mov	r11d, DWORD PTR 4[r12]
	imul	edi, r11d
	imul	r10d, r11d
	lea	eax, -1[rcx+rdi]
	mov	edi, DWORD PTR 8[r12]
	cdq
	lea	r11d, 0[0+r10*8]
	idiv	ecx
	mov	DWORD PTR 24[r12], r11d
	imul	r8d, edi
	imul	r9d, edi
	lea	edi, 0[0+r9*8]
	imul	r11d, edi
	mov	DWORD PTR 28[r12], edi
	lea	edi, 15[r11]
	mov	DWORD PTR 16[r12], eax
	lea	eax, -1[r15+r8]
	cdq
	idiv	r15d
	mov	DWORD PTR 20[r12], eax
	call	malloc@PLT
	mov	ecx, DWORD PTR 8[rsp]
	mov	QWORD PTR 40[r12], rax
	mov	r12, QWORD PTR 24[rbp]
	add	r13, r12
	mov	rax, QWORD PTR 40[r13]
	test	rax, rax
	jne	.L23
	lea	eax, -1[r14]
	test	r14d, r14d
	je	.L26
	cdqe
	movsx	rdx, DWORD PTR 12[rsp]
	lea	rbx, 0[0+rax*8]
	sub	rbx, rax
	lea	eax, -1[r14]
	sub	rdx, rax
	sal	rbx, 3
	lea	rax, 0[0+rdx*8]
	sub	rax, rdx
	lea	r13, -112[0+rax*8]
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rdi, QWORD PTR 40[r12+rbx]
	call	free@PLT
	mov	r12, QWORD PTR 24[rbp]
	mov	QWORD PTR 48[r12+rbx], 0
	sub	rbx, 56
	cmp	r13, rbx
	jne	.L25
.L26:
	lea	rsi, .LC14[rip]
	lea	rdi, .LC15[rip]
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L31:
	lea	rsi, .LC0[rip]
	lea	rdi, .LC9[rip]
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L32:
	lea	rsi, .LC0[rip]
	lea	rdi, .LC10[rip]
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L52:
	lea	rsi, .LC0[rip]
	lea	rdi, .LC8[rip]
	jmp	.L48
.L54:
	movabs	rax, 4294967297
	mov	ecx, 8
	mov	QWORD PTR 0[rbp], rax
	movabs	rax, 34359738376
	mov	QWORD PTR 8[rbp], rax
	lea	eax, 7[rdi]
	cdq
	idiv	ecx
	mov	DWORD PTR 16[rbp], eax
	lea	eax, 7[r8]
	cdq
	idiv	ecx
	mov	DWORD PTR 20[rbp], eax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, 1
	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
.L18:
	.cfi_restore_state
	lea	rsi, .LC12[rip]
	lea	rdi, .LC13[rip]
	jmp	.L48
	.cfi_endproc
.LFE0:
	.size	process_frame_header, .-process_frame_header
	.comm	SCAN_load,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_stb_image.c_process_frame_header.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Corrupt JPEG\000"
	.align	2
.LC1:
	.ascii	"bad SOF len\000"
	.align	2
.LC2:
	.ascii	"JPEG format not supported: 8-bit only\000"
	.align	2
.LC3:
	.ascii	"only 8-bit\000"
	.align	2
.LC4:
	.ascii	"JPEG format not supported: delayed height\000"
	.align	2
.LC5:
	.ascii	"no header height\000"
	.align	2
.LC6:
	.ascii	"0 width\000"
	.align	2
.LC7:
	.ascii	"bad component count\000"
	.align	2
.LC8:
	.ascii	"bad component ID\000"
	.align	2
.LC9:
	.ascii	"bad H\000"
	.align	2
.LC10:
	.ascii	"bad V\000"
	.align	2
.LC11:
	.ascii	"bad TQ\000"
	.global	__aeabi_idiv
	.align	2
.LC12:
	.ascii	"Image too large to decode\000"
	.align	2
.LC13:
	.ascii	"too large\000"
	.align	2
.LC14:
	.ascii	"Out of memory\000"
	.align	2
.LC15:
	.ascii	"outofmem\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_frame_header, %function
process_frame_header:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r6, [r0, #28]
	mov	r4, r0
	sub	sp, sp, #20
	mov	r0, r6
	mov	r9, r1
	bl	get16
	cmp	r0, #10
	ble	.L27
	mov	r7, r0
	mov	r0, r6
	bl	get8
	cmp	r0, #8
	beq	.L3
	ldr	r1, .L45
	ldr	r0, .L45+4
.L36:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	e
.L3:
	mov	r0, r6
	bl	get16
	cmp	r0, #0
	str	r0, [r6]
	beq	.L38
	mov	r0, r6
	bl	get16
	cmp	r0, #0
	str	r0, [r6, #4]
	beq	.L39
	mov	r0, r6
	bl	get8
	cmp	r0, #3
	cmpne	r0, #1
	mov	r5, r0
	movne	r2, #1
	moveq	r2, #0
	bne	.L40
	add	r3, r0, r0, lsl #1
	cmp	r0, #0
	str	r0, [r6, #8]
	add	r1, r3, #8
	ble	.L7
	ldr	r3, [r4, #24]
	add	r0, r0, r0, lsl #2
	add	r5, r5, r0, lsl #1
	add	r5, r3, r5, lsl #2
.L8:
	str	r2, [r3, #40]
	str	r2, [r3, #32]
	add	r3, r3, #44
	cmp	r5, r3
	bne	.L8
	cmp	r7, r1
	moveq	r8, #0
	moveq	r7, r8
	beq	.L9
	b	.L27
.L11:
	cmp	r0, #4
	movle	r2, #0
	movgt	r2, #1
	cmp	r0, #0
	moveq	r2, #1
	cmp	r2, #0
	str	r0, [r3, #8]
	bne	.L41
	mov	r0, r6
	bl	get8
	ldr	r3, [r4, #24]
	cmp	r0, #3
	add	r3, r3, r8
	str	r0, [r3, #12]
	add	r8, r8, #44
	bgt	.L13
	ldr	r5, [r6, #8]
	cmp	r7, r5
	bge	.L14
.L9:
	mov	r0, r6
	bl	get8
	mov	r3, r7
	add	r7, r7, #1
	cmp	r0, r7
	cmpne	r0, r3
	ldr	r3, [r4, #24]
	str	r0, [r3, r8]
	bne	.L42
	mov	r0, r6
	bl	get8
	asr	r2, r0, #4
	cmp	r2, #4
	movle	r1, #0
	movgt	r1, #1
	cmp	r2, #0
	moveq	r1, #1
	ldr	r3, [r4, #24]
	cmp	r1, #0
	add	r3, r3, r8
	and	r0, r0, #15
	str	r2, [r3, #4]
	beq	.L11
	ldr	r1, .L45+8
	ldr	r0, .L45+12
	b	.L36
.L7:
	cmp	r7, r1
	beq	.L14
.L27:
	ldr	r1, .L45+8
	ldr	r0, .L45+16
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	e
.L38:
	ldr	r1, .L45+20
	ldr	r0, .L45+24
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	e
.L39:
	ldr	r1, .L45+8
	ldr	r0, .L45+28
	b	.L36
.L40:
	ldr	r1, .L45+8
	ldr	r0, .L45+32
	b	.L36
.L14:
	ldr	r3, .L45+36
	ldr	r3, [r3]
	cmp	r3, r9
	bne	.L1
	ldr	r3, [r6, #4]
	mov	r0, #1073741824
	mov	r1, r3
	str	r3, [sp]
	bl	__aeabi_idiv
	mov	r1, r5
	bl	__aeabi_idiv
	ldr	r3, [r6]
	cmp	r0, r3
	str	r3, [sp, #4]
	blt	.L17
	cmp	r5, #0
	ble	.L43
	mov	r9, #1
	ldr	r6, [r4, #24]
	mov	fp, r9
	mov	r2, r6
	add	ip, r5, r5, lsl #2
	add	ip, r5, ip, lsl r9
	add	ip, r6, ip, lsl #2
.L20:
	ldmib	r2, {r1, r3}
	cmp	fp, r1
	movlt	fp, r1
	add	r2, r2, #44
	cmp	r9, r3
	movlt	r9, r3
	cmp	ip, r2
	bne	.L20
	ldr	r3, [sp]
	lsl	r1, fp, #3
	add	r0, r3, r1
	lsl	r7, r9, #3
	str	fp, [r4]
	str	r1, [r4, #8]
	str	r9, [r4, #4]
	sub	r0, r0, #1
	str	r7, [r4, #12]
	bl	__aeabi_idiv
	mov	r3, r0
	ldr	r2, [sp, #4]
	str	r0, [sp, #8]
	add	r0, r2, r7
	mov	r1, r7
	str	r3, [r4, #16]
	sub	r0, r0, #1
	bl	__aeabi_idiv
	mov	r8, fp
	mov	r10, #0
	mov	fp, r0
	str	r0, [r4, #20]
	str	r4, [sp, #12]
.L25:
	ldr	r7, [r6, #4]
	ldr	r0, [sp]
	mov	r1, r8
	mla	r0, r7, r0, r8
	sub	r0, r0, #1
	bl	__aeabi_idiv
	ldr	r4, [r6, #8]
	str	r0, [r6, #16]
	ldr	r0, [sp, #4]
	mov	r1, r9
	mla	r0, r4, r0, r9
	sub	r0, r0, #1
	bl	__aeabi_idiv
	mov	r1, r0
	ldr	r3, [sp, #8]
	mul	r4, fp, r4
	mul	r3, r7, r3
	lsl	r4, r4, #3
	lsl	r7, r3, #3
	mul	r0, r4, r7
	str	r1, [r6, #20]
	str	r7, [r6, #24]
	str	r4, [r6, #28]
	add	r0, r0, #15
	bl	malloc
	add	r1, r0, #15
	cmp	r0, #0
	bic	r1, r1, #15
	str	r0, [r6, #36]
	beq	.L44
	mov	r3, #0
	add	r10, r10, #1
	cmp	r10, r5
	str	r1, [r6, #40]
	str	r3, [r6, #32]
	add	r6, r6, #44
	bne	.L25
.L1:
	mov	r0, #1
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L41:
	ldr	r1, .L45+8
	ldr	r0, .L45+40
	b	.L36
.L13:
	ldr	r1, .L45+8
	ldr	r0, .L45+44
	b	.L36
.L42:
	ldr	r1, .L45+8
	ldr	r0, .L45+48
	b	.L36
.L17:
	ldr	r1, .L45+52
	ldr	r0, .L45+56
	b	.L36
.L43:
	ldr	r3, [sp]
	ldr	r1, [sp, #4]
	adds	r2, r3, #7
	addmi	r2, r3, #14
	adds	r3, r1, #7
	mov	r0, #1
	addmi	r3, r1, #14
	mov	r1, #8
	asr	r2, r2, #3
	asr	r3, r3, #3
	stmib	r4, {r0, r1}
	str	r2, [r4, #16]
	str	r3, [r4, #20]
	str	r0, [r4]
	str	r1, [r4, #12]
	b	.L1
.L44:
	mov	r5, r0
	mov	r8, #44
	ldr	r4, [sp, #12]
	sub	r10, r10, #1
	b	.L23
.L24:
	mul	r6, r8, r10
	ldr	r3, [r4, #24]
	sub	r10, r10, #1
	add	r3, r3, r6
	ldr	r0, [r3, #36]
	bl	free
	ldr	r3, [r4, #24]
	add	r6, r3, r6
	str	r5, [r6, #40]
.L23:
	cmn	r10, #1
	bne	.L24
	ldr	r1, .L45+60
	ldr	r0, .L45+64
	b	.L36
.L46:
	.align	2
.L45:
	.word	.LC2
	.word	.LC3
	.word	.LC0
	.word	.LC9
	.word	.LC1
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	SCAN_load
	.word	.LC10
	.word	.LC11
	.word	.LC8
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.size	process_frame_header, .-process_frame_header
	.comm	SCAN_load,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
