	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_eba_unmap_leb              ## -- Begin function ubi_eba_unmap_leb
	.p2align	4, 0x90
_ubi_eba_unmap_leb:                     ## @ubi_eba_unmap_leb
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	_EROFS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	(%rsi), %r15d
	movl	%r15d, %esi
	callq	_leb_write_lock
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	8(%r12), %rax
	movslq	%r14d, %rcx
	movl	(%rax,%rcx,4), %ebx
	testl	%ebx, %ebx
	js	LBB0_4
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %ecx
	callq	_dbg_eba
	movq	_UBI_LEB_UNMAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r12), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rcx,%rdx,4)
	movq	%r13, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_ubi_wl_put_peb
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_4:
	xorl	%ebx, %ebx
LBB0_6:
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_leb_write_unlock
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EROFS,4,2                      ## @EROFS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"erase LEB %d:%d, PEB %d"

	.comm	_UBI_LEB_UNMAPPED,4,2           ## @UBI_LEB_UNMAPPED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_eba_unmap_leb              ; -- Begin function ubi_eba_unmap_leb
	.p2align	2
_ubi_eba_unmap_leb:                     ; @ubi_eba_unmap_leb
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EROFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_7
LBB0_2:
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	ldr	w21, [x1]
	mov	x1, x21
	bl	_leb_write_lock
	mov	x23, x0
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	x8, [x22, #8]
	ldr	w23, [x8, w19, sxtw #2]
	tbnz	w23, #31, LBB0_5
; %bb.4:
	sxtw	x24, w19
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	mov	x3, x23
	bl	_dbg_eba
Lloh5:
	adrp	x8, _UBI_LEB_UNMAPPED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _UBI_LEB_UNMAPPED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	x9, [x22, #8]
	str	w8, [x9, x24, lsl #2]
	mov	x0, x20
	mov	x1, x23
	mov	w2, #0
	bl	_ubi_wl_put_peb
	mov	x23, x0
	b	LBB0_6
LBB0_5:
	mov	w23, #0
LBB0_6:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_leb_write_unlock
LBB0_7:
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EROFS,4,2                      ; @EROFS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"erase LEB %d:%d, PEB %d"

	.comm	_UBI_LEB_UNMAPPED,4,2           ; @UBI_LEB_UNMAPPED
.subsections_via_symbols
