	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_leb_change                 ## -- Begin function ubi_leb_change
	.p2align	4, 0x90
_ubi_leb_change:                        ## @ubi_leb_change
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %eax
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	movq	32(%rbx), %r12
	movl	(%rbx), %r14d
	leaq	L_.str(%rip), %rdi
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %esi
	movl	%r14d, %edx
	movl	%eax, %r13d
	movl	%eax, %ecx
	callq	_dbg_gen
	testl	%r14d, %r14d
	js	LBB0_2
## %bb.1:
	cmpl	(%r12), %r14d
	jge	LBB0_2
## %bb.4:
	movq	(%r15), %rax
	movq	_UBI_READONLY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	8(%rbx), %rax
	movq	_UBI_STATIC_VOLUME@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
LBB0_6:
	movq	_EROFS@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_7:
	testl	%r13d, %r13d
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	js	LBB0_2
## %bb.8:
	testl	%r8d, %r8d
	js	LBB0_2
## %bb.9:
	cmpl	%r13d, 16(%rbx)
	jle	LBB0_2
## %bb.10:
	cmpl	%r8d, 20(%rbx)
	jl	LBB0_2
## %bb.11:
	movl	4(%r12), %eax
	decl	%eax
	testl	%r8d, %eax
	jne	LBB0_2
## %bb.12:
	movq	_UBI_LONGTERM@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	cmpl	%r9d, (%rax)
	je	LBB0_15
## %bb.13:
	movq	_UBI_SHORTTERM@GOTPCREL(%rip), %rax
	cmpl	%r9d, (%rax)
	je	LBB0_15
## %bb.14:
	movq	_UBI_UNKNOWN@GOTPCREL(%rip), %rax
	cmpl	%r9d, (%rax)
	je	LBB0_15
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	cmpq	$0, 24(%rbx)
	je	LBB0_17
## %bb.16:
	movq	_EBADF@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_17:
	testl	%r8d, %r8d
	je	LBB0_18
## %bb.20:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ubi_eba_atomic_leb_change      ## TAILCALL
LBB0_18:
	xorl	%eax, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"atomically write %d bytes to LEB %d:%d"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_UBI_READONLY,8,3               ## @UBI_READONLY
	.comm	_UBI_STATIC_VOLUME,8,3          ## @UBI_STATIC_VOLUME
	.comm	_EROFS,4,2                      ## @EROFS
	.comm	_UBI_LONGTERM,4,2               ## @UBI_LONGTERM
	.comm	_UBI_SHORTTERM,4,2              ## @UBI_SHORTTERM
	.comm	_UBI_UNKNOWN,4,2                ## @UBI_UNKNOWN
	.comm	_EBADF,4,2                      ## @EBADF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_leb_change                 ; -- Begin function ubi_leb_change
	.p2align	2
_ubi_leb_change:                        ; @ubi_leb_change
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x25, x0
	ldr	x23, [x0, #8]
	ldr	x24, [x23, #32]
	ldr	w26, [x23]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x3
	mov	x2, x26
	mov	x3, x22
	bl	_dbg_gen
	tbnz	w26, #31, LBB0_13
; %bb.1:
	ldr	w8, [x24]
	cmp	w26, w8
	b.ge	LBB0_13
; %bb.2:
	ldr	x8, [x25]
Lloh2:
	adrp	x9, _UBI_READONLY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _UBI_READONLY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x23, #8]
Lloh5:
	adrp	x9, _UBI_STATIC_VOLUME@GOTPAGE
Lloh6:
	ldr	x9, [x9, _UBI_STATIC_VOLUME@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _EROFS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
	b	LBB0_14
LBB0_5:
	tbnz	w22, #31, LBB0_13
; %bb.6:
	tbnz	w20, #31, LBB0_13
; %bb.7:
	ldr	w8, [x23, #16]
	cmp	w8, w22
	b.le	LBB0_13
; %bb.8:
	ldr	w8, [x23, #20]
	cmp	w8, w20
	b.lt	LBB0_13
; %bb.9:
	ldr	w8, [x24, #4]
	sub	w8, w8, #1
	tst	w8, w20
	b.ne	LBB0_13
; %bb.10:
Lloh10:
	adrp	x8, _UBI_LONGTERM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _UBI_LONGTERM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, w19
	b.eq	LBB0_16
; %bb.11:
Lloh13:
	adrp	x8, _UBI_SHORTTERM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _UBI_SHORTTERM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, w19
	b.eq	LBB0_16
; %bb.12:
Lloh16:
	adrp	x8, _UBI_UNKNOWN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _UBI_UNKNOWN@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w8, w19
	b.eq	LBB0_16
LBB0_13:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_16:
	ldr	x8, [x23, #24]
	cbz	x8, LBB0_18
; %bb.17:
Lloh21:
	adrp	x8, _EBADF@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
	b	LBB0_14
LBB0_18:
	cbz	w20, LBB0_20
; %bb.19:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ubi_eba_atomic_leb_change
LBB0_20:
	mov	w0, #0
	b	LBB0_15
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"atomically write %d bytes to LEB %d:%d"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_UBI_READONLY,8,3               ; @UBI_READONLY
	.comm	_UBI_STATIC_VOLUME,8,3          ; @UBI_STATIC_VOLUME
	.comm	_EROFS,4,2                      ; @EROFS
	.comm	_UBI_LONGTERM,4,2               ; @UBI_LONGTERM
	.comm	_UBI_SHORTTERM,4,2              ; @UBI_SHORTTERM
	.comm	_UBI_UNKNOWN,4,2                ; @UBI_UNKNOWN
	.comm	_EBADF,4,2                      ; @EBADF
.subsections_via_symbols
