	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dir_list_read
_dir_list_read:                         ## @dir_list_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movl	%ecx, %r14d
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	movl	%r8d, %esi
	callq	_retro_opendir_include_hidden
	testq	%rax, %rax
	je	LBB0_22
## %bb.1:
	movq	%rax, %rbx
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movq	%rax, %rdi
	callq	_retro_dirent_error
	movl	$-1, %r14d
	testq	%rax, %rax
	jne	LBB0_24
## %bb.2:
	movq	%rbx, %rdi
	callq	_retro_readdir
	testq	%rax, %rax
	je	LBB0_23
## %bb.3:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_9
LBB0_4:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rdi
	callq	_path_get_extension
	movq	_RARCH_FILETYPE_UNSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdx
	callq	_string_list_find_elem_prefix
	testq	%rax, %rax
	je	LBB0_18
## %bb.5:                               ##   in Loop: Header=BB0_9 Depth=1
	movq	_RARCH_PLAIN_FILE@GOTPCREL(%rip), %rax
LBB0_6:                                 ##   in Loop: Header=BB0_9 Depth=1
	movl	(%rax), %r14d
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_string_list_append
	testl	%eax, %eax
	je	LBB0_27
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	%r12, %rsp
	movq	%rbx, %rdi
	callq	_retro_readdir
	testq	%rax, %rax
	je	LBB0_23
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsp, %r12
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	%rbx, %rdi
	callq	_retro_dirent_get_name
	movq	%rax, %r15
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpb	$46, (%r15)
	je	LBB0_8
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_8
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_8
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movb	$0, (%r13)
	movq	%r13, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_fill_pathname_join
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_retro_dirent_is_dir
	testq	%rax, %rax
	je	LBB0_4
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	16(%rbp), %eax
	testl	%eax, %eax
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	subq	$8, %rsp
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%r14d, %ecx
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rax
	callq	_dir_list_read
	addq	$16, %rsp
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	testl	%r14d, %r14d
	je	LBB0_8
## %bb.17:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_RARCH_DIRECTORY@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_18:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	setne	%r15b
	movq	%r13, %rdi
	callq	_path_is_compressed_file
	testl	%eax, %eax
	setne	%al
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_RARCH_COMPRESSED_ARCHIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_20:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_7
## %bb.21:                              ##   in Loop: Header=BB0_9 Depth=1
	andb	%al, %r15b
	je	LBB0_8
	jmp	LBB0_7
LBB0_22:
	movl	$-1, %r14d
	jmp	LBB0_25
LBB0_23:
	xorl	%r14d, %r14d
LBB0_24:
	movq	%rbx, %rdi
	callq	_retro_closedir
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_28
## %bb.26:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	%r12, %rsp
	movl	$-1, %r14d
	jmp	LBB0_24
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

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

	.comm	_RARCH_DIRECTORY,4,2            ## @RARCH_DIRECTORY
	.comm	_RARCH_FILETYPE_UNSET,4,2       ## @RARCH_FILETYPE_UNSET
	.comm	_RARCH_PLAIN_FILE,4,2           ## @RARCH_PLAIN_FILE
	.comm	_RARCH_COMPRESSED_ARCHIVE,4,2   ## @RARCH_COMPRESSED_ARCHIVE
	.no_dead_strip	_dir_list_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dir_list_read
_dir_list_read:                         ; @dir_list_read
	.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
	sub	sp, sp, #32
	mov	x20, x6
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x26, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	mov	x1, x4
	bl	_retro_opendir_include_hidden
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_retro_dirent_error
	cbz	x0, LBB0_4
; %bb.2:
	mov	w20, #-1
	b	LBB0_23
LBB0_3:
	mov	w20, #-1
	b	LBB0_24
LBB0_4:
	mov	x0, x19
	bl	_retro_readdir
	cbz	x0, LBB0_22
; %bb.5:
	stur	x24, [x29, #-96]                ; 8-byte Folded Spill
	stp	w21, w20, [x29, #-104]          ; 8-byte Folded Spill
Lloh3:
	adrp	x27, _PATH_MAX_LENGTH@GOTPAGE
Lloh4:
	ldr	x27, [x27, _PATH_MAX_LENGTH@GOTPAGEOFF]
	b	LBB0_11
LBB0_6:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x24
	bl	_path_get_extension
	mov	x2, x0
Lloh5:
	adrp	x8, _RARCH_FILETYPE_UNSET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RARCH_FILETYPE_UNSET@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	ldur	x24, [x29, #-96]                ; 8-byte Folded Reload
	mov	x0, x24
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_string_list_find_elem_prefix
	cbz	x0, LBB0_20
; %bb.7:                                ;   in Loop: Header=BB0_11 Depth=1
Lloh10:
	adrp	x8, _RARCH_PLAIN_FILE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RARCH_PLAIN_FILE@GOTPAGEOFF]
LBB0_8:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x8]
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	w2, w8
	mov	x0, x25
	mov	x1, x28
	bl	_string_list_append
	cbz	w0, LBB0_26
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	sp, x20
	mov	x0, x19
	bl	_retro_readdir
	cbz	x0, LBB0_22
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x20, sp
	ldr	w21, [x27]
	mov	x9, x21
Lloh12:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh13:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x28, x8, x9
	mov	sp, x28
	mov	x0, x19
	bl	_retro_dirent_get_name
	mov	x24, x0
	cbnz	w22, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldrb	w8, [x24]
	cmp	w8, #46
	b.eq	LBB0_10
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x24
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x24
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	strb	wzr, [x28]
	mov	x0, x28
	mov	x1, x26
	mov	x2, x24
	mov	x3, x21
	bl	_fill_pathname_join
	mov	x0, x19
	mov	x1, #0
	bl	_retro_dirent_is_dir
	cbz	x0, LBB0_6
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	ldur	w6, [x29, #-100]                ; 4-byte Folded Reload
	cbz	w6, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x28
	mov	x1, x25
	ldur	x2, [x29, #-96]                 ; 8-byte Folded Reload
	mov	x3, x23
	mov	x4, x22
	ldur	w5, [x29, #-104]                ; 4-byte Folded Reload
	bl	_dir_list_read
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=1
	cbz	w23, LBB0_10
; %bb.19:                               ;   in Loop: Header=BB0_11 Depth=1
Lloh18:
	adrp	x8, _RARCH_DIRECTORY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RARCH_DIRECTORY@GOTPAGEOFF]
	b	LBB0_8
LBB0_20:                                ;   in Loop: Header=BB0_11 Depth=1
	ldur	w8, [x29, #-104]                ; 4-byte Folded Reload
	cmp	w8, #0
	cset	w8, ne
	stur	w8, [x29, #-108]                ; 4-byte Folded Spill
	mov	x0, x28
	bl	_path_is_compressed_file
Lloh20:
	adrp	x8, _RARCH_COMPRESSED_ARCHIVE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RARCH_COMPRESSED_ARCHIVE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w8, w8, w21, ne
	cset	w9, ne
	cbz	x24, LBB0_9
; %bb.21:                               ;   in Loop: Header=BB0_11 Depth=1
	ldur	w10, [x29, #-108]               ; 4-byte Folded Reload
	and	w9, w10, w9
	cbz	w9, LBB0_10
	b	LBB0_9
LBB0_22:
	mov	w20, #0
LBB0_23:
	mov	x0, x19
	bl	_retro_closedir
LBB0_24:
	ldur	x8, [x29, #-88]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.25:
	mov	x0, x20
	sub	sp, x29, #80
	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
LBB0_26:
	mov	sp, x20
	mov	w20, #-1
	b	LBB0_23
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

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

	.comm	_RARCH_DIRECTORY,4,2            ; @RARCH_DIRECTORY
	.comm	_RARCH_FILETYPE_UNSET,4,2       ; @RARCH_FILETYPE_UNSET
	.comm	_RARCH_PLAIN_FILE,4,2           ; @RARCH_PLAIN_FILE
	.comm	_RARCH_COMPRESSED_ARCHIVE,4,2   ; @RARCH_COMPRESSED_ARCHIVE
	.no_dead_strip	_dir_list_read
.subsections_via_symbols
