	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r8
	movq	%rdi, %r13
	movq	16(%rdi), %r15
	movq	(%r15), %rax
	movq	_ISO_DEFAULT_BLOCK_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movq	%rax, %rcx
	orq	%rdi, %rcx
	shrq	$32, %rcx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rdi
	movq	%rdx, %r12
	movq	%rax, %rbx
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%edi
	movl	%edx, %r12d
	movl	%eax, %ebx
LBB0_3:
	addq	8(%r15), %rbx
	cmpq	16(%r15), %rbx
	jne	LBB0_4
LBB0_10:
	subq	%r12, %rdi
	addq	24(%r15), %r12
	movq	%r12, (%rsi)
	movq	%rdi, (%r8)
	movq	32(%r15), %rax
	subq	(%r15), %rax
	cmpq	%rax, %rdi
	cmovbq	%rdi, %rax
	movq	%rax, (%r8)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_4:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	cmpq	$0, 24(%r15)
	jne	LBB0_6
## %bb.5:
	callq	_malloc
	movq	%rax, 24(%r15)
LBB0_6:
	movl	$16, %edi
	callq	_twiddle
	movq	8(%r13), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%r13), %r13d
	movq	_F_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_cdb2devb
	movq	_ISO_DEFAULT_BLOCK_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	24(%r15), %r8
	leaq	-72(%rbp), %r9
	movl	%r13d, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	*-64(%rbp)                      ## 8-byte Folded Reload
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movq	-72(%rbp), %rdi
	movq	_ISO_DEFAULT_BLOCK_SIZE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_8
## %bb.9:
	movq	%rbx, 16(%r15)
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_8:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISO_DEFAULT_BLOCK_SIZE,8,3     ## @ISO_DEFAULT_BLOCK_SIZE
	.comm	_F_READ,4,2                     ## @F_READ
	.comm	_EIO,4,2                        ## @EIO
	.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
	ldr	x25, [x0, #16]
Lloh0:
	adrp	x28, _ISO_DEFAULT_BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _ISO_DEFAULT_BLOCK_SIZE@GOTPAGEOFF]
	ldr	x21, [x28]
	ldp	x26, x8, [x25]
	udiv	x27, x26, x21
	ldr	x9, [x25, #16]
	add	x22, x8, x27
	cmp	x22, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x8, x21
LBB0_2:
	mov	w0, #0
	msub	x9, x27, x21, x26
	sub	x8, x8, x9
	str	x8, [x19]
	ldp	x10, x11, [x25, #24]
	add	x9, x10, x9
	str	x9, [x1]
	ldr	x9, [x25]
	sub	x9, x11, x9
	cmp	x8, x9
	csel	x8, x8, x9, lo
	str	x8, [x19]
	b	LBB0_9
LBB0_3:
	mov	x23, x0
	str	x1, [sp]                        ; 8-byte Folded Spill
	ldr	x8, [x25, #24]
	cbnz	x8, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_malloc
	str	x0, [x25, #24]
LBB0_5:
	mov	w0, #16
	bl	_twiddle
	ldr	x8, [x23, #8]
	ldr	x20, [x8]
	ldr	w23, [x23]
Lloh2:
	adrp	x8, _F_READ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _F_READ@GOTPAGEOFF]
Lloh4:
	ldr	w24, [x8]
	mov	x0, x22
	bl	_cdb2devb
	mov	x2, x0
	ldr	x3, [x28]
	ldr	x4, [x25, #24]
	add	x5, sp, #8
	mov	x0, x23
	mov	x1, x24
	blr	x20
	cbnz	w0, LBB0_9
; %bb.6:
	ldp	x1, x8, [sp]                    ; 8-byte Folded Reload
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	str	x22, [x25, #16]
	b	LBB0_2
LBB0_8:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
LBB0_9:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ISO_DEFAULT_BLOCK_SIZE,8,3     ; @ISO_DEFAULT_BLOCK_SIZE
	.comm	_F_READ,4,2                     ; @F_READ
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_buf_read_file
.subsections_via_symbols
