	.file	"extr_vdr.c_SwitchFile.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Failed to open %s: %s"
.LC1:
	.string	"%s is not a regular file"
.LC2:
	.string	"opened %s"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"VLC could not open the file \"%s\" (%s)."
	.section	.rodata.str1.1
.LC4:
	.string	"File reading failed"
	.text
	.p2align 4
	.type	SwitchFile, @function
SwitchFile:
.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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rbx, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	edi, DWORD PTR [rbx]
	cmp	edi, -1
	je	.L2
	mov	eax, 1
	cmp	DWORD PTR 4[rbx], esi
	je	.L1
	call	vlc_close@PLT
	mov	DWORD PTR [rbx], -1
.L2:
	cmp	DWORD PTR FILE_COUNT[rip], ebp
	ja	.L4
.L26:
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L28
	add	rsp, 16
	.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
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	DWORD PTR 4[rbx], ebp
	mov	esi, ebp
	mov	rdi, r12
	call	GetFilePath@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L26
	mov	esi, DWORD PTR O_RDONLY[rip]
	mov	rdi, rax
	call	vlc_open@PLT
	mov	DWORD PTR [rbx], eax
	mov	edi, eax
	cmp	eax, -1
	je	.L29
	lea	rsi, 4[rsp]
	call	fstat@PLT
	test	rax, rax
	jne	.L9
	mov	edi, DWORD PTR 4[rsp]
	call	S_ISREG@PLT
	test	eax, eax
	je	.L9
	mov	edi, DWORD PTR [rbx]
	call	OptimizeForRead@PLT
	mov	rdx, rbp
	lea	rsi, .LC2[rip]
	mov	rdi, r12
	call	msg_Dbg@PLT
	mov	rdi, rbp
	call	free@PLT
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdx, rbp
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	xor	eax, eax
	call	msg_Err@PLT
.L7:
	mov	edi, DWORD PTR errno[rip]
	call	vlc_strerror@PLT
	lea	rdi, .LC3[rip]
	mov	r14d, eax
	call	_@PLT
	lea	rdi, .LC4[rip]
	mov	r13d, eax
	call	_@PLT
	mov	rdi, r12
	mov	r8d, r14d
	mov	rcx, rbp
	mov	esi, eax
	mov	edx, r13d
	call	vlc_dialog_display_error@PLT
	mov	edi, DWORD PTR [rbx]
	cmp	edi, -1
	je	.L10
	call	vlc_close@PLT
	mov	DWORD PTR [rbx], -1
.L10:
	mov	rdi, rbp
	call	free@PLT
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edi, DWORD PTR errno[rip]
	call	vlc_strerror_c@PLT
	mov	rdx, rbp
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	mov	ecx, eax
	xor	eax, eax
	call	msg_Err@PLT
	jmp	.L7
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	SwitchFile, .-SwitchFile
	.comm	errno,4,4
	.comm	O_RDONLY,4,4
	.comm	FILE_COUNT,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_vdr.c_SwitchFile.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to open %s: %s\000"
	.align	2
.LC1:
	.ascii	"%s is not a regular file\000"
	.align	2
.LC2:
	.ascii	"opened %s\000"
	.align	2
.LC3:
	.ascii	"File reading failed\000"
	.align	2
.LC4:
	.ascii	"VLC could not open the file \"%s\" (%s).\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	SwitchFile, %function
SwitchFile:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r6, [r0]
	mov	r5, r0
	ldr	r0, [r6]
	ldr	r3, .L30
	sub	sp, sp, #20
	cmn	r0, #1
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	beq	.L2
	ldr	r3, [r6, #4]
	cmp	r3, r1
	moveq	r0, #1
	beq	.L1
	bl	vlc_close
	mvn	r3, #0
	str	r3, [r6]
.L2:
	ldr	r3, .L30+4
	ldr	r3, [r3]
	cmp	r3, r4
	bhi	.L4
.L26:
	mov	r0, #0
.L1:
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L28
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L4:
	mov	r1, r4
	str	r4, [r6, #4]
	mov	r0, r5
	bl	GetFilePath
	subs	r4, r0, #0
	beq	.L26
	ldr	r3, .L30+8
	ldr	r1, [r3]
	bl	vlc_open
	cmn	r0, #1
	str	r0, [r6]
	beq	.L29
	add	r1, sp, #8
	bl	fstat
	cmp	r0, #0
	bne	.L9
	ldr	r0, [sp, #8]
	bl	S_ISREG
	cmp	r0, #0
	beq	.L9
	ldr	r0, [r6]
	bl	OptimizeForRead
	mov	r2, r4
	ldr	r1, .L30+12
	mov	r0, r5
	bl	msg_Dbg
	mov	r0, r4
	bl	free
	mov	r0, #1
	b	.L1
.L9:
	mov	r2, r4
	mov	r0, r5
	ldr	r1, .L30+16
	bl	msg_Err
	ldr	r9, .L30+20
.L7:
	ldr	r0, .L30+24
	bl	_
	mov	r7, r0
	ldr	r0, .L30+28
	bl	_
	mov	r8, r0
	ldr	r0, [r9]
	bl	vlc_strerror
	mov	r2, r8
	str	r0, [sp]
	mov	r1, r7
	mov	r0, r5
	mov	r3, r4
	bl	vlc_dialog_display_error
	ldr	r0, [r6]
	cmn	r0, #1
	beq	.L10
	bl	vlc_close
	mvn	r3, #0
	str	r3, [r6]
.L10:
	mov	r0, r4
	bl	free
	b	.L26
.L29:
	ldr	r9, .L30+20
	ldr	r0, [r9]
	bl	vlc_strerror_c
	mov	r2, r4
	mov	r3, r0
	ldr	r1, .L30+32
	mov	r0, r5
	bl	msg_Err
	b	.L7
.L28:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	.LC5
	.word	FILE_COUNT
	.word	O_RDONLY
	.word	.LC2
	.word	.LC1
	.word	errno
	.word	.LC3
	.word	.LC4
	.word	.LC0
	.size	SwitchFile, .-SwitchFile
	.comm	errno,4,4
	.comm	O_RDONLY,4,4
	.comm	FILE_COUNT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
