	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function afs_parse_v2_partition
_afs_parse_v2_partition:                ## @afs_parse_v2_partition
	.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	$248, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %edx
	addl	%esi, %edx
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_pr_debug
	movq	%rbx, -280(%rbp)                ## 8-byte Spill
	leal	-48(%rbx), %r14d
	movl	(%r13), %ebx
	addl	%r14d, %ebx
	leaq	-248(%rbp), %rcx
	leaq	-96(%rbp), %r8
	movq	%r13, -264(%rbp)                ## 8-byte Spill
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	$48, %edx
	callq	_mtd_read
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	cmpq	$48, -248(%rbp)
	jne	LBB0_7
## %bb.2:
	movl	-60(%rbp), %edx
	movq	-264(%rbp), %rbx                ## 8-byte Reload
	addl	(%rbx), %r14d
	subl	-64(%rbp), %r14d
	leaq	L_.str.2(%rip), %rdi
	xorl	%r12d, %r12d
	leaq	-96(%rbp), %rsi
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_pr_debug
	leaq	-248(%rbp), %rcx
	leaq	-240(%rbp), %r8
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$144, %edx
	callq	_mtd_read
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	cmpq	$144, -248(%rbp)
	jne	LBB0_8
## %bb.4:
	leaq	-236(%rbp), %rdi
	movl	$34, %esi
	callq	_word_sum_v2
	testl	%eax, %eax
	je	LBB0_13
## %bb.5:
	leaq	-232(%rbp), %rdi
	movl	$34, %esi
	callq	_word_sum_v2
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:
	leaq	L_.str.5(%rip), %rdi
	xorl	%r12d, %r12d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
LBB0_9:
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %r12d
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.12:
	movl	%r12d, %eax
	addq	$248, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	$1, %ebx
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_15
LBB0_14:
	movl	$2, %ebx
	leaq	L_.str.4(%rip), %rdi
LBB0_15:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_pr_debug
	movl	%ebx, %eax
	movl	-240(%rbp,%rax,4), %esi
	movl	-236(%rbp,%rax,4), %edx
	movl	-232(%rbp,%rax,4), %r14d
	movl	-160(%rbp), %r8d
	movl	-156(%rbp), %r9d
	leaq	L_.str.6(%rip), %rdi
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_pr_debug
	movl	%r14d, -256(%rbp)               ## 4-byte Spill
	testl	%r14d, %r14d
	jle	LBB0_11
## %bb.16:
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	movq	%r15, -272(%rbp)                ## 8-byte Spill
	movl	%ebx, -252(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %eax
	orl	%ebx, %eax
	movl	-228(%rbp,%rax,4), %edx
	movl	-224(%rbp,%rax,4), %r15d
	movl	-220(%rbp,%rax,4), %ebx
	leaq	L_.str.7(%rip), %rdi
	movl	%r12d, %esi
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_pr_debug
	addl	-280(%rbp), %ebx                ## 4-byte Folded Reload
	movq	-264(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %r14d
	addl	%ebx, %r15d
	leal	(%r14,%r15), %eax
	decl	%eax
	movq	-272(%rbp), %r15                ## 8-byte Reload
	negl	%r14d
	andl	%eax, %r14d
	leaq	L_.str.8(%rip), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-96(%rbp), %rdi
	callq	_kstrdup
	movl	%eax, 16(%r15)
	testl	%eax, %eax
	je	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	%ebx, (%r15)
	subl	%ebx, %r14d
	movl	%r14d, 4(%r15)
	movq	$0, 8(%r15)
	incl	%r12d
	addl	$4, %r13d
	cmpl	%r12d, -256(%rbp)               ## 4-byte Folded Reload
	movl	-252(%rbp), %ebx                ## 4-byte Reload
	jne	LBB0_17
## %bb.19:
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_20:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	jmp	LBB0_10
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Parsing v2 partition @%08x-%08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"AFS: mtd read failed at 0x%x: %d\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"found image \"%s\", version %08x, info @%08x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Padding 1 word (4 bytes)\n"

L_.str.4:                               ## @.str.4
	.asciz	"Padding 2 words (8 bytes)\n"

L_.str.5:                               ## @.str.5
	.asciz	"AFS: bad checksum on v2 image info: %08x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.6:                               ## @.str.6
	.asciz	"image entry=%08x, attr=%08x, regions=%08x, bs=%08x, be=%08x\n"

L_.str.7:                               ## @.str.7
	.asciz	"  region %d: address: %08x, size: %08x, offset: %08x\n"

L_.str.8:                               ## @.str.8
	.asciz	"   partition start = %08x, partition end = %08x\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_afs_parse_v2_partition
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function afs_parse_v2_partition
_afs_parse_v2_partition:                ; @afs_parse_v2_partition
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #352
	.cfi_def_cfa_offset 352
	stp	x28, x27, [sp, #256]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #272]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #288]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #304]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #320]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #336]            ; 16-byte Folded Spill
	add	x29, sp, #336
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	ldr	w8, [x0]
	add	w8, w8, w1
	stp	x20, x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	ldr	w8, [x21]
	sub	w23, w20, #48
	add	w22, w23, w8
	add	x3, sp, #40
	sub	x4, x29, #144
	mov	x0, x21
	mov	x1, x22
	mov	w2, #48
	bl	_mtd_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
	ldr	x8, [sp, #40]
	cmp	x8, #48
	b.ne	LBB0_7
; %bb.2:
	ldr	w8, [x21]
	ldp	w9, w10, [x29, #-112]
	add	w8, w23, w8
	sub	w22, w8, w9
	sub	x8, x29, #144
	stp	x8, x10, [sp]
	str	x22, [sp, #16]
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
	add	x3, sp, #40
	add	x4, sp, #48
	mov	x0, x21
	mov	x1, x22
	mov	w2, #144
	bl	_mtd_read
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_8
; %bb.3:
	ldr	x8, [sp, #40]
	cmp	x8, #144
	b.ne	LBB0_8
; %bb.4:
	add	x22, sp, #48
	add	x0, x22, #4
	mov	w1, #34
	bl	_word_sum_v2
	cbz	w0, LBB0_13
; %bb.5:
	add	x0, x22, #8
	mov	w1, #34
	bl	_word_sum_v2
	cbz	w0, LBB0_14
; %bb.6:
	mov	x1, x0
Lloh7:
	adrp	x0, l_.str.5@PAGE
Lloh8:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	str	x0, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	b	LBB0_9
LBB0_8:
	str	x0, [sp]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
LBB0_9:
	bl	_pr_err
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldur	x8, [x29, #-96]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.12:
	ldp	x29, x30, [sp, #336]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #320]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #304]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #288]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #272]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #256]            ; 16-byte Folded Reload
	add	sp, sp, #352
	ret
LBB0_13:
	mov	w24, #1
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_14:
	mov	w24, #2
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_15:
	bl	_pr_debug
	add	w8, w24, #1
	add	w9, w24, #2
	ldr	w25, [x22, w9, uxtw #2]
	ldr	w9, [x22, w24, uxtw #2]
	ldr	w8, [x22, w8, uxtw #2]
	ldp	w10, w11, [sp, #128]
	stp	x10, x11, [sp, #24]
	stp	x8, x25, [sp, #8]
	str	x9, [sp]
Lloh24:
	adrp	x0, l_.str.6@PAGE
Lloh25:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_pr_debug
	cmp	w25, #1
	b.lt	LBB0_19
; %bb.16:
	mov	w26, #0
	mov	w27, #0
	add	x28, sp, #48
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	orr	w8, w26, w24
	add	w9, w8, #4
	ldr	w23, [x28, w9, uxtw #2]
	add	w9, w8, #3
	add	w8, w8, #5
	ldr	w22, [x28, w8, uxtw #2]
	ldr	w8, [x28, w9, uxtw #2]
	stp	x23, x22, [sp, #16]
	stp	x27, x8, [sp]
Lloh26:
	adrp	x0, l_.str.7@PAGE
Lloh27:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_debug
	ldr	w8, [x21]
	add	w22, w22, w20
	add	w9, w23, w22
	add	w9, w9, w8
	sub	w9, w9, #1
	neg	w8, w8
	and	w23, w9, w8
	stp	x22, x23, [sp]
Lloh28:
	adrp	x0, l_.str.8@PAGE
Lloh29:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_pr_debug
Lloh30:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	sub	x0, x29, #144
	bl	_kstrdup
	str	w0, [x19, #16]
	cbz	w0, LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	sub	w8, w23, w22
	stp	w22, w8, [x19]
	str	xzr, [x19, #8]
	add	w27, w27, #1
	add	w26, w26, #4
	cmp	w25, w27
	b.ne	LBB0_17
LBB0_19:
	mov	w0, #0
	b	LBB0_11
LBB0_20:
Lloh33:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_10
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Parsing v2 partition @%08x-%08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"AFS: mtd read failed at 0x%x: %d\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"found image \"%s\", version %08x, info @%08x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Padding 1 word (4 bytes)\n"

l_.str.4:                               ; @.str.4
	.asciz	"Padding 2 words (8 bytes)\n"

l_.str.5:                               ; @.str.5
	.asciz	"AFS: bad checksum on v2 image info: %08x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.6:                               ; @.str.6
	.asciz	"image entry=%08x, attr=%08x, regions=%08x, bs=%08x, be=%08x\n"

l_.str.7:                               ; @.str.7
	.asciz	"  region %d: address: %08x, size: %08x, offset: %08x\n"

l_.str.8:                               ; @.str.8
	.asciz	"   partition start = %08x, partition end = %08x\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_afs_parse_v2_partition
.subsections_via_symbols
