	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtdsplit_parse_eva
_mtdsplit_parse_eva:                    ## @mtdsplit_parse_eva
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	-56(%rbp), %rcx
	leaq	-48(%rbp), %r8
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_mtd_read
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	cmpq	$8, -56(%rbp)
	jne	LBB0_2
## %bb.4:
	movl	-44(%rbp), %edi
	callq	_le32_to_cpu
	movq	_EVA_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movl	-48(%rbp), %edi
	callq	_le32_to_cpu
	movq	%rax, %r15
	movq	_EVA_FOOTER_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	movq	%r15, %rdi
	movl	$65536, %esi                    ## imm = 0x10000
	callq	_round_up
	movq	%rax, %r12
	movq	_EVA_DUMMY_SQUASHFS_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	cmpq	(%rbx), %r12
	jae	LBB0_5
## %bb.7:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_mtd_check_rootfs_magic
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	_EVA_NR_PARTS@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	shll	$3, %eax
	leal	(%rax,%rax,2), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	_KERNEL_PART_NAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movq	$0, (%rax)
	movq	%r15, 8(%rax)
	movq	_ROOTFS_PART_NAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%rax)
	movq	%r12, 24(%rax)
	movq	(%rbx), %rcx
	subq	%r12, %rcx
	movq	%rcx, 32(%rax)
	movq	%rax, (%r14)
	movl	(%r13), %eax
	jmp	LBB0_11
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EVA_MAGIC,8,3                  ## @EVA_MAGIC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EVA_FOOTER_SIZE,8,3            ## @EVA_FOOTER_SIZE
	.comm	_EVA_DUMMY_SQUASHFS_SIZE,8,3    ## @EVA_DUMMY_SQUASHFS_SIZE
	.comm	_EVA_NR_PARTS,4,2               ## @EVA_NR_PARTS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_KERNEL_PART_NAME,4,2           ## @KERNEL_PART_NAME
	.comm	_ROOTFS_PART_NAME,4,2           ## @ROOTFS_PART_NAME
	.no_dead_strip	_mtdsplit_parse_eva
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtdsplit_parse_eva
_mtdsplit_parse_eva:                    ; @mtdsplit_parse_eva
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	mov	x3, sp
	add	x4, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_mtd_read
	cbnz	w0, LBB0_10
; %bb.1:
	ldr	x8, [sp]
	cmp	x8, #8
	b.ne	LBB0_7
; %bb.2:
	ldr	w0, [sp, #12]
	bl	_le32_to_cpu
Lloh0:
	adrp	x8, _EVA_MAGIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVA_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.3:
	ldr	w0, [sp, #8]
	bl	_le32_to_cpu
Lloh3:
	adrp	x8, _EVA_FOOTER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EVA_FOOTER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x21, x8, x0
	mov	x0, x21
	mov	w1, #65536
	bl	_round_up
Lloh6:
	adrp	x8, _EVA_DUMMY_SQUASHFS_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EVA_DUMMY_SQUASHFS_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x9, [x20]
	add	x22, x8, x0
	cmp	x22, x9
	b.hs	LBB0_8
; %bb.4:
	mov	x0, x20
	mov	x1, x22
	mov	x2, #0
	bl	_mtd_check_rootfs_magic
	cbnz	w0, LBB0_10
; %bb.5:
Lloh9:
	adrp	x23, _EVA_NR_PARTS@GOTPAGE
Lloh10:
	ldr	x23, [x23, _EVA_NR_PARTS@GOTPAGEOFF]
	ldr	w8, [x23]
	add	w8, w8, w8, lsl #1
	lsl	w0, w8, #3
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.6:
Lloh14:
	adrp	x8, _KERNEL_PART_NAME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _KERNEL_PART_NAME@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	stp	xzr, x21, [x0]
Lloh17:
	adrp	x8, _ROOTFS_PART_NAME@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ROOTFS_PART_NAME@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x0, #40]
	str	x22, [x0, #24]
	ldr	x8, [x20]
	sub	x8, x8, x22
	str	x8, [x0, #32]
	str	x0, [x19]
	ldr	w0, [x23]
	b	LBB0_10
LBB0_7:
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EVA_MAGIC,8,3                  ; @EVA_MAGIC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EVA_FOOTER_SIZE,8,3            ; @EVA_FOOTER_SIZE
	.comm	_EVA_DUMMY_SQUASHFS_SIZE,8,3    ; @EVA_DUMMY_SQUASHFS_SIZE
	.comm	_EVA_NR_PARTS,4,2               ; @EVA_NR_PARTS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_KERNEL_PART_NAME,4,2           ; @KERNEL_PART_NAME
	.comm	_ROOTFS_PART_NAME,4,2           ; @ROOTFS_PART_NAME
	.no_dead_strip	_mtdsplit_parse_eva
.subsections_via_symbols
