	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtdsplit_parse_lzma
_mtdsplit_parse_lzma:                   ## @mtdsplit_parse_lzma
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	-40(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movl	$16, %edx
	xorl	%esi, %esi
	callq	_mtd_read
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	cmpq	$16, -40(%rbp)
	jne	LBB0_2
## %bb.4:
	movq	-56(%rbp), %rdi
	cmpl	$225, (%rdi)
	jge	LBB0_5
## %bb.6:
	addq	$4, %rdi
	callq	_get_unaligned_le32
	movq	%rax, %rdi
	callq	_is_power_of_2
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	leaq	-48(%rbp), %rdi
	callq	_get_unaligned_le32
	testq	%rax, %rax
	je	LBB0_8
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	8(%rbx), %esi
	movq	(%rbx), %rdx
	leaq	-32(%rbp), %rcx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	callq	_mtd_find_rootfs_from
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	_LZMA_NR_PARTS@GOTPCREL(%rip), %r15
	movl	(%r15), %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_10
## %bb.11:
	movq	_KERNEL_PART_NAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movq	$0, (%rax)
	movq	-32(%rbp), %rcx
	movq	%rcx, 8(%rax)
	movq	_ROOTFS_PART_NAME@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 40(%rax)
	movq	%rcx, 24(%rax)
	movq	(%rbx), %rdx
	subq	%rcx, %rdx
	movq	%rdx, 32(%rax)
	movq	%rax, (%r14)
	movl	(%r15), %eax
	jmp	LBB0_12
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LZMA_NR_PARTS,4,2              ## @LZMA_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_lzma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtdsplit_parse_lzma
_mtdsplit_parse_lzma:                   ; @mtdsplit_parse_lzma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
	mov	x20, x0
	add	x3, sp, #8
	add	x4, sp, #16
	mov	w1, #0
	mov	w2, #16
	bl	_mtd_read
	cbnz	w0, LBB0_8
; %bb.1:
	ldr	x8, [sp, #8]
	cmp	x8, #16
	b.ne	LBB0_6
; %bb.2:
	ldr	x8, [sp, #16]
	ldr	w9, [x8]
	cmp	w9, #225
	b.ge	LBB0_5
; %bb.3:
	add	x0, x8, #4
	bl	_get_unaligned_le32
	bl	_is_power_of_2
	cbz	w0, LBB0_5
; %bb.4:
	add	x8, sp, #16
	add	x0, x8, #8
	bl	_get_unaligned_le32
	cbz	x0, LBB0_9
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #80
	ret
LBB0_9:
	ldr	w1, [x20, #8]
	ldr	x2, [x20]
	mov	x3, sp
	mov	x0, x20
	mov	x4, #0
	bl	_mtd_find_rootfs_from
	cbnz	w0, LBB0_8
; %bb.10:
Lloh4:
	adrp	x21, _LZMA_NR_PARTS@GOTPAGE
Lloh5:
	ldr	x21, [x21, _LZMA_NR_PARTS@GOTPAGEOFF]
	ldr	w8, [x21]
	add	w8, w8, w8, lsl #1
	lsl	w0, w8, #3
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.11:
Lloh9:
	adrp	x8, _KERNEL_PART_NAME@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KERNEL_PART_NAME@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	str	xzr, [x0]
	ldr	x8, [sp]
	str	x8, [x0, #8]
Lloh12:
	adrp	x9, _ROOTFS_PART_NAME@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ROOTFS_PART_NAME@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	str	w9, [x0, #40]
	str	x8, [x0, #24]
	ldr	x9, [x20]
	sub	x8, x9, x8
	str	x8, [x0, #32]
	str	x0, [x19]
	ldr	w0, [x21]
	b	LBB0_8
LBB0_12:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LZMA_NR_PARTS,4,2              ; @LZMA_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_lzma
.subsections_via_symbols
