	.file	"extr_pd-video.c_set_std.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"name : %s"
	.text
	.p2align 4
	.type	set_std, @function
set_std:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rcx, QWORD PTR POSEIDON_TVNORMS[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	rcx, rcx
	je	.L2
	mov	rbp, rdi
	mov	rdx, QWORD PTR poseidon_tvnorms[rip]
	mov	edi, DWORD PTR [rsi]
	xor	ebx, ebx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	add	rax, 1
	add	rbx, 24
	cmp	rcx, rax
	je	.L2
.L6:
	lea	rsi, [rdx+rbx]
	test	DWORD PTR [rdx+rbx], edi
	je	.L3
	mov	r12, QWORD PTR 8[rsi]
	mov	esi, DWORD PTR 16[rsi]
	lea	rdi, .LC0[rip]
	call	log@PLT
	mov	rdi, rbp
	call	mutex_lock@PLT
	mov	rdx, r12
	mov	rcx, rsp
	mov	rdi, rbp
	mov	esi, DWORD PTR VIDEO_STD_SEL[rip]
	call	send_set_req@PLT
	mov	r12, rax
	or	rax, QWORD PTR [rsp]
	jne	.L5
	mov	rax, QWORD PTR poseidon_tvnorms[rip]
	mov	eax, DWORD PTR [rax+rbx]
	mov	DWORD PTR 8[rbp], eax
	test	DWORD PTR V4L2_STD_525_60[rip], eax
	jne	.L18
	mov	edx, DWORD PTR V4L_PAL_VBI_FRAMESIZE[rip]
	mov	eax, 576
.L9:
	mov	DWORD PTR 4[rbp], edx
	cmp	DWORD PTR 12[rbp], eax
	je	.L5
	mov	DWORD PTR 12[rbp], eax
	imul	eax, DWORD PTR 20[rbp]
	add	eax, eax
	mov	DWORD PTR 16[rbp], eax
.L5:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	mov	eax, r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L19
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.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
.L18:
	.cfi_restore_state
	mov	edx, DWORD PTR V4L_NTSC_VBI_FRAMESIZE[rip]
	mov	eax, 480
	jmp	.L9
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	set_std, .-set_std
	.comm	poseidon_tvnorms,8,8
	.comm	VIDEO_STD_SEL,4,4
	.comm	V4L_PAL_VBI_FRAMESIZE,4,4
	.comm	V4L_NTSC_VBI_FRAMESIZE,4,4
	.comm	V4L2_STD_525_60,4,4
	.comm	POSEIDON_TVNORMS,8,8
	.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_pd-video.c_set_std.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"name : %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_std, %function
set_std:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L19
	sub	sp, sp, #12
	ldr	ip, [r3]
	ldr	r3, .L19+4
	cmp	ip, #0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	beq	.L2
	mov	r4, #0
	ldr	r6, .L19+8
	mov	r5, r0
	mov	r3, r4
	ldr	r0, [r1]
	ldr	r2, [r6]
	b	.L6
.L3:
	add	r3, r3, #1
	cmp	ip, r3
	add	r4, r4, #12
	beq	.L2
.L6:
	ldr	r1, [r2, r4]
	add	lr, r2, r4
	tst	r0, r1
	beq	.L3
	ldr	r1, [lr, #8]
	ldr	r0, .L19+12
	ldr	r7, [lr, #4]
	bl	log
	mov	r0, r5
	bl	mutex_lock
	ldr	r3, .L19+16
	mov	r2, r7
	ldr	r1, [r3]
	mov	r0, r5
	mov	r3, sp
	bl	send_set_req
	ldr	r3, [sp]
	mov	r7, r0
	orrs	r3, r0, r3
	bne	.L5
	ldr	r3, [r6]
	ldr	r2, .L19+20
	ldr	r3, [r3, r4]
	ldr	r2, [r2]
	str	r3, [r5, #8]
	tst	r3, r2
	movne	r3, #480
	moveq	r3, #576
	ldrne	r2, .L19+24
	ldreq	r2, .L19+28
	ldr	r1, [r2]
	ldr	r2, [r5, #12]
	str	r1, [r5, #4]
	cmp	r2, r3
	ldrne	r2, [r5, #20]
	strne	r3, [r5, #12]
	mulne	r3, r2, r3
	lslne	r3, r3, #1
	strne	r3, [r5, #16]
.L5:
	mov	r0, r5
	bl	mutex_unlock
	mov	r0, r7
	b	.L1
.L2:
	ldr	r3, .L19+32
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	POSEIDON_TVNORMS
	.word	.LC1
	.word	poseidon_tvnorms
	.word	.LC0
	.word	VIDEO_STD_SEL
	.word	V4L2_STD_525_60
	.word	V4L_NTSC_VBI_FRAMESIZE
	.word	V4L_PAL_VBI_FRAMESIZE
	.word	EINVAL
	.size	set_std, .-set_std
	.comm	poseidon_tvnorms,4,4
	.comm	VIDEO_STD_SEL,4,4
	.comm	V4L_PAL_VBI_FRAMESIZE,4,4
	.comm	V4L_NTSC_VBI_FRAMESIZE,4,4
	.comm	V4L2_STD_525_60,4,4
	.comm	POSEIDON_TVNORMS,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
