	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scan
_scan:                                  ## @scan
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_faults@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_status@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	jne	LBB0_8
## %bb.1:
	movq	%r12, %rdi
	callq	_compute_tmp_dir_name
	testq	%rax, %rax
	js	LBB0_20
## %bb.2:
	movq	_tmp_dir@GOTPCREL(%rip), %r13
	movsd	(%r13), %xmm0                   ## xmm0 = mem[0],zero
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_vkprintf
	movq	_use_clone@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.3:
	xorl	%eax, %eax
	callq	_mytime
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movsd	(%r13), %xmm0                   ## xmm0 = mem[0],zero
	movq	%r12, %rdi
	callq	_clone_file
	testl	%eax, %eax
	js	LBB0_21
## %bb.4:
	xorl	%eax, %eax
	callq	_mytime
	subsd	-48(%rbp), %xmm0                ## 8-byte Folded Reload
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_vkprintf
	movq	_copy_file_cloning_mode@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movsd	(%r13), %xmm0                   ## xmm0 = mem[0],zero
	movq	%r12, %rdi
	callq	_pending_operations_init
	xorl	%edi, %edi
	callq	_pending_operations_reset
	movsd	(%r13), %xmm0                   ## xmm0 = mem[0],zero
	movl	$504, %edi                      ## imm = 0x1F8
	callq	_mkdir
	testq	%rax, %rax
	js	LBB0_22
## %bb.6:
	movq	_copy_file_po_mode@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movq	_copy_file@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	callq	_do_transaction_begin
LBB0_8:
	movq	%r12, %rdi
	callq	_strlen
	movq	_old_dir_length@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_PATH_MAX@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	decl	%ecx
	xorl	%edi, %edi
	cmpl	%ecx, %eax
	setl	%dil
	callq	_assert
	movq	_old_dir@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_strcpy
	movq	%rbx, %rdi
	callq	_strlen
	movq	_new_dir_length@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	movl	(%r13), %ecx
	decl	%ecx
	xorl	%edi, %edi
	cmpl	%ecx, %eax
	setl	%dil
	callq	_assert
	movq	_new_dir@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_strcpy
	movq	_old_dir_length@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	movq	_faults@GOTPCREL(%rip), %r14
	leaq	-52(%rbp), %rdx
	callq	_rec_scan
	cmpq	$0, (%r15)
	je	LBB0_9
LBB0_17:
	movl	$-1, %ebx
	cmpq	$0, (%r14)
	jne	LBB0_19
## %bb.18:
	cmpq	$0, (%r15)
	sete	%al
	movq	_events@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	setle	%cl
	andb	%al, %cl
	movzbl	%cl, %ebx
	negl	%ebx
	jmp	LBB0_19
LBB0_9:
	xorl	%eax, %eax
	callq	_do_transaction_end
	movl	$-1, %ebx
	cmpq	$0, (%r14)
	je	LBB0_10
LBB0_19:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_use_clone@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.11:
	movq	%r12, %rdi
	callq	_delete_file
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.5(%rip), %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_kprintf
	jmp	LBB0_19
LBB0_15:
	xorl	%eax, %eax
	callq	_pending_operations_apply
	movq	_tmp_dir@GOTPCREL(%rip), %rbx
	movsd	(%rbx), %xmm0                   ## xmm0 = mem[0],zero
	callq	_rmdir
	testq	%rax, %rax
	jns	LBB0_17
## %bb.16:
	movsd	(%rbx), %xmm0                   ## xmm0 = mem[0],zero
	leaq	L_.str.7(%rip), %rdi
	movb	$1, %al
	callq	_kprintf
	jmp	LBB0_17
LBB0_13:
	movq	_tmp_dir@GOTPCREL(%rip), %rbx
	movsd	(%rbx), %xmm0                   ## xmm0 = mem[0],zero
	movq	%r12, %rdi
	callq	_rename
	testl	%eax, %eax
	je	LBB0_17
## %bb.14:
	movsd	(%rbx), %xmm0                   ## xmm0 = mem[0],zero
	leaq	L_.str.6(%rip), %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	movb	$1, %al
	callq	_kprintf
	movl	$-2, %ebx
	jmp	LBB0_19
LBB0_20:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
	movl	$1, %edi
	callq	_exit
LBB0_21:
	movsd	(%r13), %xmm0                   ## xmm0 = mem[0],zero
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	movb	$1, %al
	callq	_kprintf
	movl	$1, %edi
	callq	_exit
LBB0_22:
	movsd	(%r13), %xmm0                   ## xmm0 = mem[0],zero
	leaq	L_.str.4(%rip), %rdi
	movb	$1, %al
	callq	_kprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_faults,8,3                     ## @faults
	.comm	_status,8,3                     ## @status
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"compute_tmp_dir_name fail.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Temporary directory name: %s\n"

	.comm	_tmp_dir,8,3                    ## @tmp_dir
	.comm	_use_clone,8,3                  ## @use_clone
L_.str.2:                               ## @.str.2
	.asciz	"clone_file (%s, %s) returns error code %d.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Cloning master copy time = %.6lf seconds.\n"

	.comm	_copy_file_cloning_mode,4,2     ## @copy_file_cloning_mode
	.comm	_copy_file,4,2                  ## @copy_file
L_.str.4:                               ## @.str.4
	.asciz	"mkdir (%s, 0770) failed. %m\n"

	.comm	_copy_file_po_mode,4,2          ## @copy_file_po_mode
	.comm	_old_dir_length,4,2             ## @old_dir_length
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.comm	_old_dir,4,2                    ## @old_dir
	.comm	_new_dir_length,4,2             ## @new_dir_length
	.comm	_new_dir,4,2                    ## @new_dir
L_.str.5:                               ## @.str.5
	.asciz	"delete_file (%s) returns error code %d.\n"

L_.str.6:                               ## @.str.6
	.asciz	"rename (%s, %s) returns error code %d.\n"

L_.str.7:                               ## @.str.7
	.asciz	"rmdir (%s) failed. %m\n"

	.comm	_events,8,3                     ## @events
	.no_dead_strip	_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scan
_scan:                                  ; @scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset b8, -88
	.cfi_offset b9, -96
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _faults@GOTPAGE
Lloh1:
	ldr	x21, [x21, _faults@GOTPAGEOFF]
	str	xzr, [x21]
Lloh2:
	adrp	x22, _status@GOTPAGE
Lloh3:
	ldr	x22, [x22, _status@GOTPAGEOFF]
	ldr	x8, [x22]
	cbnz	x8, LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_compute_tmp_dir_name
	tbnz	x0, #63, LBB0_21
; %bb.2:
Lloh4:
	adrp	x23, _tmp_dir@GOTPAGE
Lloh5:
	ldr	x23, [x23, _tmp_dir@GOTPAGEOFF]
	ldr	d0, [x23]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_vkprintf
Lloh8:
	adrp	x8, _use_clone@GOTPAGE
Lloh9:
	ldr	x8, [x8, _use_clone@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
	bl	_mytime
	fmov	d8, d0
	ldr	d0, [x23]
	mov	x0, x19
	bl	_clone_file
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_22
; %bb.4:
	bl	_mytime
	fsub	d0, d0, d8
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_vkprintf
Lloh13:
	adrp	x8, _copy_file_cloning_mode@GOTPAGE
Lloh14:
	ldr	x8, [x8, _copy_file_cloning_mode@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	ldr	d0, [x23]
	mov	x0, x19
	bl	_pending_operations_init
	mov	w0, #0
	bl	_pending_operations_reset
	ldr	d0, [x23]
	mov	w0, #504
	bl	_mkdir
	tbnz	x0, #63, LBB0_23
; %bb.6:
Lloh15:
	adrp	x8, _copy_file_po_mode@GOTPAGE
Lloh16:
	ldr	x8, [x8, _copy_file_po_mode@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _copy_file@GOTPAGE
Lloh18:
	ldr	x9, [x9, _copy_file@GOTPAGEOFF]
Lloh19:
	str	w8, [x9]
	bl	_do_transaction_begin
LBB0_8:
	mov	x0, x19
	bl	_strlen
Lloh20:
	adrp	x23, _old_dir_length@GOTPAGE
Lloh21:
	ldr	x23, [x23, _old_dir_length@GOTPAGEOFF]
	str	w0, [x23]
Lloh22:
	adrp	x24, _PATH_MAX@GOTPAGE
Lloh23:
	ldr	x24, [x24, _PATH_MAX@GOTPAGEOFF]
	ldr	w8, [x24]
	sub	w8, w8, #1
	cmp	w0, w8
	cset	w0, lt
	bl	_assert
Lloh24:
	adrp	x8, _old_dir@GOTPAGE
Lloh25:
	ldr	x8, [x8, _old_dir@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_strcpy
	mov	x0, x20
	bl	_strlen
Lloh27:
	adrp	x25, _new_dir_length@GOTPAGE
Lloh28:
	ldr	x25, [x25, _new_dir_length@GOTPAGEOFF]
	str	w0, [x25]
	ldr	w8, [x24]
	sub	w8, w8, #1
	cmp	w0, w8
	cset	w0, lt
	bl	_assert
Lloh29:
	adrp	x8, _new_dir@GOTPAGE
Lloh30:
	ldr	x8, [x8, _new_dir@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_strcpy
	ldr	w0, [x23]
	ldr	w1, [x25]
	add	x2, sp, #28
	bl	_rec_scan
	ldr	x8, [x22]
	cbz	x8, LBB0_11
LBB0_9:
	ldr	x8, [x21]
	cbnz	x8, LBB0_12
; %bb.10:
	ldr	x8, [x22]
	cmp	x8, #0
Lloh32:
	adrp	x8, _events@GOTPAGE
Lloh33:
	ldr	x8, [x8, _events@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	ccmp	x8, #1, #0, eq
	cset	w8, lt
	sbfx	w0, w8, #0, #1
	b	LBB0_13
LBB0_11:
	bl	_do_transaction_end
	ldr	x8, [x21]
	cbz	x8, LBB0_14
LBB0_12:
	mov	w0, #-1
LBB0_13:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_14:
Lloh35:
	adrp	x8, _use_clone@GOTPAGE
Lloh36:
	ldr	x8, [x8, _use_clone@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	cbz	x8, LBB0_17
; %bb.15:
	mov	x0, x19
	bl	_delete_file
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_19
; %bb.16:
	stp	x19, x0, [sp]
Lloh38:
	adrp	x0, l_.str.5@PAGE
Lloh39:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_kprintf
	b	LBB0_12
LBB0_17:
	bl	_pending_operations_apply
Lloh40:
	adrp	x19, _tmp_dir@GOTPAGE
Lloh41:
	ldr	x19, [x19, _tmp_dir@GOTPAGEOFF]
	ldr	d0, [x19]
	bl	_rmdir
	tbz	x0, #63, LBB0_9
; %bb.18:
	ldr	d0, [x19]
	str	d0, [sp]
Lloh42:
	adrp	x0, l_.str.7@PAGE
Lloh43:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_kprintf
	b	LBB0_9
LBB0_19:
Lloh44:
	adrp	x20, _tmp_dir@GOTPAGE
Lloh45:
	ldr	x20, [x20, _tmp_dir@GOTPAGEOFF]
	ldr	d0, [x20]
	mov	x0, x19
	bl	_rename
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_9
; %bb.20:
	ldr	d0, [x20]
	stp	x19, x0, [sp, #8]
	str	d0, [sp]
Lloh46:
	adrp	x0, l_.str.6@PAGE
Lloh47:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_kprintf
	mov	w0, #-2
	b	LBB0_13
LBB0_21:
Lloh48:
	adrp	x0, l_.str@PAGE
Lloh49:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_24
LBB0_22:
	ldr	d0, [x23]
	str	x0, [sp, #16]
	str	d0, [sp, #8]
	str	x19, [sp]
Lloh50:
	adrp	x0, l_.str.2@PAGE
Lloh51:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_24
LBB0_23:
	ldr	d0, [x23]
	str	d0, [sp]
Lloh52:
	adrp	x0, l_.str.4@PAGE
Lloh53:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_24:
	bl	_kprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_faults,8,3                     ; @faults
	.comm	_status,8,3                     ; @status
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"compute_tmp_dir_name fail.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Temporary directory name: %s\n"

	.comm	_tmp_dir,8,3                    ; @tmp_dir
	.comm	_use_clone,8,3                  ; @use_clone
l_.str.2:                               ; @.str.2
	.asciz	"clone_file (%s, %s) returns error code %d.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Cloning master copy time = %.6lf seconds.\n"

	.comm	_copy_file_cloning_mode,4,2     ; @copy_file_cloning_mode
	.comm	_copy_file,4,2                  ; @copy_file
l_.str.4:                               ; @.str.4
	.asciz	"mkdir (%s, 0770) failed. %m\n"

	.comm	_copy_file_po_mode,4,2          ; @copy_file_po_mode
	.comm	_old_dir_length,4,2             ; @old_dir_length
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.comm	_old_dir,4,2                    ; @old_dir
	.comm	_new_dir_length,4,2             ; @new_dir_length
	.comm	_new_dir,4,2                    ; @new_dir
l_.str.5:                               ; @.str.5
	.asciz	"delete_file (%s) returns error code %d.\n"

l_.str.6:                               ; @.str.6
	.asciz	"rename (%s, %s) returns error code %d.\n"

l_.str.7:                               ; @.str.7
	.asciz	"rmdir (%s) failed. %m\n"

	.comm	_events,8,3                     ; @events
	.no_dead_strip	_scan
.subsections_via_symbols
