	.file	"extr_linsys_hdsdi.c_InitVideo.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"found standard %d"
.LC1:
	.string	"unsupported standard %d"
	.text
	.p2align 4
	.type	InitVideo, @function
InitVideo:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	rsi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 48
	.cfi_def_cfa_offset 80
	mov	rbx, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	edx, DWORD PTR [rbx]
	call	msg_Dbg@PLT
	mov	edx, DWORD PTR [rbx]
	lea	eax, -128[rdx]
	cmp	eax, 7
	ja	.L2
	lea	rdx, .L4[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L9-.L4
	.long	.L8-.L4
	.long	.L5-.L4
	.long	.L5-.L4
	.long	.L7-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
	.p2align 4,,10
	.p2align 3
.L5:
	movabs	rax, 4294967321
	mov	edx, DWORD PTR VOUT_ASPECT_FACTOR[rip]
	mov	QWORD PTR 4[rbx], rax
	movabs	rax, 4638564681600
	sal	edx, 4
	mov	QWORD PTR 12[rbx], rax
	movsx	rax, edx
	imul	rax, rax, 954437177
	sar	rax, 33
.L14:
	sar	edx, 31
	mov	edi, 1
	mov	esi, 25
	sub	eax, edx
	mov	DWORD PTR 20[rbx], eax
.L10:
	mov	eax, DWORD PTR START_DATE[rip]
	mov	r12, rsp
	mov	DWORD PTR 40[rbx], eax
	call	vlc_tick_from_samples@PLT
	mov	esi, DWORD PTR VIDEO_ES[rip]
	mov	rdi, r12
	mov	DWORD PTR 36[rbx], eax
	mov	eax, DWORD PTR 12[rbx]
	imul	eax, DWORD PTR 16[rbx]
	lea	edx, [rax+rax*2]
	mov	eax, edx
	shr	eax, 31
	add	eax, edx
	mov	edx, DWORD PTR VLC_CODEC_I420[rip]
	sar	eax
	add	eax, 4
	mov	DWORD PTR 24[rbx], eax
	call	es_format_Init@PLT
	mov	eax, DWORD PTR 32[rbx]
	mov	ecx, DWORD PTR 12[rbx]
	mov	rsi, r12
	mov	edi, DWORD PTR 0[rbp]
	mov	DWORD PTR 32[rsp], eax
	mov	eax, DWORD PTR 4[rbx]
	mov	DWORD PTR [rsp], eax
	mov	eax, DWORD PTR 8[rbx]
	mov	DWORD PTR 12[rsp], ecx
	mov	DWORD PTR 4[rsp], eax
	mov	eax, DWORD PTR 16[rbx]
	mov	DWORD PTR 8[rsp], ecx
	mov	DWORD PTR 20[rsp], eax
	mov	DWORD PTR 16[rsp], eax
	imul	eax, DWORD PTR 20[rbx]
	cdq
	idiv	ecx
	mov	DWORD PTR 24[rsp], eax
	mov	eax, DWORD PTR VOUT_ASPECT_FACTOR[rip]
	mov	DWORD PTR 28[rsp], eax
	call	es_out_Add@PLT
	mov	DWORD PTR 28[rbx], eax
	mov	eax, DWORD PTR VLC_SUCCESS[rip]
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L16
	add	rsp, 48
	.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
.L7:
	.cfi_restore_state
	mov	edx, DWORD PTR VOUT_ASPECT_FACTOR[rip]
	mov	edi, 1
	mov	esi, 30
	movabs	rax, 4294967326
	mov	QWORD PTR 4[rbx], rax
	movabs	rax, 4638564681600
	sal	edx, 4
	mov	QWORD PTR 12[rbx], rax
	movsx	rax, edx
	sar	edx, 31
	imul	rax, rax, 954437177
	sar	rax, 33
	sub	eax, edx
	mov	DWORD PTR 20[rbx], eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edx, DWORD PTR VOUT_ASPECT_FACTOR[rip]
	mov	edi, 1001
	mov	esi, 30000
	movabs	rax, 4299262293296
	mov	QWORD PTR 4[rbx], rax
	movabs	rax, 4638564681600
	sal	edx, 4
	mov	QWORD PTR 12[rbx], rax
	movsx	rax, edx
	sar	edx, 31
	imul	rax, rax, 954437177
	sar	rax, 33
	sub	eax, edx
	mov	DWORD PTR 20[rbx], eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movabs	rax, 4294967321
	mov	QWORD PTR 4[rbx], rax
	movabs	rax, 2473901163216
	mov	QWORD PTR 12[rbx], rax
	mov	eax, DWORD PTR VOUT_ASPECT_FACTOR[rip]
	lea	edx, 0[0+rax*4]
	movsx	rax, edx
	imul	rax, rax, 1431655766
	shr	rax, 32
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edx, DWORD PTR VOUT_ASPECT_FACTOR[rip]
	mov	edi, 1
	mov	esi, 60
	movabs	rax, 4294967356
	mov	QWORD PTR 4[rbx], rax
	movabs	rax, 3092376454400
	sal	edx, 4
	mov	QWORD PTR 12[rbx], rax
	movsx	rax, edx
	sar	edx, 31
	imul	rax, rax, 954437177
	sar	rax, 33
	sub	eax, edx
	mov	DWORD PTR 20[rbx], eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edx, DWORD PTR VOUT_ASPECT_FACTOR[rip]
	mov	edi, 1
	mov	esi, 50
	movabs	rax, 4294967346
	mov	QWORD PTR 4[rbx], rax
	movabs	rax, 3092376454400
	sal	edx, 4
	mov	QWORD PTR 12[rbx], rax
	movsx	rax, edx
	sar	edx, 31
	imul	rax, rax, 954437177
	sar	rax, 33
	sub	eax, edx
	mov	DWORD PTR 20[rbx], eax
	jmp	.L10
.L2:
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	msg_Err@PLT
	mov	eax, DWORD PTR VLC_EGENERIC[rip]
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	InitVideo, .-InitVideo
	.comm	VOUT_ASPECT_FACTOR,4,4
	.comm	VLC_SUCCESS,4,4
	.comm	VLC_EGENERIC,4,4
	.comm	VLC_CODEC_I420,4,4
	.comm	VIDEO_ES,4,4
	.comm	START_DATE,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_linsys_hdsdi.c_InitVideo.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"found standard %d\000"
	.align	2
.LC1:
	.ascii	"unsupported standard %d\000"
	.global	__aeabi_idiv
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	InitVideo, %function
InitVideo:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r4, [r0, #4]
	ldr	r3, .L18
	ldr	r2, [r4]
	sub	sp, sp, #44
	ldr	r1, .L18+4
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	mov	r5, r0
	bl	msg_Dbg
	ldr	r2, [r4]
	sub	r3, r2, #128
	cmp	r3, #7
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L9
	.word	.L8
	.word	.L5
	.word	.L5
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L5:
	mov	r1, #25
.L15:
	mov	r0, #1
	mov	ip, #1920
	ldr	r6, .L18+8
	ldr	r2, .L18+12
	ldr	r3, [r6]
	str	r1, [r4, #4]
	lsl	r3, r3, #4
	smull	lr, r2, r3, r2
	asr	r3, r3, #31
	rsb	r3, r3, r2, asr r0
	str	r3, [r4, #20]
	ldr	r3, .L18+16
	str	r0, [r4, #8]
	str	ip, [r4, #12]
	str	r3, [r4, #16]
.L10:
	ldr	r3, .L18+20
	ldr	r3, [r3]
	str	r3, [r4, #40]
	bl	vlc_tick_from_samples
	ldr	r1, [r4, #16]
	ldr	r3, [r4, #12]
	ldr	r2, .L18+24
	mul	r3, r1, r3
	add	r3, r3, r3, lsl #1
	add	r3, r3, r3, lsr #31
	ldr	r1, .L18+28
	asr	r3, r3, #1
	add	r3, r3, #4
	ldr	r2, [r2]
	ldr	r1, [r1]
	str	r0, [r4, #36]
	str	r3, [r4, #24]
	mov	r0, sp
	bl	es_format_Init
	ldr	r2, [r4, #4]
	ldr	r3, [r4, #16]
	str	r2, [sp]
	ldr	r2, [r4, #8]
	ldr	r0, [r4, #20]
	ldr	r1, [r4, #12]
	str	r2, [sp, #4]
	ldr	r2, [r4, #32]
	mul	r0, r3, r0
	str	r1, [sp, #12]
	str	r1, [sp, #8]
	str	r3, [sp, #20]
	str	r3, [sp, #16]
	str	r2, [sp, #32]
	bl	__aeabi_idiv
	mov	r2, r0
	ldr	r3, [r6]
	mov	r1, sp
	ldr	r0, [r5]
	str	r3, [sp, #28]
	str	r2, [sp, #24]
	bl	es_out_Add
	ldr	r3, .L18+32
	str	r0, [r4, #28]
	ldr	r0, [r3]
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L7:
	mov	r1, #30
	b	.L15
.L6:
	mov	r1, #1920
	ldr	r6, .L18+8
	ldr	r2, .L18+12
	ldr	r3, [r6]
	str	r1, [r4, #12]
	lsl	r3, r3, #4
	smull	r1, r2, r3, r2
	asr	r3, r3, #31
	rsb	r3, r3, r2, asr #1
	ldr	r1, .L18+36
	ldr	r0, .L18+40
	ldr	r2, .L18+16
	str	r3, [r4, #20]
	str	r1, [r4, #4]
	str	r0, [r4, #8]
	str	r2, [r4, #16]
	b	.L10
.L3:
	mov	r1, #25
	mov	r0, #1
	mov	lr, #720
	mov	ip, #576
	ldr	r6, .L18+8
	ldr	r3, .L18+44
	ldr	r2, [r6]
	str	r1, [r4, #4]
	lsl	r2, r2, #2
	smull	r7, r3, r2, r3
	sub	r3, r3, r2, asr #31
	str	r3, [r4, #20]
	str	r0, [r4, #8]
	str	lr, [r4, #12]
	str	ip, [r4, #16]
	b	.L10
.L9:
	mov	r1, #60
.L14:
	mov	r0, #1
	mov	lr, #1280
	mov	ip, #720
	ldr	r6, .L18+8
	ldr	r2, .L18+12
	ldr	r3, [r6]
	str	r1, [r4, #4]
	lsl	r3, r3, #4
	smull	r7, r2, r3, r2
	asr	r3, r3, #31
	rsb	r3, r3, r2, asr r0
	str	r3, [r4, #20]
	str	r0, [r4, #8]
	str	lr, [r4, #12]
	str	ip, [r4, #16]
	b	.L10
.L8:
	mov	r1, #50
	b	.L14
.L17:
	bl	__stack_chk_fail
.L2:
	mov	r0, r5
	ldr	r1, .L18+48
	bl	msg_Err
	ldr	r3, .L18+52
	ldr	r0, [r3]
	b	.L1
.L19:
	.align	2
.L18:
	.word	.LC2
	.word	.LC0
	.word	VOUT_ASPECT_FACTOR
	.word	954437177
	.word	1080
	.word	START_DATE
	.word	VLC_CODEC_I420
	.word	VIDEO_ES
	.word	VLC_SUCCESS
	.word	30000
	.word	1001
	.word	1431655766
	.word	.LC1
	.word	VLC_EGENERIC
	.size	InitVideo, .-InitVideo
	.comm	VOUT_ASPECT_FACTOR,4,4
	.comm	VLC_SUCCESS,4,4
	.comm	VLC_EGENERIC,4,4
	.comm	VLC_CODEC_I420,4,4
	.comm	VIDEO_ES,4,4
	.comm	START_DATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
