	.file	"extr_stream_concat.c_seek.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	seek, @function
seek:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r15, QWORD PTR 8[rdi]
	mov	eax, DWORD PTR [r15]
	test	eax, eax
	jle	.L6
	test	rsi, rsi
	js	.L6
	xor	r14d, r14d
	xor	ebp, ebp
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	add	rax, rbp
	add	r14, 1
	add	ebx, 1
	cmp	DWORD PTR [r15], ebx
	jle	.L8
	cmp	r12, rax
	jl	.L8
	mov	rbp, rax
.L4:
	mov	rax, QWORD PTR 8[r15]
	mov	DWORD PTR 4[r15], r14d
	mov	ebx, r14d
	mov	edi, DWORD PTR [rax+r14*4]
	call	stream_get_size@PLT
	test	rax, rax
	jns	.L3
.L8:
	sub	r12, rbp
.L2:
	movsx	rdx, DWORD PTR 4[r15]
	mov	rax, QWORD PTR 8[r15]
	mov	rsi, r12
	mov	edi, DWORD PTR [rax+rdx*4]
	call	stream_seek@PLT
	movsx	rdx, DWORD PTR 4[r15]
	mov	r12d, eax
	mov	rax, QWORD PTR 8[r15]
	mov	edi, DWORD PTR [rax+rdx*4]
	call	stream_tell@PLT
	add	rbp, rax
	mov	eax, r12d
	mov	QWORD PTR 0[r13], rbp
	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
.L6:
	.cfi_restore_state
	xor	ebp, ebp
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	seek, .-seek
	.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_stream_concat.c_seek.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	seek, %function
seek:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, [r0, #4]
	lsr	r4, r1, #31
	ldr	r3, [r7]
	mov	r6, r0
	cmp	r3, #0
	orrle	r4, r4, #1
	cmp	r4, #0
	mov	r5, r1
	bne	.L5
	mov	r8, r4
	b	.L4
.L6:
	mov	r8, r0
.L4:
	ldr	r3, [r7, #8]
	str	r4, [r7, #4]
	ldr	r0, [r3, r4, lsl #2]
	bl	stream_get_size
	cmp	r0, #0
	add	r4, r4, #1
	add	r0, r0, r8
	blt	.L8
	ldr	r3, [r7]
	cmp	r5, r0
	cmpge	r3, r4
	bgt	.L6
.L8:
	sub	r5, r5, r8
.L2:
	ldmib	r7, {r2, r3}
	mov	r1, r5
	ldr	r0, [r3, r2, lsl #2]
	bl	stream_seek
	ldmib	r7, {r2, r3}
	mov	r4, r0
	ldr	r0, [r3, r2, lsl #2]
	bl	stream_tell
	add	r8, r0, r8
	str	r8, [r6]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r8, #0
	b	.L2
	.size	seek, .-seek
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
