	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_updates
_copy_updates:                          ## @copy_updates
	.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	%rcx, -72(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movl	$0, (%r8)
	movq	_verbosity@GOTPCREL(%rip), %r14
	cmpl	$3, (%r14)
	jl	LBB0_2
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_filesys_dump_tree
LBB0_2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%rbx), %r13d
	xorl	%r15d, %r15d
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.3:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leal	-1(%rbx), %esi
	callq	_tree_upperbound
	movq	%rax, %r12
	cmpl	$3, (%r14)
	jl	LBB0_5
## %bb.4:
	movq	_stderr@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	callq	_fprintf
	movq	8(%r12), %rdi
	movl	(%r12), %edx
	movl	(%r14), %ecx
	movl	$1, %esi
	callq	_fwrite
	jmp	LBB0_6
LBB0_5:
	testq	%r12, %r12
	je	LBB0_8
LBB0_6:
	movq	%r12, %r15
	movl	4(%r12), %r12d
	movl	(%r15), %r14d
	addl	%r12d, %r14d
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_vkprintf
	movl	%r14d, %eax
	subl	%ebx, %eax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%edi, %edi
	cmpl	%ebx, %r12d
	movq	%r15, %r12
	movl	$0, %r15d
	setb	%dil
	callq	_assert
	subl	%ebx, %r14d
	jbe	LBB0_8
## %bb.7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	%eax, %r14d
	cmovael	%eax, %r14d
	movl	%ebx, %ecx
	subl	4(%r12), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_vkprintf
	movl	%ebx, %esi
	subl	4(%r12), %esi
	shlq	$2, %rsi
	addq	8(%r12), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_memcpy
	movl	%r14d, %r15d
LBB0_8:
	cmpl	%ebx, %r13d
	jbe	LBB0_13
## %bb.9:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
                                        ## kill: def $ebx killed $ebx killed $rbx
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_tree_lowerbound
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %r14
	movl	4(%rax), %ebx
	cmpl	%r13d, %ebx
	jae	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%ebx, %r12d
	subl	-88(%rbp), %r12d                ## 4-byte Folded Reload
	movl	(%r14), %eax
	addl	%r12d, %eax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r13d
	subl	%r12d, %r13d
	movl	(%r14), %eax
	cmpl	%eax, %r13d
	cmovael	%eax, %r13d
	movl	$3, %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_vkprintf
	addl	%r13d, %r15d
	addq	-72(%rbp), %r12                 ## 8-byte Folded Reload
	movq	8(%r14), %rsi
	movq	%r12, %rdi
	movl	%r13d, %edx
	movl	-60(%rbp), %r13d                ## 4-byte Reload
	callq	_memcpy
	addl	(%r14), %ebx
	cmpl	%r13d, %ebx
	jb	LBB0_10
LBB0_13:
	xorl	%edi, %edi
	cmpl	-48(%rbp), %r15d                ## 4-byte Folded Reload
	setbe	%dil
	callq	_assert
	leaq	L_.str.4(%rip), %rsi
	movl	$3, %edi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_vkprintf
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_verbosity,4,2                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"copy_updates: T = %p\n"

L_.str.1:                               ## @.str.1
	.asciz	"copy_updates: tr = %d, to = %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"copy_updates: moved_bytes = %d, start pos %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"copy_updates: moved_bytes = %d, dest pos %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"copy_updates: returns %d\n"

	.no_dead_strip	_copy_updates
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_updates
_copy_updates:                          ; @copy_updates
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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 w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	str	x3, [sp, #8]                    ; 8-byte Folded Spill
	mov	x19, x2
	mov	x22, x1
	mov	x23, x0
	str	wzr, [x4]
Lloh0:
	adrp	x21, _verbosity@GOTPAGE
Lloh1:
	ldr	x21, [x21, _verbosity@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #3
	b.lt	LBB0_2
; %bb.1:
	ldr	w0, [x23]
	bl	_filesys_dump_tree
LBB0_2:
	add	w28, w19, w22
	cbz	w22, LBB0_8
; %bb.3:
	ldr	w0, [x23]
	sub	w1, w22, #1
	bl	_tree_upperbound
	mov	x25, x0
	ldr	w8, [x21]
	cmp	w8, #3
	b.lt	LBB0_5
; %bb.4:
Lloh2:
	adrp	x21, _stderr@GOTPAGE
Lloh3:
	ldr	x21, [x21, _stderr@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	bl	_fprintf
	ldr	x0, [x25, #8]
	ldr	w2, [x25]
	ldr	w3, [x21]
	mov	w1, #1
	bl	_fwrite
	b	LBB0_6
LBB0_5:
	cbz	x25, LBB0_8
LBB0_6:
	ldp	w8, w24, [x25]
	add	w21, w8, w24
	str	x21, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #3
	mov	x2, x24
	bl	_vkprintf
	subs	w8, w21, w22
	str	w8, [x20]
	cmp	w24, w22
	cset	w0, lo
	bl	_assert
	subs	w8, w21, w22
	b.ls	LBB0_8
; %bb.7:
	cmp	w8, w19
	csel	w24, w8, w19, lo
	ldr	w8, [x25, #4]
	sub	w8, w22, w8
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	mov	x2, x24
	bl	_vkprintf
	ldr	x8, [x25, #8]
	ldr	w9, [x25, #4]
	sub	w9, w22, w9
	add	x1, x8, w9, uxtw #2
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x2, x24
	bl	_memcpy
	cmp	w28, w22
	b.hi	LBB0_9
	b	LBB0_13
LBB0_8:
	mov	w24, #0
	cmp	w28, w22
	b.ls	LBB0_13
LBB0_9:
	mov	x1, x22
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_tree_lowerbound
	cbz	x0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x26, x0
	ldr	w21, [x0, #4]
	cmp	w21, w28
	b.hs	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x26]
	sub	w25, w21, w22
	add	w8, w25, w8
	str	w8, [x20]
	ldr	w8, [x26]
	sub	w9, w19, w25
	cmp	w9, w8
	csel	w27, w9, w8, lo
	mov	x8, x25
	str	x8, [sp]
	mov	w0, #3
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x27
	bl	_vkprintf
	add	w24, w27, w24
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x0, x8, x25
	ldr	x1, [x26, #8]
	mov	x2, x27
	bl	_memcpy
	ldr	w8, [x26]
	add	w1, w8, w21
	cmp	w1, w28
	b.lo	LBB0_10
LBB0_13:
	cmp	w24, w19
	cset	w0, ls
	bl	_assert
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #3
	mov	x2, x24
	bl	_vkprintf
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_verbosity,4,2                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"copy_updates: T = %p\n"

l_.str.1:                               ; @.str.1
	.asciz	"copy_updates: tr = %d, to = %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"copy_updates: moved_bytes = %d, start pos %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"copy_updates: moved_bytes = %d, dest pos %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"copy_updates: returns %d\n"

	.no_dead_strip	_copy_updates
.subsections_via_symbols
