	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r2w1
_r2w1:                                  ## @r2w1
	.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	_wrkpid@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rump_pub_lwproc_newlwp
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	$511, %edx                      ## imm = 0x1FF
	callq	_rump_sys_open
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_2:
	movl	%ebx, %edi
	callq	_rump_sys_close
	movq	_quittingtime@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	je	LBB0_3
LBB0_9:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str(%rip), %r14
	leaq	L_.str.2(%rip), %rbx
	leaq	L_.str.3(%rip), %r15
	leaq	L_.str.4(%rip), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, (%r13)
	jne	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_rump_sys_rename
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_atf_tc_fail_errno
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_rump_sys_rename
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	callq	_atf_tc_fail_errno
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_wrkpid,4,2                     ## @wrkpid
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/file"

	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.1:                               ## @.str.1
	.asciz	"creat"

	.comm	_quittingtime,4,2               ## @quittingtime
L_.str.2:                               ## @.str.2
	.asciz	"/dir/file"

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

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

	.no_dead_strip	_r2w1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r2w1
_r2w1:                                  ; @r2w1
	.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
Lloh0:
	adrp	x8, _wrkpid@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wrkpid@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_rump_pub_lwproc_newlwp
Lloh3:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #511
	bl	_rump_sys_open
	mov	x19, x0
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_2:
	mov	x0, x19
	bl	_rump_sys_close
Lloh13:
	adrp	x23, _quittingtime@GOTPAGE
Lloh14:
	ldr	x23, [x23, _quittingtime@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_4
LBB0_3:
	mov	x0, #0
	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_4:
Lloh15:
	adrp	x19, l_.str@PAGE
Lloh16:
	add	x19, x19, l_.str@PAGEOFF
Lloh17:
	adrp	x20, l_.str.2@PAGE
Lloh18:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh19:
	adrp	x21, l_.str.3@PAGE
Lloh20:
	add	x21, x21, l_.str.3@PAGEOFF
Lloh21:
	adrp	x22, l_.str.4@PAGE
Lloh22:
	add	x22, x22, l_.str.4@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x23]
	cbnz	w8, LBB0_3
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_rump_sys_rename
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_atf_tc_fail_errno
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_rump_sys_rename
	cmn	w0, #1
	b.ne	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_atf_tc_fail_errno
	b	LBB0_5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_wrkpid,4,2                     ; @wrkpid
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/file"

	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.1:                               ; @.str.1
	.asciz	"creat"

	.comm	_quittingtime,4,2               ; @quittingtime
l_.str.2:                               ; @.str.2
	.asciz	"/dir/file"

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

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

	.no_dead_strip	_r2w1
.subsections_via_symbols
