	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hb_dvdnav_read
_hb_dvdnav_read:                        ## @hb_dvdnav_read
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_HB_DVD_READ_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_hb_buffer_init
	movq	%rax, %r14
	movq	%rax, -64(%rbp)
	leaq	-72(%rbp), %r12
	leaq	-76(%rbp), %r13
	movq	_DVDNAV_STATUS_ERR@GOTPCREL(%rip), %r15
	xorl	%eax, %eax
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=2
	movl	20(%rbx), %edi
	callq	_dvdnav_wait_skip
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$0, (%rbx)
	jne	LBB0_18
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	20(%rbx), %edi
	movq	8(%r14), %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	_dvdnav_get_next_block
	cmpl	(%r15), %eax
	je	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	-72(%rbp), %eax
	addl	$-128, %eax
	cmpl	$11, %eax
	ja	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=2
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=2
	movl	$0, -44(%rbp)
	movl	$0, -52(%rbp)
	movl	$0, -48(%rbp)
	movl	20(%rbx), %edi
	leaq	-44(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_dvdnav_current_title_program
	movl	-44(%rbp), %eax
	cmpl	4(%rbx), %eax
	je	LBB0_3
	jmp	LBB0_21
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=2
	movl	20(%rbx), %edi
	callq	_dvdnav_still_skip
	jmp	LBB0_3
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=2
	movq	%r13, %r15
	movq	%r12, %r13
	movl	$0, -44(%rbp)
	movl	$0, -52(%rbp)
	movl	$0, -48(%rbp)
	movq	8(%r14), %r12
	movl	20(%rbx), %edi
	leaq	-44(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_dvdnav_current_title_program
	movl	-44(%rbp), %eax
	cmpl	4(%rbx), %eax
	jne	LBB0_23
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=2
	movl	16(%rbx), %edi
	movl	-52(%rbp), %esi
	movl	-48(%rbp), %edx
	callq	_FindChapterIndex
	cmpl	8(%rbx), %eax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=2
	movl	(%r12), %ecx
	cmpl	12(%rbx), %ecx
	jg	LBB0_14
	jmp	LBB0_24
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=2
	jl	LBB0_25
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=2
	movl	%eax, 8(%rbx)
	movl	(%r12), %ecx
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=2
	movl	%ecx, 12(%rbx)
	movq	%r13, %r12
	movq	%r15, %r13
	movq	_DVDNAV_STATUS_ERR@GOTPCREL(%rip), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	20(%rbx), %edi
	callq	_dvdnav_err_to_string
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_hb_error
	movl	20(%rbx), %edi
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %esi
	callq	_dvdnav_sector_search
	movq	_DVDNAV_STATUS_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_30
## %bb.16:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cmpl	$501, %eax                      ## imm = 0x1F5
	jne	LBB0_1
## %bb.17:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_hb_error
	jmp	LBB0_31
LBB0_18:
	leaq	-64(%rbp), %rdi
	callq	_hb_buffer_close
	jmp	LBB0_28
LBB0_19:
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	jmp	LBB0_29
LBB0_20:
	movl	$1, (%rbx)
	leaq	-64(%rbp), %rdi
	callq	_hb_buffer_close
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_22
LBB0_21:
	leaq	-64(%rbp), %rdi
	callq	_hb_buffer_close
	leaq	L_.str.3(%rip), %rsi
LBB0_22:
	movl	$2, %edi
	jmp	LBB0_27
LBB0_23:
	leaq	L_.str.4(%rip), %rbx
	jmp	LBB0_26
LBB0_24:
	leaq	L_.str.6(%rip), %rbx
	jmp	LBB0_26
LBB0_25:
	leaq	L_.str.5(%rip), %rbx
LBB0_26:
	leaq	-64(%rbp), %rdi
	callq	_hb_buffer_close
	movl	$2, %edi
	movq	%rbx, %rsi
LBB0_27:
	callq	_hb_deep_log
LBB0_28:
	xorl	%r14d, %r14d
LBB0_29:
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	movl	20(%rbx), %edi
	callq	_dvdnav_err_to_string
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_hb_error
LBB0_31:
	leaq	-64(%rbp), %rdi
	callq	_hb_buffer_close
	movl	24(%rbx), %edi
	movq	_HB_ERROR_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hb_set_work_error
	jmp	LBB0_29
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_7
	.long	L0_0_set_20
	.long	L0_0_set_8
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_19
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_9
	.long	L0_0_set_19
	.end_data_region
                                        ## -- End function
	.comm	_HB_DVD_READ_BUFFER_SIZE,4,2    ## @HB_DVD_READ_BUFFER_SIZE
	.comm	_DVDNAV_STATUS_ERR,4,2          ## @DVDNAV_STATUS_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dvdnav: Read Error, %s"

	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_DVDNAV_STATUS_OK,8,3           ## @DVDNAV_STATUS_OK
L_.str.1:                               ## @.str.1
	.asciz	"dvd: dvdnav_sector_search failed - %s"

	.comm	_HB_ERROR_READ,4,2              ## @HB_ERROR_READ
L_.str.2:                               ## @.str.2
	.asciz	"dvdnav: Error, too many consecutive read errors"

L_.str.3:                               ## @.str.3
	.asciz	"dvdnav: vts change, found next title"

L_.str.4:                               ## @.str.4
	.asciz	"dvdnav: cell change, found next title"

L_.str.5:                               ## @.str.5
	.asciz	"dvdnav: cell change, previous chapter"

L_.str.6:                               ## @.str.6
	.asciz	"dvdnav: cell change, previous cell"

L_.str.7:                               ## @.str.7
	.asciz	"dvdnav: stop"

	.no_dead_strip	_hb_dvdnav_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hb_dvdnav_read
_hb_dvdnav_read:                        ; @hb_dvdnav_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _HB_DVD_READ_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HB_DVD_READ_BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_hb_buffer_init
	mov	x20, x0
	mov	w23, #0
	mov	w24, #0
Lloh3:
	adrp	x25, _DVDNAV_STATUS_ERR@GOTPAGE
Lloh4:
	ldr	x25, [x25, _DVDNAV_STATUS_ERR@GOTPAGEOFF]
Lloh5:
	adrp	x22, l_.str@PAGE
Lloh6:
	add	x22, x22, l_.str@PAGEOFF
Lloh7:
	adrp	x27, _DVDNAV_STATUS_OK@GOTPAGE
Lloh8:
	ldr	x27, [x27, _DVDNAV_STATUS_OK@GOTPAGEOFF]
	str	x0, [sp, #32]
Lloh9:
	adrp	x28, lJTI0_0@PAGE
Lloh10:
	add	x28, x28, lJTI0_0@PAGEOFF
Lloh11:
	adrp	x21, l_.str.4@PAGE
Lloh12:
	add	x21, x21, l_.str.4@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #20]
	bl	_dvdnav_wait_skip
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19]
	cbnz	w8, LBB0_17
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #20]
	ldr	x1, [x20, #8]
	add	x2, sp, #44
	add	x3, sp, #40
	bl	_dvdnav_get_next_block
	ldr	w8, [x25]
	cmp	w0, w8
	b.eq	LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #44]
	sub	w8, w8, #128
	cmp	w8, #11
	b.hi	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	adr	x9, LBB0_1
	ldrb	w10, [x28, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	str	xzr, [sp, #24]
	str	wzr, [sp, #20]
	ldr	w0, [x19, #20]
	add	x1, sp, #28
	add	x2, sp, #24
	add	x3, sp, #20
	bl	_dvdnav_current_title_program
	ldr	w8, [sp, #28]
	ldr	w9, [x19, #4]
	cmp	w8, w9
	b.eq	LBB0_2
	b	LBB0_20
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #20]
	bl	_dvdnav_still_skip
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	str	xzr, [sp, #24]
	str	wzr, [sp, #20]
	ldr	x26, [x20, #8]
	ldr	w0, [x19, #20]
	add	x1, sp, #28
	add	x2, sp, #24
	add	x3, sp, #20
	bl	_dvdnav_current_title_program
	ldr	w8, [sp, #28]
	ldr	w9, [x19, #4]
	cmp	w8, w9
	b.ne	LBB0_24
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #16]
	ldp	w2, w1, [sp, #20]
	bl	_FindChapterIndex
	ldr	w8, [x19, #8]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x19, #12]
	cmp	w8, w9
	b.gt	LBB0_13
	b	LBB0_22
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	b.lt	LBB0_23
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	str	w0, [x19, #8]
	ldr	w8, [x26]
	mov	x24, x0
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w8, [x19, #12]
	b	LBB0_2
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #20]
	bl	_dvdnav_err_to_string
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
	mov	x0, x22
	bl	_hb_error
	ldr	w0, [x19, #20]
Lloh13:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	w1, #1
	bl	_dvdnav_sector_search
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_28
; %bb.15:                               ;   in Loop: Header=BB0_2 Depth=1
	add	w23, w23, #1
	cmp	w23, #501
	b.ne	LBB0_2
; %bb.16:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_29
LBB0_17:
	add	x0, sp, #32
	bl	_hb_buffer_close
	b	LBB0_26
LBB0_18:
	str	w24, [x20]
	b	LBB0_27
LBB0_19:
	mov	w8, #1
	str	w8, [x19]
	add	x0, sp, #32
	bl	_hb_buffer_close
Lloh18:
	adrp	x1, l_.str.7@PAGE
Lloh19:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_21
LBB0_20:
	add	x0, sp, #32
	bl	_hb_buffer_close
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_21:
	mov	w0, #2
	b	LBB0_25
LBB0_22:
Lloh22:
	adrp	x21, l_.str.6@PAGE
Lloh23:
	add	x21, x21, l_.str.6@PAGEOFF
	b	LBB0_24
LBB0_23:
Lloh24:
	adrp	x21, l_.str.5@PAGE
Lloh25:
	add	x21, x21, l_.str.5@PAGEOFF
LBB0_24:
	add	x0, sp, #32
	bl	_hb_buffer_close
	mov	w0, #2
	mov	x1, x21
LBB0_25:
	bl	_hb_deep_log
LBB0_26:
	mov	x20, #0
LBB0_27:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_28:
	ldr	w0, [x19, #20]
	bl	_dvdnav_err_to_string
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_29:
	bl	_hb_error
	add	x0, sp, #32
	bl	_hb_buffer_close
	ldr	w0, [x19, #24]
Lloh28:
	adrp	x8, _HB_ERROR_READ@GOTPAGE
Lloh29:
	ldr	x8, [x8, _HB_ERROR_READ@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	bl	_hb_set_work_error
	b	LBB0_26
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_1-LBB0_1)>>2
	.byte	(LBB0_6-LBB0_1)>>2
	.byte	(LBB0_19-LBB0_1)>>2
	.byte	(LBB0_7-LBB0_1)>>2
	.byte	(LBB0_2-LBB0_1)>>2
	.byte	(LBB0_2-LBB0_1)>>2
	.byte	(LBB0_2-LBB0_1)>>2
	.byte	(LBB0_18-LBB0_1)>>2
	.byte	(LBB0_2-LBB0_1)>>2
	.byte	(LBB0_2-LBB0_1)>>2
	.byte	(LBB0_8-LBB0_1)>>2
	.byte	(LBB0_18-LBB0_1)>>2
                                        ; -- End function
	.comm	_HB_DVD_READ_BUFFER_SIZE,4,2    ; @HB_DVD_READ_BUFFER_SIZE
	.comm	_DVDNAV_STATUS_ERR,4,2          ; @DVDNAV_STATUS_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dvdnav: Read Error, %s"

	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_DVDNAV_STATUS_OK,8,3           ; @DVDNAV_STATUS_OK
l_.str.1:                               ; @.str.1
	.asciz	"dvd: dvdnav_sector_search failed - %s"

	.comm	_HB_ERROR_READ,4,2              ; @HB_ERROR_READ
l_.str.2:                               ; @.str.2
	.asciz	"dvdnav: Error, too many consecutive read errors"

l_.str.3:                               ; @.str.3
	.asciz	"dvdnav: vts change, found next title"

l_.str.4:                               ; @.str.4
	.asciz	"dvdnav: cell change, found next title"

l_.str.5:                               ; @.str.5
	.asciz	"dvdnav: cell change, previous chapter"

l_.str.6:                               ; @.str.6
	.asciz	"dvdnav: cell change, previous cell"

l_.str.7:                               ; @.str.7
	.asciz	"dvdnav: stop"

	.no_dead_strip	_hb_dvdnav_read
.subsections_via_symbols
