	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buf_read_file
_buf_read_file:                         ## @buf_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	16(%rdi), %r12
	movq	40(%r12), %r14
	movq	(%r12), %rsi
	movq	%r14, %rdi
	callq	_blkoff
	movq	%rax, %rbx
	movq	(%r12), %rsi
	movq	%r14, %rdi
	callq	_lblkno
	movq	%rax, %r13
	leaq	32(%r12), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_dblksize
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	cmpq	8(%r12), %r13
	jne	LBB0_1
LBB0_8:
	movq	16(%r12), %rcx
	addq	%rbx, %rcx
	movq	%rcx, (%rdi)
	subq	%rbx, %rax
	movq	%rax, (%rdx)
	movq	32(%r12), %rcx
	subq	(%r12), %rcx
	cmpq	%rcx, %rax
	cmovbq	%rax, %rcx
	movq	%rcx, (%rdx)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_1:
	movq	%r13, %rsi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	leaq	-72(%rbp), %rdx
	movq	%r15, %rdi
	callq	_block_map
	testl	%eax, %eax
	je	LBB0_2
LBB0_9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	16(%r12), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	cmpq	$0, -72(%rbp)
	je	LBB0_5
LBB0_6:
	movl	$4, %edi
	callq	_twiddle
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_F_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	-72(%rbp), %rsi
	movq	%r14, %rdi
	callq	_fsb_to_db
	movq	16(%r12), %r8
	leaq	24(%r12), %r9
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	movl	%eax, %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	*-80(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_7
LBB0_3:
	movl	(%r14), %edi
	callq	_malloc
	movq	%rax, 16(%r12)
	cmpq	$0, -72(%rbp)
	jne	LBB0_6
LBB0_5:
	movq	%rax, %rdi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_bzero
	movq	%r14, 24(%r12)
LBB0_7:
	movq	%r13, 8(%r12)
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_F_READ,4,2                     ## @F_READ
	.no_dead_strip	_buf_read_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buf_read_file
_buf_read_file:                         ; @buf_read_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x25, x0
	ldr	x27, [x0, #16]
	ldr	x24, [x27, #40]
	ldr	x1, [x27]
	mov	x0, x24
	bl	_blkoff
	mov	x21, x0
	ldr	x1, [x27]
	mov	x0, x24
	bl	_lblkno
	mov	x22, x0
	add	x1, x27, #32
	mov	x0, x24
	mov	x2, x22
	bl	_dblksize
	mov	x23, x0
	ldr	x8, [x27, #8]
	cmp	x22, x8
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #0
	ldr	x8, [x27, #16]
	add	x8, x8, x21
	str	x8, [x20]
	sub	x8, x23, x21
	str	x8, [x19]
	ldr	x9, [x27, #32]
	ldr	x10, [x27]
	sub	x9, x9, x10
	cmp	x8, x9
	csel	x8, x8, x9, lo
	str	x8, [x19]
	b	LBB0_3
LBB0_2:
	add	x2, sp, #8
	mov	x0, x25
	mov	x1, x22
	bl	_block_map
	cbz	w0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
	ldr	x0, [x27, #16]
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_8
LBB0_6:
	mov	w0, #4
	bl	_twiddle
	ldr	x8, [x25, #8]
	ldr	x28, [x8]
	ldr	w25, [x25]
Lloh0:
	adrp	x8, _F_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _F_READ@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	ldr	x1, [sp, #8]
	mov	x0, x24
	bl	_fsb_to_db
	mov	x2, x0
	ldr	x4, [x27, #16]
	add	x5, x27, #24
	mov	x0, x25
	mov	x1, x26
	mov	x3, x23
	blr	x28
	cbnz	w0, LBB0_3
	b	LBB0_9
LBB0_7:
	ldr	w0, [x24]
	bl	_malloc
	str	x0, [x27, #16]
	ldr	x8, [sp, #8]
	cbnz	x8, LBB0_6
LBB0_8:
	mov	x1, x23
	bl	_bzero
	str	x23, [x27, #24]
LBB0_9:
	str	x22, [x27, #8]
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_F_READ,4,2                     ; @F_READ
	.no_dead_strip	_buf_read_file
.subsections_via_symbols
