	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Atari_OpenDir                  ## -- Begin function Atari_OpenDir
	.p2align	4, 0x90
_Atari_OpenDir:                         ## @Atari_OpenDir
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rsi
	movl	$5, %edx
	callq	_strncmp
	movq	_FALSE@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	leaq	4(%r15), %rdx
	movq	_MAX_FILES_PER_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_mcDir@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_mcGetDir
	movq	_dir_n@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	xorl	%edi, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_mcSync
	cmpq	$0, (%r14)
	js	LBB0_3
## %bb.2:
	movq	_dir_i@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_dir_path@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_Util_splitpath
	movq	_TRUE@GOTPCREL(%rip), %rbx
LBB0_3:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mc0:/"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_MAX_FILES_PER_DIR,4,2          ## @MAX_FILES_PER_DIR
	.comm	_mcDir,4,2                      ## @mcDir
	.comm	_dir_n,8,3                      ## @dir_n
	.comm	_dir_i,8,3                      ## @dir_i
	.comm	_dir_path,4,2                   ## @dir_path
	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Atari_OpenDir                  ; -- Begin function Atari_OpenDir
	.p2align	2
_Atari_OpenDir:                         ; @Atari_OpenDir
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #5
	bl	_strncmp
	cbz	x0, LBB0_2
LBB0_1:
Lloh2:
	adrp	x8, _FALSE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	add	x2, x19, #4
Lloh4:
	adrp	x8, _MAX_FILES_PER_DIR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MAX_FILES_PER_DIR@GOTPAGEOFF]
Lloh6:
	ldr	w4, [x8]
Lloh7:
	adrp	x8, _mcDir@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mcDir@GOTPAGEOFF]
Lloh9:
	ldr	w5, [x8]
	mov	w1, #0
	mov	w3, #0
	bl	_mcGetDir
Lloh10:
	adrp	x20, _dir_n@GOTPAGE
Lloh11:
	ldr	x20, [x20, _dir_n@GOTPAGEOFF]
	str	x0, [x20]
	mov	w0, #0
	mov	x1, #0
	mov	x2, x20
	bl	_mcSync
	ldr	x8, [x20]
	tbnz	x8, #63, LBB0_1
; %bb.3:
Lloh12:
	adrp	x8, _dir_i@GOTPAGE
Lloh13:
	ldr	x8, [x8, _dir_i@GOTPAGEOFF]
Lloh14:
	str	xzr, [x8]
Lloh15:
	adrp	x8, _dir_path@GOTPAGE
Lloh16:
	ldr	x8, [x8, _dir_path@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_Util_splitpath
Lloh18:
	adrp	x8, _TRUE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mc0:/"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_MAX_FILES_PER_DIR,4,2          ; @MAX_FILES_PER_DIR
	.comm	_mcDir,4,2                      ; @mcDir
	.comm	_dir_n,8,3                      ; @dir_n
	.comm	_dir_i,8,3                      ; @dir_i
	.comm	_dir_path,4,2                   ; @dir_path
	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
