	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_leb_unmap                  ## -- Begin function ubi_leb_unmap
	.p2align	4, 0x90
_ubi_leb_unmap:                         ## @ubi_leb_unmap
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	movq	32(%r12), %r15
	movl	24(%r12), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %edx
	callq	_dbg_gen
	movq	(%rbx), %rax
	movq	_UBI_READONLY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	(%r12), %rax
	movq	_UBI_STATIC_VOLUME@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_2:
	movq	_EROFS@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	testl	%r14d, %r14d
	js	LBB0_6
## %bb.5:
	cmpl	%r14d, 8(%r12)
	jle	LBB0_6
## %bb.7:
	cmpq	$0, 16(%r12)
	je	LBB0_9
## %bb.8:
	movq	_EBADF@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_9:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ubi_eba_unmap_leb              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unmap LEB %d:%d"

	.comm	_UBI_READONLY,8,3               ## @UBI_READONLY
	.comm	_UBI_STATIC_VOLUME,8,3          ## @UBI_STATIC_VOLUME
	.comm	_EROFS,4,2                      ## @EROFS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.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_unmap                  ; -- Begin function ubi_leb_unmap
	.p2align	2
_ubi_leb_unmap:                         ; @ubi_leb_unmap
	.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	x19, x1
	mov	x22, x0
	ldr	x20, [x0, #8]
	ldr	x21, [x20, #32]
	ldr	w1, [x20, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dbg_gen
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _UBI_READONLY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _UBI_READONLY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x20]
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_4
LBB0_2:
Lloh8:
	adrp	x8, _EROFS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
	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_4:
	tbnz	w19, #31, LBB0_8
; %bb.5:
	ldr	w8, [x20, #8]
	cmp	w8, w19
	b.le	LBB0_8
; %bb.6:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_9
; %bb.7:
Lloh10:
	adrp	x8, _EBADF@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
	b	LBB0_3
LBB0_8:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_3
LBB0_9:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	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
	b	_ubi_eba_unmap_leb
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unmap LEB %d:%d"

	.comm	_UBI_READONLY,8,3               ; @UBI_READONLY
	.comm	_UBI_STATIC_VOLUME,8,3          ; @UBI_STATIC_VOLUME
	.comm	_EROFS,4,2                      ; @EROFS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBADF,4,2                      ; @EBADF
.subsections_via_symbols
