	.file	"extr_ttusb2.c_tt3650_ci_slot_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
	.text
	.p2align 4
	.type	tt3650_ci_slot_reset, @function
tt3650_ci_slot_reset:
.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
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	r13, QWORD PTR [rdi]
	lea	rdi, .LC0[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rbp, QWORD PTR 0[r13]
	call	ci_dbg@PLT
	test	r12d, r12d
	je	.L2
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L8
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	mov	DWORD PTR 4[rsp], 0
	lea	r14, 4[rsp]
	call	mutex_lock@PLT
	mov	ecx, 1
	mov	rdx, r14
	mov	rdi, r13
	mov	esi, DWORD PTR TT3650_CMD_CI_RESET[rip]
	mov	r8d, 1
	call	tt3650_ci_msg@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L4
	mov	edi, 500
	call	msleep@PLT
	mov	ecx, 1
	mov	rdx, r14
	mov	rdi, r13
	mov	esi, DWORD PTR TT3650_CMD_CI_RESET[rip]
	mov	r8d, 1
	mov	DWORD PTR 4[rsp], 1
	call	tt3650_ci_msg@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L9
.L4:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, 500
	call	msleep@PLT
	mov	ecx, 1
	mov	rdx, r14
	mov	rdi, r13
	mov	esi, DWORD PTR TT3650_CMD_CI_SET_VIDEO_PORT[rip]
	mov	r8d, 1
	mov	DWORD PTR 4[rsp], 0
	call	tt3650_ci_msg@PLT
	mov	edi, 1100
	mov	r12d, eax
	call	msleep@PLT
	mov	rdi, rbp
	call	mutex_unlock@PLT
	jmp	.L1
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	tt3650_ci_slot_reset, .-tt3650_ci_slot_reset
	.comm	TT3650_CMD_CI_SET_VIDEO_PORT,4,4
	.comm	TT3650_CMD_CI_RESET,4,4
	.comm	EINVAL,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_ttusb2.c_tt3650_ci_slot_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%d\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tt3650_ci_slot_reset, %function
tt3650_ci_slot_reset:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	ldr	r5, [r0]
	ldr	r3, .L10
	sub	sp, sp, #16
	ldr	r0, .L10+4
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r7, [r5]
	bl	ci_dbg
	cmp	r4, #0
	beq	.L2
	ldr	r3, .L10+8
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r6, #1
	ldr	r8, .L10+12
	mov	r0, r7
	str	r4, [sp, #8]
	bl	mutex_lock
	mov	r3, r6
	mov	r0, r5
	ldr	r1, [r8]
	str	r6, [sp]
	add	r2, sp, #8
	bl	tt3650_ci_msg
	subs	r4, r0, #0
	bne	.L4
	mov	r0, #500
	bl	msleep
	mov	r3, r6
	mov	r0, r5
	ldr	r1, [r8]
	str	r6, [sp]
	add	r2, sp, #8
	str	r6, [sp, #8]
	bl	tt3650_ci_msg
	subs	r4, r0, #0
	beq	.L9
.L4:
	mov	r0, r7
	bl	mutex_unlock
	b	.L1
.L9:
	mov	r0, #500
	bl	msleep
	ldr	r1, .L10+16
	str	r6, [sp]
	mov	r3, r6
	ldr	r1, [r1]
	add	r2, sp, #8
	mov	r0, r5
	str	r4, [sp, #8]
	bl	tt3650_ci_msg
	mov	r4, r0
	ldr	r0, .L10+20
	bl	msleep
	mov	r0, r7
	bl	mutex_unlock
	b	.L1
.L8:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	.LC1
	.word	.LC0
	.word	EINVAL
	.word	TT3650_CMD_CI_RESET
	.word	TT3650_CMD_CI_SET_VIDEO_PORT
	.word	1100
	.size	tt3650_ci_slot_reset, .-tt3650_ci_slot_reset
	.comm	TT3650_CMD_CI_SET_VIDEO_PORT,4,4
	.comm	TT3650_CMD_CI_RESET,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
