	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cleanfile
_cleanfile:                             ## @cleanfile
	.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	%esi, %r15d
	movq	%rdi, %rbx
	movq	___SWR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	___sflush
	movl	%eax, %r14d
	testl	%r15d, %r15d
	jne	LBB0_4
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
	testl	%r15d, %r15d
	je	LBB0_7
LBB0_4:
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.5:
	movl	48(%rbx), %edi
	callq	*%rcx
	testq	%rax, %rax
	jns	LBB0_7
## %bb.6:
	movq	_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_7:
	movq	___SMBF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_9
## %bb.8:
	movq	40(%rbx), %rdi
	callq	_free
LBB0_9:
	movq	%rbx, %rdi
	callq	_HASUB
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_FREEUB
LBB0_11:
	movq	%rbx, %rdi
	callq	_HASLB
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	callq	_FREELB
LBB0_13:
	movl	$-1, 16(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	xorl	%eax, %eax
	callq	_STDIO_THREAD_LOCK
	movl	$0, (%rbx)
	xorl	%eax, %eax
	callq	_STDIO_THREAD_UNLOCK
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___SWR,4,2                      ## @__SWR
	.comm	_EOF,4,2                        ## @EOF
	.comm	___SMBF,4,2                     ## @__SMBF
	.no_dead_strip	_cleanfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cleanfile
_cleanfile:                             ; @cleanfile
	.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	x21, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, ___SWR@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___SWR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	___sflush
	mov	x20, x0
	cbnz	w21, LBB0_3
	b	LBB0_5
LBB0_2:
	mov	w20, #0
	cbz	w21, LBB0_5
LBB0_3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w0, [x19, #48]
	blr	x8
Lloh3:
	adrp	x8, _EOF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w20, w8, w20, lt
LBB0_5:
	ldr	w8, [x19]
Lloh6:
	adrp	x9, ___SMBF@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___SMBF@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	x0, [x19, #40]
	bl	_free
LBB0_7:
	mov	x0, x19
	bl	_HASUB
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_FREEUB
LBB0_9:
	mov	x0, x19
	bl	_HASLB
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_FREELB
LBB0_11:
	mov	w8, #-1
	str	w8, [x19, #16]
	stp	xzr, xzr, [x19, #24]
	bl	_STDIO_THREAD_LOCK
	str	wzr, [x19]
	bl	_STDIO_THREAD_UNLOCK
	mov	x0, 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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	___SWR,4,2                      ; @__SWR
	.comm	_EOF,4,2                        ; @EOF
	.comm	___SMBF,4,2                     ; @__SMBF
	.no_dead_strip	_cleanfile
.subsections_via_symbols
