	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_create_titan_partitions        ## -- Begin function create_titan_partitions
	.p2align	4, 0x90
_create_titan_partitions:               ## @create_titan_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	$88, %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, %r15
	leaq	L_.str(%rip), %rdi
	leaq	-44(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	_titan_get_single_image
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_24
## %bb.1:
	movl	-44(%rbp), %esi
	leaq	-80(%rbp), %rcx
	leaq	-128(%rbp), %r8
	movq	%r15, %rdi
	movl	$16, %edx
	callq	_mtd_read
	movq	-128(%rbp), %rax
	movq	_NSP_IMG_MAGIC_NUMBER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.2:
	movl	-120(%rbp), %esi
	addl	-44(%rbp), %esi
	leaq	-80(%rbp), %rcx
	leaq	-72(%rbp), %r8
	movq	%r15, %rdi
	movl	$12, %edx
	callq	_mtd_read
	movl	-72(%rbp), %eax
	xorl	%ebx, %ebx
	movq	_MAX_NUM_PARTITIONS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %eax
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	jle	LBB0_8
## %bb.3:
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.4:
	xorl	%ebx, %ebx
	movl	$1, %r14d
	leaq	-112(%rbp), %r12
	movq	_NSP_IMG_SECTION_TYPE_FILESYSTEM_ROOT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	-68(%rbp), %eax
	addl	-44(%rbp), %eax
	leal	-1(%r14), %esi
	imull	-64(%rbp), %esi
	addl	%eax, %esi
	movq	%r15, %rdi
	movl	$24, %edx
	leaq	-80(%rbp), %rcx
	movq	%r12, %r8
	callq	_mtd_read
	movq	-112(%rbp), %rax
	cmpq	(%r13), %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-104(%rbp), %esi
	addl	-44(%rbp), %esi
	movl	%esi, -52(%rbp)
	movl	-100(%rbp), %edx
	addl	%esi, %edx
	movl	%edx, -48(%rbp)
	leaq	L_.str.1(%rip), %rdi
	callq	_titan_add_partition
	incl	%ebx
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	-72(%rbp), %eax
	movq	_MAX_NUM_PARTITIONS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%eax, %r14d
	jge	LBB0_8
## %bb.25:                              ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%r14), %edx
	cmpl	%ecx, %r14d
	movl	%edx, %r14d
	jl	LBB0_5
LBB0_8:
	testl	%eax, %eax
	jle	LBB0_18
## %bb.9:
	testl	%ecx, %ecx
	jle	LBB0_18
## %bb.10:
	movl	$1, %r12d
	leaq	-80(%rbp), %r13
	leaq	-112(%rbp), %r14
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	-68(%rbp), %eax
	addl	-44(%rbp), %eax
	leal	-1(%r12), %esi
	imull	-64(%rbp), %esi
	addl	%eax, %esi
	movq	%r15, %rdi
	movl	$24, %edx
	movq	%r13, %rcx
	movq	%r14, %r8
	callq	_mtd_read
	movq	-112(%rbp), %rax
	movq	_NSP_IMG_SECTION_TYPE_FILESYSTEM_ROOT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	-104(%rbp), %esi
	addl	-44(%rbp), %esi
	movl	%esi, -52(%rbp)
	movl	-56(%rbp), %edx
	movl	%edx, -48(%rbp)
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	_NSP_IMG_SECTION_TYPE_KERNEL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	-104(%rbp), %esi
	addl	-44(%rbp), %esi
	movl	%esi, -52(%rbp)
	movl	-100(%rbp), %edx
	addl	%esi, %edx
	movl	%edx, -48(%rbp)
	leaq	L_.str.3(%rip), %rdi
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	callq	_titan_add_partition
	incl	%ebx
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpl	-72(%rbp), %r12d
	jge	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	leal	1(%r12), %eax
	movq	_MAX_NUM_PARTITIONS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	movl	%eax, %r12d
	jl	LBB0_11
LBB0_18:
	movl	-44(%rbp), %esi
	movl	-56(%rbp), %edx
	leaq	L_.str.4(%rip), %rdi
	callq	_titan_add_partition
	movl	(%r15), %edx
	leaq	L_.str.5(%rip), %rdi
	xorl	%esi, %esi
	callq	_titan_add_partition
	leaq	L_.str.6(%rip), %rdi
	leaq	-52(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	callq	_titan_parse_env_address
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	addl	$2, %ebx
	jmp	LBB0_21
LBB0_20:
	movl	-52(%rbp), %esi
	movl	-48(%rbp), %edx
	leaq	L_.str.7(%rip), %rdi
	callq	_titan_add_partition
	addl	$3, %ebx
LBB0_21:
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	leaq	L_.str.8(%rip), %rdi
	leaq	-52(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	callq	_titan_parse_env_address
	testl	%eax, %eax
	jne	LBB0_23
## %bb.22:
	movl	-52(%rbp), %esi
	movl	-48(%rbp), %edx
	leaq	L_.str.8(%rip), %rdi
	callq	_titan_add_partition
	incl	%ebx
LBB0_23:
	movq	_titan_parts@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_24:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BOOTCFG"

	.comm	_NSP_IMG_MAGIC_NUMBER,8,3       ## @NSP_IMG_MAGIC_NUMBER
	.comm	_MAX_NUM_PARTITIONS,4,2         ## @MAX_NUM_PARTITIONS
	.comm	_NSP_IMG_SECTION_TYPE_FILESYSTEM_ROOT,8,3 ## @NSP_IMG_SECTION_TYPE_FILESYSTEM_ROOT
L_.str.1:                               ## @.str.1
	.asciz	"root"

L_.str.2:                               ## @.str.2
	.asciz	"rootfs"

	.comm	_NSP_IMG_SECTION_TYPE_KERNEL,8,3 ## @NSP_IMG_SECTION_TYPE_KERNEL
L_.str.3:                               ## @.str.3
	.asciz	"kernel"

L_.str.4:                               ## @.str.4
	.asciz	"primary_image"

L_.str.5:                               ## @.str.5
	.asciz	"full_image"

L_.str.6:                               ## @.str.6
	.asciz	"BOOTLOADER"

L_.str.7:                               ## @.str.7
	.asciz	"bootloader"

L_.str.8:                               ## @.str.8
	.asciz	"boot_env"

	.comm	_titan_parts,8,3                ## @titan_parts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_create_titan_partitions        ; -- Begin function create_titan_partitions
	.p2align	2
_create_titan_partitions:               ; @create_titan_partitions
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #20
	add	x2, sp, #16
	bl	_titan_get_single_image
	cbnz	x0, LBB0_8
; %bb.1:
	ldr	w1, [sp, #20]
	mov	x3, sp
	add	x4, sp, #64
	mov	x0, x20
	mov	w2, #16
	bl	_mtd_read
	ldr	x8, [sp, #64]
Lloh2:
	adrp	x9, _NSP_IMG_MAGIC_NUMBER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NSP_IMG_MAGIC_NUMBER@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.2:
	ldr	w8, [sp, #20]
	ldr	w9, [sp, #72]
	add	w1, w9, w8
	mov	x3, sp
	add	x4, sp, #48
	mov	x0, x20
	mov	w2, #12
	bl	_mtd_read
	mov	w23, #0
	ldr	w8, [sp, #48]
Lloh5:
	adrp	x24, _MAX_NUM_PARTITIONS@GOTPAGE
Lloh6:
	ldr	x24, [x24, _MAX_NUM_PARTITIONS@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.3:
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.4:
	mov	w23, #0
	mov	w22, #1
Lloh7:
	adrp	x25, _NSP_IMG_SECTION_TYPE_FILESYSTEM_ROOT@GOTPAGE
Lloh8:
	ldr	x25, [x25, _NSP_IMG_SECTION_TYPE_FILESYSTEM_ROOT@GOTPAGEOFF]
Lloh9:
	adrp	x21, l_.str.1@PAGE
Lloh10:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #48]
	ldr	w9, [x24]
	cmp	w22, w8
	ccmp	w22, w9, #0, lt
	add	w22, w22, #1
	b.ge	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w22, #1
	ldr	w9, [sp, #20]
	ldp	w10, w11, [sp, #52]
	add	w9, w10, w9
	madd	w1, w11, w8, w9
	mov	x3, sp
	add	x4, sp, #24
	mov	x0, x20
	mov	w2, #24
	bl	_mtd_read
	ldr	x8, [sp, #24]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #20]
	ldp	w9, w10, [sp, #32]
	add	w1, w9, w8
	add	w2, w10, w1
	stp	w2, w1, [sp, #8]
	mov	x0, x21
	bl	_titan_add_partition
	add	w23, w23, #1
	b	LBB0_5
LBB0_8:
	mov	w20, #-1
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_10:
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.11:
	cmp	w9, #1
	b.lt	LBB0_20
; %bb.12:
	mov	w25, #1
Lloh11:
	adrp	x26, _NSP_IMG_SECTION_TYPE_FILESYSTEM_ROOT@GOTPAGE
Lloh12:
	ldr	x26, [x26, _NSP_IMG_SECTION_TYPE_FILESYSTEM_ROOT@GOTPAGEOFF]
Lloh13:
	adrp	x21, l_.str.2@PAGE
Lloh14:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh15:
	adrp	x27, _NSP_IMG_SECTION_TYPE_KERNEL@GOTPAGE
Lloh16:
	ldr	x27, [x27, _NSP_IMG_SECTION_TYPE_KERNEL@GOTPAGEOFF]
Lloh17:
	adrp	x22, l_.str.3@PAGE
Lloh18:
	add	x22, x22, l_.str.3@PAGEOFF
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	w8, w25, #1
	ldr	w9, [sp, #20]
	ldp	w10, w11, [sp, #52]
	add	w9, w10, w9
	madd	w1, w11, w8, w9
	mov	x3, sp
	add	x4, sp, #24
	mov	x0, x20
	mov	w2, #24
	bl	_mtd_read
	ldr	x8, [sp, #24]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldp	w2, w8, [sp, #16]
	ldr	w9, [sp, #32]
	add	w1, w9, w8
	stp	w2, w1, [sp, #8]
	mov	x0, x21
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [sp, #20]
	ldp	w9, w10, [sp, #32]
	add	w1, w9, w8
	add	w2, w10, w1
	stp	w2, w1, [sp, #8]
	mov	x0, x22
LBB0_17:                                ;   in Loop: Header=BB0_13 Depth=1
	bl	_titan_add_partition
	add	w23, w23, #1
LBB0_18:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [sp, #48]
	cmp	w25, w8
	b.ge	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x24]
	add	w9, w25, #1
	cmp	w25, w8
	mov	x25, x9
	b.lt	LBB0_13
LBB0_20:
	ldp	w2, w1, [sp, #16]
Lloh19:
	adrp	x0, l_.str.4@PAGE
Lloh20:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_titan_add_partition
	ldr	w2, [x20]
Lloh21:
	adrp	x0, l_.str.5@PAGE
Lloh22:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	w1, #0
	bl	_titan_add_partition
Lloh23:
	adrp	x0, l_.str.6@PAGE
Lloh24:
	add	x0, x0, l_.str.6@PAGEOFF
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_titan_parse_env_address
	cbz	w0, LBB0_22
; %bb.21:
	add	w20, w23, #2
	b	LBB0_23
LBB0_22:
	ldp	w2, w1, [sp, #8]
Lloh25:
	adrp	x0, l_.str.7@PAGE
Lloh26:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_titan_add_partition
	add	w20, w23, #3
LBB0_23:
Lloh27:
	adrp	x0, l_.str.8@PAGE
Lloh28:
	add	x0, x0, l_.str.8@PAGEOFF
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_titan_parse_env_address
	cbnz	w0, LBB0_25
; %bb.24:
	ldp	w2, w1, [sp, #8]
Lloh29:
	adrp	x0, l_.str.8@PAGE
Lloh30:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_titan_add_partition
	add	w20, w20, #1
LBB0_25:
Lloh31:
	adrp	x8, _titan_parts@GOTPAGE
Lloh32:
	ldr	x8, [x8, _titan_parts@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	str	x8, [x19]
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BOOTCFG"

	.comm	_NSP_IMG_MAGIC_NUMBER,8,3       ; @NSP_IMG_MAGIC_NUMBER
	.comm	_MAX_NUM_PARTITIONS,4,2         ; @MAX_NUM_PARTITIONS
	.comm	_NSP_IMG_SECTION_TYPE_FILESYSTEM_ROOT,8,3 ; @NSP_IMG_SECTION_TYPE_FILESYSTEM_ROOT
l_.str.1:                               ; @.str.1
	.asciz	"root"

l_.str.2:                               ; @.str.2
	.asciz	"rootfs"

	.comm	_NSP_IMG_SECTION_TYPE_KERNEL,8,3 ; @NSP_IMG_SECTION_TYPE_KERNEL
l_.str.3:                               ; @.str.3
	.asciz	"kernel"

l_.str.4:                               ; @.str.4
	.asciz	"primary_image"

l_.str.5:                               ; @.str.5
	.asciz	"full_image"

l_.str.6:                               ; @.str.6
	.asciz	"BOOTLOADER"

l_.str.7:                               ; @.str.7
	.asciz	"bootloader"

l_.str.8:                               ; @.str.8
	.asciz	"boot_env"

	.comm	_titan_parts,8,3                ; @titan_parts
.subsections_via_symbols
