	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ubiblock_resize
_ubiblock_resize:                       ## @ubiblock_resize
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_devices_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	8(%r15), %esi
	movl	12(%r15), %edi
	callq	_find_dev_nolock
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	leaq	-32(%rbp), %rsi
	movq	%r15, %rdi
	callq	_calc_disk_capacity
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	movq	_devices_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_EFBIG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_8
## %bb.4:
	movl	4(%r14), %edi
	callq	_disk_to_dev
	movl	4(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_warn
	jmp	LBB0_8
LBB0_1:
	movq	_devices_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	4(%r14), %edi
	callq	_get_capacity
	movq	-32(%rbp), %rsi
	cmpq	%rsi, %rax
	je	LBB0_7
## %bb.6:
	movl	4(%r14), %edi
	callq	_set_capacity
	movl	4(%r14), %edi
	callq	_disk_to_dev
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_info
LBB0_7:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_devices_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_devices_mutex,4,2              ## @devices_mutex
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EFBIG,4,2                      ## @EFBIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"the volume is too big (%d LEBs), cannot resize"

L_.str.1:                               ## @.str.1
	.asciz	"resized to %lld bytes"

	.no_dead_strip	_ubiblock_resize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ubiblock_resize
_ubiblock_resize:                       ; @ubiblock_resize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x0, _devices_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _devices_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldp	w1, w0, [x19, #8]
	bl	_find_dev_nolock
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	add	x1, sp, #8
	mov	x0, x19
	bl	_calc_disk_capacity
	cbz	w0, LBB0_5
; %bb.2:
	mov	x21, x0
Lloh2:
	adrp	x0, _devices_mutex@GOTPAGE
Lloh3:
	ldr	x0, [x0, _devices_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh4:
	adrp	x8, _EFBIG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EFBIG@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmn	w21, w8
	b.ne	LBB0_8
; %bb.3:
	ldr	w0, [x20, #4]
	bl	_disk_to_dev
	ldr	w2, [x19, #4]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	b	LBB0_8
LBB0_4:
Lloh9:
	adrp	x0, _devices_mutex@GOTPAGE
Lloh10:
	ldr	x0, [x0, _devices_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	bl	_mutex_lock
	ldr	w0, [x20, #4]
	bl	_get_capacity
	ldr	x1, [sp, #8]
	cmp	x0, x1
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x20, #4]
	bl	_set_capacity
	ldr	w0, [x20, #4]
	bl	_disk_to_dev
	ldr	w2, [x19]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
LBB0_7:
	mov	x0, x20
	bl	_mutex_unlock
Lloh16:
	adrp	x0, _devices_mutex@GOTPAGE
Lloh17:
	ldr	x0, [x0, _devices_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w21, #0
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_devices_mutex,4,2              ; @devices_mutex
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EFBIG,4,2                      ; @EFBIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"the volume is too big (%d LEBs), cannot resize"

l_.str.1:                               ; @.str.1
	.asciz	"resized to %lld bytes"

	.no_dead_strip	_ubiblock_resize
.subsections_via_symbols
