	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoStateLoadGfx               ## -- Begin function PicoStateLoadGfx
	.p2align	4, 0x90
_PicoStateLoadGfx:                      ## @PicoStateLoadGfx
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%esi, %esi
	callq	_open_save_file
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_state_load_gfx
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_SEEK_SET@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$65568, %esi                    ## imm = 0x10020
	callq	_areaSeek
	movq	_Pico@GOTPCREL(%rip), %r14
	movq	24(%r14), %rdi
	movl	$1, %esi
	movl	$8, %edx
	movq	%rbx, %rcx
	callq	_areaRead
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$8192, %esi                     ## imm = 0x2000
	callq	_areaSeek
	movq	16(%r14), %rdi
	movl	$1, %esi
	movl	$8, %edx
	movq	%rbx, %rcx
	callq	_areaRead
	movq	8(%r14), %rdi
	movl	$1, %esi
	movl	$8, %edx
	movq	%rbx, %rcx
	callq	_areaRead
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movl	$139680, %esi                   ## imm = 0x221A0
	callq	_areaSeek
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$4, %edx
	movq	%rbx, %rcx
	callq	_areaRead
LBB0_4:
	movq	%rbx, %rdi
	callq	_areaClose
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movl	$-1, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_Pico,32,3                      ## @Pico
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoStateLoadGfx               ; -- Begin function PicoStateLoadGfx
	.p2align	2
_PicoStateLoadGfx:                      ; @PicoStateLoadGfx
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	w1, #0
	bl	_open_save_file
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_state_load_gfx
	cbz	w0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x21, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #32
	movk	w1, #1, lsl #16
	bl	_areaSeek
Lloh2:
	adrp	x20, _Pico@GOTPAGE
Lloh3:
	ldr	x20, [x20, _Pico@GOTPAGEOFF]
	ldr	x0, [x20, #24]
	mov	w1, #1
	mov	w2, #8
	mov	x3, x19
	bl	_areaRead
Lloh4:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #8192
	bl	_areaSeek
	ldr	x0, [x20, #16]
	mov	w1, #1
	mov	w2, #8
	mov	x3, x19
	bl	_areaRead
	ldr	x0, [x20, #8]
	mov	w1, #1
	mov	w2, #8
	mov	x3, x19
	bl	_areaRead
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #8608
	movk	w1, #2, lsl #16
	bl	_areaSeek
	mov	x0, x20
	mov	w1, #1
	mov	w2, #4
	mov	x3, x19
	bl	_areaRead
LBB0_3:
	mov	x0, x19
	bl	_areaClose
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_Pico,32,3                      ; @Pico
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
.subsections_via_symbols
