	.file	"extr_cx25840-core.c_set_v4lstd.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"changing video std to fmt %i\n"
	.text
	.p2align 4
	.type	set_v4lstd, @function
set_v4lstd:
.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
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	i2c_get_clientdata@PLT
	mov	edi, eax
	call	to_state@PLT
	mov	r8d, DWORD PTR [rax]
	cmp	r8d, DWORD PTR V4L2_STD_NTSC_M_JP[rip]
	mov	r13, rax
	je	.L6
	cmp	r8d, DWORD PTR V4L2_STD_NTSC_443[rip]
	je	.L7
	cmp	r8d, DWORD PTR V4L2_STD_PAL_M[rip]
	je	.L8
	cmp	r8d, DWORD PTR V4L2_STD_PAL_N[rip]
	je	.L9
	cmp	r8d, DWORD PTR V4L2_STD_PAL_Nc[rip]
	je	.L10
	cmp	r8d, DWORD PTR V4L2_STD_PAL_60[rip]
	je	.L11
	mov	r14d, r8d
	and	r14d, DWORD PTR V4L2_STD_NTSC[rip]
	jne	.L12
	test	DWORD PTR V4L2_STD_PAL[rip], r8d
	jne	.L13
	and	r8d, DWORD PTR V4L2_STD_SECAM[rip]
	mov	eax, 12
	mov	r12d, r8d
	cmovne	r12d, eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r12d, 3
.L2:
	mov	esi, DWORD PTR cx25840_debug[rip]
	mov	r8d, r12d
	mov	rdx, rbp
	xor	r14d, r14d
	lea	rcx, .LC0[rip]
	mov	edi, 1
	call	v4l_dbg@PLT
.L5:
	mov	ecx, r12d
	mov	edx, -16
	mov	esi, 1024
	mov	rdi, rbp
	call	cx25840_and_or@PLT
	mov	ecx, r14d
	mov	edx, -4
	mov	rdi, rbp
	mov	esi, 1027
	call	cx25840_and_or@PLT
	mov	rdi, rbp
	call	cx25840_std_setup@PLT
	mov	rdi, r13
	call	is_cx2583x@PLT
	test	eax, eax
	je	.L19
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L6:
	.cfi_restore_state
	mov	r12d, 2
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, rbp
	call	input_change@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L9:
	.cfi_restore_state
	xor	r14d, r14d
	mov	r12d, 6
.L3:
	mov	esi, DWORD PTR cx25840_debug[rip]
	mov	r8d, r12d
	mov	rdx, rbp
	lea	rcx, .LC0[rip]
	mov	edi, 1
	call	v4l_dbg@PLT
	mov	rdi, rbp
	mov	ecx, 1
	mov	edx, -16
	mov	esi, 1024
	call	cx25840_and_or@PLT
	xor	ecx, ecx
	mov	edx, -7
	mov	rdi, rbp
	mov	esi, 1147
	call	cx25840_and_or@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	mov	r14d, 1
	mov	r12d, 5
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L10:
	xor	r14d, r14d
	mov	r12d, 7
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	mov	r12d, 1
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L11:
	mov	r12d, 8
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	mov	r12d, 4
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	set_v4lstd, .-set_v4lstd
	.comm	cx25840_debug,4,4
	.comm	V4L2_STD_SECAM,4,4
	.comm	V4L2_STD_PAL_Nc,4,4
	.comm	V4L2_STD_PAL_N,4,4
	.comm	V4L2_STD_PAL_M,4,4
	.comm	V4L2_STD_PAL_60,4,4
	.comm	V4L2_STD_PAL,4,4
	.comm	V4L2_STD_NTSC_M_JP,4,4
	.comm	V4L2_STD_NTSC_443,4,4
	.comm	V4L2_STD_NTSC,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_cx25840-core.c_set_v4lstd.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"changing video std to fmt %i\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_v4lstd, %function
set_v4lstd:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	sub	sp, sp, #12
	mov	r4, r0
	bl	i2c_get_clientdata
	bl	to_state
	ldr	r3, .L20
	ldr	r2, [r0]
	ldr	r3, [r3]
	mov	r6, r0
	cmp	r2, r3
	beq	.L6
	ldr	r3, .L20+4
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L7
	ldr	r3, .L20+8
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L8
	ldr	r3, .L20+12
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L9
	ldr	r3, .L20+16
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L10
	ldr	r3, .L20+20
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L11
	ldr	r3, .L20+24
	ldr	r7, [r3]
	ands	r7, r2, r7
	bne	.L12
	ldr	r3, .L20+28
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L13
	ldr	r3, .L20+32
	ldr	r5, [r3]
	ands	r5, r2, r5
	movne	r5, #12
	b	.L2
.L7:
	mov	r5, #3
.L2:
	ldr	r3, .L20+36
	str	r5, [sp]
	ldr	r1, [r3]
	mov	r2, r4
	mov	r0, #1
	ldr	r3, .L20+40
	bl	v4l_dbg
	mov	r7, #0
.L5:
	mov	r3, r5
	mvn	r2, #15
	mov	r1, #1024
	mov	r0, r4
	bl	cx25840_and_or
	mov	r3, r7
	mvn	r2, #3
	ldr	r1, .L20+44
	mov	r0, r4
	bl	cx25840_and_or
	mov	r0, r4
	bl	cx25840_std_setup
	mov	r0, r6
	bl	is_cx2583x
	cmp	r0, #0
	beq	.L19
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L6:
	mov	r5, #2
	b	.L2
.L19:
	mov	r0, r4
	bl	input_change
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L9:
	mov	r7, #0
	mov	r5, #6
.L3:
	ldr	r3, .L20+36
	str	r5, [sp]
	mov	r2, r4
	ldr	r1, [r3]
	mov	r0, #1
	ldr	r3, .L20+40
	bl	v4l_dbg
	mov	r3, #1
	mvn	r2, #15
	mov	r1, #1024
	mov	r0, r4
	bl	cx25840_and_or
	mov	r3, #0
	mvn	r2, #6
	mov	r0, r4
	ldr	r1, .L20+48
	bl	cx25840_and_or
	b	.L5
.L8:
	mov	r7, #1
	mov	r5, #5
	b	.L3
.L10:
	mov	r7, #0
	mov	r5, #7
	b	.L3
.L12:
	mov	r5, #1
	b	.L2
.L11:
	mov	r5, #8
	b	.L2
.L13:
	mov	r5, #4
	b	.L3
.L21:
	.align	2
.L20:
	.word	V4L2_STD_NTSC_M_JP
	.word	V4L2_STD_NTSC_443
	.word	V4L2_STD_PAL_M
	.word	V4L2_STD_PAL_N
	.word	V4L2_STD_PAL_Nc
	.word	V4L2_STD_PAL_60
	.word	V4L2_STD_NTSC
	.word	V4L2_STD_PAL
	.word	V4L2_STD_SECAM
	.word	cx25840_debug
	.word	.LC0
	.word	1027
	.word	1147
	.size	set_v4lstd, .-set_v4lstd
	.comm	cx25840_debug,4,4
	.comm	V4L2_STD_SECAM,4,4
	.comm	V4L2_STD_PAL_Nc,4,4
	.comm	V4L2_STD_PAL_N,4,4
	.comm	V4L2_STD_PAL_M,4,4
	.comm	V4L2_STD_PAL_60,4,4
	.comm	V4L2_STD_PAL,4,4
	.comm	V4L2_STD_NTSC_M_JP,4,4
	.comm	V4L2_STD_NTSC_443,4,4
	.comm	V4L2_STD_NTSC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
