	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_carthw_prot_lk3_startup        ## -- Begin function carthw_prot_lk3_startup
	.p2align	4, 0x90
_carthw_prot_lk3_startup:               ## @carthw_prot_lk3_startup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_EL_STATUS@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elprintf
	movq	_Pico@GOTPCREL(%rip), %rbx
	movl	$32768, %edi                    ## imm = 0x8000
	addq	8(%rbx), %rdi
	callq	_PicoCartResize
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_elprintf                       ## TAILCALL
LBB0_1:
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdi
	addq	%rsi, %rdi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_memcpy
	movq	_carthw_prot_lk3_mem_setup@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoCartMemSetup@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EL_STATUS,4,2                  ## @EL_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lk3 prot emu startup"

	.comm	_Pico,16,3                      ## @Pico
L_.str.1:                               ## @.str.1
	.asciz	"OOM"

	.comm	_carthw_prot_lk3_mem_setup,4,2  ## @carthw_prot_lk3_mem_setup
	.comm	_PicoCartMemSetup,4,2           ## @PicoCartMemSetup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_carthw_prot_lk3_startup        ; -- Begin function carthw_prot_lk3_startup
	.p2align	2
_carthw_prot_lk3_startup:               ; @carthw_prot_lk3_startup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _EL_STATUS@GOTPAGE
Lloh1:
	ldr	x19, [x19, _EL_STATUS@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elprintf
Lloh4:
	adrp	x20, _Pico@GOTPAGE
Lloh5:
	ldr	x20, [x20, _Pico@GOTPAGEOFF]
	ldr	x8, [x20, #8]
	add	x0, x8, #8, lsl #12             ; =32768
	bl	_PicoCartResize
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_elprintf
LBB0_2:
	ldp	x1, x8, [x20]
	add	x0, x8, x1
	mov	w2, #32768
	bl	_memcpy
Lloh8:
	adrp	x8, _carthw_prot_lk3_mem_setup@GOTPAGE
Lloh9:
	ldr	x8, [x8, _carthw_prot_lk3_mem_setup@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _PicoCartMemSetup@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PicoCartMemSetup@GOTPAGEOFF]
Lloh13:
	str	w8, [x9]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EL_STATUS,4,2                  ; @EL_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lk3 prot emu startup"

	.comm	_Pico,16,3                      ; @Pico
l_.str.1:                               ; @.str.1
	.asciz	"OOM"

	.comm	_carthw_prot_lk3_mem_setup,4,2  ; @carthw_prot_lk3_mem_setup
	.comm	_PicoCartMemSetup,4,2           ; @PicoCartMemSetup
.subsections_via_symbols
