	.file	"extr_em28xx-video.c_em28xx_copy_video.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Overflow of %zu bytes past buffer end (1)\n"
	.align 8
.LC1:
	.string	"Overflow of %zu bytes past buffer end(2)\n"
	.text
	.p2align 4
	.type	em28xx_copy_video, @function
em28xx_copy_video:
.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	r14, rsi
	mov	rsi, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rbx, QWORD PTR [rdi]
	mov	r11, QWORD PTR 8[r14]
	mov	rdi, rsi
	mov	eax, DWORD PTR [rbx]
	mov	rdx, r11
	mov	QWORD PTR 16[rsp], rbx
	lea	ecx, [rax+rax]
	mov	DWORD PTR 12[rsp], eax
	mov	rax, QWORD PTR [r14]
	add	rsi, rax
	sub	rdx, rax
	cmp	rsi, r11
	movsx	rsi, ecx
	cmovbe	rdx, rdi
	mov	rdi, QWORD PTR 16[r14]
	mov	QWORD PTR 24[rsp], rdx
	mov	r12d, edx
	xor	edx, edx
	div	rsi
	imul	eax, ecx
	cmp	QWORD PTR 8[rbx], 0
	jne	.L3
	cmp	QWORD PTR 24[r14], 0
	mov	r8, rdi
	je	.L21
.L4:
	lea	eax, [rdx+rax*2]
.L15:
	mov	ebx, ecx
	cdqe
	sub	ebx, edx
	lea	r15, [r8+rax]
	cmp	r12d, ebx
	cmovle	ebx, r12d
	add	rdi, r11
	movsx	rbp, ebx
	lea	rsi, [r15+rbp]
	cmp	rsi, rdi
	ja	.L22
	mov	DWORD PTR 12[rsp], ecx
	test	ebx, ebx
	jle	.L1
	mov	edx, ebx
	mov	rsi, r13
	mov	rdi, r15
	sub	r12d, ebx
	call	memcpy@PLT
	test	r12d, r12d
	jle	.L10
	mov	ecx, DWORD PTR 12[rsp]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L24:
	add	r15, rbp
.L12:
	add	r13, rbp
	mov	ebx, r12d
	cmp	ecx, r12d
	mov	rax, QWORD PTR 8[r14]
	cmovle	ebx, ecx
	add	rax, QWORD PTR 16[r14]
	movsx	rbp, ebx
	add	rbp, r15
	cmp	rbp, rax
	ja	.L23
	mov	DWORD PTR 12[rsp], ecx
	test	ebx, ebx
	jle	.L10
.L25:
	mov	edx, ebx
	mov	rsi, r13
	mov	rdi, r15
	sub	r12d, ebx
	call	memcpy@PLT
	test	r12d, r12d
	jle	.L10
	mov	ecx, DWORD PTR 12[rsp]
	movsx	rbp, ebx
.L9:
	mov	rax, QWORD PTR 16[rsp]
	cmp	QWORD PTR 8[rax], 0
	jne	.L24
	add	ebx, ecx
	movsx	rbx, ebx
	add	r15, rbx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L21:
	lea	r8, [rdi+rsi]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L23:
	sub	rbp, rax
	lea	rdi, .LC1[rip]
	mov	DWORD PTR 12[rsp], ecx
	mov	esi, ebp
	call	em28xx_isocdbg@PLT
	mov	rbx, QWORD PTR 8[r14]
	mov	ecx, DWORD PTR 12[rsp]
	add	rbx, QWORD PTR 16[r14]
	sub	rbx, r15
	mov	DWORD PTR 12[rsp], ecx
	mov	r12d, ebx
	test	ebx, ebx
	jg	.L25
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 24[rsp]
	add	QWORD PTR [r14], rax
.L1:
	add	rsp, 40
	.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
.L3:
	.cfi_restore_state
	add	eax, edx
	mov	r8, rdi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L22:
	sub	rsi, rdi
	lea	rdi, .LC0[rip]
	call	em28xx_isocdbg@PLT
	mov	rdx, QWORD PTR 8[r14]
	add	rdx, QWORD PTR 16[r14]
	sub	rdx, r15
	test	edx, edx
	jle	.L1
	mov	rsi, r13
	mov	rdi, r15
	call	memcpy@PLT
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	em28xx_copy_video, .-em28xx_copy_video
	.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_em28xx-video.c_em28xx_copy_video.c"
	.text
	.global	__aeabi_uidivmod
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Overflow of %zu bytes past buffer end (1)\012\000"
	.align	2
.LC1:
	.ascii	"Overflow of %zu bytes past buffer end(2)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	em28xx_copy_video, %function
em28xx_copy_video:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r9, [r0]
	mov	r10, r3
	ldm	r1, {r0, r5}
	ldr	r8, [r9]
	add	r3, r0, r3
	lsl	r8, r8, #1
	cmp	r3, r5
	mov	r7, r1
	mov	r1, r8
	mov	fp, r2
	subhi	r10, r5, r0
	bl	__aeabi_uidivmod
	ldr	r2, [r9, #4]
	mul	r0, r8, r0
	cmp	r2, #0
	ldr	r2, [r7, #8]
	bne	.L3
	ldr	ip, [r7, #12]
	add	r0, r1, r0, lsl #1
	cmp	ip, #0
	movne	r6, r2
	addeq	r6, r2, r8
.L15:
	sub	r4, r8, r1
	cmp	r10, r4
	movlt	r4, r10
	add	r6, r6, r0
	add	r5, r2, r5
	add	r1, r6, r4
	cmp	r1, r5
	bhi	.L21
	cmp	r4, #0
	pople	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r2, r4
	mov	r1, fp
	mov	r0, r6
	sub	r5, r10, r4
	bl	memcpy
	cmp	r5, #0
	bgt	.L9
	b	.L10
.L13:
	cmp	r4, #0
	sub	r5, r5, r4
	ble	.L10
.L22:
	mov	r2, r4
	mov	r1, fp
	mov	r0, r6
	bl	memcpy
	cmp	r5, #0
	ble	.L10
.L9:
	ldr	r2, [r9, #4]
	add	r1, r8, r4
	cmp	r2, #0
	addne	r6, r6, r4
	addeq	r6, r6, r1
	cmp	r8, r5
	add	fp, fp, r4
	movlt	r4, r8
	ldmib	r7, {r0, r2}
	movge	r4, r5
	add	r2, r2, r0
	add	r1, r6, r4
	cmp	r1, r2
	bls	.L13
	sub	r1, r1, r2
	ldr	r0, .L23
	bl	em28xx_isocdbg
	ldmib	r7, {r2, r5}
	add	r5, r5, r2
	sub	r5, r5, r6
	mov	r4, r5
	cmp	r4, #0
	sub	r5, r5, r4
	bgt	.L22
.L10:
	ldr	r3, [r7]
	add	r10, r3, r10
	str	r10, [r7]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	r6, r2
	add	r0, r0, r1
	b	.L15
.L21:
	sub	r1, r1, r5
	ldr	r0, .L23+4
	bl	em28xx_isocdbg
	ldmib	r7, {r1, r2}
	add	r2, r2, r1
	sub	r2, r2, r6
	cmp	r2, #0
	pople	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r1, fp
	mov	r0, r6
	bl	memcpy
	b	.L10
.L24:
	.align	2
.L23:
	.word	.LC1
	.word	.LC0
	.size	em28xx_copy_video, .-em28xx_copy_video
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
