	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rename_dir
_rename_dir:                            ## @rename_dir
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_FSTYPE_RUMPFS
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_atf_tc_skip
LBB0_2:
	leaq	L_.str.1(%rip), %rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_md
	movq	%rbx, %rdi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_rump_sys_mkdir
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_4:
	leaq	L_.str.3(%rip), %rcx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_md
	movq	%r13, %rdi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_rump_sys_mkdir
	cmpl	$-1, %eax
	movq	%r12, %rbx
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.4(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_6:
	leaq	L_.str.5(%rip), %rcx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_md
	movl	$511, %r12d                     ## imm = 0x1FF
	movq	%r13, %rdi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_rump_sys_mkdir
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.6(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_8:
	leaq	L_.str.7(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_md
	movq	_S_IFREG@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	$-1, %edx
	callq	_rump_sys_mknod
	cmpl	$-1, %eax
	movq	%r15, %r13
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.8(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_10:
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_rump_sys_stat
	cmpl	$-1, %eax
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%rbx, %r15
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.9(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_12:
	leaq	L_.str.10(%rip), %rcx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_rump_sys_rename
	cmpl	$-1, %eax
	jne	LBB0_14
## %bb.13:
	leaq	L_.str.11(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_14:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_checkfile
	leaq	L_.str.12(%rip), %rcx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_rump_sys_rename
	cmpl	$-1, %eax
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_16
## %bb.15:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
LBB0_16:
	leaq	L_.str.13(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_17:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_rump_sys_rename
	cmpl	$-1, %eax
	jne	LBB0_19
## %bb.18:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EISDIR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_20
LBB0_19:
	leaq	L_.str.14(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_20:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_checkfile
	leaq	L_.str.15(%rip), %rcx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	leaq	L_.str.3(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_rump_sys_rename
	cmpl	$-1, %eax
	jne	LBB0_22
## %bb.21:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_23
LBB0_22:
	leaq	L_.str.16(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_23:
	leaq	L_.str.17(%rip), %rcx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_rump_sys_rename
	cmpl	$-1, %eax
	jne	LBB0_25
## %bb.24:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_26
LBB0_25:
	leaq	L_.str.18(%rip), %rdi
	callq	_atf_tc_fail
LBB0_26:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_checkfile
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_rump_sys_rename
	cmpl	$-1, %eax
	jne	LBB0_28
## %bb.27:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOTEMPTY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_29
LBB0_28:
	leaq	L_.str.19(%rip), %rdi
	callq	_atf_tc_fail
LBB0_29:
	leaq	L_.str.10(%rip), %rcx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	leaq	L_.str.20(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_rump_sys_rename
	cmpl	$-1, %eax
	jne	LBB0_31
## %bb.30:
	leaq	L_.str.21(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_31:
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_checkfile
	leaq	L_.str.22(%rip), %rcx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_rump_sys_rename
	cmpl	$-1, %eax
	jne	LBB0_33
## %bb.32:
	leaq	L_.str.23(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_33:
	leaq	L_.str.24(%rip), %rcx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	_checkfile
	leaq	L_.str.5(%rip), %rcx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_rump_sys_rename
	cmpl	$-1, %eax
	jne	LBB0_35
## %bb.34:
	leaq	L_.str.25(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_35:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_checkfile
	leaq	L_.str.26(%rip), %rcx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	leaq	L_.str.27(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	leaq	L_.str.28(%rip), %rcx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_md
	movq	%r12, %rdi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_rump_sys_mkdir
	movl	%eax, %edi
	callq	_RL
	movq	%rbx, %rdi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_rump_sys_mkdir
	movl	%eax, %edi
	callq	_RL
	movq	%r15, %rdi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_rump_sys_mkdir
	movl	%eax, %edi
	callq	_RL
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_rump_sys_rename
	movl	%eax, %edi
	callq	_RL
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	callq	_rump_sys_stat
	movl	%eax, %edi
	callq	_RL
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_FSTYPE_MSDOS
	testl	%eax, %eax
	jne	LBB0_37
## %bb.36:
	movl	-64(%rbp), %edi
	movl	$3, %esi
	callq	_ATF_CHECK_EQ
LBB0_37:
	movq	%r15, %rdi
	callq	_rump_sys_rmdir
	movl	%eax, %edi
	callq	_RL
	movq	%r12, %rdi
	callq	_rump_sys_rmdir
	movl	%eax, %edi
	callq	_RL
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_39
## %bb.38:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_39:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rename not supported by file system"

	.comm	_USES_DIRS,4,2                  ## @USES_DIRS
L_.str.1:                               ## @.str.1
	.asciz	"dir1"

L_.str.2:                               ## @.str.2
	.asciz	"mkdir 1"

L_.str.3:                               ## @.str.3
	.asciz	"dir2"

L_.str.4:                               ## @.str.4
	.asciz	"mkdir 2"

L_.str.5:                               ## @.str.5
	.asciz	"dir2/subdir"

L_.str.6:                               ## @.str.6
	.asciz	"mkdir 3"

L_.str.7:                               ## @.str.7
	.asciz	"dir1/file"

	.comm	_S_IFREG,4,2                    ## @S_IFREG
L_.str.8:                               ## @.str.8
	.asciz	"create file"

L_.str.9:                               ## @.str.9
	.asciz	"stat of file"

L_.str.10:                              ## @.str.10
	.asciz	"dir3"

L_.str.11:                              ## @.str.11
	.asciz	"rename 1"

L_.str.12:                              ## @.str.12
	.asciz	"dir3/."

	.comm	_errno,8,3                      ## @errno
	.comm	_EINVAL,8,3                     ## @EINVAL
L_.str.13:                              ## @.str.13
	.asciz	"rename 2"

	.comm	_EISDIR,8,3                     ## @EISDIR
L_.str.14:                              ## @.str.14
	.asciz	"rename 3"

L_.str.15:                              ## @.str.15
	.asciz	"dir2/dir"

L_.str.16:                              ## @.str.16
	.asciz	"rename 4"

L_.str.17:                              ## @.str.17
	.asciz	"dir2/subdir/dir2"

L_.str.18:                              ## @.str.18
	.asciz	"rename 5"

	.comm	_ENOTEMPTY,8,3                  ## @ENOTEMPTY
L_.str.19:                              ## @.str.19
	.asciz	"rename 6"

L_.str.20:                              ## @.str.20
	.asciz	"dir2/somedir"

L_.str.21:                              ## @.str.21
	.asciz	"rename 7"

L_.str.22:                              ## @.str.22
	.asciz	"dir2/somedir/../../dir3"

L_.str.23:                              ## @.str.23
	.asciz	"rename 8"

L_.str.24:                              ## @.str.24
	.asciz	"dir2/../dir3"

L_.str.25:                              ## @.str.25
	.asciz	"rename 9"

L_.str.26:                              ## @.str.26
	.asciz	"parent"

L_.str.27:                              ## @.str.27
	.asciz	"parent/dir1"

L_.str.28:                              ## @.str.28
	.asciz	"parent/dir2"

	.no_dead_strip	_rename_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rename_dir
_rename_dir:                            ; @rename_dir
	.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
	sub	sp, sp, #32
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	mov	x9, x24
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x24, #15
	and	x12, x9, #0x1fffffff0
	sub	x19, x8, x12
	mov	sp, x19
	mov	x9, x24
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x22, x8, x12
	mov	sp, x22
	mov	x9, x24
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x21, x8, x12
	mov	sp, x21
	bl	_FSTYPE_RUMPFS
	cbz	x0, LBB0_2
; %bb.1:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_atf_tc_skip
LBB0_2:
Lloh14:
	adrp	x3, l_.str.1@PAGE
Lloh15:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_md
	mov	x0, x19
	mov	w1, #511
	bl	_rump_sys_mkdir
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_4:
Lloh18:
	adrp	x3, l_.str.3@PAGE
Lloh19:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	bl	_md
	mov	x0, x22
	mov	w1, #511
	bl	_rump_sys_mkdir
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_6:
Lloh22:
	adrp	x3, l_.str.5@PAGE
Lloh23:
	add	x3, x3, l_.str.5@PAGEOFF
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	bl	_md
	mov	x0, x22
	mov	w1, #511
	bl	_rump_sys_mkdir
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.7:
Lloh24:
	adrp	x0, l_.str.6@PAGE
Lloh25:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_8:
Lloh26:
	adrp	x3, l_.str.7@PAGE
Lloh27:
	add	x3, x3, l_.str.7@PAGEOFF
	mov	x0, x21
	mov	x1, x24
	mov	x2, x23
	bl	_md
Lloh28:
	adrp	x8, _S_IFREG@GOTPAGE
Lloh29:
	ldr	x8, [x8, _S_IFREG@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	orr	w1, w8, #0x1ff
	mov	x0, x21
	mov	w2, #-1
	bl	_rump_sys_mknod
	cmn	w0, #1
	b.ne	LBB0_10
; %bb.9:
Lloh31:
	adrp	x0, l_.str.8@PAGE
Lloh32:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_10:
	sub	x1, x29, #64
	mov	x0, x21
	bl	_rump_sys_stat
	cmn	w0, #1
	b.ne	LBB0_12
; %bb.11:
Lloh33:
	adrp	x0, l_.str.9@PAGE
Lloh34:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_12:
Lloh35:
	adrp	x3, l_.str.10@PAGE
Lloh36:
	add	x3, x3, l_.str.10@PAGEOFF
	mov	x0, x21
	mov	x1, x24
	mov	x2, x23
	bl	_md
	mov	x0, x19
	mov	x1, x21
	bl	_rump_sys_rename
	cmn	w0, #1
	b.ne	LBB0_14
; %bb.13:
Lloh37:
	adrp	x0, l_.str.11@PAGE
Lloh38:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_14:
	sub	x1, x29, #64
	mov	x0, x21
	bl	_checkfile
Lloh39:
	adrp	x3, l_.str.12@PAGE
Lloh40:
	add	x3, x3, l_.str.12@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_md
	mov	x0, x19
	mov	x1, x21
	bl	_rump_sys_rename
	cmn	w0, #1
	b.ne	LBB0_16
; %bb.15:
Lloh41:
	adrp	x8, _errno@GOTPAGE
Lloh42:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh43:
	ldr	x8, [x8]
Lloh44:
	adrp	x9, _EINVAL@GOTPAGE
Lloh45:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_17
LBB0_16:
Lloh47:
	adrp	x0, l_.str.13@PAGE
Lloh48:
	add	x0, x0, l_.str.13@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_17:
	mov	x0, x21
	mov	x1, x19
	bl	_rump_sys_rename
	cmn	w0, #1
	b.ne	LBB0_19
; %bb.18:
Lloh49:
	adrp	x8, _errno@GOTPAGE
Lloh50:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh51:
	ldr	x8, [x8]
Lloh52:
	adrp	x9, _EISDIR@GOTPAGE
Lloh53:
	ldr	x9, [x9, _EISDIR@GOTPAGEOFF]
Lloh54:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_20
LBB0_19:
Lloh55:
	adrp	x0, l_.str.14@PAGE
Lloh56:
	add	x0, x0, l_.str.14@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_20:
	sub	x1, x29, #64
	mov	x0, x21
	bl	_checkfile
Lloh57:
	adrp	x3, l_.str.15@PAGE
Lloh58:
	add	x3, x3, l_.str.15@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_md
Lloh59:
	adrp	x3, l_.str.3@PAGE
Lloh60:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	bl	_md
	mov	x0, x22
	mov	x1, x19
	bl	_rump_sys_rename
	cmn	w0, #1
	b.ne	LBB0_22
; %bb.21:
Lloh61:
	adrp	x8, _errno@GOTPAGE
Lloh62:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh63:
	ldr	x8, [x8]
Lloh64:
	adrp	x9, _EINVAL@GOTPAGE
Lloh65:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh66:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_23
LBB0_22:
Lloh67:
	adrp	x0, l_.str.16@PAGE
Lloh68:
	add	x0, x0, l_.str.16@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_23:
Lloh69:
	adrp	x3, l_.str.17@PAGE
Lloh70:
	add	x3, x3, l_.str.17@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_md
	mov	x0, x22
	mov	x1, x19
	bl	_rump_sys_rename
	cmn	w0, #1
	b.ne	LBB0_25
; %bb.24:
Lloh71:
	adrp	x8, _errno@GOTPAGE
Lloh72:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh73:
	ldr	x8, [x8]
Lloh74:
	adrp	x9, _EINVAL@GOTPAGE
Lloh75:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh76:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_26
LBB0_25:
Lloh77:
	adrp	x0, l_.str.18@PAGE
Lloh78:
	add	x0, x0, l_.str.18@PAGEOFF
	bl	_atf_tc_fail
LBB0_26:
	sub	x1, x29, #64
	mov	x0, x21
	bl	_checkfile
	mov	x0, x22
	mov	x1, x21
	bl	_rump_sys_rename
	cmn	w0, #1
	b.ne	LBB0_28
; %bb.27:
Lloh79:
	adrp	x8, _errno@GOTPAGE
Lloh80:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh81:
	ldr	x8, [x8]
Lloh82:
	adrp	x9, _ENOTEMPTY@GOTPAGE
Lloh83:
	ldr	x9, [x9, _ENOTEMPTY@GOTPAGEOFF]
Lloh84:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_29
LBB0_28:
Lloh85:
	adrp	x0, l_.str.19@PAGE
Lloh86:
	add	x0, x0, l_.str.19@PAGEOFF
	bl	_atf_tc_fail
LBB0_29:
Lloh87:
	adrp	x3, l_.str.10@PAGE
Lloh88:
	add	x3, x3, l_.str.10@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_md
Lloh89:
	adrp	x3, l_.str.20@PAGE
Lloh90:
	add	x3, x3, l_.str.20@PAGEOFF
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	bl	_md
	mov	x0, x19
	mov	x1, x22
	bl	_rump_sys_rename
	cmn	w0, #1
	b.ne	LBB0_31
; %bb.30:
Lloh91:
	adrp	x0, l_.str.21@PAGE
Lloh92:
	add	x0, x0, l_.str.21@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_31:
	sub	x1, x29, #64
	mov	x0, x22
	bl	_checkfile
Lloh93:
	adrp	x3, l_.str.22@PAGE
Lloh94:
	add	x3, x3, l_.str.22@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_md
	mov	x0, x22
	mov	x1, x19
	bl	_rump_sys_rename
	cmn	w0, #1
	b.ne	LBB0_33
; %bb.32:
Lloh95:
	adrp	x0, l_.str.23@PAGE
Lloh96:
	add	x0, x0, l_.str.23@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_33:
Lloh97:
	adrp	x3, l_.str.24@PAGE
Lloh98:
	add	x3, x3, l_.str.24@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_md
	sub	x1, x29, #64
	mov	x0, x19
	bl	_checkfile
Lloh99:
	adrp	x3, l_.str.5@PAGE
Lloh100:
	add	x3, x3, l_.str.5@PAGEOFF
	mov	x0, x21
	mov	x1, x24
	mov	x2, x23
	bl	_md
	mov	x0, x19
	mov	x1, x21
	bl	_rump_sys_rename
	cmn	w0, #1
	b.ne	LBB0_35
; %bb.34:
Lloh101:
	adrp	x0, l_.str.25@PAGE
Lloh102:
	add	x0, x0, l_.str.25@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_35:
	sub	x1, x29, #64
	mov	x0, x21
	bl	_checkfile
Lloh103:
	adrp	x3, l_.str.26@PAGE
Lloh104:
	add	x3, x3, l_.str.26@PAGEOFF
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_md
Lloh105:
	adrp	x3, l_.str.27@PAGE
Lloh106:
	add	x3, x3, l_.str.27@PAGEOFF
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	bl	_md
Lloh107:
	adrp	x3, l_.str.28@PAGE
Lloh108:
	add	x3, x3, l_.str.28@PAGEOFF
	mov	x0, x21
	mov	x1, x24
	mov	x2, x23
	bl	_md
	mov	x0, x19
	mov	w1, #511
	bl	_rump_sys_mkdir
	bl	_RL
	mov	x0, x22
	mov	w1, #511
	bl	_rump_sys_mkdir
	bl	_RL
	mov	x0, x21
	mov	w1, #511
	bl	_rump_sys_mkdir
	bl	_RL
	mov	x0, x22
	mov	x1, x21
	bl	_rump_sys_rename
	bl	_RL
	sub	x1, x29, #72
	mov	x0, x19
	bl	_rump_sys_stat
	bl	_RL
	mov	x0, x20
	bl	_FSTYPE_MSDOS
	cbnz	w0, LBB0_37
; %bb.36:
	ldur	w0, [x29, #-72]
	mov	w1, #3
	bl	_ATF_CHECK_EQ
LBB0_37:
	mov	x0, x21
	bl	_rump_sys_rmdir
	bl	_RL
	mov	x0, x19
	bl	_rump_sys_rmdir
	bl	_RL
	ldur	x8, [x29, #-56]
Lloh109:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh110:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh111:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_39
; %bb.38:
	sub	sp, x29, #48
	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_39:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpAdd	Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpAdd	Lloh85, Lloh86
	.loh AdrpAdd	Lloh89, Lloh90
	.loh AdrpAdd	Lloh87, Lloh88
	.loh AdrpAdd	Lloh91, Lloh92
	.loh AdrpAdd	Lloh93, Lloh94
	.loh AdrpAdd	Lloh95, Lloh96
	.loh AdrpAdd	Lloh99, Lloh100
	.loh AdrpAdd	Lloh97, Lloh98
	.loh AdrpAdd	Lloh101, Lloh102
	.loh AdrpAdd	Lloh107, Lloh108
	.loh AdrpAdd	Lloh105, Lloh106
	.loh AdrpAdd	Lloh103, Lloh104
	.loh AdrpLdrGotLdr	Lloh109, Lloh110, Lloh111
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rename not supported by file system"

	.comm	_USES_DIRS,4,2                  ; @USES_DIRS
l_.str.1:                               ; @.str.1
	.asciz	"dir1"

l_.str.2:                               ; @.str.2
	.asciz	"mkdir 1"

l_.str.3:                               ; @.str.3
	.asciz	"dir2"

l_.str.4:                               ; @.str.4
	.asciz	"mkdir 2"

l_.str.5:                               ; @.str.5
	.asciz	"dir2/subdir"

l_.str.6:                               ; @.str.6
	.asciz	"mkdir 3"

l_.str.7:                               ; @.str.7
	.asciz	"dir1/file"

	.comm	_S_IFREG,4,2                    ; @S_IFREG
l_.str.8:                               ; @.str.8
	.asciz	"create file"

l_.str.9:                               ; @.str.9
	.asciz	"stat of file"

l_.str.10:                              ; @.str.10
	.asciz	"dir3"

l_.str.11:                              ; @.str.11
	.asciz	"rename 1"

l_.str.12:                              ; @.str.12
	.asciz	"dir3/."

	.comm	_errno,8,3                      ; @errno
	.comm	_EINVAL,8,3                     ; @EINVAL
l_.str.13:                              ; @.str.13
	.asciz	"rename 2"

	.comm	_EISDIR,8,3                     ; @EISDIR
l_.str.14:                              ; @.str.14
	.asciz	"rename 3"

l_.str.15:                              ; @.str.15
	.asciz	"dir2/dir"

l_.str.16:                              ; @.str.16
	.asciz	"rename 4"

l_.str.17:                              ; @.str.17
	.asciz	"dir2/subdir/dir2"

l_.str.18:                              ; @.str.18
	.asciz	"rename 5"

	.comm	_ENOTEMPTY,8,3                  ; @ENOTEMPTY
l_.str.19:                              ; @.str.19
	.asciz	"rename 6"

l_.str.20:                              ; @.str.20
	.asciz	"dir2/somedir"

l_.str.21:                              ; @.str.21
	.asciz	"rename 7"

l_.str.22:                              ; @.str.22
	.asciz	"dir2/somedir/../../dir3"

l_.str.23:                              ; @.str.23
	.asciz	"rename 8"

l_.str.24:                              ; @.str.24
	.asciz	"dir2/../dir3"

l_.str.25:                              ; @.str.25
	.asciz	"rename 9"

l_.str.26:                              ; @.str.26
	.asciz	"parent"

l_.str.27:                              ; @.str.27
	.asciz	"parent/dir1"

l_.str.28:                              ; @.str.28
	.asciz	"parent/dir2"

	.no_dead_strip	_rename_dir
.subsections_via_symbols
