	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_filesys_rename              ## -- Begin function vc_filesys_rename
	.p2align	4, 0x90
_vc_filesys_rename:                     ## @vc_filesys_rename
	.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
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_strlen
	movq	_FS_MAX_PATH@GOTPCREL(%rip), %r12
	movl	$-1, %ebx
	cmpl	(%r12), %eax
	jge	LBB0_4
## %bb.1:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	cmpl	(%r12), %eax
	jge	LBB0_4
## %bb.2:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_lock_obtain
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_vc_filesys_client@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movl	(%r12), %edx
	movq	%r13, %rsi
	callq	_strncpy
	movq	(%rbx), %rax
	movslq	%r15d, %rcx
	leaq	(%rax,%rcx,4), %rdi
	addq	$4, %rdi
	movl	(%r12), %edx
	movq	%r14, %rsi
	callq	_strncpy
	movq	_VC_FILESYS_RENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	(%r15,%rax), %edx
	addl	$18, %edx
	movq	%rbx, %rdi
	callq	_vchi_msg_stub
	movq	_FILESERV_RESP_OK@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	setne	%bl
	negl	%ebx
	xorl	%eax, %eax
	callq	_lock_release
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FS_MAX_PATH,4,2                ## @FS_MAX_PATH
	.comm	_vc_filesys_client,8,3          ## @vc_filesys_client
	.comm	_VC_FILESYS_RENAME,4,2          ## @VC_FILESYS_RENAME
	.comm	_FILESERV_RESP_OK,8,3           ## @FILESERV_RESP_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_filesys_rename              ; -- Begin function vc_filesys_rename
	.p2align	2
_vc_filesys_rename:                     ; @vc_filesys_rename
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
	mov	x22, x0
	bl	_strlen
Lloh0:
	adrp	x24, _FS_MAX_PATH@GOTPAGE
Lloh1:
	ldr	x24, [x24, _FS_MAX_PATH@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	b.ge	LBB0_3
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_strlen
	ldr	w8, [x24]
	cmp	w0, w8
	b.ge	LBB0_3
; %bb.2:
	mov	x21, x0
	bl	_lock_obtain
	cbz	x0, LBB0_5
LBB0_3:
	mov	w19, #-1
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh2:
	adrp	x23, _vc_filesys_client@GOTPAGE
Lloh3:
	ldr	x23, [x23, _vc_filesys_client@GOTPAGEOFF]
	ldr	x0, [x23]
	ldr	w2, [x24]
	mov	x1, x22
	bl	_strncpy
	ldr	x8, [x23]
	add	w9, w20, #1
	add	x0, x8, w9, sxtw #2
	ldr	w2, [x24]
	mov	x1, x19
	bl	_strncpy
Lloh4:
	adrp	x8, _VC_FILESYS_RENAME@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VC_FILESYS_RENAME@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	add	w8, w20, w21
	add	w2, w8, #18
	mov	x0, x23
	bl	_vchi_msg_stub
Lloh7:
	adrp	x8, _FILESERV_RESP_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FILESERV_RESP_OK@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	csetm	w19, ne
	bl	_lock_release
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_FS_MAX_PATH,4,2                ; @FS_MAX_PATH
	.comm	_vc_filesys_client,8,3          ; @vc_filesys_client
	.comm	_VC_FILESYS_RENAME,4,2          ; @VC_FILESYS_RENAME
	.comm	_FILESERV_RESP_OK,8,3           ; @FILESERV_RESP_OK
.subsections_via_symbols
