	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function titan_get_single_image
_titan_get_single_image:                ## @titan_get_single_image
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$-1, %r14d
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	movq	%rsi, %r12
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.2:
	movq	%rdx, %r15
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.3:
	movq	%rdi, %rbx
	callq	_prom_getenv
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	leaq	-80(%rbp), %rdi
	movq	%rdi, -88(%rbp)
	movq	%rax, %rsi
	movl	$30, %edx
	callq	_strncpy
	movb	$0, -51(%rbp)
	leaq	L_.str.1(%rip), %rsi
	leaq	-88(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strsep
	movq	%rax, %r13
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strsep
	testq	%r13, %r13
	je	LBB0_8
## %bb.5:
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rax, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_titan_parse_env_address
	movl	%eax, %r14d
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	leaq	-80(%rbp), %rsi
LBB0_9:
	callq	_printk
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"titan: %s variable not found.\n"

L_.str.1:                               ## @.str.1
	.asciz	"\""

L_.str.2:                               ## @.str.2
	.asciz	"titan: invalid bootcfg format, %s.\n"

	.no_dead_strip	_titan_get_single_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function titan_get_single_image
_titan_get_single_image:                ; @titan_get_single_image
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	w0, #-1
	cbz	x21, LBB0_10
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_10
; %bb.2:
	mov	x19, x2
	cbz	x2, LBB0_10
; %bb.3:
	mov	x0, x21
	bl	_prom_getenv
	cbz	x0, LBB0_7
; %bb.4:
	mov	x1, x0
	add	x8, sp, #10
	str	x8, [sp]
	add	x0, sp, #10
	mov	w2, #30
	bl	_strncpy
	strb	wzr, [sp, #39]
Lloh3:
	adrp	x21, l_.str.1@PAGE
Lloh4:
	add	x21, x21, l_.str.1@PAGEOFF
	mov	x0, sp
	mov	x1, x21
	bl	_strsep
	mov	x22, x0
	mov	x0, sp
	mov	x1, x21
	bl	_strsep
	cbz	x22, LBB0_8
; %bb.5:
	cbz	x0, LBB0_8
; %bb.6:
	mov	x1, x20
	mov	x2, x19
	bl	_titan_parse_env_address
	b	LBB0_10
LBB0_7:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x1, sp, #10
LBB0_9:
	bl	_printk
	mov	w0, #-1
LBB0_10:
	ldr	x8, [sp, #40]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"titan: %s variable not found.\n"

l_.str.1:                               ; @.str.1
	.asciz	"\""

l_.str.2:                               ; @.str.2
	.asciz	"titan: invalid bootcfg format, %s.\n"

	.no_dead_strip	_titan_get_single_image
.subsections_via_symbols
