	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function clear_update_marker
_clear_update_marker:                   ## @clear_update_marker
	.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	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_dbg_gen
	movq	(%rbx), %rsi
	shlq	$2, %rsi
	addq	8(%r14), %rsi
	leaq	-32(%rbp), %rdi
	movl	$8, %edx
	callq	_memcpy
	cmpq	$0, 32(%rbx)
	setne	%al
	cmpq	$0, -32(%rbp)
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_ubi_assert
	movq	$0, -32(%rbp)
	movq	8(%rbx), %rax
	movq	_UBI_STATIC_VOLUME@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	$0, 56(%rbx)
	movq	%r15, 16(%rbx)
	movq	40(%rbx), %rsi
	leaq	48(%rbx), %rdx
	movq	%r15, %rdi
	callq	_div_u64_rem
	movl	%eax, 24(%rbx)
	cmpq	$0, 48(%rbx)
	je	LBB0_3
## %bb.2:
	incl	%eax
	movl	%eax, 24(%rbx)
	jmp	LBB0_4
LBB0_3:
	movq	40(%rbx), %rax
	movq	%rax, 48(%rbx)
LBB0_4:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rsi
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	callq	_ubi_change_vtbl_record
	movl	%eax, %r15d
	movq	$0, 32(%rbx)
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clear update marker for volume %d"

	.comm	_UBI_STATIC_VOLUME,8,3          ## @UBI_STATIC_VOLUME
	.no_dead_strip	_clear_update_marker
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function clear_update_marker
_clear_update_marker:                   ; @clear_update_marker
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x1, [x1]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_gen
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x1, x8, x9, lsl #2
	add	x0, sp, #8
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [x20, #32]
	cmp	x8, #0
	ldr	x8, [sp, #8]
	ccmp	x8, #0, #4, ne
	cset	w0, ne
	bl	_ubi_assert
	str	xzr, [sp, #8]
	ldr	x8, [x20, #8]
Lloh2:
	adrp	x9, _UBI_STATIC_VOLUME@GOTPAGE
Lloh3:
	ldr	x9, [x9, _UBI_STATIC_VOLUME@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	str	xzr, [x20, #56]
	str	x21, [x20, #16]
	add	x2, x20, #48
	ldr	x1, [x20, #40]
	mov	x0, x21
	bl	_div_u64_rem
	str	w0, [x20, #24]
	ldr	x8, [x20, #48]
	cbz	x8, LBB0_3
; %bb.2:
	add	w8, w0, #1
	str	w8, [x20, #24]
	b	LBB0_4
LBB0_3:
	ldr	x8, [x20, #40]
	str	x8, [x20, #48]
LBB0_4:
	mov	x0, x19
	bl	_mutex_lock
	ldr	x1, [x20]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ubi_change_vtbl_record
	mov	x21, x0
	str	xzr, [x20, #32]
	mov	x0, x19
	bl	_mutex_unlock
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clear update marker for volume %d"

	.comm	_UBI_STATIC_VOLUME,8,3          ; @UBI_STATIC_VOLUME
	.no_dead_strip	_clear_update_marker
.subsections_via_symbols
