	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_filesys_read                ## -- Begin function vc_filesys_read
	.p2align	4, 0x90
_vc_filesys_read:                       ## @vc_filesys_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	je	LBB0_1
## %bb.2:
	movl	%edx, %ebx
	movq	%rsi, %r15
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_lock_obtain
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	xorl	%r14d, %r14d
	movq	_vc_filesys_client@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_FILESERV_MAX_BULK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	cmpl	%r12d, %ebx
	cmovbl	%ebx, %r12d
	movq	(%r13), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movl	$-1, 4(%rax)
	movq	_VC_FILESYS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	movq	%r15, %rcx
	callq	_vc_vchi_msg_bulk_read
	cmpl	%eax, %r12d
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movslq	%r12d, %rax
	leaq	(%r15,%rax,4), %r15
	addl	%r12d, %r14d
	subl	%r12d, %ebx
	jne	LBB0_4
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_8
LBB0_5:
	addl	%eax, %r14d
	testl	%eax, %eax
	movl	$-1, %eax
	cmovsl	%eax, %r14d
LBB0_7:
	xorl	%eax, %eax
	callq	_lock_release
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FILESERV_MAX_BULK,4,2          ## @FILESERV_MAX_BULK
	.comm	_vc_filesys_client,8,3          ## @vc_filesys_client
	.comm	_VC_FILESYS_READ,4,2            ## @VC_FILESYS_READ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_filesys_read                ; -- Begin function vc_filesys_read
	.p2align	2
_vc_filesys_read:                       ; @vc_filesys_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	w2, LBB0_5
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_lock_obtain
	mov	w19, #0
	cbnz	x0, LBB0_8
; %bb.2:
Lloh0:
	adrp	x25, _FILESERV_MAX_BULK@GOTPAGE
Lloh1:
	ldr	x25, [x25, _FILESERV_MAX_BULK@GOTPAGEOFF]
Lloh2:
	adrp	x23, _vc_filesys_client@GOTPAGE
Lloh3:
	ldr	x23, [x23, _vc_filesys_client@GOTPAGEOFF]
	mov	w26, #-1
Lloh4:
	adrp	x27, _VC_FILESYS_READ@GOTPAGE
Lloh5:
	ldr	x27, [x27, _VC_FILESYS_READ@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25]
	cmp	w20, w8
	csel	w24, w20, w8, lo
	ldr	x8, [x23]
	stp	w22, w26, [x8]
	ldr	w1, [x27]
	mov	x0, x23
	mov	x2, x24
	mov	x3, x21
	bl	_vc_vchi_msg_bulk_read
	cmp	w24, w0
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, w24, sxtw #2
	add	w19, w24, w19
	subs	w20, w20, w24
	b.ne	LBB0_3
	b	LBB0_7
LBB0_5:
	mov	w19, #0
	b	LBB0_8
LBB0_6:
	add	w8, w0, w19
	cmp	w0, #0
	csinv	w19, w8, wzr, ge
LBB0_7:
	bl	_lock_release
LBB0_8:
	mov	x0, 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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_FILESERV_MAX_BULK,4,2          ; @FILESERV_MAX_BULK
	.comm	_vc_filesys_client,8,3          ; @vc_filesys_client
	.comm	_VC_FILESYS_READ,4,2            ; @VC_FILESYS_READ
.subsections_via_symbols
