	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_is_mapped                  ## -- Begin function ubi_is_mapped
	.p2align	4, 0x90
_ubi_is_mapped:                         ## @ubi_is_mapped
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	(%rdi), %r14
	movl	24(%r14), %esi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_dbg_gen
	testl	%ebx, %ebx
	js	LBB0_2
## %bb.1:
	cmpl	%ebx, (%r14)
	jle	LBB0_2
## %bb.4:
	cmpq	$0, 16(%r14)
	je	LBB0_6
## %bb.5:
	movq	_EBADF@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	8(%r14), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %rax
	shrq	$63, %rax
	xorl	$1, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"test LEB %d:%d"

	.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_is_mapped                  ; -- Begin function ubi_is_mapped
	.p2align	2
_ubi_is_mapped:                         ; @ubi_is_mapped
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	x20, [x0]
	ldr	w1, [x20, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dbg_gen
	tbnz	w19, #31, LBB0_4
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, w19
	b.le	LBB0_4
; %bb.2:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_7
; %bb.3:
Lloh2:
	adrp	x8, _EBADF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, w19, uxtw #3]
	lsr	x8, x8, #63
	eor	w0, w8, #0x1
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"test LEB %d:%d"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBADF,4,2                      ; @EBADF
.subsections_via_symbols
