	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OpenDirectory                  ## -- Begin function OpenDirectory
	.p2align	4, 0x90
_OpenDirectory:                         ## @OpenDirectory
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	_TYPE_RECENT@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	jne	LBB0_6
## %bb.1:
	movq	_NUM_HISTORY_ENTRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_17
## %bb.2:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	xorl	%ebx, %ebx
	movq	_history@GOTPCREL(%rip), %r13
	movq	_filelist@GOTPCREL(%rip), %r15
	movq	_MAXJOLIET@GOTPCREL(%rip), %r12
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx), %rcx
	cmpq	$0, (%rcx)
	jle	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rcx
	movq	$0, 8(%rcx,%rbx)
	movq	(%rcx,%rbx), %rdi
	movl	8(%rax,%rbx), %esi
	movl	(%r12), %edx
	decl	%edx
	callq	_strncpy
	movq	(%r15), %rax
	movq	(%rax,%rbx), %rax
	movslq	(%r12), %rcx
	movb	$0, -1(%rcx,%rax)
	incq	%r14
	movq	_NUM_HISTORY_ENTRIES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$16, %rbx
	cmpq	%rax, %r14
	jl	LBB0_3
LBB0_5:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	testl	%r14d, %r14d
	jne	LBB0_18
	jmp	LBB0_17
LBB0_6:
	movl	%edi, %ebx
	movq	_TYPE_DVD@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_7
## %bb.8:
	movq	_rootdir@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %r13
	movl	(%rax,%r13,4), %edi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_9
## %bb.11:
	movq	%rax, %rdi
	callq	_closedir
	jmp	LBB0_12
LBB0_7:
	movslq	%ebx, %r13
LBB0_12:
	movq	_config@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax,%r13,4), %eax
	movq	_fileDir@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	callq	_ParseDirectory
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	LBB0_13
LBB0_18:
	movq	_deviceType@GOTPCREL(%rip), %rax
	movq	_fileType@GOTPCREL(%rip), %rcx
	movl	$1, %r12d
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rax)
	jne	LBB0_20
## %bb.19:
	cmpl	%r15d, (%rcx)
	je	LBB0_21
LBB0_20:
	movl	%edx, (%rax)
	movl	%r15d, (%rcx)
	movl	%r14d, %edi
	callq	_ClearSelector
	jmp	LBB0_21
LBB0_13:
	movl	(%rbx), %edi
	movq	_rootdir@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %esi
	callq	_strcpy
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_ParseDirectory
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:
	movl	%eax, %r14d
	movq	_deviceType@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
	testl	%r14d, %r14d
	jne	LBB0_18
LBB0_17:
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_GUI_WaitPrompt
	xorl	%r12d, %r12d
LBB0_21:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_MountDVD
	testl	%eax, %eax
	je	LBB0_21
## %bb.10:
	movq	_deviceType@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
	jmp	LBB0_12
LBB0_14:
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_GUI_WaitPrompt
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_TYPE_RECENT,4,2                ## @TYPE_RECENT
	.comm	_NUM_HISTORY_ENTRIES,4,2        ## @NUM_HISTORY_ENTRIES
	.comm	_history,8,3                    ## @history
	.comm	_filelist,8,3                   ## @filelist
	.comm	_MAXJOLIET,4,2                  ## @MAXJOLIET
	.comm	_TYPE_DVD,4,2                   ## @TYPE_DVD
	.comm	_rootdir,8,3                    ## @rootdir
	.comm	_deviceType,4,2                 ## @deviceType
	.comm	_config,8,3                     ## @config
	.comm	_fileDir,4,2                    ## @fileDir
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to open directory !"

L_.str.2:                               ## @.str.2
	.asciz	"No files found !"

	.comm	_fileType,4,2                   ## @fileType
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OpenDirectory                  ; -- Begin function OpenDirectory
	.p2align	2
_OpenDirectory:                         ; @OpenDirectory
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _TYPE_RECENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TYPE_RECENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_8
; %bb.1:
Lloh3:
	adrp	x22, _NUM_HISTORY_ENTRIES@GOTPAGE
Lloh4:
	ldr	x22, [x22, _NUM_HISTORY_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x23, #0
	mov	x21, #0
Lloh5:
	adrp	x24, _history@GOTPAGE
Lloh6:
	ldr	x24, [x24, _history@GOTPAGEOFF]
Lloh7:
	adrp	x25, _filelist@GOTPAGE
Lloh8:
	ldr	x25, [x25, _filelist@GOTPAGEOFF]
Lloh9:
	adrp	x26, _MAXJOLIET@GOTPAGE
Lloh10:
	ldr	x26, [x26, _MAXJOLIET@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x9, [x8, x23]
	ldr	x9, [x9]
	cmp	x9, #1
	b.lt	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x25]
	add	x9, x9, x23
	str	xzr, [x9, #8]
	ldr	x0, [x9]
	add	x8, x8, x23
	ldr	w1, [x8, #8]
	ldr	w8, [x26]
	sub	w2, w8, #1
	bl	_strncpy
	ldr	x8, [x25]
	ldr	x8, [x8, x23]
	ldrsw	x9, [x26]
	add	x8, x9, x8
	sturb	wzr, [x8, #-1]
	add	x21, x21, #1
	ldrsw	x8, [x22]
	add	x23, x23, #16
	cmp	x21, x8
	b.lt	LBB0_3
LBB0_5:
	cbnz	w21, LBB0_13
LBB0_6:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	bl	_GUI_WaitPrompt
	mov	w0, #0
	b	LBB0_16
LBB0_8:
Lloh15:
	adrp	x8, _TYPE_DVD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TYPE_DVD@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_11
; %bb.9:
Lloh18:
	adrp	x8, _rootdir@GOTPAGE
Lloh19:
	ldr	x8, [x8, _rootdir@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	sxtw	x22, w20
	ldr	w0, [x8, w20, sxtw #2]
	bl	_opendir
	cbz	x0, LBB0_19
; %bb.10:
	bl	_closedir
	b	LBB0_12
LBB0_11:
	mov	x8, x20
	sxtw	x22, w8
LBB0_12:
Lloh21:
	adrp	x8, _config@GOTPAGE
Lloh22:
	ldr	x8, [x8, _config@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	x8, [x8, w19, sxtw #3]
	ldr	w8, [x8, x22, lsl #2]
Lloh24:
	adrp	x23, _fileDir@GOTPAGE
Lloh25:
	ldr	x23, [x23, _fileDir@GOTPAGEOFF]
	str	w8, [x23]
	bl	_ParseDirectory
	mov	x21, x0
	cmp	w0, #0
	b.le	LBB0_17
LBB0_13:
Lloh26:
	adrp	x8, _deviceType@GOTPAGE
Lloh27:
	ldr	x8, [x8, _deviceType@GOTPAGEOFF]
	ldr	w10, [x8]
Lloh28:
	adrp	x9, _fileType@GOTPAGE
Lloh29:
	ldr	x9, [x9, _fileType@GOTPAGEOFF]
	ldr	w11, [x9]
	cmp	w10, w20
	ccmp	w11, w19, #0, eq
	b.eq	LBB0_15
; %bb.14:
	str	w20, [x8]
	str	w19, [x9]
	mov	x0, x21
	bl	_ClearSelector
LBB0_15:
	mov	w0, #1
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
	ldr	w0, [x23]
Lloh30:
	adrp	x8, _rootdir@GOTPAGE
Lloh31:
	ldr	x8, [x8, _rootdir@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	ldr	w1, [x8, x22, lsl #2]
	bl	_strcpy
	bl	_ParseDirectory
	tbnz	w0, #31, LBB0_21
; %bb.18:
	mov	x21, x0
Lloh33:
	adrp	x8, _deviceType@GOTPAGE
Lloh34:
	ldr	x8, [x8, _deviceType@GOTPAGEOFF]
	mov	w9, #-1
Lloh35:
	str	w9, [x8]
	cbnz	w21, LBB0_13
	b	LBB0_6
LBB0_19:
	bl	_MountDVD
	cbz	w0, LBB0_16
; %bb.20:
Lloh36:
	adrp	x8, _deviceType@GOTPAGE
Lloh37:
	ldr	x8, [x8, _deviceType@GOTPAGEOFF]
	mov	w9, #-1
Lloh38:
	str	w9, [x8]
	b	LBB0_12
LBB0_21:
Lloh39:
	adrp	x0, l_.str@PAGE
Lloh40:
	add	x0, x0, l_.str@PAGEOFF
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotStr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_TYPE_RECENT,4,2                ; @TYPE_RECENT
	.comm	_NUM_HISTORY_ENTRIES,4,2        ; @NUM_HISTORY_ENTRIES
	.comm	_history,8,3                    ; @history
	.comm	_filelist,8,3                   ; @filelist
	.comm	_MAXJOLIET,4,2                  ; @MAXJOLIET
	.comm	_TYPE_DVD,4,2                   ; @TYPE_DVD
	.comm	_rootdir,8,3                    ; @rootdir
	.comm	_deviceType,4,2                 ; @deviceType
	.comm	_config,8,3                     ; @config
	.comm	_fileDir,4,2                    ; @fileDir
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to open directory !"

l_.str.2:                               ; @.str.2
	.asciz	"No files found !"

	.comm	_fileType,4,2                   ; @fileType
.subsections_via_symbols
