	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function maybe_resize_metadata_dev
_maybe_resize_metadata_dev:             ## @maybe_resize_metadata_dev
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	movl	$0, (%rsi)
	movl	8(%rbx), %edi
	callq	_get_metadata_dev_size_in_blocks
	movq	%rax, %r12
	movl	(%rbx), %edi
	leaq	-40(%rbp), %rsi
	callq	_dm_pool_get_metadata_dev_size
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	callq	_dm_device_name
	leaq	L_.str(%rip), %rdi
LBB0_2:
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DMERR
	jmp	LBB0_13
LBB0_3:
	movq	-40(%rbp), %rax
	cmpq	%rax, %r12
	jge	LBB0_5
## %bb.4:
	movl	4(%rbx), %edi
	callq	_dm_device_name
	movq	-40(%rbp), %rcx
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%eax, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_DMERR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_5:
	xorl	%r14d, %r14d
	cmpq	%rax, %r12
	jle	LBB0_13
## %bb.6:
	movl	(%rbx), %edi
	callq	_dm_pool_metadata_needs_check
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	4(%rbx), %edi
	callq	_dm_device_name
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	jmp	LBB0_2
LBB0_8:
	movl	8(%rbx), %edi
	callq	_warn_if_metadata_device_too_big
	movl	4(%rbx), %edi
	callq	_dm_device_name
	movq	-40(%rbp), %rdx
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	movq	%r12, %rcx
	callq	_DMINFO
	movq	%rbx, %rdi
	callq	_get_pool_mode
	movq	_PM_OUT_OF_METADATA_SPACE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_PM_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_set_pool_mode
LBB0_10:
	movl	(%rbx), %edi
	movq	%r12, %rsi
	callq	_dm_pool_resize_metadata_dev
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r12d
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_metadata_operation_failed
	movl	%r12d, %r14d
	jmp	LBB0_13
LBB0_12:
	movl	$1, (%r15)
LBB0_13:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: failed to retrieve metadata device size"

L_.str.1:                               ## @.str.1
	.asciz	"%s: metadata device (%llu blocks) too small: expected %llu"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"%s: unable to grow the metadata device until repaired."

L_.str.3:                               ## @.str.3
	.asciz	"%s: growing the metadata device from %llu to %llu blocks"

	.comm	_PM_OUT_OF_METADATA_SPACE,8,3   ## @PM_OUT_OF_METADATA_SPACE
	.comm	_PM_WRITE,4,2                   ## @PM_WRITE
L_.str.4:                               ## @.str.4
	.asciz	"dm_pool_resize_metadata_dev"

	.no_dead_strip	_maybe_resize_metadata_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function maybe_resize_metadata_dev
_maybe_resize_metadata_dev:             ; @maybe_resize_metadata_dev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	ldr	x8, [x0]
	ldr	x19, [x8]
	str	wzr, [x1]
	ldr	w0, [x19, #8]
	bl	_get_metadata_dev_size_in_blocks
	mov	x21, x0
	ldr	w0, [x19]
	add	x1, sp, #24
	bl	_dm_pool_get_metadata_dev_size
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
	ldr	w0, [x19, #4]
	bl	_dm_device_name
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DMERR
	b	LBB0_8
LBB0_2:
	ldr	x8, [sp, #24]
	cmp	x21, x8
	b.ge	LBB0_4
; %bb.3:
	ldr	w0, [x19, #4]
	bl	_dm_device_name
	mov	x1, x0
	ldr	x8, [sp, #24]
	stp	x21, x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DMERR
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_8
LBB0_4:
	b.le	LBB0_7
; %bb.5:
	ldr	w0, [x19]
	bl	_dm_pool_metadata_needs_check
	cbz	x0, LBB0_9
; %bb.6:
	ldr	w0, [x19, #4]
	bl	_dm_device_name
	mov	x1, x0
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DMERR
LBB0_7:
	mov	w22, #0
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	ldr	w0, [x19, #8]
	bl	_warn_if_metadata_device_too_big
	ldr	w0, [x19, #4]
	bl	_dm_device_name
	mov	x1, x0
	ldr	x2, [sp, #24]
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x3, x21
	bl	_DMINFO
	mov	x0, x19
	bl	_get_pool_mode
Lloh11:
	adrp	x8, _PM_OUT_OF_METADATA_SPACE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PM_OUT_OF_METADATA_SPACE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.10:
Lloh14:
	adrp	x8, _PM_WRITE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PM_WRITE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_set_pool_mode
LBB0_11:
	ldr	w0, [x19]
	mov	x1, x21
	bl	_dm_pool_resize_metadata_dev
	mov	x22, x0
	cbz	w0, LBB0_13
; %bb.12:
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_metadata_operation_failed
	b	LBB0_8
LBB0_13:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: failed to retrieve metadata device size"

l_.str.1:                               ; @.str.1
	.asciz	"%s: metadata device (%llu blocks) too small: expected %llu"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"%s: unable to grow the metadata device until repaired."

l_.str.3:                               ; @.str.3
	.asciz	"%s: growing the metadata device from %llu to %llu blocks"

	.comm	_PM_OUT_OF_METADATA_SPACE,8,3   ; @PM_OUT_OF_METADATA_SPACE
	.comm	_PM_WRITE,4,2                   ; @PM_WRITE
l_.str.4:                               ; @.str.4
	.asciz	"dm_pool_resize_metadata_dev"

	.no_dead_strip	_maybe_resize_metadata_dev
.subsections_via_symbols
