	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hb_dvdnav_reset
_hb_dvdnav_reset:                       ## @hb_dvdnav_reset
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_hb_utf8_to_cp
	movq	%rax, %r14
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_dvdnav_close
LBB0_2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dvdnav_open
	movq	_DVDNAV_STATUS_OK@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_3
## %bb.4:
	movq	(%rbx), %rdi
	movq	_DVD_READ_CACHE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dvdnav_set_readahead_flag
	movq	(%rbx), %rdi
	cmpq	(%r12), %rax
	jne	LBB0_5
## %bb.6:
	movl	$1, %r15d
	movl	$1, %esi
	callq	_dvdnav_set_PGC_positioning_flag
	cmpq	(%r12), %rax
	je	LBB0_11
## %bb.7:
	movq	(%rbx), %rdi
	callq	_dvdnav_err_to_string
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_hb_log
	jmp	LBB0_9
LBB0_5:
	callq	_dvdnav_err_to_string
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	movl	%eax, %esi
	callq	_hb_error
LBB0_9:
	movq	(%rbx), %rdi
	xorl	%r15d, %r15d
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	callq	_dvdnav_close
LBB0_11:
	movq	%r14, %rdi
	callq	_free
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DVDNAV_STATUS_OK,8,3           ## @DVDNAV_STATUS_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dvd: not a dvd - trying as a stream/file instead"

	.comm	_DVD_READ_CACHE,4,2             ## @DVD_READ_CACHE
L_.str.1:                               ## @.str.1
	.asciz	"Error: dvdnav_set_readahead_flag: %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error: dvdnav_set_PGC_positioning_flag: %s\n"

	.no_dead_strip	_hb_dvdnav_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hb_dvdnav_reset
_hb_dvdnav_reset:                       ; @hb_dvdnav_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	w0, [x0, #8]
	bl	_hb_utf8_to_cp
	mov	x19, x0
	ldr	x0, [x20]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_dvdnav_close
LBB0_2:
	mov	x0, x20
	mov	x1, x19
	bl	_dvdnav_open
Lloh0:
	adrp	x22, _DVDNAV_STATUS_OK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DVDNAV_STATUS_OK@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.3:
	ldr	x0, [x20]
Lloh2:
	adrp	x8, _DVD_READ_CACHE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DVD_READ_CACHE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_dvdnav_set_readahead_flag
	mov	x8, x0
	ldr	x9, [x22]
	ldr	x0, [x20]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.4:
	mov	w21, #1
	mov	w1, #1
	bl	_dvdnav_set_PGC_positioning_flag
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.5:
	ldr	x0, [x20]
	bl	_dvdnav_err_to_string
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_6:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hb_log
	ldr	x0, [x20]
	cbz	x0, LBB0_8
LBB0_7:
	bl	_dvdnav_close
LBB0_8:
	mov	w21, #0
LBB0_9:
	mov	x0, x19
	bl	_free
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	_dvdnav_err_to_string
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_11:
	bl	_hb_error
	ldr	x0, [x20]
	cbnz	x0, LBB0_7
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DVDNAV_STATUS_OK,8,3           ; @DVDNAV_STATUS_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dvd: not a dvd - trying as a stream/file instead"

	.comm	_DVD_READ_CACHE,4,2             ; @DVD_READ_CACHE
l_.str.1:                               ; @.str.1
	.asciz	"Error: dvdnav_set_readahead_flag: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error: dvdnav_set_PGC_positioning_flag: %s\n"

	.no_dead_strip	_hb_dvdnav_reset
.subsections_via_symbols
