	.file	"extr_saa7115.c_saa711x_set_lcr.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	saa711x_set_lcr, @function
saa711x_set_lcr:
.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
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 112
	.cfi_def_cfa_offset 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 104[rsp], rax
	xor	eax, eax
	call	to_state@PLT
	mov	rsi, QWORD PTR R_41_LCR_BASE[rip]
	mov	r14d, DWORD PTR V4L2_STD_625_50[rip]
	mov	rdi, QWORD PTR 8[rax]
	mov	ebx, DWORD PTR [rax]
	call	saa711x_has_reg@PLT
	test	eax, eax
	je	.L41
	mov	r12, rsp
	lea	rdx, 96[rsp]
	mov	rax, r12
	.p2align 4,,10
	.p2align 3
.L4:
	mov	DWORD PTR [rax], 255
	add	rax, 4
	cmp	rax, rdx
	jne	.L4
	and	ebx, r14d
	test	rbp, rbp
	je	.L45
	mov	rax, QWORD PTR 0[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	rsi, QWORD PTR [rax]
	xor	eax, eax
	test	ebx, ebx
	je	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	mov	DWORD PTR [rcx+rax], 0
	mov	DWORD PTR [rsi+rax], 0
	add	rax, 4
	cmp	rax, 24
	jne	.L12
.L13:
	mov	eax, 24
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L46:
	test	edx, edx
	je	.L23
	cmp	edx, 128
	jne	.L25
	or	DWORD PTR [r12+rax], 80
.L25:
	add	rax, 4
	cmp	rax, 96
	je	.L10
.L28:
	mov	edx, DWORD PTR [rcx+rax]
	mov	DWORD PTR [r12+rax], 0
	cmp	edx, 129
	je	.L14
	jg	.L15
	test	edx, edx
	je	.L16
	cmp	edx, 128
	jne	.L18
	mov	DWORD PTR [r12+rax], 5
.L18:
	mov	edx, DWORD PTR [rsi+rax]
	cmp	edx, 129
	je	.L21
.L47:
	jle	.L46
	cmp	edx, 130
	je	.L26
	cmp	edx, 131
	jne	.L25
	or	DWORD PTR [r12+rax], 64
	add	rax, 4
	cmp	rax, 96
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L10:
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rsi, QWORD PTR R_41_LCR_BASE[rip]
	mov	edx, DWORD PTR 8[r12+rbx*4]
	mov	rdi, r13
	add	rsi, rbx
	add	rbx, 1
	call	saa711x_write@PLT
	cmp	rbx, 22
	jne	.L8
	test	rbp, rbp
	mov	esi, DWORD PTR saa7115_cfg_vbi_on[rip]
	cmovne	esi, DWORD PTR saa7115_cfg_vbi_off[rip]
	mov	rax, QWORD PTR 104[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L43
	add	rsp, 112
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	rdi, r13
	pop	rbx
	.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
	jmp	saa711x_writeregs@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	DWORD PTR [rcx+rax], 0
	mov	DWORD PTR [rsi+rax], 0
	add	rax, 4
	cmp	rax, 40
	jne	.L11
	mov	DWORD PTR 88[rcx], 0
	mov	DWORD PTR 88[rsi], 0
	mov	DWORD PTR 92[rcx], 0
	mov	DWORD PTR 92[rsi], 0
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L15:
	cmp	edx, 130
	je	.L19
	cmp	edx, 131
	jne	.L18
	mov	edx, DWORD PTR [rsi+rax]
	mov	DWORD PTR [r12+rax], 4
	cmp	edx, 129
	jne	.L47
	.p2align 4,,10
	.p2align 3
.L21:
	or	DWORD PTR [r12+rax], 112
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L16:
	mov	DWORD PTR [r12+rax], 15
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L19:
	mov	DWORD PTR [r12+rax], 1
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L23:
	or	DWORD PTR [r12+rax], 240
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L14:
	mov	DWORD PTR [r12+rax], 7
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L26:
	or	DWORD PTR [r12+rax], 16
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L41:
	mov	rax, QWORD PTR 104[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L43
	add	rsp, 112
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.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
.L45:
	.cfi_restore_state
	test	ebx, ebx
	je	.L6
	lea	rax, 24[rsp]
	.p2align 4,,10
	.p2align 3
.L7:
	mov	DWORD PTR [rax], 221
	add	rax, 4
	cmp	rax, rdx
	jne	.L7
	jmp	.L10
.L6:
	lea	rax, 40[rsp]
	lea	rdx, 88[r12]
	.p2align 4,,10
	.p2align 3
.L9:
	mov	DWORD PTR [rax], 221
	add	rax, 4
	cmp	rdx, rax
	jne	.L9
	jmp	.L10
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	saa711x_set_lcr, .-saa711x_set_lcr
	.comm	saa7115_cfg_vbi_on,4,4
	.comm	saa7115_cfg_vbi_off,4,4
	.comm	V4L2_STD_625_50,4,4
	.comm	V4L2_IDENT_SAA7115,8,8
	.comm	R_41_LCR_BASE,8,8
	.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_saa7115.c_saa711x_set_lcr.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	saa711x_set_lcr, %function
saa711x_set_lcr:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L47
	sub	sp, sp, #108
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #100]
	mov	r3,#0
	mov	r4, r0
	bl	to_state
	mov	r3, r0
	ldr	r5, .L47+4
	ldr	r2, .L47+8
	ldr	r0, [r0, #4]
	ldr	r1, [r5]
	ldr	r7, [r3]
	ldr	r8, [r2]
	bl	saa711x_has_reg
	cmp	r0, #0
	beq	.L41
	mov	r1, #255
	mov	r3, sp
	add	r2, sp, #96
.L4:
	str	r1, [r3, #4]!
	cmp	r3, r2
	bne	.L4
	cmp	r6, #0
	and	r3, r7, r8
	beq	.L45
	ldr	r2, [r6]
	cmp	r3, #0
	ldr	ip, [r2, #4]
	ldr	lr, [r2]
	beq	.L11
	mov	r1, #0
	sub	r3, ip, #4
	sub	r2, lr, #4
	add	ip, ip, #20
.L12:
	str	r1, [r3, #4]!
	cmp	r3, ip
	str	r1, [r2, #4]!
	bne	.L12
.L13:
	mov	r9, #4
	mov	r1, #0
	mov	fp, #15
	mov	r10, #1
	mov	r8, #5
	mov	r7, #7
	add	r3, sp, r9
	add	lr, lr, #20
	add	r0, r3, #96
	add	r2, sp, #28
.L29:
	ldr	r3, [ip, #4]!
	str	r1, [r2], #4
	cmp	r3, #0
	streq	fp, [r2, #-4]
	beq	.L16
	sub	r3, r3, #128
	cmp	r3, #3
	bhi	.L16
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L16
.L18:
	.word	.L21
	.word	.L20
	.word	.L19
	.word	.L17
.L17:
	str	r9, [r2, #-4]
.L16:
	ldr	r3, [lr, #4]!
	cmp	r3, #0
	beq	.L22
.L46:
	sub	r3, r3, #128
	cmp	r3, #3
	bhi	.L23
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L23
.L25:
	.word	.L28
	.word	.L27
	.word	.L26
	.word	.L24
.L24:
	ldr	r3, [r2, #-4]
	orr	r3, r3, #64
	str	r3, [r2, #-4]
.L23:
	cmp	r0, r2
	bne	.L29
.L10:
	mov	r7, #0
	add	r8, sp, #8
.L8:
	ldr	r1, [r5]
	mov	r0, r4
	add	r1, r7, r1
	ldr	r2, [r8, #4]!
	add	r7, r7, #1
	bl	saa711x_write
	cmp	r7, #22
	bne	.L8
	cmp	r6, #0
	ldreq	r3, .L47+12
	ldrne	r3, .L47+16
	ldr	r1, [r3]
	ldr	r3, .L47
	ldr	r2, [r3]
	ldr	r3, [sp, #100]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L43
	mov	r0, r4
	add	sp, sp, #108
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	saa711x_writeregs
.L27:
	ldr	r3, [r2, #-4]
	orr	r3, r3, #112
	str	r3, [r2, #-4]
	b	.L23
.L26:
	ldr	r3, [r2, #-4]
	orr	r3, r3, #16
	str	r3, [r2, #-4]
	b	.L23
.L28:
	ldr	r3, [r2, #-4]
	orr	r3, r3, #80
	str	r3, [r2, #-4]
	b	.L23
.L20:
	ldr	r3, [lr, #4]!
	str	r7, [r2, #-4]
	cmp	r3, #0
	bne	.L46
.L22:
	ldr	r3, [r2, #-4]
	orr	r3, r3, #240
	str	r3, [r2, #-4]
	b	.L23
.L21:
	str	r8, [r2, #-4]
	b	.L16
.L19:
	str	r10, [r2, #-4]
	b	.L16
.L41:
	ldr	r3, .L47
	ldr	r2, [r3]
	ldr	r3, [sp, #100]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L43
	add	sp, sp, #108
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	sub	r2, ip, #4
	sub	r1, lr, #4
	add	r0, ip, #36
.L14:
	str	r3, [r2, #4]!
	cmp	r2, r0
	str	r3, [r1, #4]!
	bne	.L14
	str	r3, [ip, #88]
	str	r3, [lr, #88]
	add	ip, ip, #20
	str	r3, [ip, #72]
	str	r3, [lr, #92]
	b	.L13
.L45:
	cmp	r3, #0
	mov	r1, #221
	beq	.L6
	add	r2, sp, #100
	add	r3, sp, #28
.L7:
	str	r1, [r3], #4
	cmp	r2, r3
	bne	.L7
	b	.L10
.L6:
	add	r2, sp, #88
	add	r3, sp, #40
.L9:
	str	r1, [r3, #4]!
	cmp	r2, r3
	bne	.L9
	b	.L10
.L43:
	bl	__stack_chk_fail
.L48:
	.align	2
.L47:
	.word	.LC0
	.word	R_41_LCR_BASE
	.word	V4L2_STD_625_50
	.word	saa7115_cfg_vbi_on
	.word	saa7115_cfg_vbi_off
	.size	saa711x_set_lcr, .-saa711x_set_lcr
	.comm	saa7115_cfg_vbi_on,4,4
	.comm	saa7115_cfg_vbi_off,4,4
	.comm	V4L2_STD_625_50,4,4
	.comm	V4L2_IDENT_SAA7115,4,4
	.comm	R_41_LCR_BASE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
