	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Devices_H_ChangeDirectory
_Devices_H_ChangeDirectory:             ## @Devices_H_ChangeDirectory
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_devbug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_Log_print
LBB0_2:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_Devices_GetHostPath
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	_host_path@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_Util_direxists
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	_atari_path@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpb	$0, (%rsi)
	movq	_Devices_h_current_dir@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_h_devnum@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, %rdi
	callq	_Util_stpcpy
	movq	_Util_DIR_SEP_CHAR@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movb	%cl, (%rax)
	incq	%rax
LBB0_7:
	movb	$0, (%rax)
	movl	$1, %eax
	jmp	LBB0_8
LBB0_4:
	movl	$150, %eax
LBB0_8:
	movq	_CPU_regY@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_9:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_devbug,8,3                     ## @devbug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CD Command"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_host_path,4,2                  ## @host_path
	.comm	_CPU_regY,4,2                   ## @CPU_regY
	.comm	_CPU_SetN,4,2                   ## @CPU_SetN
	.comm	_atari_path,8,3                 ## @atari_path
	.comm	_Devices_h_current_dir,8,3      ## @Devices_h_current_dir
	.comm	_h_devnum,8,3                   ## @h_devnum
	.comm	_Util_DIR_SEP_CHAR,1,0          ## @Util_DIR_SEP_CHAR
	.comm	_CPU_ClrN,4,2                   ## @CPU_ClrN
	.no_dead_strip	_Devices_H_ChangeDirectory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Devices_H_ChangeDirectory
_Devices_H_ChangeDirectory:             ; @Devices_H_ChangeDirectory
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _devbug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _devbug@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_print
LBB0_2:
Lloh5:
	adrp	x8, _FALSE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_Devices_GetHostPath
	cbz	x0, LBB0_9
; %bb.3:
Lloh8:
	adrp	x8, _host_path@GOTPAGE
Lloh9:
	ldr	x8, [x8, _host_path@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_Util_direxists
	cbz	w0, LBB0_7
; %bb.4:
Lloh11:
	adrp	x8, _atari_path@GOTPAGE
Lloh12:
	ldr	x8, [x8, _atari_path@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
	ldrb	w8, [x1]
Lloh14:
	adrp	x9, _Devices_h_current_dir@GOTPAGE
Lloh15:
	ldr	x9, [x9, _Devices_h_current_dir@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
Lloh17:
	adrp	x10, _h_devnum@GOTPAGE
Lloh18:
	ldr	x10, [x10, _h_devnum@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	ldr	x0, [x9, x10, lsl #3]
	cbz	w8, LBB0_6
; %bb.5:
	bl	_Util_stpcpy
Lloh20:
	adrp	x8, _Util_DIR_SEP_CHAR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _Util_DIR_SEP_CHAR@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [x0], #1
LBB0_6:
	strb	wzr, [x0]
	mov	w8, #1
	b	LBB0_8
LBB0_7:
	mov	w8, #150
LBB0_8:
Lloh22:
	adrp	x9, _CPU_regY@GOTPAGE
Lloh23:
	ldr	x9, [x9, _CPU_regY@GOTPAGEOFF]
Lloh24:
	str	w8, [x9]
LBB0_9:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_devbug,8,3                     ; @devbug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CD Command"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_host_path,4,2                  ; @host_path
	.comm	_CPU_regY,4,2                   ; @CPU_regY
	.comm	_CPU_SetN,4,2                   ; @CPU_SetN
	.comm	_atari_path,8,3                 ; @atari_path
	.comm	_Devices_h_current_dir,8,3      ; @Devices_h_current_dir
	.comm	_h_devnum,8,3                   ; @h_devnum
	.comm	_Util_DIR_SEP_CHAR,1,0          ; @Util_DIR_SEP_CHAR
	.comm	_CPU_ClrN,4,2                   ; @CPU_ClrN
	.no_dead_strip	_Devices_H_ChangeDirectory
.subsections_via_symbols
