	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function maybe_resize_data_dev
_maybe_resize_data_dev:                 ## @maybe_resize_data_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, %r12
	movq	(%rdi), %r14
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	movl	$0, (%rsi)
	movl	8(%rbx), %esi
	movq	%r14, %rdi
	callq	_sector_div
	movl	(%rbx), %edi
	leaq	-40(%rbp), %rsi
	callq	_dm_pool_get_data_dev_size
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %r15d
	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, %r14
	jge	LBB0_5
## %bb.4:
	movl	4(%rbx), %edi
	callq	_dm_device_name
	movq	-40(%rbp), %rcx
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%eax, %esi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_DMERR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_13
LBB0_5:
	xorl	%r15d, %r15d
	cmpq	%rax, %r14
	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	%r15d, %r15d
	jmp	LBB0_2
LBB0_8:
	cmpq	$0, -40(%rbp)
	je	LBB0_10
## %bb.9:
	movl	4(%rbx), %edi
	callq	_dm_device_name
	movq	-40(%rbp), %rdx
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	movq	%r14, %rcx
	callq	_DMINFO
LBB0_10:
	movl	(%rbx), %edi
	movq	%r14, %rsi
	callq	_dm_pool_resize_data_dev
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r14d
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_metadata_operation_failed
	movl	%r14d, %r15d
	jmp	LBB0_13
LBB0_12:
	movl	$1, (%r12)
LBB0_13:
	movl	%r15d, %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 data device size"

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

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

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

L_.str.4:                               ## @.str.4
	.asciz	"dm_pool_resize_data_dev"

	.no_dead_strip	_maybe_resize_data_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_data_dev
_maybe_resize_data_dev:                 ; @maybe_resize_data_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
	ldp	x21, x8, [x0]
	ldr	x19, [x8]
	str	wzr, [x1]
	ldr	w1, [x19, #8]
	mov	x0, x21
	bl	_sector_div
	ldr	w0, [x19]
	add	x1, sp, #24
	bl	_dm_pool_get_data_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	x8, [sp, #24]
	cbz	x8, LBB0_11
; %bb.10:
	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
LBB0_11:
	ldr	w0, [x19]
	mov	x1, x21
	bl	_dm_pool_resize_data_dev
	mov	x22, x0
	cbz	w0, LBB0_13
; %bb.12:
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	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 AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: failed to retrieve data device size"

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

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

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

l_.str.4:                               ; @.str.4
	.asciz	"dm_pool_resize_data_dev"

	.no_dead_strip	_maybe_resize_data_dev
.subsections_via_symbols
