	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_check_volume               ## -- Begin function ubi_check_volume
	.p2align	4, 0x90
_ubi_check_volume:                      ## @ubi_check_volume
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %r12
	movq	(%r12), %rax
	movq	_UBI_STATIC_VOLUME@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.1:
	movq	%rdi, %r15
	movl	8(%r12), %edi
	callq	_vmalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %r14
	movl	12(%r12), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_8
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	decl	%eax
	xorl	%ecx, %ecx
	cmpl	%eax, %ebx
	sete	%cl
	movl	8(%r12,%rcx,8), %r9d
	movl	$1, (%rsp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	callq	_ubi_eba_read_leb
	testl	%eax, %eax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movl	12(%r12), %eax
	cmpl	%eax, %ebx
	jl	LBB0_3
## %bb.7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_4:
	movq	_EBADMSG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	movl	$1, %ebx
	cmovnel	%eax, %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_vfree
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UBI_STATIC_VOLUME,8,3          ## @UBI_STATIC_VOLUME
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EBADMSG,4,2                    ## @EBADMSG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_check_volume               ; -- Begin function ubi_check_volume
	.p2align	2
_ubi_check_volume:                      ; @ubi_check_volume
	.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]
	ldr	x21, [x8, w1, sxtw #3]
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _UBI_STATIC_VOLUME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _UBI_STATIC_VOLUME@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	w0, [x21, #8]
	bl	_vmalloc
	cbz	x0, LBB0_8
; %bb.2:
	mov	x19, x0
	ldr	w8, [x21, #12]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	w22, #0
	mov	w23, #8
	mov	w24, #16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w8, #1
	cmp	w22, w8
	csel	x8, x24, x23, eq
	ldr	w5, [x21, x8]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x19
	mov	w4, #0
	mov	w6, #1
	bl	_ubi_eba_read_leb
	cbnz	w0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #1
	ldr	w8, [x21, #12]
	cmp	w22, w8
	b.lt	LBB0_4
LBB0_6:
	mov	w20, #0
	b	LBB0_10
LBB0_7:
	mov	w20, #0
	b	LBB0_11
LBB0_8:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_9:
Lloh6:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	csinc	w20, w0, wzr, ne
LBB0_10:
	mov	x0, x19
	bl	_vfree
LBB0_11:
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_UBI_STATIC_VOLUME,8,3          ; @UBI_STATIC_VOLUME
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EBADMSG,4,2                    ; @EBADMSG
.subsections_via_symbols
