	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function leb_read_sanity_check
_leb_read_sanity_check:                 ## @leb_read_sanity_check
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %r8
	movl	(%r8), %edi
	testl	%edi, %edi
	js	LBB0_6
## %bb.1:
	testl	%esi, %esi
	js	LBB0_6
## %bb.2:
	movq	40(%r8), %rax
	cmpl	(%rax), %edi
	jge	LBB0_6
## %bb.3:
	movl	%ecx, %eax
	orl	%edx, %eax
	js	LBB0_6
## %bb.4:
	movl	4(%r8), %edi
	cmpl	%esi, %edi
	jle	LBB0_6
## %bb.5:
	addl	%edx, %ecx
	cmpl	8(%r8), %ecx
	jg	LBB0_6
## %bb.7:
	movq	16(%r8), %rax
	movq	_UBI_STATIC_VOLUME@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_10
## %bb.8:
	decl	%edi
	cmpl	%esi, %edi
	jne	LBB0_10
## %bb.9:
	cmpl	24(%r8), %ecx
	jle	LBB0_10
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_13:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_10:
	cmpq	$0, 32(%r8)
	je	LBB0_11
## %bb.12:
	movq	_EBADF@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_11:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_UBI_STATIC_VOLUME,8,3          ## @UBI_STATIC_VOLUME
	.comm	_EBADF,4,2                      ## @EBADF
	.no_dead_strip	_leb_read_sanity_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function leb_read_sanity_check
_leb_read_sanity_check:                 ; @leb_read_sanity_check
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
	ldr	w9, [x8]
	tbnz	w9, #31, LBB0_8
; %bb.1:
	tbnz	w1, #31, LBB0_8
; %bb.2:
	ldr	x10, [x8, #40]
	ldr	w10, [x10]
	cmp	w9, w10
	b.ge	LBB0_8
; %bb.3:
	orr	w9, w3, w2
	tbnz	w9, #31, LBB0_8
; %bb.4:
	ldr	w10, [x8, #4]
	cmp	w10, w1
	b.le	LBB0_8
; %bb.5:
	ldr	w11, [x8, #8]
	add	w9, w3, w2
	cmp	w9, w11
	b.gt	LBB0_8
; %bb.6:
	ldr	x11, [x8, #16]
Lloh0:
	adrp	x12, _UBI_STATIC_VOLUME@GOTPAGE
Lloh1:
	ldr	x12, [x12, _UBI_STATIC_VOLUME@GOTPAGEOFF]
Lloh2:
	ldr	x12, [x12]
	sub	w10, w10, #1
	cmp	x11, x12
	ccmp	w10, w1, #0, eq
	b.ne	LBB0_10
; %bb.7:
	ldr	w10, [x8, #24]
	cmp	w9, w10
	b.le	LBB0_10
LBB0_8:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_10:
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_12
; %bb.11:
Lloh5:
	adrp	x8, _EBADF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
	b	LBB0_9
LBB0_12:
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_UBI_STATIC_VOLUME,8,3          ; @UBI_STATIC_VOLUME
	.comm	_EBADF,4,2                      ; @EBADF
	.no_dead_strip	_leb_read_sanity_check
.subsections_via_symbols
