	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hb_dvdread_start
_hb_dvdread_start:                      ## @hb_dvdread_start
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %r14d
	movq	%rdi, %rbx
	movslq	(%rsi), %rax
	movq	136(%rdi), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movl	-4(%rcx,%rax,8), %esi
	movl	%esi, 120(%rdi)
	movl	-8(%rcx,%rax,8), %eax
	movl	%eax, (%rdi)
	movl	124(%rdi), %edi
	callq	_ifoOpen
	movq	%rax, 88(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movl	120(%rbx), %esi
	movl	124(%rbx), %edi
	movq	_DVD_READ_TITLE_VOBS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_DVDOpenFile
	movl	%eax, 128(%rbx)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	88(%rbx), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movslq	(%rbx), %rdx
	movq	-8(%rax,%rdx,8), %r11
	movslq	(%r11), %rax
	movslq	4(%r11), %rdx
	movq	(%rcx), %r8
	movq	-8(%r8,%rax,8), %rcx
	movq	(%rcx), %rax
	movq	-8(%rax,%rdx,8), %rdi
	decq	%rdi
	movq	%rdi, 8(%rbx)
	movq	8(%rcx), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, 16(%rbx)
	movq	16(%rcx), %r10
	movslq	%edi, %rsi
	shlq	$4, %rdi
	movq	(%r10,%rdi), %rcx
	movq	%rcx, 112(%rbx)
	movq	%rdx, %rcx
	shlq	$4, %rcx
	movq	8(%r10,%rcx), %rcx
	movq	%rcx, 104(%rbx)
	movq	$0, 96(%rbx)
	cmpq	%rsi, %rdx
	jb	LBB0_14
## %bb.6:
	leaq	1(%rsi), %rcx
	cmpq	%rcx, %rax
	cmovaq	%rax, %rcx
	subq	%rsi, %rcx
	cmpq	$4, %rcx
	jae	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	movq	%rsi, %rdi
	jmp	LBB0_11
LBB0_1:
	movl	120(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	movl	120(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_hb_error
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_8:
	movq	%rcx, %r9
	andq	$-4, %r9
	leaq	(%rsi,%r9), %rdi
	shlq	$4, %rsi
	addq	%r10, %rsi
	addq	$32, %rsi
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm8, %xmm8
	movq	%r9, %rax
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-32(%rsi), %xmm3
	movdqu	-16(%rsi), %xmm4
	movdqu	(%rsi), %xmm5
	movdqu	16(%rsi), %xmm6
	movdqa	%xmm3, %xmm7
	punpcklqdq	%xmm4, %xmm7            ## xmm7 = xmm7[0],xmm4[0]
	movdqa	%xmm5, %xmm2
	punpcklqdq	%xmm6, %xmm2            ## xmm2 = xmm2[0],xmm6[0]
	punpckhqdq	%xmm4, %xmm3            ## xmm3 = xmm3[1],xmm4[1]
	psubq	%xmm7, %xmm3
	paddq	%xmm3, %xmm0
	punpckhqdq	%xmm6, %xmm5            ## xmm5 = xmm5[1],xmm6[1]
	psubq	%xmm2, %xmm5
	paddq	%xmm5, %xmm1
	psubq	%xmm8, %xmm0
	psubq	%xmm8, %xmm1
	addq	$64, %rsi
	addq	$-4, %rax
	jne	LBB0_9
## %bb.10:
	paddq	%xmm0, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rax
	cmpq	%r9, %rcx
	je	LBB0_13
LBB0_11:
	movq	%rdi, %rcx
	shlq	$4, %rcx
	addq	%r10, %rcx
	addq	$8, %rcx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx), %rsi
	subq	-8(%rcx), %rsi
	addq	%rsi, %rax
	incq	%rax
	incq	%rdi
	addq	$16, %rcx
	cmpq	%rdi, %rdx
	jae	LBB0_12
LBB0_13:
	movq	%rax, 96(%rbx)
LBB0_14:
	movslq	%r14d, %rax
	movslq	-8(%r11,%rax,8), %rcx
	movslq	-4(%r11,%rax,8), %rax
	movq	-8(%r8,%rcx,8), %rcx
	movq	%rcx, 80(%rbx)
	movq	(%rcx), %rcx
	movq	-8(%rcx,%rax,8), %rax
	decq	%rax
	movq	%rax, 24(%rbx)
	movq	%rbx, %rdi
	callq	_FindNextCell
	movq	24(%rbx), %rax
	movq	80(%rbx), %rcx
	movq	16(%rcx), %rcx
	shlq	$4, %rax
	movq	(%rcx,%rax), %rax
	movq	%rax, 64(%rbx)
	movq	%rax, 72(%rbx)
	pxor	%xmm0, %xmm0
	movdqu	%xmm0, 40(%rbx)
	movq	$0, 56(%rbx)
	movl	$2, 32(%rbx)
	movl	$1, %eax
LBB0_15:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dvd: ifoOpen failed for VTS %d"

	.comm	_DVD_READ_TITLE_VOBS,4,2        ## @DVD_READ_TITLE_VOBS
L_.str.1:                               ## @.str.1
	.asciz	"dvd: DVDOpenFile failed for VTS %d"

	.no_dead_strip	_hb_dvdread_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hb_dvdread_start
_hb_dvdread_start:                      ; @hb_dvdread_start
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x19, x0
	ldrsw	x8, [x1]
	ldr	x9, [x0, #136]
	ldr	x9, [x9]
	ldr	x9, [x9]
	add	x8, x9, x8, lsl #3
	ldp	w8, w1, [x8, #-8]
	str	w1, [x0, #120]
	str	w8, [x0]
	ldr	w0, [x0, #124]
	bl	_ifoOpen
	str	x0, [x19, #88]
	cbz	x0, LBB0_5
; %bb.1:
	ldp	w1, w0, [x19, #120]
Lloh0:
	adrp	x8, _DVD_READ_TITLE_VOBS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DVD_READ_TITLE_VOBS@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_DVDOpenFile
	str	w0, [x19, #128]
	cbz	w0, LBB0_6
; %bb.2:
	ldr	x8, [x19, #88]
	ldp	x8, x9, [x8]
	ldr	x9, [x9]
	ldrsw	x10, [x19]
	add	x9, x9, x10, lsl #3
	ldur	x9, [x9, #-8]
	ldpsw	x10, x12, [x9]
	ldr	x8, [x8]
	add	x10, x8, x10, lsl #3
	ldur	x13, [x10, #-8]
	ldp	x10, x11, [x13]
	add	x10, x10, x12, lsl #3
	ldur	x10, [x10, #-8]
	sub	x14, x10, #1
	sub	x10, x11, #1
	stp	x14, x10, [x19, #8]
	ldr	x12, [x13, #16]
	lsl	x13, x14, #4
	ldr	x13, [x12, x13]
	str	x13, [x19, #112]
	add	x13, x12, x10, lsl #4
	ldr	x13, [x13, #8]
	stp	xzr, x13, [x19, #96]
	sxtw	x16, w14
	cmp	x10, x16
	b.lo	LBB0_14
; %bb.3:
	add	x13, x16, #1
	cmp	x11, x13
	csinc	x11, x11, x16, hi
	sub	x13, x11, x16
	cmp	x13, #8
	b.hs	LBB0_8
; %bb.4:
	mov	x15, #0
	mov	x11, x16
	b	LBB0_11
LBB0_5:
	ldr	w1, [x19, #120]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	w1, [x19, #120]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	bl	_hb_error
	mov	w0, #0
	b	LBB0_15
LBB0_8:
	and	x14, x13, #0xfffffffffffffff8
	add	x11, x16, x14
	add	x15, x12, x16, lsl #4
	add	x15, x15, #64
	movi.2d	v0, #0000000000000000
	mov	x16, x14
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	sub	x17, x15, #64
	ld2.2d	{ v4, v5 }, [x17]
	sub	x17, x15, #32
	ld2.2d	{ v6, v7 }, [x17]
	mov	x17, x15
	ld2.2d	{ v16, v17 }, [x17], #32
	ld2.2d	{ v18, v19 }, [x17]
	sub.2d	v4, v5, v4
	sub.2d	v5, v7, v6
	sub.2d	v6, v17, v16
	sub.2d	v7, v19, v18
	mvn.16b	v4, v4
	sub.2d	v0, v0, v4
	mvn.16b	v4, v5
	sub.2d	v1, v1, v4
	mvn.16b	v4, v6
	sub.2d	v2, v2, v4
	mvn.16b	v4, v7
	sub.2d	v3, v3, v4
	add	x15, x15, #128
	subs	x16, x16, #8
	b.ne	LBB0_9
; %bb.10:
	add.2d	v0, v1, v0
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	addp.2d	d0, v0
	fmov	x15, d0
	cmp	x13, x14
	b.eq	LBB0_13
LBB0_11:
	add	x12, x12, x11, lsl #4
	add	x12, x12, #8
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldp	x14, x13, [x12, #-8]
	sub	x13, x13, x14
	add	x13, x13, x15
	add	x15, x13, #1
	add	x11, x11, #1
	add	x12, x12, #16
	cmp	x10, x11
	b.hs	LBB0_12
LBB0_13:
	str	x15, [x19, #96]
LBB0_14:
	add	x9, x9, w20, sxtw #3
	ldpsw	x10, x9, [x9, #-8]
	add	x8, x8, x10, lsl #3
	ldur	x8, [x8, #-8]
	str	x8, [x19, #80]
	ldr	x8, [x8]
	add	x8, x8, x9, lsl #3
	ldur	x8, [x8, #-8]
	sub	x8, x8, #1
	str	x8, [x19, #24]
	mov	x0, x19
	bl	_FindNextCell
	ldr	x8, [x19, #80]
	ldr	x8, [x8, #16]
	ldr	x9, [x19, #24]
	lsl	x9, x9, #4
	ldr	x8, [x8, x9]
	stp	x8, x8, [x19, #64]
	stp	xzr, xzr, [x19, #48]
	str	xzr, [x19, #40]
	mov	w8, #2
	str	w8, [x19, #32]
	mov	w0, #1
LBB0_15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dvd: ifoOpen failed for VTS %d"

	.comm	_DVD_READ_TITLE_VOBS,4,2        ; @DVD_READ_TITLE_VOBS
l_.str.1:                               ; @.str.1
	.asciz	"dvd: DVDOpenFile failed for VTS %d"

	.no_dead_strip	_hb_dvdread_start
.subsections_via_symbols
