	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function remote_fileio_func_unlink
_remote_fileio_func_unlink:             ## @remote_fileio_func_unlink
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, -40(%rbp)
	leaq	-40(%rbp), %rdi
	leaq	-28(%rbp), %rsi
	leaq	-20(%rbp), %rdx
	callq	_remote_fileio_extract_ptr_w_len
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movl	-20(%rbp), %edi
	callq	_alloca
	movq	%rax, %rbx
	movl	-28(%rbp), %edi
	movl	-20(%rbp), %edx
	movq	%rax, %rsi
	callq	_remote_read_bytes
	cmpl	-20(%rbp), %eax
	jne	LBB0_1
## %bb.3:
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movl	-24(%rbp), %r14d
	movl	%r14d, %edi
	callq	_S_ISREG
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movl	%r14d, %edi
	callq	_S_ISDIR
	testl	%eax, %eax
	je	LBB0_6
LBB0_7:
	movq	_remote_fio_no_longjmp@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	%rbx, %rdi
	callq	_unlink
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.9:
	movl	%eax, %edi
	callq	_remote_fileio_return_success
	jmp	LBB0_10
LBB0_1:
	xorl	%eax, %eax
	callq	_remote_fileio_ioerror
LBB0_10:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movl	$-1, %edi
	callq	_remote_fileio_return_errno
	jmp	LBB0_10
LBB0_6:
	movq	_FILEIO_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$-1, %edi
	callq	_remote_fileio_reply
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_FILEIO_ENODEV,4,2              ## @FILEIO_ENODEV
	.comm	_remote_fio_no_longjmp,4,2      ## @remote_fio_no_longjmp
	.no_dead_strip	_remote_fileio_func_unlink
.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_unlink
_remote_fileio_func_unlink:             ; @remote_fileio_func_unlink
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	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_7
; %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_7
; %bb.2:
	add	x1, sp, #8
	mov	x0, x19
	bl	_stat
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w20, [sp, #8]
	mov	x0, x20
	bl	_S_ISREG
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_S_ISDIR
	cbz	w0, LBB0_10
LBB0_5:
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
	bl	_unlink
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.6:
	bl	_remote_fileio_return_success
	b	LBB0_8
LBB0_7:
	bl	_remote_fileio_ioerror
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
	bl	_remote_fileio_return_errno
	b	LBB0_8
LBB0_10:
Lloh3:
	adrp	x8, _FILEIO_ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FILEIO_ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #-1
	bl	_remote_fileio_reply
	b	LBB0_8
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FILEIO_ENODEV,4,2              ; @FILEIO_ENODEV
	.comm	_remote_fio_no_longjmp,4,2      ; @remote_fio_no_longjmp
	.no_dead_strip	_remote_fileio_func_unlink
.subsections_via_symbols
