	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pblk_write_gc_to_cache         ## -- Begin function pblk_write_gc_to_cache
	.p2align	4, 0x90
_pblk_write_gc_to_cache:                ## @pblk_write_gc_to_cache
	.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	%rsi, %r15
	movq	32(%rsi), %r12
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	leaq	12(%rdi), %r14
	movl	(%rsi), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pblk_rb_may_write_gc
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	leaq	-44(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_io_schedule
	movl	(%r15), %esi
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_pblk_rb_may_write_gc
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	_PBLK_IOTYPE_GC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	leaq	-56(%rbp), %rdi
	callq	_pblk_ppa_set_empty
	movl	4(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.5:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	_ADDR_EMPTY@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r14
	movslq	%eax, %rcx
	cmpq	%rcx, %r14
	jge	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	movq	(%rcx,%r14,8), %rcx
	cmpq	(%rdx), %rcx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rcx, -64(%rbp)
	movl	-44(%rbp), %esi
	addl	%ebx, %esi
	movq	%r13, %rdi
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	%rdx, %rbx
	callq	_pblk_rb_wrap_pos
	movl	24(%r15), %r8d
	movq	16(%r15), %rcx
	movl	(%rcx,%r14,4), %r9d
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rcx
	movl	%eax, (%rsp)
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_pblk_rb_write_entry_gc
	movq	%rbx, %rdx
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movq	_PBLK_EXPOSED_PAGE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	%rax, %r12
	incl	%ebx
	movl	4(%r15), %eax
	jmp	LBB0_8
LBB0_4:
	xorl	%ebx, %ebx
LBB0_9:
	xorl	%edi, %edi
	cmpl	%ebx, (%r15)
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN_ONCE
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	leaq	8(%r14), %rsi
	movl	%ebx, %edi
	callq	_atomic64_add
	movq	%r14, %rdi
	callq	_pblk_write_should_kick
	movq	_NVM_IO_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PBLK_IOTYPE_GC,4,2             ## @PBLK_IOTYPE_GC
	.comm	_ADDR_EMPTY,8,3                 ## @ADDR_EMPTY
	.comm	_PBLK_EXPOSED_PAGE_SIZE,4,2     ## @PBLK_EXPOSED_PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pblk: inconsistent GC write\n"

	.comm	_NVM_IO_OK,4,2                  ## @NVM_IO_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pblk_write_gc_to_cache         ; -- Begin function pblk_write_gc_to_cache
	.p2align	2
_pblk_write_gc_to_cache:                ; @pblk_write_gc_to_cache
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x1, #32]
	add	x22, x0, #12
	ldr	w1, [x1]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #12
	mov	x0, x22
	bl	_pblk_rb_may_write_gc
	cbnz	w0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_io_schedule
	ldr	w1, [x20]
	b	LBB0_1
LBB0_3:
Lloh0:
	adrp	x8, _PBLK_IOTYPE_GC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PBLK_IOTYPE_GC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #28]
	add	x8, sp, #16
	add	x0, x8, #8
	bl	_pblk_ppa_set_empty
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x24, #0
	mov	w23, #0
Lloh3:
	adrp	x25, _ADDR_EMPTY@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ADDR_EMPTY@GOTPAGEOFF]
Lloh5:
	adrp	x26, _PBLK_EXPOSED_PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x26, [x26, _PBLK_EXPOSED_PAGE_SIZE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x24, #1
	cmp	x24, w8, sxtw
	b.ge	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	ldr	x9, [x9, x24, lsl #3]
	ldr	x10, [x25]
	cmp	x9, x10
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	str	x9, [sp, #16]
	ldr	w8, [sp, #12]
	add	w1, w8, w23
	mov	x0, x22
	bl	_pblk_rb_wrap_pos
	mov	x6, x0
	ldr	w4, [x20, #24]
	ldr	x8, [x20, #16]
	ldr	w5, [x8, x24, lsl #2]
	ldp	x2, x3, [sp, #16]
	mov	x0, x22
	mov	x1, x21
	bl	_pblk_rb_write_entry_gc
	ldrsw	x8, [x26]
	add	x21, x21, x8
	add	w23, w23, #1
	ldr	w8, [x20, #4]
	b	LBB0_5
LBB0_8:
	mov	w23, #0
LBB0_9:
	ldr	w8, [x20]
	cmp	w8, w23
	cset	w0, ne
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN_ONCE
	add	x1, x19, #8
	mov	x0, x23
	bl	_atomic64_add
	mov	x0, x19
	bl	_pblk_write_should_kick
Lloh9:
	adrp	x8, _NVM_IO_OK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NVM_IO_OK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PBLK_IOTYPE_GC,4,2             ; @PBLK_IOTYPE_GC
	.comm	_ADDR_EMPTY,8,3                 ; @ADDR_EMPTY
	.comm	_PBLK_EXPOSED_PAGE_SIZE,4,2     ; @PBLK_EXPOSED_PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pblk: inconsistent GC write\n"

	.comm	_NVM_IO_OK,4,2                  ; @NVM_IO_OK
.subsections_via_symbols
