	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btree_gc_coalesce
_btree_gc_coalesce:                     ## @btree_gc_coalesce
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, -160(%rbp)                ## 8-byte Spill
	movq	%rsi, -152(%rbp)                ## 8-byte Spill
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_GC_MERGE_NODES@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	leaq	(,%rbx,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	leaq	-56(%rbp), %rdi
	callq	_bch_keylist_init
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_btree_check_reserve
	testq	%rax, %rax
	jne	LBB0_47
## %bb.1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	shll	$3, %ebx
	xorl	%r15d, %r15d
	movq	%r14, -128(%rbp)                ## 8-byte Spill
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	leaq	-72(%rbp), %rdi
	callq	_closure_init_stack
	cmpl	$0, (%r12)
	movl	$0, %r13d
	movl	$0, %r14d
	je	LBB0_5
## %bb.2:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %rbx
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	-8(%rbx), %r13d
	incq	%r14
	movl	(%r12), %eax
	addq	$16, %rbx
	cmpq	%rax, %r14
	jb	LBB0_3
LBB0_5:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_btree_default_blocks
	cmpl	$2, %r14d
	jb	LBB0_47
## %bb.6:
	addl	%eax, %eax
	cltq
	imulq	$1431655766, %rax, %r12         ## imm = 0x55555556
	movq	%r12, %rax
	shrq	$63, %rax
	shrq	$32, %r12
	addl	%eax, %r12d
	movq	(%rbx), %rdi
	movq	32(%rbx), %rax
	movq	(%rax), %rbx
	callq	_block_bytes
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	___set_blocks
	leal	-1(%r14), %edx
	movq	%r12, -144(%rbp)                ## 8-byte Spill
	movl	%r12d, %ecx
	imull	%edx, %ecx
	cmpl	%ecx, %eax
	movq	-128(%rbp), %r13                ## 8-byte Reload
	ja	LBB0_47
## %bb.7:
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	movl	%r14d, %r15d
	shlq	$3, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax,%rbx,2), %rdi
	xorl	%esi, %esi
	callq	_btree_node_alloc_replacement
	movq	%rax, (%r13,%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_9 Depth=1
	addq	$8, %rbx
	cmpq	%rbx, %r15
	jne	LBB0_9
## %bb.20:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_btree_check_reserve
	testq	%rax, %rax
	je	LBB0_21
LBB0_10:
	leaq	-72(%rbp), %rdi
	callq	_closure_sync
	leaq	-56(%rbp), %rdi
	callq	_bch_keylist_pop
	testq	%rax, %rax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_15
## %bb.11:
	movq	_ZERO_KEY@GOTPCREL(%rip), %r15
	leaq	-56(%rbp), %rbx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	%rbx, %rdi
	callq	_bch_keylist_pop
	testq	%rax, %rax
	je	LBB0_15
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_bkey_cmp
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r12), %rdi
	callq	_atomic_dec
	jmp	LBB0_14
LBB0_15:
	leaq	-56(%rbp), %rdi
	callq	_bch_keylist_free
	cmpl	$2, %r14d
	movl	$1, %eax
	cmovbl	%eax, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_19
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rbx,8), %rdi
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	(%r13,%rbx,8), %rdi
	callq	_btree_node_free
	movq	(%r13,%rbx,8), %rsi
	movl	$1, %edi
	callq	_rw_unlock
	jmp	LBB0_18
LBB0_19:
	xorl	%r15d, %r15d
LBB0_47:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_49
## %bb.48:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	cmpl	$2, %r14d
	movl	$1, %r15d
	cmovael	%r14d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rbx,8), %rdi
	addq	$24, %rdi
	callq	_mutex_lock
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_22
## %bb.23:
	movq	%r15, -136(%rbp)                ## 8-byte Spill
	cmpl	$0, -76(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_39
## %bb.24:
	movl	-76(%rbp), %ebx                 ## 4-byte Reload
LBB0_25:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_31 Depth 2
	movq	(%r13,%rbx,8), %rdi
	callq	_btree_bset_first
	movq	%rax, %r12
	movq	-8(%r13,%rbx,8), %rdi
	callq	_btree_bset_first
	cmpq	$1, %rbx
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	jne	LBB0_26
## %bb.32:                              ##   in Loop: Header=BB0_25 Depth=1
	movl	(%rax), %r15d
	addl	(%r12), %r15d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_block_bytes
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	___set_blocks
	movl	%eax, %r15d
	movq	(%r13,%rbx,8), %rdi
	callq	_btree_blocks
	cmpl	%eax, %r15d
	ja	LBB0_10
## %bb.33:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %r13d
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	addq	$8, %rax
	jmp	LBB0_34
LBB0_26:                                ##   in Loop: Header=BB0_25 Depth=1
	movq	%rax, %rdi
	movq	8(%rax), %r12
	callq	_bset_bkey_last
	cmpq	%rax, %r12
	jae	LBB0_27
## %bb.28:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movl	(%r15), %ebx
	movq	%r12, %rdi
	callq	_bkey_u64s
	addl	%eax, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_block_bytes
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	___set_blocks
	cmpl	-144(%rbp), %eax                ## 4-byte Folded Reload
	jbe	LBB0_29
LBB0_27:                                ##   in Loop: Header=BB0_25 Depth=1
	xorl	%r13d, %r13d
	xorl	%eax, %eax
LBB0_34:                                ##   in Loop: Header=BB0_25 Depth=1
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
LBB0_35:                                ##   in Loop: Header=BB0_25 Depth=1
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movl	(%r12), %ebx
	addl	%r13d, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_block_bytes
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	___set_blocks
	movl	%eax, %ebx
	movq	-128(%rbp), %r15                ## 8-byte Reload
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	(%r15,%rax,8), %rdi
	callq	_btree_blocks
	xorl	%edi, %edi
	cmpl	%eax, %ebx
	seta	%dil
	callq	_BUG_ON
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_37
## %bb.36:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	(%r15,%rax,8), %rdi
	addq	$8, %rdi
	callq	_bkey_copy_key
LBB0_37:                                ##   in Loop: Header=BB0_25 Depth=1
	movq	%r12, %rdi
	callq	_bset_bkey_last
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, %rbx
	movq	-120(%rbp), %r12                ## 8-byte Reload
	movq	8(%r12), %r15
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_bset_bkey_idx
	subl	8(%r12), %eax
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_memcpy
	movl	(%rbx), %eax
	addl	%r13d, %eax
	movl	%eax, (%rbx)
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	shlq	$4, %rcx
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rdx,%rcx)
	movq	8(%r12), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_bset_bkey_idx
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_bset_bkey_last
	movq	%rax, %r15
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_bset_bkey_idx
	subl	%eax, %r15d
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%rbx, %rsi
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memmove
	subl	%r13d, (%r12)
	movq	-128(%rbp), %r13                ## 8-byte Reload
	movq	(%r13,%rbx,8), %rdi
	addq	$8, %rdi
	callq	_bkey_u64s
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	___bch_keylist_realloc
	testq	%rax, %rax
	jne	LBB0_10
## %bb.38:                              ##   in Loop: Header=BB0_25 Depth=1
	leaq	-1(%rbx), %r12
	movq	(%r13,%rbx,8), %rdi
	leaq	-72(%rbp), %rsi
	callq	_bch_btree_node_write
	movq	(%r13,%rbx,8), %rsi
	addq	$8, %rsi
	movq	%r15, %rdi
	callq	_bch_keylist_add
	movq	%r12, %rbx
	testq	%r12, %r12
	jne	LBB0_25
	jmp	LBB0_39
LBB0_29:                                ##   in Loop: Header=BB0_25 Depth=1
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_31:                                ##   Parent Loop BB0_25 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movl	%r13d, %ebx
	movq	%r12, %rdi
	callq	_bkey_u64s
	movl	%eax, %r13d
	addl	%ebx, %r13d
	movq	%r12, %rdi
	callq	_bkey_next
	movq	%rax, %r12
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	callq	_bset_bkey_last
	cmpq	%rax, %r12
	jae	LBB0_35
## %bb.30:                              ##   in Loop: Header=BB0_31 Depth=2
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movl	(%r15), %ebx
	addl	%r13d, %ebx
	movq	%r12, %rdi
	callq	_bkey_u64s
	addl	%eax, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_block_bytes
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	___set_blocks
	cmpl	-144(%rbp), %eax                ## 4-byte Folded Reload
	jbe	LBB0_31
	jmp	LBB0_35
LBB0_39:
	xorl	%ebx, %ebx
	movq	-136(%rbp), %r12                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_40:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rbx,8), %rdi
	addq	$24, %rdi
	callq	_mutex_unlock
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_40
## %bb.41:
	leaq	-72(%rbp), %rdi
	callq	_closure_sync
	movq	(%r13), %rdi
	callq	_btree_bset_first
	movl	(%rax), %edi
	callq	_BUG_ON
	movq	(%r13), %rdi
	callq	_btree_node_free
	movq	(%r13), %rsi
	movl	$1, %edi
	callq	_rw_unlock
	movq	$0, (%r13)
	shlq	$4, %r12
	xorl	%ebx, %ebx
	movq	-96(%rbp), %r15                 ## 8-byte Reload
LBB0_42:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15,%rbx), %rdi
	addq	$8, %rdi
	callq	_bkey_u64s
	leaq	-56(%rbp), %rdi
	movl	%eax, %esi
	callq	___bch_keylist_realloc
	testq	%rax, %rax
	jne	LBB0_10
## %bb.43:                              ##   in Loop: Header=BB0_42 Depth=1
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	8(%r15,%rbx), %rdi
	movl	-56(%rbp), %esi
	callq	_make_btree_freeing_key
	leaq	-56(%rbp), %rdi
	callq	_bch_keylist_push
	addq	$16, %rbx
	cmpq	%rbx, %r12
	jne	LBB0_42
## %bb.44:
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %r12
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-152(%rbp), %rsi                ## 8-byte Reload
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_bch_btree_insert_node
	movq	%r12, %rdi
	callq	_bch_keylist_empty
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_BUG_ON
	movq	-136(%rbp), %r12                ## 8-byte Reload
	shlq	$3, %r12
LBB0_45:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15,%rbx,2), %rdi
	callq	_btree_node_free
	movq	8(%r15,%rbx,2), %rsi
	movl	$1, %edi
	callq	_rw_unlock
	movq	(%r13,%rbx), %rax
	movq	%rax, 8(%r15,%rbx,2)
	addq	$8, %rbx
	cmpq	%rbx, %r12
	jne	LBB0_45
## %bb.46:
	leaq	16(%r15), %rsi
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, %ebx
	shll	$4, %edx
	movq	%r15, %rdi
	callq	_memmove
	movq	_EINTR@GOTPCREL(%rip), %r12
	movq	%r15, %r13
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	subl	(%r12), %edi
	callq	_ERR_PTR
	shlq	$4, %rbx
	movq	%rax, 8(%r13,%rbx)
	movl	%r14d, %edi
	callq	_trace_bcache_btree_gc_coalesce
	movq	-160(%rbp), %rax                ## 8-byte Reload
	decl	(%rax)
	leaq	-56(%rbp), %rdi
	callq	_bch_keylist_free
	subl	(%r12), %r15d
	jmp	LBB0_47
LBB0_49:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GC_MERGE_NODES,4,2             ## @GC_MERGE_NODES
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_ZERO_KEY,4,2                   ## @ZERO_KEY
	.no_dead_strip	_btree_gc_coalesce
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btree_gc_coalesce
_btree_gc_coalesce:                     ; @btree_gc_coalesce
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #96
	mov	x28, x3
	mov	x26, x2
	mov	x25, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x22, _GC_MERGE_NODES@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GC_MERGE_NODES@GOTPAGEOFF]
	ldr	w20, [x22]
	lsl	x8, x20, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x19, x9, x8
	mov	sp, x19
	sub	x0, x29, #96
	bl	_bch_keylist_init
	mov	x0, x23
	mov	x1, #0
	bl	_btree_check_reserve
	cbnz	x0, LBB0_8
; %bb.1:
	lsl	w2, w20, #3
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	sub	x0, x29, #104
	bl	_closure_init_stack
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x21, #0
	mov	w20, #0
	add	x24, x28, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
	bl	_IS_ERR_OR_NULL
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldur	w8, [x24, #-8]
	add	w20, w8, w20
	ldr	w8, [x22]
	add	x24, x24, #16
	cmp	x21, x8
	b.lo	LBB0_3
	b	LBB0_6
LBB0_5:
	mov	w20, #0
	mov	w21, #0
LBB0_6:
	ldr	x0, [x23]
	bl	_btree_default_blocks
	cmp	w21, #2
	b.lo	LBB0_8
; %bb.7:
	stur	x25, [x29, #-128]               ; 8-byte Folded Spill
	lsl	w8, w0, #1
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w22, w8, w9
	ldr	x8, [x23, #32]
	ldr	x25, [x8]
	ldr	x0, [x23]
	bl	_block_bytes
	mov	x2, x0
	mov	x0, x25
	mov	x1, x20
	bl	___set_blocks
	sub	w9, w21, #1
	stur	w22, [x29, #-108]               ; 4-byte Folded Spill
	mul	w8, w22, w9
	cmp	w0, w8
	b.ls	LBB0_11
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldur	x8, [x29, #-88]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_49
; %bb.10:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	stp	x26, x9, [x29, #-152]           ; 16-byte Folded Spill
	mov	x20, #0
	mov	w8, w21
	lsl	x22, x8, #3
	mov	w24, #8
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x28, x24]
	mov	x1, #0
	bl	_btree_node_alloc_replacement
	str	x0, [x19, x20]
	bl	_IS_ERR_OR_NULL
	cbnz	x0, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x20, x20, #8
	add	x24, x24, #16
	cmp	x22, x20
	b.ne	LBB0_12
; %bb.14:
	mov	x0, x23
	mov	x1, #0
	bl	_btree_check_reserve
	cbz	x0, LBB0_24
LBB0_15:
	sub	x0, x29, #104
	bl	_closure_sync
	sub	x0, x29, #96
	bl	_bch_keylist_pop
	cbz	x0, LBB0_20
; %bb.16:
Lloh10:
	adrp	x20, _ZERO_KEY@GOTPAGE
Lloh11:
	ldr	x20, [x20, _ZERO_KEY@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	sub	x0, x29, #96
	bl	_bch_keylist_pop
	cbz	x0, LBB0_20
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	x1, x20
	bl	_bkey_cmp
	cbnz	w0, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x0, [x23]
	bl	_atomic_dec
	b	LBB0_17
LBB0_20:
	sub	x0, x29, #96
	bl	_bch_keylist_free
	cmp	w21, #1
	csinc	w20, w21, wzr, hi
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	x19, x19, #8
	subs	x20, x20, #1
	b.eq	LBB0_8
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	bl	_IS_ERR_OR_NULL
	cbnz	x0, LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	x0, [x19]
	bl	_btree_node_free
	ldr	x1, [x19]
	mov	w0, #1
	bl	_rw_unlock
	b	LBB0_21
LBB0_24:
	mov	x20, #0
	cmp	w21, #1
	csinc	w8, w21, wzr, hi
	stur	x8, [x29, #-160]                ; 8-byte Folded Spill
	lsl	x22, x8, #3
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, x20]
	add	x0, x8, #24
	bl	_mutex_lock
	add	x20, x20, #8
	cmp	x22, x20
	b.ne	LBB0_25
; %bb.26:
	stur	x22, [x29, #-168]               ; 8-byte Folded Spill
	ldur	x8, [x29, #-144]                ; 8-byte Folded Reload
	cbz	w8, LBB0_41
; %bb.27:
	ldur	x22, [x29, #-144]               ; 8-byte Folded Reload
	stur	x28, [x29, #-136]               ; 8-byte Folded Spill
LBB0_28:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_39 Depth 2
	ldr	x0, [x19, x22, lsl #3]
	bl	_btree_bset_first
	mov	x26, x0
	subs	x8, x22, #1
	ldr	x0, [x19, x8, lsl #3]
	bl	_btree_bset_first
	mov	x25, x0
	subs	x8, x22, #1
	stur	x8, [x29, #-120]                ; 8-byte Folded Spill
	b.ne	LBB0_31
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x25]
	add	w20, w9, w8
	ldr	x0, [x23]
	bl	_block_bytes
	mov	x2, x0
	mov	x0, x26
	mov	x1, x20
	bl	___set_blocks
	mov	x20, x0
	ldr	x0, [x19, x22, lsl #3]
	bl	_btree_blocks
	cmp	w20, w0
	b.hi	LBB0_15
; %bb.30:                               ;   in Loop: Header=BB0_28 Depth=1
	ldr	w27, [x25]
	ldr	x8, [x28, #8]
	add	x20, x8, #8
	b	LBB0_34
LBB0_31:                                ;   in Loop: Header=BB0_28 Depth=1
	ldr	x28, [x25, #8]
	mov	x0, x25
	bl	_bset_bkey_last
	cmp	x28, x0
	b.hs	LBB0_33
; %bb.32:                               ;   in Loop: Header=BB0_28 Depth=1
	ldr	w20, [x26]
	mov	x0, x28
	bl	_bkey_u64s
	add	w20, w20, w0
	ldr	x0, [x23]
	bl	_block_bytes
	mov	x2, x0
	mov	x0, x26
	mov	x1, x20
	bl	___set_blocks
	ldur	w8, [x29, #-108]                ; 4-byte Folded Reload
	cmp	w0, w8
	b.ls	LBB0_38
LBB0_33:                                ;   in Loop: Header=BB0_28 Depth=1
	mov	w27, #0
	mov	x20, #0
LBB0_34:                                ;   in Loop: Header=BB0_28 Depth=1
	ldr	w8, [x26]
	add	w24, w8, w27
	ldr	x0, [x23]
	bl	_block_bytes
	mov	x2, x0
	mov	x0, x26
	mov	x1, x24
	bl	___set_blocks
	mov	x24, x0
	ldr	x0, [x19, x22, lsl #3]
	bl	_btree_blocks
	cmp	w24, w0
	cset	w0, hi
	bl	_BUG_ON
	cbz	x20, LBB0_36
; %bb.35:                               ;   in Loop: Header=BB0_28 Depth=1
	ldr	x8, [x19, x22, lsl #3]
	add	x0, x8, #8
	mov	x1, x20
	bl	_bkey_copy_key
LBB0_36:                                ;   in Loop: Header=BB0_28 Depth=1
	mov	x0, x26
	bl	_bset_bkey_last
	mov	x20, x0
	ldr	x24, [x25, #8]
	mov	x0, x25
	mov	x1, x27
	bl	_bset_bkey_idx
	ldr	w8, [x25, #8]
	sub	w2, w0, w8
	mov	x0, x20
	mov	x1, x24
	bl	_memcpy
	ldr	w8, [x26]
	add	w8, w8, w27
	str	w8, [x26]
	lsl	x9, x22, #4
	ldur	x28, [x29, #-136]               ; 8-byte Folded Reload
	str	w8, [x28, x9]
	ldr	x20, [x25, #8]
	mov	x0, x25
	mov	x1, x27
	bl	_bset_bkey_idx
	mov	x24, x0
	mov	x0, x25
	bl	_bset_bkey_last
	mov	x26, x0
	mov	x0, x25
	mov	x1, x27
	bl	_bset_bkey_idx
	sub	w2, w26, w0
	mov	x0, x20
	mov	x1, x24
	bl	_memmove
	ldr	w8, [x25]
	sub	w8, w8, w27
	str	w8, [x25]
	ldr	x8, [x19, x22, lsl #3]
	add	x0, x8, #8
	bl	_bkey_u64s
	mov	x1, x0
	sub	x0, x29, #96
	bl	___bch_keylist_realloc
	cbnz	x0, LBB0_15
; %bb.37:                               ;   in Loop: Header=BB0_28 Depth=1
	lsl	x20, x22, #3
	ldr	x0, [x19, x20]
	sub	x1, x29, #104
	bl	_bch_btree_node_write
	ldr	x8, [x19, x20]
	add	x1, x8, #8
	sub	x0, x29, #96
	bl	_bch_keylist_add
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	mov	x22, x8
	cbnz	x8, LBB0_28
	b	LBB0_41
LBB0_38:                                ;   in Loop: Header=BB0_28 Depth=1
	mov	w27, #0
LBB0_39:                                ;   Parent Loop BB0_28 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x20, x28
	mov	x0, x28
	bl	_bkey_u64s
	add	w27, w0, w27
	mov	x0, x28
	bl	_bkey_next
	mov	x28, x0
	mov	x0, x25
	bl	_bset_bkey_last
	cmp	x28, x0
	b.hs	LBB0_34
; %bb.40:                               ;   in Loop: Header=BB0_39 Depth=2
	ldr	w8, [x26]
	add	w24, w8, w27
	mov	x0, x28
	bl	_bkey_u64s
	add	w24, w24, w0
	ldr	x0, [x23]
	bl	_block_bytes
	mov	x2, x0
	mov	x0, x26
	mov	x1, x24
	bl	___set_blocks
	ldur	w8, [x29, #-108]                ; 4-byte Folded Reload
	cmp	w0, w8
	b.ls	LBB0_39
	b	LBB0_34
LBB0_41:
	mov	x20, #0
	ldur	x22, [x29, #-168]               ; 8-byte Folded Reload
LBB0_42:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, x20]
	add	x0, x8, #24
	bl	_mutex_unlock
	add	x20, x20, #8
	cmp	x22, x20
	b.ne	LBB0_42
; %bb.43:
	sub	x0, x29, #104
	bl	_closure_sync
	ldr	x0, [x19]
	bl	_btree_bset_first
	ldr	w0, [x0]
	bl	_BUG_ON
	ldr	x0, [x19]
	bl	_btree_node_free
	ldr	x1, [x19]
	mov	w0, #1
	bl	_rw_unlock
	mov	x22, #0
	str	xzr, [x19]
	ldur	x8, [x29, #-160]                ; 8-byte Folded Reload
	lsl	x20, x8, #4
LBB0_44:                                ; =>This Inner Loop Header: Depth=1
	add	x24, x28, x22
	ldr	x8, [x24, #8]
	add	x0, x8, #8
	bl	_bkey_u64s
	mov	x1, x0
	sub	x0, x29, #96
	bl	___bch_keylist_realloc
	cbnz	x0, LBB0_15
; %bb.45:                               ;   in Loop: Header=BB0_44 Depth=1
	ldr	x0, [x24, #8]
	ldur	w1, [x29, #-96]
	bl	_make_btree_freeing_key
	sub	x0, x29, #96
	bl	_bch_keylist_push
	add	x22, x22, #16
	cmp	x20, x22
	b.ne	LBB0_44
; %bb.46:
	sub	x2, x29, #96
	mov	x0, x23
	ldur	x1, [x29, #-128]                ; 8-byte Folded Reload
	mov	x3, #0
	mov	x4, #0
	bl	_bch_btree_insert_node
	sub	x0, x29, #96
	bl	_bch_keylist_empty
	cmp	w0, #0
	cset	w0, eq
	bl	_BUG_ON
	mov	x22, #0
LBB0_47:                                ; =>This Inner Loop Header: Depth=1
	add	x23, x28, x22
	ldr	x0, [x23, #8]
	bl	_btree_node_free
	ldr	x1, [x23, #8]
	mov	w0, #1
	bl	_rw_unlock
	ldr	x8, [x19], #8
	str	x8, [x23, #8]
	add	x22, x22, #16
	cmp	x20, x22
	b.ne	LBB0_47
; %bb.48:
	add	x1, x28, #16
	ldur	x20, [x29, #-144]               ; 8-byte Folded Reload
	lsl	w2, w20, #4
	mov	x0, x28
	bl	_memmove
Lloh12:
	adrp	x19, _EINTR@GOTPAGE
Lloh13:
	ldr	x19, [x19, _EINTR@GOTPAGEOFF]
	ldr	w8, [x19]
	neg	w0, w8
	bl	_ERR_PTR
	add	x8, x28, w20, uxtw #4
	str	x0, [x8, #8]
	mov	x0, x21
	bl	_trace_bcache_btree_gc_coalesce
	ldur	x9, [x29, #-152]                ; 8-byte Folded Reload
	ldr	w8, [x9]
	sub	w8, w8, #1
	str	w8, [x9]
	sub	x0, x29, #96
	bl	_bch_keylist_free
	ldr	w8, [x19]
	neg	w0, w8
	b	LBB0_9
LBB0_49:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GC_MERGE_NODES,4,2             ; @GC_MERGE_NODES
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_ZERO_KEY,4,2                   ; @ZERO_KEY
	.no_dead_strip	_btree_gc_coalesce
.subsections_via_symbols
