	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function filesys_rename
_filesys_rename:                        ## @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, %r15
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_vkprintf
	movq	_lf_find@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_filesys_lookup_file
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r13
	cmpq	$0, (%rax)
	js	LBB0_1
## %bb.4:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_filesys_lookup_file
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	%rax, %rcx
	movq	(%r13), %r12
	xorl	%eax, %eax
	cmpq	%r12, (%rcx)
	je	LBB0_11
## %bb.6:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_get_inode_f
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rbx
	movq	_lf_unlink@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_filesys_lookup_file
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_filesys_directory_node_free
	jmp	LBB0_9
LBB0_12:
	movq	(%r13), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_get_inode_f
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_7
LBB0_9:
	movq	_lf_creat@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_filesys_lookup_file
	testq	%rax, %rax
	je	LBB0_1
## %bb.10:
	incl	(%rbx)
	movq	%r12, (%rax)
	movl	16(%r13), %ecx
	movl	%ecx, 16(%rax)
	movl	12(%r13), %ecx
	movl	%ecx, 12(%rax)
	movl	8(%r13), %ecx
	movl	%ecx, 8(%rax)
	movq	_lf_unlink@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_filesys_lookup_file
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	%rbx, %rdi
	callq	_filesys_directory_node_free
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"filesys_rename (%s, %s)\n"

	.comm	_lf_find,4,2                    ## @lf_find
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_lf_unlink,4,2                  ## @lf_unlink
	.comm	_lf_creat,4,2                   ## @lf_creat
	.no_dead_strip	_filesys_rename
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function filesys_rename
_filesys_rename:                        ; @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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	mov	x2, x19
	mov	x3, x20
	bl	_vkprintf
Lloh2:
	adrp	x22, _lf_find@GOTPAGE
Lloh3:
	ldr	x22, [x22, _lf_find@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_filesys_lookup_file
	cbz	x0, LBB0_11
; %bb.1:
	mov	x21, x0
	ldr	x8, [x0]
	tbnz	x8, #63, LBB0_11
; %bb.2:
	ldr	w1, [x22]
	mov	x0, x20
	bl	_filesys_lookup_file
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x8, [x0]
	ldr	x22, [x21]
	cmp	x8, x22
	b.eq	LBB0_10
; %bb.4:
	mov	x0, x22
	mov	w1, #0
	bl	_get_inode_f
	cbz	x0, LBB0_14
; %bb.5:
	mov	x23, x0
Lloh4:
	adrp	x8, _lf_unlink@GOTPAGE
Lloh5:
	ldr	x8, [x8, _lf_unlink@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_filesys_lookup_file
	mov	x24, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x24
	bl	_filesys_directory_node_free
	b	LBB0_8
LBB0_6:
	ldr	x22, [x21]
	mov	x0, x22
	mov	w1, #0
	bl	_get_inode_f
	cbz	x0, LBB0_14
; %bb.7:
	mov	x23, x0
LBB0_8:
Lloh7:
	adrp	x8, _lf_creat@GOTPAGE
Lloh8:
	ldr	x8, [x8, _lf_creat@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_filesys_lookup_file
	cbz	x0, LBB0_11
; %bb.9:
	ldr	w8, [x23]
	add	w8, w8, #1
	str	w8, [x23]
	str	x22, [x0]
	ldr	w8, [x21, #16]
	str	w8, [x0, #16]
	ldr	d0, [x21, #8]
	str	d0, [x0, #8]
Lloh10:
	adrp	x8, _lf_unlink@GOTPAGE
Lloh11:
	ldr	x8, [x8, _lf_unlink@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_filesys_lookup_file
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x19
	bl	_filesys_directory_node_free
LBB0_10:
	mov	w0, #0
	b	LBB0_13
LBB0_11:
Lloh13:
	adrp	x8, _ENOENT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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_14:
Lloh15:
	adrp	x8, _EFAULT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"filesys_rename (%s, %s)\n"

	.comm	_lf_find,4,2                    ; @lf_find
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_lf_unlink,4,2                  ; @lf_unlink
	.comm	_lf_creat,4,2                   ; @lf_creat
	.no_dead_strip	_filesys_rename
.subsections_via_symbols
