	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_start_update               ## -- Begin function ubi_start_update
	.p2align	4, 0x90
_ubi_start_update:                      ## @ubi_start_update
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	44(%rsi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_dbg_gen
	xorl	%edi, %edi
	cmpl	$0, (%r12)
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpl	$0, 40(%r12)
	sete	%dil
LBB0_2:
	callq	_ubi_assert
	movl	$1, (%r12)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_set_update_marker
	testl	%eax, %eax
	je	LBB0_3
LBB0_15:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	cmpl	$0, 4(%r12)
	jle	LBB0_7
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_ubi_eba_unmap_leb
	testl	%eax, %eax
	jne	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	cmpl	4(%r12), %ebx
	jl	LBB0_6
LBB0_7:
	testq	%r14, %r14
	je	LBB0_8
## %bb.11:
	movl	(%r15), %edi
	callq	_vmalloc
	movl	%eax, 36(%r12)
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movq	24(%r12), %rsi
	leaq	(%r14,%rsi), %rdi
	decq	%rdi
	callq	_div_u64
	movl	%eax, 32(%r12)
	movq	%r14, 8(%r12)
	movq	$0, 16(%r12)
LBB0_14:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_8:
	movq	%r15, %rdi
	callq	_ubi_wl_flush
	testl	%eax, %eax
	jne	LBB0_15
## %bb.9:
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_clear_update_marker
	testl	%eax, %eax
	jne	LBB0_15
## %bb.10:
	movl	$0, (%r12)
	jmp	LBB0_14
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"start update of volume %d, %llu bytes"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_start_update               ; -- Begin function ubi_start_update
	.p2align	2
_ubi_start_update:                      ; @ubi_start_update
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w1, [x1, #44]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_gen
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	w8, [x19, #40]
	cmp	w8, #0
	cset	w0, eq
LBB0_3:
	bl	_ubi_assert
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x21
	mov	x1, x19
	bl	_set_update_marker
	cbz	w0, LBB0_5
LBB0_4:
	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_5:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:
	mov	w22, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_ubi_eba_unmap_leb
	cbnz	w0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w22, w22, #1
	ldr	w8, [x19, #4]
	cmp	w22, w8
	b.lt	LBB0_7
LBB0_9:
	cbz	x20, LBB0_12
; %bb.10:
	ldr	w0, [x21]
	bl	_vmalloc
	str	w0, [x19, #36]
	cbz	w0, LBB0_15
; %bb.11:
	ldr	x1, [x19, #24]
	add	x8, x20, x1
	sub	x0, x8, #1
	bl	_div_u64
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #32]
	stp	x20, xzr, [x19, #8]
	b	LBB0_4
LBB0_12:
	mov	x0, x21
	bl	_ubi_wl_flush
	cbnz	w0, LBB0_4
; %bb.13:
	mov	x0, x21
	mov	x1, x19
	mov	w2, #0
	bl	_clear_update_marker
	cbnz	w0, LBB0_4
; %bb.14:
	str	wzr, [x19]
	b	LBB0_4
LBB0_15:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"start update of volume %d, %llu bytes"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
