	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_discard_bitset
_write_discard_bitset:                  ## @write_discard_bitset
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_get_cache_mode
	movq	_CM_READ_ONLY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_4
## %bb.1:
	movl	8(%r14), %esi
	movl	(%r14), %edi
	movl	4(%r14), %edx
	callq	_dm_cache_discard_bitset_resize
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_cache_device_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DMERR
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_metadata_operation_failed
	jmp	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	4(%r14), %edi
	callq	_from_dblock
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %r15d
	movl	%ebx, %edi
	callq	_to_dblock
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_to_dblock
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_is_discarded
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_dm_cache_set_discard
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incl	%ebx
	movl	4(%r14), %edi
	callq	_from_dblock
	cmpl	%eax, %ebx
	jb	LBB0_8
LBB0_11:
	xorl	%r15d, %r15d
	jmp	LBB0_5
LBB0_12:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_CM_READ_ONLY,8,3               ## @CM_READ_ONLY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: could not resize on-disk discard bitset"

L_.str.1:                               ## @.str.1
	.asciz	"dm_cache_discard_bitset_resize"

L_.str.2:                               ## @.str.2
	.asciz	"dm_cache_set_discard"

	.no_dead_strip	_write_discard_bitset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_discard_bitset
_write_discard_bitset:                  ; @write_discard_bitset
	.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
	bl	_get_cache_mode
Lloh0:
	adrp	x8, _CM_READ_ONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CM_READ_ONLY@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_4
; %bb.1:
	ldp	w2, w1, [x19, #4]
	ldr	w0, [x19]
	bl	_dm_cache_discard_bitset_resize
	cbz	w0, LBB0_6
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	bl	_cache_device_name
	mov	x1, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DMERR
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_3:
	mov	x0, x19
	mov	x2, x20
	bl	_metadata_operation_failed
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w0, [x19, #4]
	bl	_from_dblock
	cbz	w0, LBB0_10
; %bb.7:
	mov	w21, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x19]
	mov	x0, x21
	bl	_to_dblock
	mov	x22, x0
	mov	x0, x21
	bl	_to_dblock
	mov	x1, x0
	mov	x0, x19
	bl	_is_discarded
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_dm_cache_set_discard
	cbnz	w0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	w21, w21, #1
	ldr	w0, [x19, #4]
	bl	_from_dblock
	cmp	w21, w0
	b.lo	LBB0_8
LBB0_10:
	mov	w20, #0
	b	LBB0_5
LBB0_11:
	mov	x20, x0
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CM_READ_ONLY,8,3               ; @CM_READ_ONLY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: could not resize on-disk discard bitset"

l_.str.1:                               ; @.str.1
	.asciz	"dm_cache_discard_bitset_resize"

l_.str.2:                               ; @.str.2
	.asciz	"dm_cache_set_discard"

	.no_dead_strip	_write_discard_bitset
.subsections_via_symbols
