	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ParseDirectory                 ## -- Begin function ParseDirectory
	.p2align	4, 0x90
_ParseDirectory:                        ## @ParseDirectory
	.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
	movq	_fileDir@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_readdir
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_15
## %bb.3:
	movq	_MAXFILES@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jle	LBB0_15
## %bb.4:
	movq	%rax, %r13
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %r12
	cmpb	$46, (%r12)
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_strlen
	cltq
	leaq	(%rax,%r12), %rsi
	addq	$-4, %rsi
	leaq	L_.str(%rip), %rdi
	movl	$4, %edx
	callq	_strncasecmp
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %r12
	movq	(%r13), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	cltq
	leaq	(%rax,%rbx), %rsi
	addq	$-4, %rsi
	leaq	L_.str.1(%rip), %rdi
	movl	$4, %edx
	callq	_strncasecmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r13), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	cltq
	leaq	(%rax,%rbx), %rsi
	addq	$-4, %rsi
	leaq	L_.str.2(%rip), %rdi
	movl	$4, %edx
	callq	_strncasecmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movslq	%r15d, %rbx
	leaq	(,%rbx,8), %rdi
	movq	_filelist@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_filelist@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	4(%rax,%rbx,8), %edi
	movq	(%r13), %rdx
	leaq	L_.str.3(%rip), %rsi
	callq	_sprintf
	movq	8(%r13), %rax
	movq	_DT_DIR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_filelist@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$1, (%rax,%rbx,8)
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	incl	%r15d
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rbx
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r13
	cmpl	(%rbx), %r15d
	jl	LBB0_5
LBB0_15:
	movq	%r14, %rdi
	callq	_closedir
	movq	_filelist@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_FileSortCallback@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %esi
	movl	$4, %edx
	callq	_qsort
	jmp	LBB0_16
LBB0_1:
	movl	$-1, %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fileDir,4,2                    ## @fileDir
	.comm	_MAXFILES,4,2                   ## @MAXFILES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".wav"

L_.str.1:                               ## @.str.1
	.asciz	".ogg"

L_.str.2:                               ## @.str.2
	.asciz	".mp3"

	.comm	_filelist,8,3                   ## @filelist
L_.str.3:                               ## @.str.3
	.asciz	"%s"

	.comm	_DT_DIR,8,3                     ## @DT_DIR
	.comm	_FileSortCallback,4,2           ## @FileSortCallback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ParseDirectory                 ; -- Begin function ParseDirectory
	.p2align	2
_ParseDirectory:                        ; @ParseDirectory
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _fileDir@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fileDir@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_opendir
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	bl	_readdir
Lloh3:
	adrp	x28, _MAXFILES@GOTPAGE
Lloh4:
	ldr	x28, [x28, _MAXFILES@GOTPAGEOFF]
	ldr	w8, [x28]
	cmp	x0, #0
	ccmp	w8, #1, #8, ne
Lloh5:
	adrp	x27, _filelist@GOTPAGE
Lloh6:
	ldr	x27, [x27, _filelist@GOTPAGEOFF]
	b.ge	LBB0_4
; %bb.2:
	mov	w19, #0
	b	LBB0_14
LBB0_3:
	mov	w19, #-1
	b	LBB0_15
LBB0_4:
	mov	x25, x0
	mov	w19, #0
Lloh7:
	adrp	x21, l_.str@PAGE
Lloh8:
	add	x21, x21, l_.str@PAGEOFF
Lloh9:
	adrp	x22, l_.str.1@PAGE
Lloh10:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh11:
	adrp	x23, l_.str.2@PAGE
Lloh12:
	add	x23, x23, l_.str.2@PAGEOFF
Lloh13:
	adrp	x24, l_.str.3@PAGE
Lloh14:
	add	x24, x24, l_.str.3@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x25]
	ldrb	w8, [x26]
	cmp	w8, #46
	b.eq	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x26
	bl	_strlen
	sub	w8, w0, #4
	add	x1, x26, w8, sxtw
	mov	x0, x21
	mov	w2, #4
	bl	_strncasecmp
	cbz	x0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x26, [x25]
	mov	x0, x26
	bl	_strlen
	sub	w8, w0, #4
	add	x1, x26, w8, sxtw
	mov	x0, x22
	mov	w2, #4
	bl	_strncasecmp
	cbz	x0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x26, [x25]
	mov	x0, x26
	bl	_strlen
	sub	w8, w0, #4
	add	x1, x26, w8, sxtw
	mov	x0, x23
	mov	w2, #4
	bl	_strncasecmp
	cbz	x0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x27]
	sbfiz	x26, x19, #3, #32
	add	x0, x8, x26
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x8, [x27]
	add	x8, x8, x26
	ldr	w0, [x8, #4]
	ldr	x2, [x25]
	mov	x1, x24
	bl	_sprintf
	ldr	x8, [x25, #8]
Lloh15:
	adrp	x9, _DT_DIR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DT_DIR@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x8, w19
	ldr	x9, [x27]
	lsl	x8, x8, #3
	mov	w10, #1
	str	w10, [x9, x8]
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w19, w19, #1
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_readdir
	cbz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x25, x0
	ldr	w8, [x28]
	cmp	w19, w8
	b.lt	LBB0_5
LBB0_14:
	mov	x0, x20
	bl	_closedir
	ldr	x0, [x27]
Lloh18:
	adrp	x8, _FileSortCallback@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FileSortCallback@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x1, x19
	mov	w2, #4
	bl	_qsort
LBB0_15:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_fileDir,4,2                    ; @fileDir
	.comm	_MAXFILES,4,2                   ; @MAXFILES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".wav"

l_.str.1:                               ; @.str.1
	.asciz	".ogg"

l_.str.2:                               ; @.str.2
	.asciz	".mp3"

	.comm	_filelist,8,3                   ; @filelist
l_.str.3:                               ; @.str.3
	.asciz	"%s"

	.comm	_DT_DIR,8,3                     ; @DT_DIR
	.comm	_FileSortCallback,4,2           ; @FileSortCallback
.subsections_via_symbols
