	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Devices_H_Close
_Devices_H_Close:                       ## @Devices_H_Close
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_devbug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_Log_print
LBB0_2:
	xorl	%eax, %eax
	callq	_Devices_GetIOCB
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movq	_h_fp@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	_h_iocb@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	(%rcx,%rax,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	movq	_h_tmpbuf@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %esi
	callq	_Util_fclose
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	movq	$0, (%rax,%rcx,8)
LBB0_5:
	movq	_CPU_regY@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_devbug,8,3                     ## @devbug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HHCLOS"

	.comm	_h_fp,8,3                       ## @h_fp
	.comm	_h_iocb,8,3                     ## @h_iocb
	.comm	_h_tmpbuf,8,3                   ## @h_tmpbuf
	.comm	_CPU_regY,4,2                   ## @CPU_regY
	.comm	_CPU_ClrN,4,2                   ## @CPU_ClrN
	.no_dead_strip	_Devices_H_Close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Devices_H_Close
_Devices_H_Close:                       ; @Devices_H_Close
	.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	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:
	bl	_Devices_GetIOCB
	cbz	w0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x19, _h_fp@GOTPAGE
Lloh6:
	ldr	x19, [x19, _h_fp@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh7:
	adrp	x20, _h_iocb@GOTPAGE
Lloh8:
	ldr	x20, [x20, _h_iocb@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x0, [x9, x8, lsl #3]
	cbz	x0, LBB0_5
; %bb.4:
Lloh9:
	adrp	x9, _h_tmpbuf@GOTPAGE
Lloh10:
	ldr	x9, [x9, _h_tmpbuf@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	w1, [x9, x8, lsl #2]
	bl	_Util_fclose
	ldr	x8, [x19]
	ldr	x9, [x20]
	str	xzr, [x8, x9, lsl #3]
LBB0_5:
Lloh12:
	adrp	x8, _CPU_regY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CPU_regY@GOTPAGEOFF]
	mov	w9, #1
Lloh14:
	str	w9, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_devbug,8,3                     ; @devbug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HHCLOS"

	.comm	_h_fp,8,3                       ; @h_fp
	.comm	_h_iocb,8,3                     ; @h_iocb
	.comm	_h_tmpbuf,8,3                   ; @h_tmpbuf
	.comm	_CPU_regY,4,2                   ; @CPU_regY
	.comm	_CPU_ClrN,4,2                   ; @CPU_ClrN
	.no_dead_strip	_Devices_H_Close
.subsections_via_symbols
