	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bch_writeback_thread
_bch_writeback_thread:                  ## @bch_writeback_thread
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	32(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addq	$16, %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_bch_ratelimit_reset
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	je	LBB0_1
LBB0_15:
	movq	8(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.16:
	callq	_flush_workqueue
	movq	8(%r13), %rdi
	callq	_destroy_workqueue
LBB0_17:
	movq	%r13, %rdi
	callq	_cached_dev_put
	xorl	%eax, %eax
	callq	_wait_for_kthread_stop
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	24(%r13), %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	4(%rax), %r14
	leaq	40(%r13), %r12
	leaq	48(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	52(%r13), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	44(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_bch_ratelimit_reset
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %r15
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	jne	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_21 Depth 2
	movq	_CACHE_SET_IO_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_down_write
	movl	(%r15), %edi
	callq	_set_current_state
	movq	_BCACHE_DEV_DETACHING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	%r13, %rdi
	callq	_refill_dirty
	testl	%eax, %eax
	je	LBB0_26
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_RB_EMPTY_ROOT
	testq	%rax, %rax
	je	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_atomic_set
	movq	_BDEV_STATE_CLEAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_SET_BDEV_STATE
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_bch_write_bdev_super
	movq	_BCACHE_DEV_DETACHING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_14
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movq	_BCH_DO_AUTO_GC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_BCH_ENABLE_AUTO_GC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	cmpl	%edx, %eax
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	notl	%ecx
	andl	%ecx, %eax
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, (%rdi)
	callq	_force_wake_up_gc
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_up_write
	movq	%r13, %rdi
	callq	_read_dirty
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	imull	(%r13), %r15d
	testl	%r15d, %r15d
	je	LBB0_25
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	jne	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=2
	movq	_CACHE_SET_IO_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=2
	movq	_BCACHE_DEV_DETACHING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_21 Depth=2
	movl	%r15d, %edi
	callq	_schedule_timeout_interruptible
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_21
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_read
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 56(%r13)
	jne	LBB0_11
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_up_write
	xorl	%eax, %eax
	callq	_kthread_should_stop
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_CACHE_SET_IO_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_schedule
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_up_write
	movq	%r13, %rdi
	callq	_read_dirty
	jmp	LBB0_10
LBB0_8:
	movq	_TASK_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	jmp	LBB0_15
LBB0_14:
	movq	%r12, %rdi
	callq	_up_write
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_CACHE_SET_IO_DISABLE,4,2       ## @CACHE_SET_IO_DISABLE
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_BCACHE_DEV_DETACHING,4,2       ## @BCACHE_DEV_DETACHING
	.comm	_TASK_RUNNING,4,2               ## @TASK_RUNNING
	.comm	_BDEV_STATE_CLEAN,4,2           ## @BDEV_STATE_CLEAN
	.comm	_BCH_ENABLE_AUTO_GC,4,2         ## @BCH_ENABLE_AUTO_GC
	.comm	_BCH_DO_AUTO_GC,4,2             ## @BCH_DO_AUTO_GC
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_bch_writeback_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bch_writeback_thread
_bch_writeback_thread:                  ; @bch_writeback_thread
	.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
	ldr	x20, [x0, #32]
	add	x21, x0, #16
	mov	x0, x21
	bl	_bch_ratelimit_reset
	bl	_kthread_should_stop
	cbz	x0, LBB0_4
LBB0_1:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_flush_workqueue
	ldr	x0, [x19, #8]
	bl	_destroy_workqueue
LBB0_3:
	mov	x0, x19
	bl	_cached_dev_put
	bl	_wait_for_kthread_stop
	mov	w0, #0
	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
LBB0_4:
	add	x22, x19, #24
	add	x24, x20, #4
	add	x23, x19, #40
	add	x9, x19, #48
	add	x8, x19, #52
	stp	x8, x9, [sp, #16]               ; 16-byte Folded Spill
	add	x8, x19, #44
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh0:
	adrp	x27, _CACHE_SET_IO_DISABLE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _CACHE_SET_IO_DISABLE@GOTPAGEOFF]
Lloh2:
	adrp	x25, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh4:
	adrp	x26, _BCACHE_DEV_DETACHING@GOTPAGE
Lloh5:
	ldr	x26, [x26, _BCACHE_DEV_DETACHING@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	bl	_bch_ratelimit_reset
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	bl	_kthread_should_stop
	cbnz	x0, LBB0_1
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	ldr	w0, [x27]
	mov	x1, x24
	bl	_test_bit
	cbnz	x0, LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_down_write
	ldr	w0, [x25]
	bl	_set_current_state
	ldr	w0, [x26]
	mov	x1, x22
	bl	_test_bit
	cbz	x0, LBB0_19
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
Lloh6:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_set_current_state
	mov	x0, x19
	bl	_refill_dirty
	cbz	w0, LBB0_24
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_RB_EMPTY_ROOT
	cbz	x0, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	w1, #0
	bl	_atomic_set
Lloh9:
	adrp	x8, _BDEV_STATE_CLEAN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BDEV_STATE_CLEAN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_SET_BDEV_STATE
	mov	x0, x19
	mov	x1, #0
	bl	_bch_write_bdev_super
	ldr	w0, [x26]
	mov	x1, x22
	bl	_test_bit
	cbnz	x0, LBB0_26
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x20]
Lloh12:
	adrp	x9, _BCH_ENABLE_AUTO_GC@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BCH_ENABLE_AUTO_GC@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x9]
Lloh15:
	adrp	x9, _BCH_DO_AUTO_GC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BCH_DO_AUTO_GC@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w10, w9, w10
	cmp	w8, w10
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
	bic	w8, w8, w9
	str	w8, [x20]
	mov	x0, x20
	bl	_force_wake_up_gc
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_up_write
	mov	x0, x19
	bl	_read_dirty
	ldr	w8, [x19]
Lloh18:
	adrp	x9, _HZ@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	mul	w28, w9, w8
	cbz	w28, LBB0_5
LBB0_15:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_kthread_should_stop
	cbnz	x0, LBB0_5
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	w0, [x27]
	mov	x1, x24
	bl	_test_bit
	cbnz	x0, LBB0_5
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	w0, [x26]
	mov	x1, x22
	bl	_test_bit
	cbnz	x0, LBB0_5
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=2
	mov	x0, x28
	bl	_schedule_timeout_interruptible
	mov	x28, x0
	cbnz	w0, LBB0_15
	b	LBB0_5
LBB0_19:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_atomic_read
	cbz	w0, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x19, #56]
	cbnz	w8, LBB0_9
LBB0_21:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_up_write
	bl	_kthread_should_stop
	cbnz	x0, LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x27]
	mov	x1, x24
	bl	_test_bit
	cbnz	x0, LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_7 Depth=1
	bl	_schedule
	b	LBB0_6
LBB0_24:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_up_write
	mov	x0, x19
	bl	_read_dirty
	b	LBB0_6
LBB0_25:
Lloh21:
	adrp	x8, _TASK_RUNNING@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TASK_RUNNING@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_set_current_state
	b	LBB0_1
LBB0_26:
	mov	x0, x23
	bl	_up_write
	b	LBB0_1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_CACHE_SET_IO_DISABLE,4,2       ; @CACHE_SET_IO_DISABLE
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_BCACHE_DEV_DETACHING,4,2       ; @BCACHE_DEV_DETACHING
	.comm	_TASK_RUNNING,4,2               ; @TASK_RUNNING
	.comm	_BDEV_STATE_CLEAN,4,2           ; @BDEV_STATE_CLEAN
	.comm	_BCH_ENABLE_AUTO_GC,4,2         ; @BCH_ENABLE_AUTO_GC
	.comm	_BCH_DO_AUTO_GC,4,2             ; @BCH_DO_AUTO_GC
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_bch_writeback_thread
.subsections_via_symbols
