	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buffer_read
_buffer_read:                           ## @buffer_read
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rsi), %r14
	testq	%rcx, %rcx
	jle	LBB0_10
## %bb.1:
	movq	%rcx, %r13
	movq	%rdx, %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$8, %ebx
	subq	%r14, %rbx
	cmpq	%r13, %rbx
	cmovaeq	%r13, %rbx
	movq	(%r15), %rsi
	addq	%r14, %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	callq	_memcpy
	addq	%rbx, %r14
	addq	%rbx, %r12
	subq	%rbx, %r13
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jle	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testq	%r15, %r15
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	24(%rbx), %r15
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	8(%rbx), %r14
	jae	LBB0_5
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$8, %r14
	jb	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %r15
	movq	%r15, 16(%rbx)
	testq	%r15, %r15
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_5:
	movq	_USER_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_display_log
	jmp	LBB0_10
LBB0_11:
	movq	_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_display_log
LBB0_10:
	movq	%r14, (%rbx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USER_ERROR,4,2                 ## @USER_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"file truncated (%lu bytes)"

	.comm	_INTERNAL_ERROR,4,2             ## @INTERNAL_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"damaged buffer list"

	.no_dead_strip	_buffer_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buffer_read
_buffer_read:                           ; @buffer_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	ldr	x24, [x1]
	cmp	x3, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x21, x3
	mov	x22, x2
	mov	x20, x0
	ldr	x25, [x19, #16]
	mov	w26, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	x8, x26, x24
	cmp	x8, x21
	csel	x23, x8, x21, lo
	ldr	x8, [x25]
	add	x1, x8, x24
	mov	x0, x22
	mov	x2, x23
	bl	_memcpy
	add	x24, x23, x24
	sub	x21, x21, x23
	add	x22, x23, x22
	cmp	x21, #0
	b.le	LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x25, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #24]
	cmp	x25, x8
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	cmp	x24, x8
	b.hs	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x24, #8
	b.lo	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x25, [x25, #8]
	str	x25, [x19, #16]
	cbz	x25, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x24, #0
	b	LBB0_2
LBB0_9:
Lloh0:
	adrp	x8, _USER_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USER_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	str	x21, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_display_log
	b	LBB0_11
LBB0_10:
Lloh5:
	adrp	x8, _INTERNAL_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INTERNAL_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_display_log
	mov	x24, #0
LBB0_11:
	str	x24, [x19]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_USER_ERROR,4,2                 ; @USER_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"file truncated (%lu bytes)"

	.comm	_INTERNAL_ERROR,4,2             ; @INTERNAL_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"damaged buffer list"

	.no_dead_strip	_buffer_read
.subsections_via_symbols
