	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msb_cache_write
_msb_cache_write:                       ## @msb_cache_write
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	$0, 32(%rdi)
	je	LBB0_2
## %bb.1:
	movq	_EROFS@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.12:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r8, %r12
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movl	%r9d, -100(%rbp)                ## 4-byte Spill
	movl	(%rdi), %edx
	movq	_MS_BLOCK_INVALID@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	cmpl	%eax, %edx
	jne	LBB0_3
## %bb.13:
	xorl	%r15d, %r15d
	testl	%ecx, %ecx
	jne	LBB0_11
	jmp	LBB0_9
LBB0_3:
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.4:
	xorl	%r15d, %r15d
	cmpl	%r13d, %edx
	jne	LBB0_11
LBB0_5:
	movl	%r13d, %ecx
	cmpl	%r13d, %edx
	je	LBB0_8
## %bb.6:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	movq	%rsi, %r15
	callq	_dbg_verbose
	movq	%rbx, %rdi
	callq	_msb_cache_flush
	movq	%r15, %rdx
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movl	(%rbx), %ecx
	movl	(%rdx), %eax
LBB0_8:
	cmpl	%eax, %ecx
	jne	LBB0_10
LBB0_9:
	movl	%r13d, (%rbx)
	leaq	24(%rbx), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_cache_flush_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	addq	%rax, %r15
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movq	%r15, %rsi
	callq	_mod_timer
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%r13d, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dbg_verbose
	leaq	-96(%rbp), %r13
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sg_init_table
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	movl	4(%rbx), %r8d
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	movl	-100(%rbp), %ecx                ## 4-byte Reload
	callq	_msb_sg_copy
	movq	%r13, %rdi
	callq	_sg_nents
	movl	4(%rbx), %ecx
	movl	%ecx, %edx
	imull	%r14d, %edx
	movslq	%edx, %rdx
	addq	16(%rbx), %rdx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sg_copy_to_buffer
	addq	$8, %rbx
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_set_bit
	jmp	LBB0_11
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EROFS,4,2                      ## @EROFS
	.comm	_MS_BLOCK_INVALID,4,2           ## @MS_BLOCK_INVALID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"first flush the cache"

	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_cache_flush_timeout,4,2        ## @cache_flush_timeout
L_.str.1:                               ## @.str.1
	.asciz	"Write of LBA %d page %d to cache "

	.no_dead_strip	_msb_cache_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msb_cache_write
_msb_cache_write:                       ; @msb_cache_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EROFS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_2:
	mov	x21, x5
	mov	x22, x4
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
	ldr	w9, [x0]
Lloh6:
	adrp	x24, _MS_BLOCK_INVALID@GOTPAGE
Lloh7:
	ldr	x24, [x24, _MS_BLOCK_INVALID@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w9, w8
	b.ne	LBB0_4
; %bb.3:
	cbnz	w3, LBB0_12
	b	LBB0_10
LBB0_4:
	cbz	w3, LBB0_6
; %bb.5:
	cmp	w9, w23
	b.ne	LBB0_12
LBB0_6:
	mov	x10, x23
	cmp	w9, w23
	b.eq	LBB0_9
; %bb.7:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_verbose
	mov	x0, x20
	bl	_msb_cache_flush
	cbnz	w0, LBB0_13
; %bb.8:
	ldr	w10, [x20]
	ldr	w8, [x24]
LBB0_9:
	cmp	w10, w8
	b.ne	LBB0_11
LBB0_10:
	mov	x24, x20
	str	w23, [x24], #24
Lloh10:
	adrp	x8, _jiffies@GOTPAGE
Lloh11:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh12:
	ldr	x25, [x8]
Lloh13:
	adrp	x8, _cache_flush_timeout@GOTPAGE
Lloh14:
	ldr	x8, [x8, _cache_flush_timeout@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x1, x0, x25
	mov	x0, x24
	bl	_mod_timer
LBB0_11:
	stp	x23, x19, [sp]
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dbg_verbose
	add	x0, sp, #16
	bl	_ARRAY_SIZE
	mov	x1, x0
	add	x0, sp, #16
	bl	_sg_init_table
	add	x0, sp, #16
	bl	_ARRAY_SIZE
	mov	x2, x0
	ldr	w4, [x20, #4]
	add	x1, sp, #16
	mov	x0, x22
	mov	x3, x21
	bl	_msb_sg_copy
	add	x0, sp, #16
	bl	_sg_nents
	mov	x1, x0
	ldr	x8, [x20, #16]
	ldr	w3, [x20, #4]
	mul	w9, w3, w19
	add	x2, x8, w9, sxtw
	add	x0, sp, #16
	bl	_sg_copy_to_buffer
	add	x1, x20, #8
	mov	x0, x19
	bl	_set_bit
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldr	x8, [sp, #56]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EROFS,4,2                      ; @EROFS
	.comm	_MS_BLOCK_INVALID,4,2           ; @MS_BLOCK_INVALID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"first flush the cache"

	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_cache_flush_timeout,4,2        ; @cache_flush_timeout
l_.str.1:                               ; @.str.1
	.asciz	"Write of LBA %d page %d to cache "

	.no_dead_strip	_msb_cache_write
.subsections_via_symbols
