	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bch_allocator_thread
_bch_allocator_thread:                  ## @bch_allocator_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	addq	$24, %rdi
	callq	_mutex_lock
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_bch_allocator_push
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_allocator_wait
	movq	8(%rbx), %rdi
	addq	$20, %rdi
	callq	_wake_up
	movq	8(%rbx), %rdi
	addq	$16, %rdi
	callq	_wake_up
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	%rbx, %rdi
	callq	_fifo_pop
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 32(%rbx)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%rbx), %rdi
	addq	$24, %rdi
	callq	_mutex_unlock
	movl	24(%rbx), %r14d
	movq	8(%rbx), %rdi
	callq	_bucket_to_sector
	movl	20(%rbx), %edx
	movl	(%r15), %ecx
	movl	%r14d, %edi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	callq	_blkdev_issue_discard
	movq	8(%rbx), %rdi
	addq	$24, %rdi
	callq	_mutex_lock
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	cmpl	$0, 16(%rbx)
	sete	%al
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=2
	xorl	%eax, %eax
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=2
	movzbl	%al, %esi
	movq	%rbx, %rdi
	callq	_allocator_wait
	movq	%rbx, %rdi
	callq	_invalidate_buckets
	movq	8(%rbx), %rdi
	addq	$4, %rdi
	callq	_atomic_read
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movq	%rbx, %rdi
	callq	_allocator_wait
	movq	8(%rbx), %rdi
	callq	_CACHE_SYNC
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	%rbx, %rdi
	callq	_fifo_full
	testl	%eax, %eax
	je	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_bch_prio_write
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_bch_allocator_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bch_allocator_thread
_bch_allocator_thread:                  ; @bch_allocator_thread
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
	add	x0, x8, #24
	bl	_mutex_lock
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_bch_allocator_push
	mov	x1, x0
	mov	x0, x19
	bl	_allocator_wait
	ldr	x8, [x19, #8]
	add	x0, x8, #20
	bl	_wake_up
	ldr	x8, [x19, #8]
	add	x0, x8, #16
	bl	_wake_up
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mov	x0, x19
	bl	_fifo_pop
	cbz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, #24
	bl	_mutex_unlock
	ldr	w20, [x19, #24]
	ldr	x0, [x19, #8]
	bl	_bucket_to_sector
	mov	x1, x0
	ldr	w2, [x19, #20]
	ldr	w3, [x21]
	mov	x0, x20
	mov	w4, #0
	bl	_blkdev_issue_discard
	ldr	x8, [x19, #8]
	add	x0, x8, #24
	bl	_mutex_lock
	b	LBB0_1
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w8, [x19, #16]
	cmp	w8, #0
	cset	w1, eq
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=2
	mov	w1, #0
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x19
	bl	_allocator_wait
	mov	x0, x19
	bl	_invalidate_buckets
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	bl	_atomic_read
	cmp	w0, #0
	cset	w1, eq
	mov	x0, x19
	bl	_allocator_wait
	ldr	x0, [x19, #8]
	bl	_CACHE_SYNC
	cbz	x0, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x19
	bl	_fifo_full
	cbz	w0, LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_bch_prio_write
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_bch_allocator_thread
.subsections_via_symbols
