	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bch_btree_gc
_bch_btree_gc:                          ## @bch_btree_gc
	.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	%rdi, %rbx
	xorl	%eax, %eax
	callq	_local_clock
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_trace_bcache_gc_start
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	callq	_closure_init_stack
	movq	_SHRT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdi
	callq	_bch_btree_op_init
	movq	%rbx, %rdi
	callq	_btree_gc_start
	leaq	8(%rbx), %r14
	movq	_EAGAIN@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_GC_SLEEP_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movl	%eax, %edi
	callq	_schedule_timeout_interruptible
	testl	%r15d, %r15d
	je	LBB0_6
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_CACHE_SET_IO_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	jne	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_gc_root@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	leaq	-56(%rbp), %rdx
	movq	%r12, %rcx
	leaq	-48(%rbp), %r8
	callq	_btree_root
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_closure_sync
	xorl	%eax, %eax
	callq	_cond_resched
	movl	(%r13), %eax
	addl	%r15d, %eax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
	jmp	LBB0_5
LBB0_6:
	movq	%rbx, %rdi
	callq	_bch_btree_gc_finish
	movq	%rbx, %rdi
	callq	_wake_up_allocators
	leaq	4(%rbx), %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_bch_time_stats_update
	shll	$2, -48(%rbp)
	shll	$9, -44(%rbp)
	leaq	-48(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_bch_update_bucket_in_use
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_trace_bcache_gc_end
	movq	%rbx, %rdi
	callq	_bch_moving_gc
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SHRT_MAX,4,2                   ## @SHRT_MAX
	.comm	_gc_root,4,2                    ## @gc_root
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_GC_SLEEP_MS,4,2                ## @GC_SLEEP_MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gc failed!"

	.comm	_CACHE_SET_IO_DISABLE,4,2       ## @CACHE_SET_IO_DISABLE
	.no_dead_strip	_bch_btree_gc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function bch_btree_gc
lCPI0_0:
	.long	2                               ; 0x2
	.long	9                               ; 0x9
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_bch_btree_gc:                          ; @bch_btree_gc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [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 w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_local_clock
	mov	x20, x0
	mov	x0, x19
	bl	_trace_bcache_gc_start
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x0, sp, #16
	bl	_closure_init_stack
Lloh0:
	adrp	x8, _SHRT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SHRT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_bch_btree_op_init
	mov	x0, x19
	bl	_btree_gc_start
	add	x21, x19, #8
Lloh3:
	adrp	x24, _gc_root@GOTPAGE
Lloh4:
	ldr	x24, [x24, _gc_root@GOTPAGEOFF]
Lloh5:
	adrp	x25, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x25, [x25, _EAGAIN@GOTPAGEOFF]
Lloh7:
	adrp	x26, _GC_SLEEP_MS@GOTPAGE
Lloh8:
	ldr	x26, [x26, _GC_SLEEP_MS@GOTPAGEOFF]
Lloh9:
	adrp	x22, l_.str@PAGE
Lloh10:
	add	x22, x22, l_.str@PAGEOFF
Lloh11:
	adrp	x27, _CACHE_SET_IO_DISABLE@GOTPAGE
Lloh12:
	ldr	x27, [x27, _CACHE_SET_IO_DISABLE@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x26]
	bl	_msecs_to_jiffies
	bl	_schedule_timeout_interruptible
	cbz	w23, LBB0_6
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x27]
	mov	x1, x21
	bl	_test_bit
	cbnz	w0, LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	add	x2, sp, #8
	add	x3, sp, #16
	add	x4, sp, #24
	mov	x1, x19
	bl	_btree_root
	mov	x23, x0
	add	x0, sp, #16
	bl	_closure_sync
	bl	_cond_resched
	ldr	w8, [x25]
	cmn	w23, w8
	b.eq	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w23, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_pr_warn
	b	LBB0_2
LBB0_6:
	mov	x0, x19
	bl	_bch_btree_gc_finish
	mov	x0, x19
	bl	_wake_up_allocators
	add	x0, x19, #4
	mov	x1, x20
	bl	_bch_time_stats_update
	ldr	d0, [sp, #24]
Lloh13:
	adrp	x8, lCPI0_0@PAGE
Lloh14:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	str	d0, [sp, #24]
	add	x1, sp, #24
	mov	x0, x19
	bl	_bch_update_bucket_in_use
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #8
	bl	_memcpy
	mov	x0, x19
	bl	_trace_bcache_gc_end
	mov	x0, x19
	bl	_bch_moving_gc
	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	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SHRT_MAX,4,2                   ; @SHRT_MAX
	.comm	_gc_root,4,2                    ; @gc_root
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_GC_SLEEP_MS,4,2                ; @GC_SLEEP_MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gc failed!"

	.comm	_CACHE_SET_IO_DISABLE,4,2       ; @CACHE_SET_IO_DISABLE
	.no_dead_strip	_bch_btree_gc
.subsections_via_symbols
