	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfs_close_file                 ## -- Begin function kfs_close_file
	.p2align	4, 0x90
_kfs_close_file:                        ## @kfs_close_file
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	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	%rdi, %rbx
	movl	(%rdi), %edi
	testl	%edi, %edi
	js	LBB0_5
## %bb.2:
	testl	%esi, %esi
	je	LBB0_4
## %bb.3:
	callq	_close
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
LBB0_4:
	movl	$-1, (%rbx)
LBB0_5:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_file_info_decref
	movq	$0, 8(%rbx)
LBB0_7:
	movq	%rbx, %rdi
	callq	_free
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
LBB0_8:
	xorl	%eax, %eax
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kfs_close_file                 ; -- Begin function kfs_close_file
	.p2align	2
_kfs_close_file:                        ; @kfs_close_file
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_8
; %bb.1:
	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
	ldr	w0, [x0]
	tbnz	w0, #31, LBB0_5
; %bb.2:
	cbz	w1, LBB0_4
; %bb.3:
	bl	_close
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
LBB0_4:
	mov	w8, #-1
	str	w8, [x19]
LBB0_5:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_file_info_decref
	str	xzr, [x19, #8]
LBB0_7:
	mov	x0, x19
	bl	_free
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
LBB0_8:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	mov	w0, #0
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
