	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_data
_read_data:                             ## @read_data
	.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
	movl	%ecx, %r12d
	movq	%rdx, %r15
	movq	(%rdi), %r13
	leaq	8(%r13), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	callq	_campoll
	movq	%r14, %rdi
	callq	_mutex_unlock
	cmpq	$0, 16(%r13)
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	$15, %esi
	callq	_read_reg
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movl	$16, %esi
	callq	_read_reg
	movl	-48(%rbp), %ebx
	shll	$8, %ebx
	orl	-44(%rbp), %ebx
	cmpl	%r12d, %ebx
	jg	LBB0_4
## %bb.3:
	cmpl	$1, %ebx
	jle	LBB0_4
## %bb.5:
	movq	%r13, %rdi
	movl	$18, %esi
	movq	%r15, %rdx
	movl	%ebx, %ecx
	callq	_read_block
	movq	$0, 16(%r13)
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_4:
	movq	(%r13), %rdx
	movq	%r13, %rdi
	movl	$18, %esi
	movl	%ebx, %ecx
	callq	_read_block
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_read_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_data
_read_data:                             ; @read_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x3
	mov	x21, x2
	ldr	x20, [x0]
	add	x19, x20, #8
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	bl	_campoll
	mov	x0, x19
	bl	_mutex_unlock
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_mutex_lock
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #15
	bl	_read_reg
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #16
	bl	_read_reg
	ldp	w9, w8, [sp, #8]
	orr	w23, w9, w8, lsl #8
	cmp	w23, w22
	ccmp	w23, #1, #4, le
	b.gt	LBB0_4
; %bb.2:
	ldr	x2, [x20]
	mov	x0, x20
	mov	w1, #18
	mov	x3, x23
	bl	_read_block
	mov	x0, x19
	bl	_mutex_unlock
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_5
LBB0_3:
	mov	w23, #0
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	mov	w1, #18
	mov	x2, x21
	mov	x3, x23
	bl	_read_block
	str	xzr, [x20, #16]
	mov	x0, x19
	bl	_mutex_unlock
LBB0_5:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_read_data
.subsections_via_symbols
