	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Atari_ReadDir                  ## -- Begin function Atari_ReadDir
	.p2align	4, 0x90
_Atari_ReadDir:                         ## @Atari_ReadDir
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movq	_dir_i@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_dir_n@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.2:
	movq	%r9, %r12
	movq	%rsi, %rbx
	movq	_mcDir@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	leaq	(%rax,%rax,4), %r15
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	movq	_dir_path@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	32(%r14,%r15,8), %edx
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	callq	_Util_catpath
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
LBB0_4:
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.5:
	movl	32(%r14,%r15,8), %esi
	movq	%rbx, %rdi
	movq	%r12, %rbx
	movq	%rdx, %r12
	callq	_strcpy
	movq	%r12, %rdx
	movq	%rbx, %r12
LBB0_6:
	leaq	(%r14,%r15,8), %rax
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.7:
	movq	_MC_ATTR_SUBDIR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	jne	LBB0_8
## %bb.9:
	movq	_FALSE@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_1:
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_8:
	movq	_TRUE@GOTPCREL(%rip), %rcx
LBB0_10:
	movl	(%rcx), %ecx
	movl	%ecx, (%rdx)
LBB0_11:
	testq	%r13, %r13
	je	LBB0_16
## %bb.12:
	movq	_MC_ATTR_WRITEABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	jne	LBB0_13
## %bb.14:
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	movl	%eax, (%r13)
LBB0_16:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_18
## %bb.17:
	movl	24(%r14,%r15,8), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_18:
	testq	%r12, %r12
	je	LBB0_20
## %bb.19:
	movl	4(%r14,%r15,8), %eax
	movl	8(%r14,%r15,8), %edx
	leal	-12(%rax), %esi
	cmpl	$12, %eax
	cmovll	%eax, %esi
	movl	$112, %ecx
	movl	$97, %eax
	cmovgel	%ecx, %eax
	testl	%esi, %esi
	movl	12(%r14,%r15,8), %ecx
	movl	$12, %r9d
	cmovnel	%esi, %r9d
	movslq	16(%r14,%r15,8), %r8
	imulq	$1374389535, %r8, %rsi          ## imm = 0x51EB851F
	movq	%rsi, %rdi
	sarq	$37, %rdi
	shrq	$63, %rsi
	movl	20(%r14,%r15,8), %ebx
	addl	%edi, %esi
	imull	$100, %esi, %esi
	subl	%esi, %r8d
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
                                        ## kill: def $r8d killed $r8d killed $r8
	pushq	%rax
	pushq	%rbx
	callq	_sprintf
	addq	$16, %rsp
LBB0_20:
	movq	_dir_i@GOTPCREL(%rip), %rax
	incq	(%rax)
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dir_i,8,3                      ## @dir_i
	.comm	_dir_n,8,3                      ## @dir_n
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_mcDir,8,3                      ## @mcDir
	.comm	_dir_path,4,2                   ## @dir_path
	.comm	_MC_ATTR_SUBDIR,4,2             ## @MC_ATTR_SUBDIR
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_MC_ATTR_WRITEABLE,4,2          ## @MC_ATTR_WRITEABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%2d-%02d-%02d %2d:%02d%c"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Atari_ReadDir                  ; -- Begin function Atari_ReadDir
	.p2align	2
_Atari_ReadDir:                         ; @Atari_ReadDir
	.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	x24, _dir_i@GOTPAGE
Lloh1:
	ldr	x24, [x24, _dir_i@GOTPAGEOFF]
	ldr	x25, [x24]
Lloh2:
	adrp	x8, _dir_n@GOTPAGE
Lloh3:
	ldr	x8, [x8, _dir_n@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x27, _FALSE@GOTPAGE
Lloh6:
	ldr	x27, [x27, _FALSE@GOTPAGEOFF]
	cmp	x25, x8
	b.ge	LBB0_14
; %bb.1:
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
Lloh7:
	adrp	x8, _mcDir@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mcDir@GOTPAGEOFF]
Lloh9:
	ldr	x26, [x8]
	mov	w28, #40
	cbz	x0, LBB0_3
; %bb.2:
Lloh10:
	adrp	x8, _dir_path@GOTPAGE
Lloh11:
	ldr	x8, [x8, _dir_path@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w8, #40
	madd	x8, x25, x8, x26
	ldr	w2, [x8, #32]
	bl	_Util_catpath
LBB0_3:
	madd	x28, x25, x28, x26
	cbz	x23, LBB0_5
; %bb.4:
	mov	w8, #40
	madd	x8, x25, x8, x26
	ldr	w1, [x8, #32]
	mov	x0, x23
	bl	_strcpy
LBB0_5:
Lloh13:
	adrp	x8, _TRUE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	cbz	x22, LBB0_7
; %bb.6:
Lloh15:
	adrp	x9, _MC_ATTR_SUBDIR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MC_ATTR_SUBDIR@GOTPAGEOFF]
	ldr	w10, [x28]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w10
	csel	x9, x27, x8, eq
	ldr	w9, [x9]
	str	w9, [x22]
LBB0_7:
	cbz	x21, LBB0_9
; %bb.8:
Lloh18:
	adrp	x9, _MC_ATTR_WRITEABLE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MC_ATTR_WRITEABLE@GOTPAGEOFF]
	ldr	w10, [x28]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w10
	csel	x8, x8, x27, eq
	ldr	w8, [x8]
	str	w8, [x21]
LBB0_9:
	cbz	x20, LBB0_11
; %bb.10:
	mov	w8, #40
	madd	x8, x25, x8, x26
	ldr	x8, [x8, #24]
	str	w8, [x20]
LBB0_11:
	cbz	x19, LBB0_13
; %bb.12:
	mov	w8, #40
	madd	x8, x25, x8, x26
	ldp	w9, w2, [x8, #4]
	sub	w10, w9, #12
	cmp	w9, #11
	csel	w9, w10, w9, gt
	mov	w10, #97
	mov	w11, #112
	csel	w7, w11, w10, gt
	ldp	w3, w10, [x8, #12]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	mov	w11, #34079
	movk	w11, #20971, lsl #16
	mul	x11, x10, x11
	lsr	x12, x11, #63
	asr	x11, x11, #37
	add	w11, w11, w12
	mov	w12, #100
	ldr	w6, [x8, #20]
	mov	w8, #12
	cmp	w9, #0
	csel	w5, w8, w9, eq
	msub	w4, w11, w12, w10
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_sprintf
LBB0_13:
	ldr	x8, [x24]
	add	x8, x8, #1
	str	x8, [x24]
Lloh23:
	adrp	x27, _TRUE@GOTPAGE
Lloh24:
	ldr	x27, [x27, _TRUE@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x27]
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_dir_i,8,3                      ; @dir_i
	.comm	_dir_n,8,3                      ; @dir_n
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_mcDir,8,3                      ; @mcDir
	.comm	_dir_path,4,2                   ; @dir_path
	.comm	_MC_ATTR_SUBDIR,4,2             ; @MC_ATTR_SUBDIR
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_MC_ATTR_WRITEABLE,4,2          ; @MC_ATTR_WRITEABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%2d-%02d-%02d %2d:%02d%c"

.subsections_via_symbols
