	.file	"extr_touptek.c_configure.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"configure()\n\n"
.LC1:
	.string	"failed key req\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"failed to replay packet 176 w/ rc %d\n"
	.align 8
.LC3:
	.string	"failed to replay packet 178 w/ rc %d\n"
	.align 8
.LC4:
	.string	"failed to replay packet 180 w/ rc %d\n"
	.align 8
.LC5:
	.string	"failed to replay final packet w/ rc %d\n"
	.section	.rodata.str1.1
.LC6:
	.string	"Configure complete\n\n"
	.text
	.p2align 4
	.type	configure, @function
configure:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, DWORD PTR D_STREAM[rip]
	lea	rdx, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	r12, QWORD PTR [rdi]
	call	gspca_dbg@PLT
	mov	edi, DWORD PTR 12[rbp]
	xor	esi, esi
	call	usb_rcvctrlpipe@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	mov	edi, DWORD PTR 12[rbp]
	xor	r9d, r9d
	push	500
	.cfi_def_cfa_offset 48
	mov	esi, eax
	xor	r8d, r8d
	mov	edx, 22
	push	2
	.cfi_def_cfa_offset 56
	mov	ecx, 192
	push	r12
	.cfi_def_cfa_offset 64
	call	usb_control_msg@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 32
	mov	rsi, r12
	mov	rdi, rbp
	mov	edx, eax
	call	val_reply@PLT
	test	rax, rax
	jne	.L10
	mov	edi, DWORD PTR 12[rbp]
	xor	esi, esi
	call	usb_sndctrlpipe@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	mov	edi, DWORD PTR 12[rbp]
	mov	r9d, 15
	push	500
	.cfi_def_cfa_offset 48
	mov	esi, eax
	mov	r8d, 1
	mov	ecx, 64
	push	0
	.cfi_def_cfa_offset 56
	mov	edx, 1
	push	0
	.cfi_def_cfa_offset 64
	call	usb_control_msg@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 32
	mov	r12d, eax
	test	eax, eax
	js	.L11
	mov	edi, DWORD PTR 12[rbp]
	xor	esi, esi
	call	usb_sndctrlpipe@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	mov	edi, DWORD PTR 12[rbp]
	xor	r8d, r8d
	push	500
	.cfi_def_cfa_offset 48
	mov	esi, eax
	mov	r9d, 15
	mov	ecx, 64
	push	0
	.cfi_def_cfa_offset 56
	mov	edx, 1
	push	0
	.cfi_def_cfa_offset 64
	call	usb_control_msg@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 32
	mov	r12d, eax
	test	eax, eax
	js	.L12
	mov	edi, DWORD PTR 12[rbp]
	xor	esi, esi
	call	usb_sndctrlpipe@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	mov	edi, DWORD PTR 12[rbp]
	mov	r9d, 15
	push	500
	.cfi_def_cfa_offset 48
	mov	esi, eax
	mov	r8d, 1
	mov	ecx, 64
	push	0
	.cfi_def_cfa_offset 56
	mov	edx, 1
	push	0
	.cfi_def_cfa_offset 64
	call	usb_control_msg@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 32
	mov	r12d, eax
	test	eax, eax
	js	.L13
	mov	DWORD PTR 8[rbp], 0
	mov	rdi, rbp
	call	configure_encrypted@PLT
	mov	r12d, DWORD PTR 8[rbp]
	test	r12d, r12d
	je	.L14
.L1:
	mov	eax, r12d
	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
.L10:
	.cfi_restore_state
	mov	rdi, rbp
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	gspca_err@PLT
	mov	r12d, DWORD PTR EIO[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	edx, eax
	mov	rdi, rbp
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	gspca_err@PLT
	mov	eax, r12d
	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
.L14:
	.cfi_restore_state
	mov	edi, DWORD PTR 12[rbp]
	xor	esi, esi
	call	usb_sndctrlpipe@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 40
	mov	edi, DWORD PTR 12[rbp]
	mov	r9d, 15
	push	500
	.cfi_def_cfa_offset 48
	mov	esi, eax
	mov	r8d, 3
	mov	ecx, 64
	push	0
	.cfi_def_cfa_offset 56
	mov	edx, 1
	push	0
	.cfi_def_cfa_offset 64
	call	usb_control_msg@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 32
	mov	ebx, eax
	test	eax, eax
	js	.L15
	mov	esi, DWORD PTR D_STREAM[rip]
	lea	rdx, .LC6[rip]
	mov	rdi, rbp
	call	gspca_dbg@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edx, eax
	mov	rdi, rbp
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	gspca_err@PLT
	mov	eax, r12d
	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
.L13:
	.cfi_restore_state
	mov	edx, eax
	lea	rsi, .LC4[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	gspca_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edx, eax
	lea	rsi, .LC5[rip]
	mov	rdi, rbp
	xor	eax, eax
	call	gspca_err@PLT
	mov	r12d, ebx
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	configure, .-configure
	.comm	EIO,4,4
	.comm	D_STREAM,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_touptek.c_configure.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"configure()\012\012\000"
	.align	2
.LC1:
	.ascii	"failed key req\012\000"
	.align	2
.LC2:
	.ascii	"failed to replay packet 176 w/ rc %d\012\000"
	.align	2
.LC3:
	.ascii	"failed to replay packet 178 w/ rc %d\012\000"
	.align	2
.LC4:
	.ascii	"failed to replay packet 180 w/ rc %d\012\000"
	.align	2
.LC5:
	.ascii	"failed to replay final packet w/ rc %d\012\000"
	.align	2
.LC6:
	.ascii	"Configure complete\012\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	configure, %function
configure:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r8, .L16
	sub	sp, sp, #24
	ldr	r2, .L16+4
	ldr	r1, [r8]
	ldr	r4, [r0]
	bl	gspca_dbg
	ldr	r7, [r5, #8]
	mov	r1, #0
	mov	r0, r7
	bl	usb_rcvctrlpipe
	mov	r6, #500
	mov	r3, #0
	mov	r2, #2
	mov	r1, r0
	str	r2, [sp, #12]
	mov	r0, r7
	mov	r2, #22
	str	r3, [sp, #4]
	str	r3, [sp]
	str	r4, [sp, #8]
	mov	r3, #192
	str	r6, [sp, #16]
	bl	usb_control_msg
	mov	r1, r4
	mov	r2, r0
	mov	r0, r5
	bl	val_reply
	subs	r7, r0, #0
	bne	.L10
	ldr	r4, [r5, #8]
	mov	r1, r7
	mov	r0, r4
	bl	usb_sndctrlpipe
	mov	r9, #1
	mov	r10, #15
	mov	r1, r0
	mov	r2, r9
	mov	r0, r4
	mov	r3, #64
	stm	sp, {r9, r10}
	str	r6, [sp, #16]
	str	r7, [sp, #12]
	str	r7, [sp, #8]
	bl	usb_control_msg
	subs	r4, r0, #0
	blt	.L11
	ldr	r4, [r5, #8]
	mov	r1, r7
	mov	r0, r4
	bl	usb_sndctrlpipe
	mov	r3, #64
	mov	r1, r0
	mov	r2, r9
	mov	r0, r4
	stm	sp, {r7, r10}
	str	r6, [sp, #16]
	str	r7, [sp, #12]
	str	r7, [sp, #8]
	bl	usb_control_msg
	subs	r4, r0, #0
	blt	.L12
	ldr	r4, [r5, #8]
	mov	r1, r7
	mov	r0, r4
	bl	usb_sndctrlpipe
	mov	r3, #64
	mov	r1, r0
	mov	r2, r9
	mov	r0, r4
	stm	sp, {r9, r10}
	str	r6, [sp, #16]
	str	r7, [sp, #12]
	str	r7, [sp, #8]
	bl	usb_control_msg
	subs	r4, r0, #0
	blt	.L13
	mov	r0, r5
	str	r7, [r5, #4]
	bl	configure_encrypted
	ldr	r4, [r5, #4]
	cmp	r4, #0
	beq	.L14
.L1:
	mov	r0, r4
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	mov	r0, r5
	ldr	r1, .L16+8
	bl	gspca_err
	ldr	r3, .L16+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	mov	r0, r5
	mov	r2, r4
	ldr	r1, .L16+16
	bl	gspca_err
	mov	r0, r4
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L14:
	ldr	r7, [r5, #8]
	mov	r1, r4
	mov	r0, r7
	bl	usb_sndctrlpipe
	mov	r3, #3
	mov	r1, r0
	mov	r2, r9
	str	r3, [sp]
	mov	r0, r7
	mov	r3, #64
	str	r6, [sp, #16]
	str	r4, [sp, #12]
	str	r4, [sp, #8]
	str	r10, [sp, #4]
	bl	usb_control_msg
	subs	r2, r0, #0
	blt	.L15
	mov	r0, r5
	ldr	r1, [r8]
	ldr	r2, .L16+20
	bl	gspca_dbg
	b	.L1
.L12:
	mov	r0, r5
	mov	r2, r4
	ldr	r1, .L16+24
	bl	gspca_err
	mov	r0, r4
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L13:
	mov	r0, r5
	mov	r2, r4
	ldr	r1, .L16+28
	bl	gspca_err
	b	.L1
.L15:
	mov	r0, r5
	ldr	r1, .L16+32
	mov	r4, r2
	bl	gspca_err
	b	.L1
.L17:
	.align	2
.L16:
	.word	D_STREAM
	.word	.LC0
	.word	.LC1
	.word	EIO
	.word	.LC2
	.word	.LC6
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	configure, .-configure
	.comm	EIO,4,4
	.comm	D_STREAM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
