	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_close
_handle_close:                          ## @handle_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	movq	_HANDLE_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_handle_is_ok
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_handles@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movslq	%r12d, %rcx
	shlq	$2, %rcx
	leaq	(%rcx,%rcx,2), %rbx
	movl	8(%rax,%rbx), %edi
	callq	_close
	jmp	LBB0_2
LBB0_3:
	movq	_HANDLE_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_handle_is_ok
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_handles@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movslq	%r12d, %rcx
	shlq	$2, %rcx
	leaq	(%rcx,%rcx,2), %rbx
	movl	4(%rax,%rbx), %edi
	callq	_closedir
LBB0_2:
	movl	%eax, %r14d
	movq	(%r15), %rax
	movl	(%rax,%rbx), %edi
	callq	_free
	movl	%r12d, %edi
	callq	_handle_unused
	movl	%r14d, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_HANDLE_FILE,4,2                ## @HANDLE_FILE
	.comm	_handles,8,3                    ## @handles
	.comm	_HANDLE_DIR,4,2                 ## @HANDLE_DIR
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_handle_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_close
_handle_close:                          ; @handle_close
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _HANDLE_FILE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HANDLE_FILE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_handle_is_ok
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x21, _handles@GOTPAGE
Lloh4:
	ldr	x21, [x21, _handles@GOTPAGEOFF]
	ldr	x8, [x21]
	mov	w9, #12
	smaddl	x8, w19, w9, x8
	smull	x22, w19, w9
	ldr	w0, [x8, #8]
	bl	_close
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x8, _HANDLE_DIR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HANDLE_DIR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_handle_is_ok
	cbz	x0, LBB0_6
; %bb.3:
Lloh8:
	adrp	x21, _handles@GOTPAGE
Lloh9:
	ldr	x21, [x21, _handles@GOTPAGEOFF]
	ldr	x8, [x21]
	mov	w9, #12
	smaddl	x8, w19, w9, x8
	smull	x22, w19, w9
	ldr	w0, [x8, #4]
	bl	_closedir
LBB0_4:
	mov	x20, x0
	ldr	x8, [x21]
	ldr	w0, [x8, x22]
	bl	_free
	mov	x0, x19
	bl	_handle_unused
	mov	x0, x20
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh10:
	adrp	x8, _ENOENT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _errno@GOTPAGE
Lloh14:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh15:
	str	w8, [x9]
	mov	w0, #-1
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_HANDLE_FILE,4,2                ; @HANDLE_FILE
	.comm	_handles,8,3                    ; @handles
	.comm	_HANDLE_DIR,4,2                 ; @HANDLE_DIR
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_handle_close
.subsections_via_symbols
