	.file	"extr_image.c_image_chunk_skipto.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	image_chunk_skipto, @function
image_chunk_skipto:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, DWORD PTR chunk_head[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	lea	rdi, image_chunks[rip]
	call	TAILQ_LAST@PLT
	mov	r12, rax
	test	rax, rax
	je	.L2
	mov	rax, QWORD PTR 8[rax]
	cqo
	idiv	QWORD PTR secsz[rip]
	add	rax, QWORD PTR [r12]
	mov	rbp, rax
.L2:
	xor	edi, edi
	cmp	rbp, rbx
	setle	dil
	call	assert@PLT
	cmp	rbp, rbx
	je	.L19
	mov	rax, QWORD PTR SIZE_MAX[rip]
	mov	rdi, QWORD PTR secsz[rip]
	sub	rbx, rbp
	cqo
	idiv	rdi
	cmp	rbx, rax
	jg	.L21
	imul	rbx, rdi
	test	r12, r12
	je	.L6
	mov	rax, QWORD PTR CH_TYPE_ZEROES[rip]
	cmp	QWORD PTR 16[r12], rax
	je	.L22
.L6:
	mov	edi, 24
	call	malloc@PLT
	mov	r12, rax
	mov	eax, DWORD PTR ENOMEM[rip]
	test	r12, r12
	je	.L1
	mov	edx, 24
	xor	esi, esi
	mov	rdi, r12
	call	memset@PLT
	mov	rax, QWORD PTR CH_TYPE_ZEROES[rip]
	mov	QWORD PTR [r12], rbp
	mov	rsi, r12
	mov	QWORD PTR 8[r12], rbx
	mov	edx, DWORD PTR ch_list[rip]
	lea	rdi, image_chunks[rip]
	mov	QWORD PTR 16[r12], rax
	call	TAILQ_INSERT_TAIL@PLT
	add	DWORD PTR image_nchunks[rip], 1
.L19:
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR EFBIG[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	rsi, rbx
	mov	rdi, r12
	call	image_chunk_grow@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L19
	mov	rax, QWORD PTR 8[r12]
	cqo
	idiv	QWORD PTR secsz[rip]
	add	rax, QWORD PTR [r12]
	mov	rbp, rax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	image_chunk_skipto, .-image_chunk_skipto
	.comm	secsz,8,8
	.comm	image_nchunks,4,4
	.comm	image_chunks,4,4
	.comm	chunk_head,4,4
	.comm	ch_list,4,4
	.comm	SIZE_MAX,8,8
	.comm	ENOMEM,4,4
	.comm	EFBIG,4,4
	.comm	CH_TYPE_ZEROES,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_image.c_image_chunk_skipto.c"
	.text
	.global	__aeabi_ldivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	image_chunk_skipto, %function
image_chunk_skipto:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r1
	ldr	r2, .L21
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r1, [r2]
	mov	r4, r0
	ldr	r0, .L21+4
	mov	r5, r3
	bl	TAILQ_LAST
	subs	r8, r0, #0
	beq	.L9
	add	r1, r8, #8
	ldmia	r1, {r0-r1}
	ldr	r3, .L21+8
	ldmia	r3, {r2-r3}
	bl	__aeabi_ldivmod
	ldr	r3, [r8]
	ldr	r2, [r8, #4]
	adds	r6, r0, r3
	adc	r7, r1, r2
.L2:
	cmp	r4, r6
	sbcs	r3, r5, r7
	movge	r0, #1
	movlt	r0, #0
	bl	assert
	cmp	r7, r5
	cmpeq	r6, r4
	beq	.L7
	ldr	r9, .L21+8
	ldr	r1, .L21+12
	ldr	r10, [r9]
	ldr	r3, [r9, #4]
	mov	r2, r10
	ldmia	r1, {r0-r1}
	bl	__aeabi_ldivmod
	sub	r3, r4, r6
	cmp	r3, r0
	bgt	.L18
	subs	r4, r4, r6
	cmp	r8, #0
	mul	r4, r10, r4
	beq	.L6
	ldr	r3, .L21+16
	ldr	r2, [r8, #16]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L19
.L6:
	mov	r0, #24
	bl	malloc
	subs	r1, r0, #0
	beq	.L20
	mov	r5, #0
	ldr	r3, .L21+16
	stm	r1, {r6-r7}
	ldr	r2, [r3]
	ldr	r3, .L21+20
	str	r2, [r1, #16]
	str	r4, [r1, #8]
	ldr	r2, [r3]
	str	r5, [r1, #20]
	str	r5, [r1, #12]
	ldr	r0, .L21+4
	bl	TAILQ_INSERT_TAIL
	ldr	r2, .L21+24
	mov	r0, r5
	ldr	r3, [r2]
	add	r3, r3, #1
	str	r3, [r2]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	mov	r6, #0
	mov	r7, #0
	b	.L2
.L18:
	ldr	r3, .L21+28
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	mov	r1, r4
	mov	r0, r8
	bl	image_chunk_grow
	subs	r4, r0, #0
	beq	.L7
	ldmia	r9, {r2-r3}
	add	r1, r8, #8
	ldmia	r1, {r0-r1}
	bl	__aeabi_ldivmod
	ldr	r3, [r8]
	ldr	r2, [r8, #4]
	adds	r6, r0, r3
	adc	r7, r1, r2
	b	.L6
.L20:
	ldr	r3, .L21+32
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L22:
	.align	2
.L21:
	.word	chunk_head
	.word	image_chunks
	.word	secsz
	.word	SIZE_MAX
	.word	CH_TYPE_ZEROES
	.word	ch_list
	.word	image_nchunks
	.word	EFBIG
	.word	ENOMEM
	.size	image_chunk_skipto, .-image_chunk_skipto
	.comm	secsz,8,8
	.comm	image_nchunks,4,4
	.comm	image_chunks,4,4
	.comm	chunk_head,4,4
	.comm	ch_list,4,4
	.comm	SIZE_MAX,8,8
	.comm	ENOMEM,4,4
	.comm	EFBIG,4,4
	.comm	CH_TYPE_ZEROES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
