	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vcs_lseek
_vcs_lseek:                             ## @vcs_lseek
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_con_buf_mtx@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_vcs_size
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.1:
	cmpl	$1, %ebx
	je	LBB0_5
## %bb.2:
	cmpl	$2, %ebx
	jne	LBB0_3
## %bb.4:
	addl	%eax, %r15d
LBB0_6:
	testl	%r15d, %r15d
	jns	LBB0_7
	jmp	LBB0_3
LBB0_5:
	addl	(%r14), %r15d
	testl	%r15d, %r15d
	js	LBB0_3
LBB0_7:
	cmpl	%eax, %r15d
	jg	LBB0_3
## %bb.8:
	movl	%r15d, (%r14)
	movq	_con_buf_mtx@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	(%r14), %eax
	jmp	LBB0_9
LBB0_3:
	movq	_con_buf_mtx@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_con_buf_mtx,4,2                ## @con_buf_mtx
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_vcs_lseek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vcs_lseek
_vcs_lseek:                             ; @vcs_lseek
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _con_buf_mtx@GOTPAGE
Lloh1:
	ldr	x0, [x0, _con_buf_mtx@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_vcs_size
	cbz	w21, LBB0_4
; %bb.1:
	cmp	w21, #1
	b.eq	LBB0_5
; %bb.2:
	cmp	w21, #2
	b.ne	LBB0_8
; %bb.3:
	add	w20, w0, w20
LBB0_4:
	tbz	w20, #31, LBB0_6
	b	LBB0_8
LBB0_5:
	ldr	w8, [x19]
	add	w20, w8, w20
	tbnz	w20, #31, LBB0_8
LBB0_6:
	cmp	w20, w0
	b.gt	LBB0_8
; %bb.7:
	str	w20, [x19]
Lloh2:
	adrp	x0, _con_buf_mtx@GOTPAGE
Lloh3:
	ldr	x0, [x0, _con_buf_mtx@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w0, [x19]
	b	LBB0_9
LBB0_8:
Lloh4:
	adrp	x0, _con_buf_mtx@GOTPAGE
Lloh5:
	ldr	x0, [x0, _con_buf_mtx@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_con_buf_mtx,4,2                ; @con_buf_mtx
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vcs_lseek
.subsections_via_symbols
