	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_file
_read_file:                             ## @read_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	$1, %ebx
	cmpq	$0, 16(%rsi)
	jne	LBB0_7
## %bb.1:
	movq	%rsi, %r15
	xorl	%ebx, %ebx
	cmpl	$0, (%rsi)
	jne	LBB0_7
## %bb.2:
	cmpq	$0, 8(%r15)
	jne	LBB0_7
## %bb.3:
	movq	%rdi, %r14
	cmpl	$-1, 4(%r15)
	jne	LBB0_6
## %bb.4:
	movq	%r15, %rdi
	callq	_open_file
	testl	%eax, %eax
	je	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_read_file_guts
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	movl	%ecx, (%r15)
	movl	4(%r15), %edi
	callq	_close
	movl	$-1, 4(%r15)
	xorl	%ebx, %ebx
	cmpl	$0, (%r15)
	sete	%bl
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_open_file_failed
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_read_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_file
_read_file:                             ; @read_file
	.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
	ldr	x8, [x1, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_5
LBB0_2:
	mov	x19, x1
	ldr	w8, [x1]
	cbnz	w8, LBB0_4
; %bb.3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x20, x0
	ldr	w8, [x19, #4]
	cmn	w8, #1
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_open_file
	cbz	w0, LBB0_9
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_read_file_guts
	cmp	w0, #0
	cset	w8, eq
	str	w8, [x19]
	ldr	w0, [x19, #4]
	bl	_close
	mov	w8, #-1
	str	w8, [x19, #4]
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w0, eq
	b	LBB0_5
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_open_file_failed
	mov	w0, #0
	b	LBB0_5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_read_file
.subsections_via_symbols
