	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Devices_CloseBasicFile
_Devices_CloseBasicFile:                ## @Devices_CloseBasicFile
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_BINLOAD_bin_file@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.1:
	callq	_fclose
	movq	$0, (%rbx)
	movq	_BINLOAD_loading_basic@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.2:
	movq	_BINLOAD_LOADING_BASIC_SAVED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.3:
	movq	_ready_prompt@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ready_ptr@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_ehwrit_addr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ESC_EHWRIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_Devices_IgnoreReady@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ESC_AddEscRts
	movq	_BINLOAD_LOADING_BASIC_RUN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_4:
	movq	%rax, (%rbx)
LBB0_5:
	xorl	%eax, %eax
	callq	_Devices_RestoreEHREAD
	movq	_Devices_RestoreEHCLOS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CPU_rts_handler@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_CPU_regY@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BINLOAD_bin_file,8,3           ## @BINLOAD_bin_file
	.comm	_BINLOAD_loading_basic,8,3      ## @BINLOAD_loading_basic
	.comm	_BINLOAD_LOADING_BASIC_SAVED,8,3 ## @BINLOAD_LOADING_BASIC_SAVED
	.comm	_ready_prompt,4,2               ## @ready_prompt
	.comm	_ready_ptr,4,2                  ## @ready_ptr
	.comm	_ehwrit_addr,4,2                ## @ehwrit_addr
	.comm	_ESC_EHWRIT,4,2                 ## @ESC_EHWRIT
	.comm	_Devices_IgnoreReady,4,2        ## @Devices_IgnoreReady
	.comm	_BINLOAD_LOADING_BASIC_RUN,8,3  ## @BINLOAD_LOADING_BASIC_RUN
	.comm	_Devices_RestoreEHCLOS,4,2      ## @Devices_RestoreEHCLOS
	.comm	_CPU_rts_handler,4,2            ## @CPU_rts_handler
	.comm	_CPU_regY,4,2                   ## @CPU_regY
	.comm	_CPU_ClrN,4,2                   ## @CPU_ClrN
	.comm	_Devices_E_Read,4,2             ## @Devices_E_Read
	.comm	_ESC_EHREAD,4,2                 ## @ESC_EHREAD
	.comm	_ehread_addr,4,2                ## @ehread_addr
	.no_dead_strip	_Devices_CloseBasicFile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Devices_CloseBasicFile
_Devices_CloseBasicFile:                ; @Devices_CloseBasicFile
	.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
Lloh0:
	adrp	x19, _BINLOAD_bin_file@GOTPAGE
Lloh1:
	ldr	x19, [x19, _BINLOAD_bin_file@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_4
; %bb.1:
	bl	_fclose
	mov	x8, #0
	str	xzr, [x19]
Lloh2:
	adrp	x19, _BINLOAD_loading_basic@GOTPAGE
Lloh3:
	ldr	x19, [x19, _BINLOAD_loading_basic@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh4:
	adrp	x10, _BINLOAD_LOADING_BASIC_SAVED@GOTPAGE
Lloh5:
	ldr	x10, [x10, _BINLOAD_LOADING_BASIC_SAVED@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	cmp	x9, #0
	ccmp	x9, x10, #4, ne
	b.eq	LBB0_3
; %bb.2:
Lloh7:
	adrp	x8, _ready_prompt@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ready_prompt@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _ready_ptr@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ready_ptr@GOTPAGEOFF]
Lloh12:
	str	w8, [x9]
Lloh13:
	adrp	x8, _ehwrit_addr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ehwrit_addr@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x8, _ESC_EHWRIT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ESC_EHWRIT@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _Devices_IgnoreReady@GOTPAGE
Lloh20:
	ldr	x8, [x8, _Devices_IgnoreReady@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	bl	_ESC_AddEscRts
Lloh22:
	adrp	x8, _BINLOAD_LOADING_BASIC_RUN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BINLOAD_LOADING_BASIC_RUN@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
LBB0_3:
	str	x8, [x19]
LBB0_4:
	bl	_Devices_RestoreEHREAD
Lloh25:
	adrp	x8, _Devices_RestoreEHCLOS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _Devices_RestoreEHCLOS@GOTPAGEOFF]
Lloh27:
	adrp	x9, _CPU_rts_handler@GOTPAGE
Lloh28:
	ldr	x9, [x9, _CPU_rts_handler@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	str	w8, [x9]
Lloh31:
	adrp	x8, _CPU_regY@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CPU_regY@GOTPAGEOFF]
	mov	w9, #1
Lloh33:
	str	w9, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_BINLOAD_bin_file,8,3           ; @BINLOAD_bin_file
	.comm	_BINLOAD_loading_basic,8,3      ; @BINLOAD_loading_basic
	.comm	_BINLOAD_LOADING_BASIC_SAVED,8,3 ; @BINLOAD_LOADING_BASIC_SAVED
	.comm	_ready_prompt,4,2               ; @ready_prompt
	.comm	_ready_ptr,4,2                  ; @ready_ptr
	.comm	_ehwrit_addr,4,2                ; @ehwrit_addr
	.comm	_ESC_EHWRIT,4,2                 ; @ESC_EHWRIT
	.comm	_Devices_IgnoreReady,4,2        ; @Devices_IgnoreReady
	.comm	_BINLOAD_LOADING_BASIC_RUN,8,3  ; @BINLOAD_LOADING_BASIC_RUN
	.comm	_Devices_RestoreEHCLOS,4,2      ; @Devices_RestoreEHCLOS
	.comm	_CPU_rts_handler,4,2            ; @CPU_rts_handler
	.comm	_CPU_regY,4,2                   ; @CPU_regY
	.comm	_CPU_ClrN,4,2                   ; @CPU_ClrN
	.comm	_Devices_E_Read,4,2             ; @Devices_E_Read
	.comm	_ESC_EHREAD,4,2                 ; @ESC_EHREAD
	.comm	_ehread_addr,4,2                ; @ehread_addr
	.no_dead_strip	_Devices_CloseBasicFile
.subsections_via_symbols
