	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buffer_from_file
_buffer_from_file:                      ## @buffer_from_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	16(%rdi), %r12
	movq	24(%rdi), %rdi
	movl	$1, %esi
	movl	$8, %edx
	movq	%r15, %rcx
	callq	_fread
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%r12, %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %r12
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r12), %rdi
	addq	%rbx, %rdi
	movl	$8, %edx
	subl	%ebx, %edx
	movl	$1, %esi
	movq	%r15, %rcx
	callq	_fread
	movq	%r12, %r13
	testq	%rax, %rax
	je	LBB0_1
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rcx
	movq	%rax, %rbx
	addq	%rcx, %rbx
	cmpq	$8, %rbx
	jb	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	sete	%al
	movzbl	%al, %edi
	callq	_assert
	movq	(%r13), %r12
	testq	%r12, %r12
	jne	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	callq	_buffer_extend
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r12
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_1:
	movq	%r15, %rdi
	callq	_feof
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%r12, 8(%r14)
	movq	%rbx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_11:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_15
## %bb.12:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_MEMORY@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
LBB0_15:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEMORY,4,2                     ## @MEMORY
	.comm	_errno,8,3                      ## @errno
	.comm	_ERANGE,4,2                     ## @ERANGE
	.no_dead_strip	_buffer_from_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buffer_from_file
_buffer_from_file:                      ; @buffer_from_file
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	add	x21, x0, #16
	ldr	x0, [x0, #24]
	mov	w22, #8
	mov	w1, #1
	mov	w2, #8
	mov	x3, x20
	bl	_fread
	mov	x23, #0
	cbnz	x0, LBB0_5
LBB0_1:
	mov	x0, x20
	bl	_feof
	cbz	x0, LBB0_9
; %bb.2:
	mov	w0, #0
	stp	x23, x21, [x19]
	b	LBB0_11
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, #0
	mov	x21, x8
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21, #8]
	add	x0, x8, x23
	sub	w2, w22, w23
	mov	w1, #1
	mov	x3, x20
	bl	_fread
	cbz	x0, LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x23, x0, x23
	cmp	x23, #8
	b.lo	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cset	w0, eq
	bl	_assert
	ldr	x8, [x21]
	cbnz	x8, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_buffer_extend
	cbz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x21, x0
	mov	x23, #0
	b	LBB0_4
LBB0_9:
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _ERANGE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ERANGE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w0, w9, w8, eq
	b	LBB0_11
LBB0_10:
Lloh6:
	adrp	x8, _MEMORY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEMORY@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MEMORY,4,2                     ; @MEMORY
	.comm	_errno,8,3                      ; @errno
	.comm	_ERANGE,4,2                     ; @ERANGE
	.no_dead_strip	_buffer_from_file
.subsections_via_symbols
