	.file	"extr_bluray.c_bluray_open.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"bd_open() failed\n"
.LC1:
	.string	"%d usable playlists:\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"playlist %05d.mpls (%d:%02d:%02d)\n"
	.section	.rodata.str1.1
.LC3:
	.string	"selected %05d.mpls\n"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"bd_select_playlist(%05d.mpls) failed\n"
	.text
	.p2align 4
	.type	bluray_open, @function
bluray_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	rdi, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rbx, QWORD PTR 0[rbp]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 16[rsp], rsi
	mov	esi, DWORD PTR BLURAY_PROTO_PREFIX[rip]
	lea	rdx, 16[rsp]
	call	av_strstart@PLT
	mov	rdi, QWORD PTR 16[rsp]
	xor	esi, esi
	call	bd_open@PLT
	mov	DWORD PTR 20[rbx], eax
	test	eax, eax
	je	.L18
	mov	rdi, rbp
	call	check_disc_info@PLT
	test	rax, rax
	js	.L16
	mov	edi, DWORD PTR 20[rbx]
	mov	edx, DWORD PTR MIN_PLAYLIST_LENGTH[rip]
	mov	esi, DWORD PTR TITLES_RELEVANT[rip]
	call	bd_get_titles@PLT
	mov	esi, DWORD PTR AV_LOG_INFO[rip]
	lea	rdx, .LC1[rip]
	mov	rdi, rbp
	mov	r12d, eax
	mov	ecx, eax
	xor	eax, eax
	call	av_log@PLT
	test	r12d, r12d
	jle	.L16
	mov	esi, DWORD PTR [rbx]
	test	esi, esi
	js	.L19
.L6:
	mov	edi, DWORD PTR 20[rbx]
	call	bd_select_playlist@PLT
	test	rax, rax
	jle	.L20
	mov	rsi, QWORD PTR 8[rbx]
	test	rsi, rsi
	js	.L10
	mov	edi, DWORD PTR 20[rbx]
	call	bd_select_angle@PLT
.L10:
	mov	esi, DWORD PTR 16[rbx]
	xor	r12d, r12d
	cmp	esi, 1
	jle	.L1
	mov	edi, DWORD PTR 20[rbx]
	sub	esi, 1
	call	bd_seek_chapter@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	ecx, DWORD PTR [rbx]
	mov	esi, DWORD PTR AV_LOG_ERROR[rip]
	mov	rdi, rbp
	xor	eax, eax
	lea	rdx, .LC4[rip]
	call	av_log@PLT
.L16:
	mov	edi, DWORD PTR EIO[rip]
	call	AVERROR@PLT
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, DWORD PTR AV_LOG_ERROR[rip]
	lea	rdx, .LC0[rip]
	mov	rdi, rbp
	call	av_log@PLT
	mov	edi, DWORD PTR EIO[rip]
	call	AVERROR@PLT
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	DWORD PTR 12[rsp], 0
	xor	r13d, r13d
	lea	r14, .LC2[rip]
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, DWORD PTR 20[rbx]
	xor	edx, edx
	mov	esi, r13d
	call	bd_get_title_info@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 104
	movsx	r8, DWORD PTR 4[rax]
	mov	r15, rax
	imul	rdx, r8, 1563749871
	mov	rcx, r8
	sar	ecx, 31
	imul	r8, r8, 1779199853
	sar	rdx, 47
	sub	edx, ecx
	sar	r8, 59
	movsx	rax, edx
	mov	edi, edx
	mov	r10d, edx
	sub	r8d, ecx
	imul	rsi, rax, -1851608123
	sar	edi, 31
	imul	rax, rax, -2004318071
	shr	rsi, 32
	add	esi, edx
	shr	rax, 32
	sar	esi, 11
	add	eax, edx
	sub	esi, edi
	sar	eax, 5
	imul	esi, esi, 3600
	sub	eax, edi
	mov	rdi, rbp
	imul	eax, eax, 60
	sub	r10d, esi
	movsx	r9, r10d
	sub	edx, eax
	xor	eax, eax
	mov	rsi, r9
	imul	r9, r9, -2004318071
	push	rdx
	.cfi_def_cfa_offset 112
	mov	ecx, DWORD PTR [r15]
	mov	rdx, r14
	shr	r9, 32
	add	r9d, esi
	sar	esi, 31
	sar	r9d, 5
	sub	r9d, esi
	mov	esi, DWORD PTR AV_LOG_INFO[rip]
	call	av_log@PLT
	pop	rdx
	.cfi_def_cfa_offset 104
	mov	eax, DWORD PTR 4[r15]
	pop	rcx
	.cfi_def_cfa_offset 96
	cmp	eax, DWORD PTR 12[rsp]
	jle	.L7
	mov	edx, DWORD PTR [r15]
	mov	DWORD PTR 12[rsp], eax
	mov	DWORD PTR [rbx], edx
.L7:
	mov	rdi, r15
	add	r13d, 1
	call	bd_free_title_info@PLT
	cmp	r12d, r13d
	jne	.L8
	mov	esi, DWORD PTR AV_LOG_INFO[rip]
	mov	ecx, DWORD PTR [rbx]
	mov	rdi, rbp
	xor	eax, eax
	lea	rdx, .LC3[rip]
	call	av_log@PLT
	mov	esi, DWORD PTR [rbx]
	jmp	.L6
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bluray_open, .-bluray_open
	.comm	TITLES_RELEVANT,4,4
	.comm	MIN_PLAYLIST_LENGTH,4,4
	.comm	EIO,4,4
	.comm	BLURAY_PROTO_PREFIX,4,4
	.comm	AV_LOG_INFO,4,4
	.comm	AV_LOG_ERROR,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_bluray.c_bluray_open.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"bd_open() failed\012\000"
	.align	2
.LC1:
	.ascii	"%d usable playlists:\012\000"
	.align	2
.LC2:
	.ascii	"playlist %05d.mpls (%d:%02d:%02d)\012\000"
	.align	2
.LC3:
	.ascii	"selected %05d.mpls\012\000"
	.align	2
.LC4:
	.ascii	"bd_select_playlist(%05d.mpls) failed\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bluray_open, %function
bluray_open:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r1
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	sub	sp, sp, #36
	ldr	r2, .L21
	str	r3, [sp, #24]
	ldr	r3, .L21+4
	mov	r0, r1
	ldr	r1, [r2]
	add	r2, sp, #24
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	ldr	r6, [r5]
	bl	av_strstart
	mov	r1, #0
	ldr	r0, [sp, #24]
	bl	bd_open
	cmp	r0, #0
	str	r0, [r6, #12]
	beq	.L17
	mov	r0, r5
	bl	check_disc_info
	cmp	r0, #0
	blt	.L15
	ldr	r3, .L21+8
	ldr	r2, .L21+12
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r0, [r6, #12]
	bl	bd_get_titles
	mov	r8, r0
	ldr	r2, .L21+16
	mov	r3, r0
	ldr	r1, [r2]
	mov	r0, r5
	ldr	r2, .L21+20
	bl	av_log
	cmp	r8, #0
	ble	.L15
	ldr	r1, [r6]
	cmp	r1, #0
	blt	.L18
.L6:
	ldr	r0, [r6, #12]
	bl	bd_select_playlist
	cmp	r0, #0
	ble	.L19
	ldr	r1, [r6, #4]
	cmp	r1, #0
	blt	.L10
	ldr	r0, [r6, #12]
	bl	bd_select_angle
.L10:
	ldr	r1, [r6, #8]
	cmp	r1, #1
	movle	r0, #0
	ble	.L1
	ldr	r0, [r6, #12]
	sub	r1, r1, #1
	bl	bd_seek_chapter
	mov	r0, #0
	b	.L1
.L19:
	ldr	r2, .L21+24
	mov	r0, r5
	ldr	r1, [r2]
	ldr	r3, [r6]
	ldr	r2, .L21+28
	bl	av_log
.L15:
	ldr	r3, .L21+32
	ldr	r0, [r3]
	bl	AVERROR
.L1:
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	ldr	r3, .L21+24
	mov	r0, r5
	ldr	r1, [r3]
	ldr	r2, .L21+36
	bl	av_log
	ldr	r3, .L21+32
	ldr	r0, [r3]
	bl	AVERROR
	b	.L1
.L18:
	mov	r7, #0
	str	r8, [sp, #20]
	mov	r8, r7
	ldr	r9, .L21+40
	str	r5, [sp, #16]
.L8:
	mov	r1, r7
	mov	r2, #0
	ldr	r0, [r6, #12]
	bl	bd_get_title_info
	mov	r4, r0
	ldm	r0, {r3, ip}
	ldr	r0, .L21+44
	asr	fp, ip, #31
	smull	r2, r0, ip, r0
	ldr	r2, .L21+48
	rsb	r0, fp, r0, asr #15
	smull	r1, r2, r0, r2
	asr	lr, r0, #31
	smull	r10, r1, r9, r0
	add	r2, r2, r0
	rsb	r2, lr, r2, asr #11
	rsb	r2, r2, r2, lsl #4
	rsb	r2, r2, r2, lsl #4
	sub	r2, r0, r2, lsl #4
	add	r1, r1, r0
	ldr	r10, .L21+52
	rsb	r1, lr, r1, asr #5
	smull	r5, lr, r9, r2
	smull	r5, r10, ip, r10
	rsb	r1, r1, r1, lsl #4
	add	lr, lr, r2
	sub	r1, r0, r1, lsl #2
	asr	r2, r2, #31
	rsb	r2, r2, lr, asr #5
	rsb	ip, fp, r10, asr #27
	str	r1, [sp, #8]
	ldr	r1, .L21+16
	str	ip, [sp]
	str	r2, [sp, #4]
	ldr	r1, [r1]
	ldr	r2, .L21+56
	ldr	r0, [sp, #16]
	bl	av_log
	ldr	r3, [r4, #4]
	mov	r0, r4
	cmp	r3, r8
	movgt	r8, r3
	ldrgt	r3, [r4]
	add	r7, r7, #1
	strgt	r3, [r6]
	bl	bd_free_title_info
	ldr	r3, [sp, #20]
	cmp	r3, r7
	bne	.L8
	ldr	r5, [sp, #16]
	ldr	r3, .L21+16
	mov	r0, r5
	ldr	r1, [r3]
	ldr	r2, .L21+60
	ldr	r3, [r6]
	bl	av_log
	ldr	r1, [r6]
	b	.L6
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	BLURAY_PROTO_PREFIX
	.word	.LC5
	.word	TITLES_RELEVANT
	.word	MIN_PLAYLIST_LENGTH
	.word	AV_LOG_INFO
	.word	.LC1
	.word	AV_LOG_ERROR
	.word	.LC4
	.word	EIO
	.word	.LC0
	.word	-2004318071
	.word	1563749871
	.word	-1851608123
	.word	1779199853
	.word	.LC2
	.word	.LC3
	.size	bluray_open, .-bluray_open
	.comm	TITLES_RELEVANT,4,4
	.comm	MIN_PLAYLIST_LENGTH,4,4
	.comm	EIO,4,4
	.comm	BLURAY_PROTO_PREFIX,4,4
	.comm	AV_LOG_INFO,4,4
	.comm	AV_LOG_ERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
