	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_file_reset                     ## -- Begin function file_reset
	.p2align	4, 0x90
_file_reset:                            ## @file_reset
	.cfi_startproc
## %bb.0:
	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
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	movq	24(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
LBB0_3:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_free
	movq	$0, 16(%rbx)
LBB0_5:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_free
	movq	$0, 8(%rbx)
LBB0_7:
	movq	_EVENT_HAD_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 4(%rbx)
	movl	$-1, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_file_error
	movl	$-1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no magic files loaded"

	.comm	_EVENT_HAD_ERR,4,2              ## @EVENT_HAD_ERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_file_reset                     ; -- Begin function file_reset
	.p2align	2
_file_reset:                            ; @file_reset
	.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
	mov	x19, x0
	cbz	w1, LBB0_2
; %bb.1:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
LBB0_2:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_free
	str	xzr, [x19, #16]
LBB0_4:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_free
	str	xzr, [x19, #8]
LBB0_6:
	mov	w0, #0
Lloh0:
	adrp	x8, _EVENT_HAD_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVENT_HAD_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	mov	w9, #-1
	stp	w9, w8, [x19]
	b	LBB0_8
LBB0_7:
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_file_error
	mov	w0, #-1
LBB0_8:
	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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no magic files loaded"

	.comm	_EVENT_HAD_ERR,4,2              ; @EVENT_HAD_ERR
.subsections_via_symbols
