	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dl_close_file                  ## -- Begin function dl_close_file
	.p2align	4, 0x90
_dl_close_file:                         ## @dl_close_file
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	testl	%edi, %edi
	setns	%al
	movq	_MAX_FN@GOTPCREL(%rip), %rcx
	cmpl	%edi, (%rcx)
	setg	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	_fd@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movslq	%ebx, %rbx
	xorl	%edi, %edi
	cmpl	$-1, (%rax,%rbx,4)
	setne	%dil
	callq	_assert
	movq	_fread_only@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_1
## %bb.2:
	movq	$0, (%rax,%rbx,8)
	jmp	LBB0_3
LBB0_1:
	movq	(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_fsync
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
LBB0_3:
	movq	(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_close
	shrq	$63, %rax
	xorl	$1, %eax
	movl	%eax, %edi
	callq	_assert
	movq	(%r14), %rax
	movl	$-1, (%rax,%rbx,4)
	movq	_fsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$0, (%rax,%rbx,8)
	movq	_fpos@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	$0, (%rax,%rbx,8)
	movq	_fnames@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %r14
	movq	%r14, %rdi
	callq	_strlen
	leaq	1(%rax), %rsi
	movq	%r14, %rdi
	callq	_dl_free
	movq	(%r15), %rax
	movq	$0, (%rax,%rbx,8)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_FN,4,2                     ## @MAX_FN
	.comm	_fd,8,3                         ## @fd
	.comm	_fread_only,8,3                 ## @fread_only
	.comm	_fsize,8,3                      ## @fsize
	.comm	_fpos,8,3                       ## @fpos
	.comm	_fnames,8,3                     ## @fnames
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dl_close_file                  ; -- Begin function dl_close_file
	.p2align	2
_dl_close_file:                         ; @dl_close_file
	.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
	cmp	w0, #0
Lloh0:
	adrp	x8, _MAX_FN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_FN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w8, w0, #4, ge
	cset	w0, gt
	bl	_assert
Lloh3:
	adrp	x21, _fd@GOTPAGE
Lloh4:
	ldr	x21, [x21, _fd@GOTPAGEOFF]
	ldr	x8, [x21]
	sxtw	x20, w19
	ldr	w8, [x8, w19, sxtw #2]
	cmn	w8, #1
	cset	w0, ne
	bl	_assert
Lloh5:
	adrp	x8, _fread_only@GOTPAGE
Lloh6:
	ldr	x8, [x8, _fread_only@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x8, w19, sxtw #3]
	cbz	x9, LBB0_2
; %bb.1:
	str	xzr, [x8, x20, lsl #3]
	b	LBB0_3
LBB0_2:
	ldr	x8, [x21]
	ldr	w0, [x8, x20, lsl #2]
	bl	_fsync
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
LBB0_3:
	ldr	x8, [x21]
	lsl	x19, x20, #2
	ldr	w0, [x8, x19]
	bl	_close
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	bl	_assert
	ldr	x8, [x21]
	mov	w9, #-1
	str	w9, [x8, x19]
Lloh8:
	adrp	x8, _fsize@GOTPAGE
Lloh9:
	ldr	x8, [x8, _fsize@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	lsl	x20, x20, #3
	str	xzr, [x8, x20]
Lloh11:
	adrp	x8, _fpos@GOTPAGE
Lloh12:
	ldr	x8, [x8, _fpos@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	xzr, [x8, x20]
Lloh14:
	adrp	x21, _fnames@GOTPAGE
Lloh15:
	ldr	x21, [x21, _fnames@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x19, [x8, x20]
	mov	x0, x19
	bl	_strlen
	add	x1, x0, #1
	mov	x0, x19
	bl	_dl_free
	ldr	x8, [x21]
	str	xzr, [x8, x20]
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_FN,4,2                     ; @MAX_FN
	.comm	_fd,8,3                         ; @fd
	.comm	_fread_only,8,3                 ; @fread_only
	.comm	_fsize,8,3                      ; @fsize
	.comm	_fpos,8,3                       ; @fpos
	.comm	_fnames,8,3                     ; @fnames
.subsections_via_symbols
