	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function conditional_stop_bcache_device
_conditional_stop_bcache_device:        ## @conditional_stop_bcache_device
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	(%rdx), %rax
	movq	_BCH_CACHED_DEV_STOP_ALWAYS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	(%r14), %rax
	movl	(%rax), %esi
	movl	(%rdi), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
	jmp	LBB0_2
LBB0_3:
	movq	%rdx, %rbx
	leaq	12(%rdx), %rdi
	callq	_atomic_read
	movq	(%r14), %rcx
	movl	(%rcx), %esi
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
	movl	$1, 8(%rbx)
	xorl	%eax, %eax
	callq	_smp_mb
LBB0_2:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_bcache_device_stop             ## TAILCALL
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pr_warn                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BCH_CACHED_DEV_STOP_ALWAYS,8,3 ## @BCH_CACHED_DEV_STOP_ALWAYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stop_when_cache_set_failed of %s is \"always\", stop it for failed cache set %pU."

L_.str.1:                               ## @.str.1
	.asciz	"stop_when_cache_set_failed of %s is \"auto\" and cache is dirty, stop it to avoid potential data corruption."

L_.str.2:                               ## @.str.2
	.asciz	"stop_when_cache_set_failed of %s is \"auto\" and cache is clean, keep it alive."

	.no_dead_strip	_conditional_stop_bcache_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function conditional_stop_bcache_device
_conditional_stop_bcache_device:        ; @conditional_stop_bcache_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _BCH_CACHED_DEV_STOP_ALWAYS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BCH_CACHED_DEV_STOP_ALWAYS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19]
	ldr	w1, [x8]
	ldr	w8, [x0]
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
	b	LBB0_4
LBB0_2:
	mov	x20, x2
	add	x0, x2, #12
	bl	_atomic_read
	ldr	x8, [x19]
	ldr	w1, [x8]
	cbz	x0, LBB0_5
; %bb.3:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
	mov	w8, #1
	str	w8, [x20, #8]
	bl	_smp_mb
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_bcache_device_stop
LBB0_5:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_pr_warn
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BCH_CACHED_DEV_STOP_ALWAYS,8,3 ; @BCH_CACHED_DEV_STOP_ALWAYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stop_when_cache_set_failed of %s is \"always\", stop it for failed cache set %pU."

l_.str.1:                               ; @.str.1
	.asciz	"stop_when_cache_set_failed of %s is \"auto\" and cache is dirty, stop it to avoid potential data corruption."

l_.str.2:                               ; @.str.2
	.asciz	"stop_when_cache_set_failed of %s is \"auto\" and cache is clean, keep it alive."

	.no_dead_strip	_conditional_stop_bcache_device
.subsections_via_symbols
