	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function remote_fileio_func_rename
_remote_fileio_func_rename:             ## @remote_fileio_func_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -64(%rbp)
	leaq	-64(%rbp), %rdi
	leaq	-40(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	callq	_remote_fileio_extract_ptr_w_len
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movl	-36(%rbp), %edi
	callq	_alloca
	movq	%rax, %rbx
	movl	-40(%rbp), %edi
	movl	-36(%rbp), %edx
	movq	%rax, %rsi
	callq	_remote_read_bytes
	cmpl	-36(%rbp), %eax
	jne	LBB0_1
## %bb.3:
	leaq	-64(%rbp), %rdi
	leaq	-40(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	callq	_remote_fileio_extract_ptr_w_len
	testq	%rax, %rax
	jne	LBB0_1
## %bb.4:
	movl	-36(%rbp), %edi
	callq	_alloca
	movq	%rax, %r14
	movl	-40(%rbp), %edi
	movl	-36(%rbp), %edx
	movq	%rax, %rsi
	callq	_remote_read_bytes
	cmpl	-36(%rbp), %eax
	jne	LBB0_1
## %bb.5:
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	movl	%eax, %r12d
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_stat
	movl	%eax, %r15d
	testl	%r12d, %r12d
	jne	LBB0_8
## %bb.6:
	movl	-56(%rbp), %r12d
	movl	%r12d, %edi
	callq	_S_ISREG
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movl	%r12d, %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_11
LBB0_8:
	testl	%r15d, %r15d
	jne	LBB0_12
## %bb.9:
	movl	-48(%rbp), %r15d
	movl	%r15d, %edi
	callq	_S_ISREG
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:
	movl	%r15d, %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_11
LBB0_12:
	movq	_remote_fio_no_longjmp@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_rename
	cmpl	$-1, %eax
	je	LBB0_13
## %bb.16:
	movl	%eax, %edi
	callq	_remote_fileio_return_success
	jmp	LBB0_17
LBB0_1:
	xorl	%eax, %eax
	callq	_remote_fileio_ioerror
LBB0_17:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_ENOTEMPTY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_15
## %bb.14:
	movq	_EEXIST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
LBB0_15:
	movl	$-1, %edi
	callq	_remote_fileio_return_errno
	jmp	LBB0_17
LBB0_11:
	movq	_FILEIO_EACCES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$-1, %edi
	callq	_remote_fileio_reply
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_FILEIO_EACCES,4,2              ## @FILEIO_EACCES
	.comm	_remote_fio_no_longjmp,4,2      ## @remote_fio_no_longjmp
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOTEMPTY,8,3                  ## @ENOTEMPTY
	.comm	_EEXIST,8,3                     ## @EEXIST
	.comm	_EACCES,8,3                     ## @EACCES
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_EISDIR,8,3                     ## @EISDIR
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.no_dead_strip	_remote_fileio_func_rename
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function remote_fileio_func_rename
_remote_fileio_func_rename:             ; @remote_fileio_func_rename
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	str	x0, [sp, #24]
	add	x0, sp, #24
	add	x1, sp, #20
	add	x2, sp, #16
	bl	_remote_fileio_extract_ptr_w_len
	cbnz	x0, LBB0_12
; %bb.1:
	ldr	w0, [sp, #16]
	bl	_alloca
	mov	x19, x0
	ldp	w2, w0, [sp, #16]
	mov	x1, x19
	bl	_remote_read_bytes
	ldr	w8, [sp, #16]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.2:
	add	x0, sp, #24
	add	x1, sp, #20
	add	x2, sp, #16
	bl	_remote_fileio_extract_ptr_w_len
	cbnz	x0, LBB0_12
; %bb.3:
	ldr	w0, [sp, #16]
	bl	_alloca
	mov	x20, x0
	ldp	w2, w0, [sp, #16]
	mov	x1, x20
	bl	_remote_read_bytes
	ldr	w8, [sp, #16]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.4:
	add	x1, sp, #8
	mov	x0, x19
	bl	_stat
	mov	x22, x0
	mov	x1, sp
	mov	x0, x20
	bl	_stat
	mov	x21, x0
	cbnz	w22, LBB0_7
; %bb.5:
	ldr	w22, [sp, #8]
	mov	x0, x22
	bl	_S_ISREG
	cbnz	x0, LBB0_7
; %bb.6:
	mov	x0, x22
	bl	_S_ISDIR
	cbz	x0, LBB0_17
LBB0_7:
	cbnz	w21, LBB0_10
; %bb.8:
	ldr	w21, [sp]
	mov	x0, x21
	bl	_S_ISREG
	cbnz	x0, LBB0_10
; %bb.9:
	mov	x0, x21
	bl	_S_ISDIR
	cbz	x0, LBB0_17
LBB0_10:
Lloh0:
	adrp	x8, _remote_fio_no_longjmp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _remote_fio_no_longjmp@GOTPAGEOFF]
	mov	w9, #1
Lloh2:
	str	w9, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_rename
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.11:
	bl	_remote_fileio_return_success
	b	LBB0_13
LBB0_12:
	bl	_remote_fileio_ioerror
LBB0_13:
	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
	add	sp, sp, #80
	ret
LBB0_14:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh5:
	adrp	x10, _ENOTEMPTY@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ENOTEMPTY@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_16
; %bb.15:
Lloh8:
	adrp	x9, _EEXIST@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EEXIST@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	str	x9, [x8]
LBB0_16:
	mov	w0, #-1
	bl	_remote_fileio_return_errno
	b	LBB0_13
LBB0_17:
Lloh11:
	adrp	x8, _FILEIO_EACCES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FILEIO_EACCES@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	w0, #-1
	bl	_remote_fileio_reply
	b	LBB0_13
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FILEIO_EACCES,4,2              ; @FILEIO_EACCES
	.comm	_remote_fio_no_longjmp,4,2      ; @remote_fio_no_longjmp
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOTEMPTY,8,3                  ; @ENOTEMPTY
	.comm	_EEXIST,8,3                     ; @EEXIST
	.comm	_EACCES,8,3                     ; @EACCES
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_EISDIR,8,3                     ; @EISDIR
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.no_dead_strip	_remote_fileio_func_rename
.subsections_via_symbols
