	.file	"extr_sunplus.c_sd_pkt_scan.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sd_pkt_scan, @function
sd_pkt_scan:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	eax, DWORD PTR [rdi]
	mov	ecx, DWORD PTR [rsi]
	cmp	eax, 129
	je	.L2
	cmp	eax, 130
	je	.L3
	cmp	eax, 128
	je	.L28
	cmp	ecx, 254
	je	.L11
.L26:
	cmp	ecx, 255
	je	.L1
	mov	eax, DWORD PTR 4[rsi]
	lea	r12, 4[rsi]
	lea	r13d, -1[rdx]
.L9:
	mov	esi, DWORD PTR INTER_PACKET[rip]
	xor	ebx, ebx
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L14:
	cmp	r13d, ecx
	jle	.L15
.L29:
	movsx	rax, ecx
	mov	ebx, ecx
	mov	eax, DWORD PTR [r12+rax*4]
.L16:
	lea	ecx, 1[rbx]
	cmp	eax, 255
	jne	.L14
	movsx	rax, ebx
	mov	rdx, r12
	mov	rdi, rbp
	sub	r13d, ebx
	lea	r14, [r12+rax*4]
	call	gspca_frame_add@PLT
	mov	ecx, 1
	mov	r12, r14
	mov	DWORD PTR [r14], 0
	mov	esi, DWORD PTR INTER_PACKET[rip]
	cmp	r13d, ecx
	jg	.L29
.L15:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	ecx, r13d
	mov	rdx, r12
	mov	rdi, rbp
	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
	jmp	gspca_frame_add@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR 4[rsi]
	lea	r12, 4[rsi]
	lea	r13d, -1[rdx]
	cmp	ecx, 255
	jne	.L9
	cmp	eax, 1
	je	.L30
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L28:
	.cfi_restore_state
	cmp	ecx, 255
	je	.L31
	mov	eax, DWORD PTR 8[rsi]
	lea	r12, 8[rsi]
	lea	r13d, -2[rdx]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	cmp	ecx, 254
	jne	.L26
	movsx	rcx, DWORD PTR SPCA504_PCCAM600_OFFSET_DATA[rip]
	sub	edx, ecx
	lea	r12, [rsi+rcx*4]
	mov	r13d, edx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L31:
	movsx	rcx, DWORD PTR SPCA536_OFFSET_DATA[rip]
	sub	edx, ecx
	lea	r12, [rsi+rcx*4]
	mov	r13d, edx
.L8:
	mov	esi, DWORD PTR LAST_PACKET[rip]
	mov	ecx, 2
	lea	rdx, ffd9.1942[rip]
	mov	rdi, rbp
	call	gspca_frame_add@PLT
	mov	rdx, QWORD PTR 8[rbp]
	mov	ecx, DWORD PTR JPEG_HDR_SZ[rip]
	mov	rdi, rbp
	mov	esi, DWORD PTR FIRST_PACKET[rip]
	call	gspca_frame_add@PLT
	mov	eax, DWORD PTR [r12]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	movsx	rcx, DWORD PTR SPCA50X_OFFSET_DATA[rip]
	sub	edx, ecx
	lea	r12, [rsi+rcx*4]
	mov	r13d, edx
	jmp	.L8
.L30:
	movsx	rcx, DWORD PTR SPCA533_OFFSET_DATA[rip]
	sub	edx, ecx
	lea	r12, [rsi+rcx*4]
	mov	r13d, edx
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	sd_pkt_scan, .-sd_pkt_scan
	.data
	.align 8
	.type	ffd9.1942, @object
	.size	ffd9.1942, 8
ffd9.1942:
	.long	255
	.long	217
	.comm	SPCA536_OFFSET_DATA,4,4
	.comm	SPCA533_OFFSET_DATA,4,4
	.comm	SPCA50X_OFFSET_DATA,4,4
	.comm	SPCA504_PCCAM600_OFFSET_DATA,4,4
	.comm	LAST_PACKET,4,4
	.comm	JPEG_HDR_SZ,4,4
	.comm	INTER_PACKET,4,4
	.comm	FIRST_PACKET,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_sunplus.c_sd_pkt_scan.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sd_pkt_scan, %function
sd_pkt_scan:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	cmp	r3, #129
	mov	r7, r0
	ldr	r0, [r1]
	beq	.L2
	cmp	r3, #130
	beq	.L3
	cmp	r3, #128
	beq	.L28
	cmp	r0, #254
	beq	.L11
.L26:
	cmp	r0, #255
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	ip, [r1, #4]
	sub	r5, r2, #1
	add	r6, r1, #4
.L9:
	mov	r4, #0
	ldr	r8, .L31
	mov	r9, r4
	ldr	r1, [r8]
	b	.L16
.L14:
	cmp	r5, r3
	ble	.L15
.L29:
	mov	r4, r3
	ldr	ip, [r6, r3, lsl #2]
.L16:
	cmp	ip, #255
	add	r3, r4, #1
	bne	.L14
	mov	r2, r6
	mov	r0, r7
	bl	gspca_frame_add
	mov	r3, #1
	sub	r5, r5, r4
	str	r9, [r6, r4, lsl #2]
	add	r10, r6, r4, lsl #2
	cmp	r5, r3
	mov	r6, r10
	ldr	r1, [r8]
	bgt	.L29
.L15:
	mov	r3, r5
	mov	r2, r6
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	gspca_frame_add
.L28:
	cmp	r0, #255
	beq	.L30
	ldr	ip, [r1, #8]
	sub	r5, r2, #2
	add	r6, r1, #8
	b	.L9
.L3:
	cmp	r0, #254
	bne	.L26
	ldr	r3, .L31+4
	ldr	r5, [r3]
	add	r6, r1, r5, lsl #2
	sub	r5, r2, r5
	b	.L8
.L2:
	cmp	r0, #255
	ldr	ip, [r1, #4]
	addne	r6, r1, #4
	subne	r5, r2, #1
	bne	.L9
	cmp	ip, #1
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r3, .L31+8
	ldr	r5, [r3]
	add	r6, r1, r5, lsl #2
	sub	r5, r2, r5
	b	.L8
.L30:
	ldr	r3, .L31+12
	ldr	r5, [r3]
	add	r6, r1, r5, lsl #2
	sub	r5, r2, r5
.L8:
	ldr	r2, .L31+16
	mov	r3, #2
	ldr	r1, [r2]
	mov	r0, r7
	ldr	r2, .L31+20
	bl	gspca_frame_add
	ldr	r2, .L31+24
	ldr	r3, .L31+28
	ldr	r1, [r2]
	mov	r0, r7
	ldr	r3, [r3]
	ldr	r2, [r7, #4]
	bl	gspca_frame_add
	ldr	ip, [r6]
	b	.L9
.L11:
	ldr	r3, .L31+32
	ldr	r5, [r3]
	add	r6, r1, r5, lsl #2
	sub	r5, r2, r5
	b	.L8
.L32:
	.align	2
.L31:
	.word	INTER_PACKET
	.word	SPCA504_PCCAM600_OFFSET_DATA
	.word	SPCA533_OFFSET_DATA
	.word	SPCA536_OFFSET_DATA
	.word	LAST_PACKET
	.word	.LANCHOR0
	.word	FIRST_PACKET
	.word	JPEG_HDR_SZ
	.word	SPCA50X_OFFSET_DATA
	.size	sd_pkt_scan, .-sd_pkt_scan
	.comm	SPCA536_OFFSET_DATA,4,4
	.comm	SPCA533_OFFSET_DATA,4,4
	.comm	SPCA50X_OFFSET_DATA,4,4
	.comm	SPCA504_PCCAM600_OFFSET_DATA,4,4
	.comm	LAST_PACKET,4,4
	.comm	JPEG_HDR_SZ,4,4
	.comm	INTER_PACKET,4,4
	.comm	FIRST_PACKET,4,4
	.data
	.align	2
	.set	.LANCHOR0,. + 0
	.type	ffd9.4226, %object
	.size	ffd9.4226, 8
ffd9.4226:
	.word	255
	.word	217
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
