	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm963xx_parse_imagetag_partitions
_bcm963xx_parse_imagetag_partitions:    ## @bcm963xx_parse_imagetag_partitions
	.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	$56, %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, %r13
	movl	$16, %edi
	callq	_vmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	leaq	L_.str(%rip), %r15
	movq	%r13, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	movq	%rax, %rcx
	callq	_bcm963xx_read_imagetag
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	jmp	LBB0_28
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_31
LBB0_4:
	movl	12(%r12), %edi
	callq	_STR_NULL_TERMINATE
	movl	12(%r12), %edi
	leaq	-48(%rbp), %rdx
	movl	$10, %esi
	callq	_kstrtouint
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movl	-48(%rbp), %eax
	movq	_BCM963XX_EXTENDED_SIZE@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jae	LBB0_8
LBB0_6:
	movl	12(%r12), %edx
	leaq	L_.str.1(%rip), %rdi
LBB0_7:
	movl	$4, %esi
	callq	_pr_err
	xorl	%ebx, %ebx
LBB0_28:
	movq	%r12, %rdi
	callq	_vfree
LBB0_31:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	8(%r12), %edi
	callq	_STR_NULL_TERMINATE
	movl	8(%r12), %edi
	leaq	-56(%rbp), %rdx
	movl	$10, %esi
	callq	_kstrtouint
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movl	-56(%rbp), %eax
	cmpl	(%rbx), %eax
	jae	LBB0_11
LBB0_10:
	movl	8(%r12), %edx
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_7
LBB0_11:
	movl	4(%r12), %edi
	callq	_STR_NULL_TERMINATE
	movl	4(%r12), %edi
	leaq	-52(%rbp), %rdx
	movl	$10, %esi
	callq	_kstrtouint
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	4(%r12), %edx
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_7
LBB0_13:
	movl	(%r12), %edi
	callq	_STR_NULL_TERMINATE
	movl	(%r12), %edi
	leaq	-84(%rbp), %rdx
	movl	$10, %esi
	callq	_kstrtouint
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	(%r12), %edx
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_7
LBB0_15:
	movl	-48(%rbp), %eax
	movl	-56(%rbp), %ecx
	cmpl	%ecx, %eax
	movl	%ecx, %edx
	cmovbl	%eax, %edx
	addl	$-16, %edx
	subl	%edx, %ecx
	movl	%ecx, -56(%rbp)
	subl	%edx, %eax
	movl	%eax, -48(%rbp)
	movl	-84(%rbp), %edi
	movl	4(%r13), %esi
	callq	_roundup
	movl	-48(%rbp), %ecx
	movl	-56(%rbp), %edi
	movl	%edi, %esi
	subl	%ecx, %esi
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	%ecx, -80(%rbp)                 ## 4-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	jbe	LBB0_17
## %bb.16:
	movl	-52(%rbp), %edx
	jmp	LBB0_18
LBB0_17:
	movl	-52(%rbp), %edx
	leal	(%rdx,%rdi), %ecx
	movl	%ecx, -48(%rbp)
	movl	%eax, %esi
	subl	%ecx, %esi
LBB0_18:
	movl	(%r13), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	xorl	%ecx, %ecx
	movl	%esi, %r13d
	testl	%esi, %esi
	setne	%cl
	leal	1(%rcx), %ebx
	testl	%edx, %edx
	cmovel	%ecx, %ebx
	leal	(%rbx,%rbx,4), %eax
	leal	(%rax,%rax,4), %edi
	addl	%ebx, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_29
## %bb.19:
	cmpl	$0, -52(%rbp)
	je	LBB0_20
## %bb.21:
	movl	%r13d, %r10d
	testl	%r13d, %r13d
	setne	%dl
	movl	-80(%rbp), %r11d                ## 4-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	cmpl	%r11d, %edi
	seta	%cl
	andb	%dl, %cl
	movzbl	%cl, %edx
	shlq	$4, %rdx
	leaq	L_.str.5(%rip), %rcx
	movq	%rcx, (%rax,%rdx)
	movl	-56(%rbp), %ecx
	movl	%ecx, 8(%rax,%rdx)
	movl	-52(%rbp), %ecx
	movl	%ecx, 12(%rax,%rdx)
	movl	$1, %esi
	movl	-64(%rbp), %r9d                 ## 4-byte Reload
	jmp	LBB0_22
LBB0_29:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r12, %rdi
	callq	_vfree
	testl	%r14d, %r14d
	je	LBB0_31
## %bb.30:
	negl	%r14d
	movl	%r14d, %ebx
	jmp	LBB0_31
LBB0_20:
	xorl	%esi, %esi
	movl	-64(%rbp), %r9d                 ## 4-byte Reload
	movl	%r13d, %r10d
	movl	-80(%rbp), %r11d                ## 4-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
LBB0_22:
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	movl	%r8d, %r13d
	subl	%r9d, %r13d
	testl	%r10d, %r10d
	je	LBB0_24
## %bb.23:
	cmpl	$0, -52(%rbp)
	setne	-41(%rbp)                       ## 1-byte Folded Spill
	cmpl	%r11d, %edi
	seta	%dl
	movl	%r13d, %edi
	movl	$0, %ecx
	cmoval	%ecx, %edi
	xorl	%r11d, %r11d
	andb	-41(%rbp), %dl                  ## 1-byte Folded Reload
	movzbl	%dl, %ecx
	subq	%rcx, %rsi
	shlq	$4, %rsi
	movq	%r15, (%rax,%rsi)
	movl	-48(%rbp), %ecx
	movl	%ecx, 8(%rax,%rsi)
	cmpl	%r9d, %r8d
	cmovel	%r11d, %edi
	addl	%r10d, %edi
	movl	%edi, 12(%rax,%rsi)
LBB0_24:
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	je	LBB0_27
## %bb.25:
	movl	%ebx, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	addq	$12, %r15
	xorl	%r13d, %r13d
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movq	-12(%r15), %rdx
	movl	-4(%r15), %ecx
	movl	(%r15), %r8d
	leaq	L_.str.6(%rip), %rdi
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_pr_info
	incq	%r13
	addq	$16, %r15
	cmpq	%r13, -80(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_26
LBB0_27:
	leaq	L_.str.7(%rip), %rdi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_pr_info
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r14)
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rootfs"

	.comm	_BCM963XX_EXTENDED_SIZE,4,2     ## @BCM963XX_EXTENDED_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"invalid rootfs address: %*ph\n"

L_.str.2:                               ## @.str.2
	.asciz	"invalid kernel address: %*ph\n"

L_.str.3:                               ## @.str.3
	.asciz	"invalid kernel length: %*ph\n"

L_.str.4:                               ## @.str.4
	.asciz	"invalid total length: %*ph\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.5:                               ## @.str.5
	.asciz	"kernel"

L_.str.6:                               ## @.str.6
	.asciz	"Partition %d is %s offset %llx and length %llx\n"

L_.str.7:                               ## @.str.7
	.asciz	"Spare partition is offset %x and length %x\n"

	.no_dead_strip	_bcm963xx_parse_imagetag_partitions
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm963xx_parse_imagetag_partitions
_bcm963xx_parse_imagetag_partitions:    ; @bcm963xx_parse_imagetag_partitions
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x20, x1
	mov	x24, x0
	mov	w0, #16
	bl	_vmalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x21, l_.str@PAGE
Lloh1:
	add	x21, x21, l_.str@PAGEOFF
	mov	x0, x24
	mov	x1, x21
	mov	w2, #0
	mov	x3, x19
	bl	_bcm963xx_read_imagetag
	cbz	w0, LBB0_4
; %bb.2:
	mov	x22, x0
	b	LBB0_8
LBB0_3:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
LBB0_4:
	ldr	w0, [x19, #12]
	bl	_STR_NULL_TERMINATE
	ldr	w0, [x19, #12]
	add	x2, sp, #44
	mov	w1, #10
	bl	_kstrtouint
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	w8, [sp, #44]
Lloh5:
	adrp	x22, _BCM963XX_EXTENDED_SIZE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _BCM963XX_EXTENDED_SIZE@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w9
	b.hs	LBB0_10
LBB0_6:
	ldr	w2, [x19, #12]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	mov	w1, #4
	bl	_pr_err
	mov	w22, #0
LBB0_8:
	mov	x0, x19
	bl	_vfree
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_10:
	ldr	w0, [x19, #8]
	bl	_STR_NULL_TERMINATE
	ldr	w0, [x19, #8]
	add	x2, sp, #40
	mov	w1, #10
	bl	_kstrtouint
	cbnz	x0, LBB0_12
; %bb.11:
	ldr	w8, [sp, #40]
	ldr	w9, [x22]
	cmp	w8, w9
	b.hs	LBB0_13
LBB0_12:
	ldr	w2, [x19, #8]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_13:
	ldr	w0, [x19, #4]
	bl	_STR_NULL_TERMINATE
	ldr	w0, [x19, #4]
	add	x2, sp, #36
	mov	w1, #10
	bl	_kstrtouint
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w2, [x19, #4]
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_15:
	ldr	w0, [x19]
	bl	_STR_NULL_TERMINATE
	ldr	w0, [x19]
	add	x2, sp, #32
	mov	w1, #10
	bl	_kstrtouint
	cbz	x0, LBB0_17
; %bb.16:
	ldr	w2, [x19]
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_17:
	ldp	w9, w8, [sp, #40]
	cmp	w8, w9
	csel	w10, w8, w9, lo
	sub	w10, w10, #16
	sub	w9, w9, w10
	sub	w8, w8, w10
	stp	w9, w8, [sp, #40]
	ldr	w0, [sp, #32]
	ldr	w1, [x24, #4]
	bl	_roundup
	mov	x23, x0
	ldp	w28, w27, [sp, #40]
	subs	w26, w28, w27
	b.ls	LBB0_19
; %bb.18:
	ldr	w8, [sp, #36]
	b	LBB0_20
LBB0_19:
	ldr	w8, [sp, #36]
	add	w9, w8, w28
	sub	w26, w23, w9
	str	w9, [sp, #44]
LBB0_20:
	ldr	w25, [x24]
	cmp	w26, #0
	cset	w9, ne
	mov	w10, #1
	cinc	w10, w10, ne
	cmp	w8, #0
	csel	w22, w9, w10, eq
	mov	w8, #26
	mul	w0, w22, w8
Lloh15:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_23
; %bb.21:
	mov	x24, x0
	ldr	w8, [sp, #36]
	cbz	w8, LBB0_25
; %bb.22:
	cmp	w26, #0
	ccmp	w28, w27, #0, ne
	cset	w8, hi
	add	x8, x24, w8, uxtw #4
Lloh18:
	adrp	x9, l_.str.5@PAGE
Lloh19:
	add	x9, x9, l_.str.5@PAGEOFF
	str	x9, [x8]
	ldr	w9, [sp, #40]
	str	w9, [x8, #8]
	ldr	w9, [sp, #36]
	str	w9, [x8, #12]
	mov	w8, #1
	b	LBB0_26
LBB0_23:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_vfree
	cbz	w20, LBB0_9
; %bb.24:
	neg	w22, w20
	b	LBB0_9
LBB0_25:
	mov	x8, #0
LBB0_26:
	sub	w12, w25, w23
	cbz	w26, LBB0_28
; %bb.27:
	cmp	w28, w27
	cset	w9, hi
	ldr	w10, [sp, #36]
	cmp	w10, #0
	cset	w10, ne
	and	w10, w10, w9
	sub	x8, x8, x10
	add	x8, x24, x8, lsl #4
	str	x21, [x8]
	ldr	w10, [sp, #44]
	cmp	w25, w23
	cset	w11, eq
	orr	w9, w11, w9
	cmp	w9, #0
	csel	w9, wzr, w12, ne
	add	w9, w9, w26
	stp	w10, w9, [x8, #8]
LBB0_28:
	mov	x21, x12
	cbz	w22, LBB0_32
; %bb.29:
	ldr	x8, [x24]
	ldp	w9, w10, [x24, #8]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh23:
	adrp	x0, l_.str.6@PAGE
Lloh24:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	w1, #0
	bl	_pr_info
	cmp	w22, #1
	b.eq	LBB0_32
; %bb.30:
	ldr	x8, [x24, #16]
	ldp	w9, w10, [x24, #24]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh25:
	adrp	x0, l_.str.6@PAGE
Lloh26:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	w1, #1
	bl	_pr_info
	cmp	w22, #2
	b.eq	LBB0_32
; %bb.31:
	ldr	x8, [x24, #32]
	ldp	w9, w10, [x24, #40]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh27:
	adrp	x0, l_.str.6@PAGE
Lloh28:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	w1, #2
	bl	_pr_info
LBB0_32:
	str	x21, [sp]
Lloh29:
	adrp	x0, l_.str.7@PAGE
Lloh30:
	add	x0, x0, l_.str.7@PAGEOFF
	mov	x1, x23
	bl	_pr_info
	str	x24, [x20]
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rootfs"

	.comm	_BCM963XX_EXTENDED_SIZE,4,2     ; @BCM963XX_EXTENDED_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"invalid rootfs address: %*ph\n"

l_.str.2:                               ; @.str.2
	.asciz	"invalid kernel address: %*ph\n"

l_.str.3:                               ; @.str.3
	.asciz	"invalid kernel length: %*ph\n"

l_.str.4:                               ; @.str.4
	.asciz	"invalid total length: %*ph\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.5:                               ; @.str.5
	.asciz	"kernel"

l_.str.6:                               ; @.str.6
	.asciz	"Partition %d is %s offset %llx and length %llx\n"

l_.str.7:                               ; @.str.7
	.asciz	"Spare partition is offset %x and length %x\n"

	.no_dead_strip	_bcm963xx_parse_imagetag_partitions
.subsections_via_symbols
