	.file	"extr_solo6x10-v4l2.c_solo_set_video_type.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	solo_set_video_type
	.type	solo_set_video_type, @function
solo_set_video_type:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	add	rdi, 20
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	vb2_is_busy@PLT
	test	rax, rax
	jne	.L16
	mov	edx, DWORD PTR 0[rbp]
	xor	ebx, ebx
	test	edx, edx
	jg	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	add	rbx, 1
	cmp	DWORD PTR 0[rbp], ebx
	jle	.L4
.L3:
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, QWORD PTR [rax+rbx*8]
	call	vb2_is_busy@PLT
	test	rax, rax
	je	.L6
.L16:
	mov	eax, DWORD PTR EBUSY[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	test	r12d, r12d
	mov	eax, DWORD PTR SOLO_VO_FMT_TYPE_PAL[rip]
	cmove	eax, DWORD PTR SOLO_VO_FMT_TYPE_NTSC[rip]
	mov	rdi, rbp
	mov	DWORD PTR 16[rbp], eax
	call	solo_disp_init@PLT
	mov	rdi, rbp
	call	solo_enc_init@PLT
	mov	rdi, rbp
	call	solo_tw28_init@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L9
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, QWORD PTR [rax+rbx*8]
	add	rbx, 1
	call	solo_update_mode@PLT
	cmp	DWORD PTR 0[rbp], ebx
	jg	.L10
.L9:
	mov	esi, DWORD PTR 4[rbp]
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	solo_v4l2_set_ch@PLT
	.cfi_endproc
.LFE0:
	.size	solo_set_video_type, .-solo_set_video_type
	.comm	SOLO_VO_FMT_TYPE_PAL,4,4
	.comm	SOLO_VO_FMT_TYPE_NTSC,4,4
	.comm	EBUSY,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_solo6x10-v4l2.c_solo_set_video_type.c"
	.text
	.align	2
	.global	solo_set_video_type
	.syntax unified
	.arm
	.fpu softvfp
	.type	solo_set_video_type, %function
solo_set_video_type:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	add	r0, r0, #16
	mov	r7, r1
	bl	vb2_is_busy
	subs	r6, r0, #0
	bne	.L15
	ldr	r3, [r4]
	cmp	r3, #0
	movgt	r5, r6
	bgt	.L3
	b	.L4
.L6:
	ldr	r3, [r4]
	cmp	r3, r5
	ble	.L4
.L3:
	ldr	r3, [r4, #8]
	ldr	r0, [r3, r5, lsl #2]
	bl	vb2_is_busy
	cmp	r0, #0
	add	r5, r5, #1
	beq	.L6
.L15:
	ldr	r3, .L17
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	cmp	r7, #0
	ldrne	r3, .L17+4
	ldreq	r3, .L17+8
	mov	r0, r4
	ldr	r3, [r3]
	str	r3, [r4, #12]
	bl	solo_disp_init
	mov	r0, r4
	bl	solo_enc_init
	mov	r0, r4
	bl	solo_tw28_init
	ldr	r3, [r4]
	cmp	r3, #0
	ble	.L9
.L10:
	ldr	r3, [r4, #8]
	ldr	r0, [r3, r6, lsl #2]
	bl	solo_update_mode
	ldr	r3, [r4]
	add	r6, r6, #1
	cmp	r3, r6
	bgt	.L10
.L9:
	mov	r0, r4
	ldr	r1, [r4, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	solo_v4l2_set_ch
.L18:
	.align	2
.L17:
	.word	EBUSY
	.word	SOLO_VO_FMT_TYPE_PAL
	.word	SOLO_VO_FMT_TYPE_NTSC
	.size	solo_set_video_type, .-solo_set_video_type
	.comm	SOLO_VO_FMT_TYPE_PAL,4,4
	.comm	SOLO_VO_FMT_TYPE_NTSC,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
