	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_YabLoadStateStream             ## -- Begin function YabLoadStateStream
	.p2align	4, 0x90
_YabLoadStateStream:                    ## @YabLoadStateStream
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	$0, -72(%rbp)
	movl	$0, -80(%rbp)
	leaq	-80(%rbp), %rdi
	leaq	-103(%rbp), %rbx
	movq	%rbx, %rsi
	movl	$1, %edx
	movl	$3, %ecx
	movq	%r12, %r8
	callq	_yread
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_strncmp
	movl	$-2, %r14d
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	leaq	-80(%rbp), %rbx
	leaq	-100(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	leaq	-60(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	leaq	-96(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movl	-60(%rbp), %eax
	cmpl	$1, %eax
	je	LBB0_17
## %bb.3:
	cmpl	$2, %eax
	jne	LBB0_19
## %bb.4:
	movq	_framecounter@GOTPCREL(%rip), %rsi
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movq	%r12, %rdi
	callq	_ftell
	movl	%eax, -56(%rbp)
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movl	$20, %r13d
	cmpl	$0, -100(%rbp)
	je	LBB0_18
LBB0_5:
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_fseek
	movl	-96(%rbp), %ebx
	movq	%r12, %rdi
	callq	_ftell
	subl	%r13d, %eax
	cmpl	%eax, %ebx
	jne	LBB0_1
## %bb.6:
	movq	_SEEK_SET@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_fseek
	movq	_SCSP_MUTE_SYSTEM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_ScspMuteAudio
	leaq	L_.str.2(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_StateCheckRetrieveHeader
	testq	%rax, %rax
	jne	LBB0_16
## %bb.7:
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_CartLoadState
	leaq	L_.str.3(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_StateCheckRetrieveHeader
	testq	%rax, %rax
	jne	LBB0_16
## %bb.8:
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_Cs2LoadState
	leaq	L_.str.4(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_StateCheckRetrieveHeader
	testq	%rax, %rax
	jne	LBB0_16
## %bb.9:
	movq	_MSH2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	%r12, %rsi
	callq	_SH2LoadState
	leaq	L_.str.5(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_StateCheckRetrieveHeader
	testq	%rax, %rax
	jne	LBB0_16
## %bb.10:
	movq	_SSH2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %ecx
	movq	%r12, %rsi
	callq	_SH2LoadState
	leaq	L_.str.6(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_StateCheckRetrieveHeader
	testq	%rax, %rax
	jne	LBB0_16
## %bb.11:
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_SoundLoadState
	leaq	L_.str.7(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_StateCheckRetrieveHeader
	testq	%rax, %rax
	jne	LBB0_16
## %bb.12:
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_ScuLoadState
	leaq	L_.str.8(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_StateCheckRetrieveHeader
	testq	%rax, %rax
	jne	LBB0_16
## %bb.13:
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_SmpcLoadState
	leaq	L_.str.9(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_StateCheckRetrieveHeader
	testq	%rax, %rax
	jne	LBB0_16
## %bb.14:
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_Vdp1LoadState
	leaq	L_.str.10(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_StateCheckRetrieveHeader
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	callq	_Vdp2LoadState
	leaq	L_.str.11(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r12, %rdi
	callq	_StateCheckRetrieveHeader
	testq	%rax, %rax
	je	LBB0_20
LBB0_16:
	movl	(%rbx), %edi
	callq	_ScspUnMuteAudio
	movl	$-3, %r14d
	jmp	LBB0_1
LBB0_17:
	movl	$12, %r13d
	cmpl	$0, -100(%rbp)
	jne	LBB0_5
LBB0_18:
	movq	_YAB_ERR_OTHER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_YabSetError
LBB0_19:
	movl	$-3, %r14d
LBB0_1:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	_BupRam@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-80(%rbp), %r13
	movq	%r13, %rdi
	movl	$65536, %edx                    ## imm = 0x10000
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movq	_HighWram@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, %rdi
	movl	$1048576, %edx                  ## imm = 0x100000
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movq	_LowWram@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, %rdi
	movl	$1048576, %edx                  ## imm = 0x100000
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movq	_yabsys@GOTPCREL(%rip), %rax
	leaq	24(%rax), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movq	_yabsys@GOTPCREL(%rip), %rax
	leaq	20(%rax), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movq	_yabsys@GOTPCREL(%rip), %rax
	leaq	16(%rax), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movq	_yabsys@GOTPCREL(%rip), %rax
	leaq	12(%rax), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	leaq	-52(%rbp), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movq	%r13, %rdi
	leaq	-52(%rbp), %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	leaq	-84(%rbp), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movq	_yabsys@GOTPCREL(%rip), %r13
	leaq	4(%r13), %rsi
	leaq	-80(%rbp), %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	leaq	8(%r13), %rsi
	leaq	-80(%rbp), %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movl	4(%r13), %edi
	callq	_YabauseChangeTiming
	movl	-84(%rbp), %eax
	movq	_YABSYS_TIMING_BITS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	imull	-52(%rbp), %eax
	cltq
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	movl	%eax, (%r13)
	cmpl	$2, -60(%rbp)
	jl	LBB0_23
## %bb.21:
	leaq	-80(%rbp), %r13
	leaq	-92(%rbp), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	leaq	-88(%rbp), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	movl	-92(%rbp), %r13d
	imull	-88(%rbp), %r13d
	shll	$2, %r13d
	movl	%r13d, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.22:
	movq	%rax, %rcx
	leaq	-80(%rbp), %rdi
	movq	%rax, %r14
	movq	%rcx, %rsi
	movl	%r13d, %edx
	movl	$1, %ecx
	movq	%r12, %r8
	callq	_yread
	xorl	%eax, %eax
	callq	_YuiSwapBuffers
	movq	_VIDCore@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	-112(%rbp), %rdi
	leaq	-108(%rbp), %rsi
	callq	*8(%rax)
	xorl	%eax, %eax
	callq	_YuiSwapBuffers
	movq	%r14, %rdi
	callq	_free
	movl	-56(%rbp), %esi
	movl	(%r15), %edx
	movq	%r12, %rdi
	callq	_fseek
	movq	%r12, %rdi
	callq	_MovieReadState
LBB0_23:
	movl	(%rbx), %edi
	callq	_ScspUnMuteAudio
	movq	_OSDMSG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.12(%rip), %rdx
	movl	$150, %esi
	callq	_OSDPushMessage
	xorl	%r14d, %r14d
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"YSS"

	.comm	_framecounter,4,2               ## @framecounter
	.comm	_YAB_ERR_OTHER,4,2              ## @YAB_ERR_OTHER
L_.str.1:                               ## @.str.1
	.asciz	"Load State byteswapping not supported"

	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_SCSP_MUTE_SYSTEM,4,2           ## @SCSP_MUTE_SYSTEM
L_.str.2:                               ## @.str.2
	.asciz	"CART"

L_.str.3:                               ## @.str.3
	.asciz	"CS2 "

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

	.comm	_MSH2,4,2                       ## @MSH2
L_.str.5:                               ## @.str.5
	.asciz	"SSH2"

	.comm	_SSH2,4,2                       ## @SSH2
L_.str.6:                               ## @.str.6
	.asciz	"SCSP"

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

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

L_.str.9:                               ## @.str.9
	.asciz	"VDP1"

L_.str.10:                              ## @.str.10
	.asciz	"VDP2"

L_.str.11:                              ## @.str.11
	.asciz	"OTHR"

	.comm	_BupRam,8,3                     ## @BupRam
	.comm	_HighWram,8,3                   ## @HighWram
	.comm	_LowWram,8,3                    ## @LowWram
	.comm	_yabsys,28,2                    ## @yabsys
	.comm	_YABSYS_TIMING_BITS,4,2         ## @YABSYS_TIMING_BITS
	.comm	_VIDCore,8,3                    ## @VIDCore
	.comm	_OSDMSG_STATUS,4,2              ## @OSDMSG_STATUS
L_.str.12:                              ## @.str.12
	.asciz	"STATE LOADED"

	.comm	_GL_RGBA,4,2                    ## @GL_RGBA
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
	.comm	_VIDCORE_OGL,8,3                ## @VIDCORE_OGL
	.comm	_VIDCORE_SOFT,8,3               ## @VIDCORE_SOFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_YabLoadStateStream             ; -- Begin function YabLoadStateStream
	.p2align	2
_YabLoadStateStream:                    ; @YabLoadStateStream
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x0
	str	xzr, [sp, #48]
	str	wzr, [sp, #40]
	add	x0, sp, #40
	sub	x1, x29, #35
	mov	w2, #1
	mov	w3, #3
	mov	x4, x19
	bl	_yread
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	sub	x0, x29, #35
	mov	w2, #3
	bl	_strncmp
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #-2
	b	LBB0_19
LBB0_2:
	add	x0, sp, #40
	sub	x1, x29, #40
	mov	w2, #1
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x0, sp, #40
	sub	x1, x29, #44
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x0, sp, #40
	sub	x1, x29, #52
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	ldur	w8, [x29, #-44]
	cmp	w8, #1
	b.eq	LBB0_16
; %bb.3:
	cmp	w8, #2
	b.ne	LBB0_18
; %bb.4:
Lloh2:
	adrp	x1, _framecounter@GOTPAGE
Lloh3:
	ldr	x1, [x1, _framecounter@GOTPAGEOFF]
	add	x0, sp, #40
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	mov	x0, x19
	bl	_ftell
	str	w0, [sp, #20]
	add	x0, sp, #40
	add	x1, sp, #20
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	mov	w20, #20
	ldur	w8, [x29, #-40]
	cbz	w8, LBB0_17
LBB0_5:
Lloh4:
	adrp	x8, _SEEK_END@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SEEK_END@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_fseek
	ldur	w21, [x29, #-52]
	mov	x0, x19
	bl	_ftell
	sub	w8, w0, w20
	cmp	w21, w8
	b.ne	LBB0_1
; %bb.6:
Lloh7:
	adrp	x22, _SEEK_SET@GOTPAGE
Lloh8:
	ldr	x22, [x22, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_fseek
Lloh9:
	adrp	x21, _SCSP_MUTE_SYSTEM@GOTPAGE
Lloh10:
	ldr	x21, [x21, _SCSP_MUTE_SYSTEM@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_ScspMuteAudio
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	sub	x2, x29, #48
	add	x3, sp, #56
	mov	x0, x19
	bl	_StateCheckRetrieveHeader
	cbnz	x0, LBB0_14
; %bb.7:
	ldur	w1, [x29, #-48]
	ldr	w2, [sp, #56]
	mov	x0, x19
	bl	_CartLoadState
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	sub	x2, x29, #48
	add	x3, sp, #56
	mov	x0, x19
	bl	_StateCheckRetrieveHeader
	cbnz	x0, LBB0_14
; %bb.8:
	ldur	w1, [x29, #-48]
	ldr	w2, [sp, #56]
	mov	x0, x19
	bl	_Cs2LoadState
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	sub	x2, x29, #48
	add	x3, sp, #56
	mov	x0, x19
	bl	_StateCheckRetrieveHeader
	cbnz	x0, LBB0_14
; %bb.9:
Lloh17:
	adrp	x8, _MSH2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MSH2@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldur	w2, [x29, #-48]
	ldr	w3, [sp, #56]
	mov	x1, x19
	bl	_SH2LoadState
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	sub	x2, x29, #48
	add	x3, sp, #56
	mov	x0, x19
	bl	_StateCheckRetrieveHeader
	cbnz	x0, LBB0_14
; %bb.10:
Lloh22:
	adrp	x8, _SSH2@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SSH2@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldur	w2, [x29, #-48]
	ldr	w3, [sp, #56]
	mov	x1, x19
	bl	_SH2LoadState
Lloh25:
	adrp	x1, l_.str.6@PAGE
Lloh26:
	add	x1, x1, l_.str.6@PAGEOFF
	sub	x2, x29, #48
	add	x3, sp, #56
	mov	x0, x19
	bl	_StateCheckRetrieveHeader
	cbnz	x0, LBB0_14
; %bb.11:
	ldur	w1, [x29, #-48]
	ldr	w2, [sp, #56]
	mov	x0, x19
	bl	_SoundLoadState
Lloh27:
	adrp	x1, l_.str.7@PAGE
Lloh28:
	add	x1, x1, l_.str.7@PAGEOFF
	sub	x2, x29, #48
	add	x3, sp, #56
	mov	x0, x19
	bl	_StateCheckRetrieveHeader
	cbnz	x0, LBB0_14
; %bb.12:
	ldur	w1, [x29, #-48]
	ldr	w2, [sp, #56]
	mov	x0, x19
	bl	_ScuLoadState
Lloh29:
	adrp	x1, l_.str.8@PAGE
Lloh30:
	add	x1, x1, l_.str.8@PAGEOFF
	sub	x2, x29, #48
	add	x3, sp, #56
	mov	x0, x19
	bl	_StateCheckRetrieveHeader
	cbnz	x0, LBB0_14
; %bb.13:
	mov	x20, x22
	ldur	w1, [x29, #-48]
	ldr	w2, [sp, #56]
	mov	x0, x19
	bl	_SmpcLoadState
Lloh31:
	adrp	x1, l_.str.9@PAGE
Lloh32:
	add	x1, x1, l_.str.9@PAGEOFF
	sub	x2, x29, #48
	add	x3, sp, #56
	mov	x0, x19
	bl	_StateCheckRetrieveHeader
	cbz	x0, LBB0_20
LBB0_14:
	ldr	w0, [x21]
LBB0_15:
	bl	_ScspUnMuteAudio
	mov	w0, #-3
	b	LBB0_19
LBB0_16:
	mov	w20, #12
	ldur	w8, [x29, #-40]
	cbnz	w8, LBB0_5
LBB0_17:
Lloh33:
	adrp	x8, _YAB_ERR_OTHER@GOTPAGE
Lloh34:
	ldr	x8, [x8, _YAB_ERR_OTHER@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_YabSetError
LBB0_18:
	mov	w0, #-3
LBB0_19:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_20:
	ldur	w1, [x29, #-48]
	ldr	w2, [sp, #56]
	mov	x0, x19
	bl	_Vdp1LoadState
Lloh38:
	adrp	x1, l_.str.10@PAGE
Lloh39:
	add	x1, x1, l_.str.10@PAGEOFF
	sub	x2, x29, #48
	add	x3, sp, #56
	mov	x0, x19
	bl	_StateCheckRetrieveHeader
	cbnz	x0, LBB0_22
; %bb.21:
	ldur	w1, [x29, #-48]
	ldr	w2, [sp, #56]
	mov	x0, x19
	bl	_Vdp2LoadState
Lloh40:
	adrp	x1, l_.str.11@PAGE
Lloh41:
	add	x1, x1, l_.str.11@PAGEOFF
	sub	x2, x29, #48
	add	x3, sp, #56
	mov	x0, x19
	bl	_StateCheckRetrieveHeader
	cbz	x0, LBB0_23
LBB0_22:
Lloh42:
	adrp	x8, _SCSP_MUTE_SYSTEM@GOTPAGE
Lloh43:
	ldr	x8, [x8, _SCSP_MUTE_SYSTEM@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
	b	LBB0_15
LBB0_23:
Lloh45:
	adrp	x8, _BupRam@GOTPAGE
Lloh46:
	ldr	x8, [x8, _BupRam@GOTPAGEOFF]
Lloh47:
	ldr	x1, [x8]
	add	x0, sp, #40
	mov	w2, #65536
	mov	w3, #1
	mov	x4, x19
	bl	_yread
Lloh48:
	adrp	x8, _HighWram@GOTPAGE
Lloh49:
	ldr	x8, [x8, _HighWram@GOTPAGEOFF]
Lloh50:
	ldr	x1, [x8]
	add	x0, sp, #40
	mov	w2, #1048576
	mov	w3, #1
	mov	x4, x19
	bl	_yread
Lloh51:
	adrp	x8, _LowWram@GOTPAGE
Lloh52:
	ldr	x8, [x8, _LowWram@GOTPAGEOFF]
Lloh53:
	ldr	x1, [x8]
	add	x0, sp, #40
	mov	w2, #1048576
	mov	w3, #1
	mov	x4, x19
	bl	_yread
Lloh54:
	adrp	x21, _yabsys@GOTPAGE
Lloh55:
	ldr	x21, [x21, _yabsys@GOTPAGEOFF]
	add	x1, x21, #24
	add	x0, sp, #40
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x1, x21, #20
	add	x0, sp, #40
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x1, x21, #16
	add	x0, sp, #40
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x1, x21, #12
	add	x0, sp, #40
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x0, sp, #40
	add	x1, sp, #16
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x0, sp, #40
	add	x1, sp, #16
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x0, sp, #40
	add	x1, sp, #12
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x1, x21, #4
	add	x0, sp, #40
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x1, x21, #8
	add	x0, sp, #40
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	ldr	w0, [x21, #4]
	bl	_YabauseChangeTiming
	ldr	w8, [sp, #12]
Lloh56:
	adrp	x9, _YABSYS_TIMING_BITS@GOTPAGE
Lloh57:
	ldr	x9, [x9, _YABSYS_TIMING_BITS@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldr	w9, [sp, #16]
	mul	w8, w8, w9
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w9
	str	w8, [x21]
	ldur	w8, [x29, #-44]
	cmp	w8, #2
	b.lt	LBB0_26
; %bb.24:
	add	x0, sp, #40
	add	x1, sp, #36
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	add	x0, sp, #40
	add	x1, sp, #32
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	ldp	w9, w8, [sp, #32]
	mul	w8, w8, w9
	lsl	w21, w8, #2
	mov	x0, x21
	bl	_malloc
	cbz	x0, LBB0_1
; %bb.25:
	mov	x22, x0
	add	x0, sp, #40
	mov	x1, x22
	mov	x2, x21
	mov	w3, #1
	mov	x4, x19
	bl	_yread
	bl	_YuiSwapBuffers
Lloh59:
	adrp	x8, _VIDCore@GOTPAGE
Lloh60:
	ldr	x8, [x8, _VIDCore@GOTPAGEOFF]
Lloh61:
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	add	x0, sp, #28
	add	x1, sp, #24
	blr	x8
	bl	_YuiSwapBuffers
	mov	x0, x22
	bl	_free
	ldr	w1, [sp, #20]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_fseek
	mov	x0, x19
	bl	_MovieReadState
LBB0_26:
Lloh62:
	adrp	x8, _SCSP_MUTE_SYSTEM@GOTPAGE
Lloh63:
	ldr	x8, [x8, _SCSP_MUTE_SYSTEM@GOTPAGEOFF]
Lloh64:
	ldr	w0, [x8]
	bl	_ScspUnMuteAudio
Lloh65:
	adrp	x8, _OSDMSG_STATUS@GOTPAGE
Lloh66:
	ldr	x8, [x8, _OSDMSG_STATUS@GOTPAGEOFF]
Lloh67:
	ldr	w0, [x8]
Lloh68:
	adrp	x2, l_.str.12@PAGE
Lloh69:
	add	x2, x2, l_.str.12@PAGEOFF
	mov	w1, #150
	bl	_OSDPushMessage
	mov	w0, #0
	b	LBB0_19
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"YSS"

	.comm	_framecounter,4,2               ; @framecounter
	.comm	_YAB_ERR_OTHER,4,2              ; @YAB_ERR_OTHER
l_.str.1:                               ; @.str.1
	.asciz	"Load State byteswapping not supported"

	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_SCSP_MUTE_SYSTEM,4,2           ; @SCSP_MUTE_SYSTEM
l_.str.2:                               ; @.str.2
	.asciz	"CART"

l_.str.3:                               ; @.str.3
	.asciz	"CS2 "

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

	.comm	_MSH2,4,2                       ; @MSH2
l_.str.5:                               ; @.str.5
	.asciz	"SSH2"

	.comm	_SSH2,4,2                       ; @SSH2
l_.str.6:                               ; @.str.6
	.asciz	"SCSP"

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

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

l_.str.9:                               ; @.str.9
	.asciz	"VDP1"

l_.str.10:                              ; @.str.10
	.asciz	"VDP2"

l_.str.11:                              ; @.str.11
	.asciz	"OTHR"

	.comm	_BupRam,8,3                     ; @BupRam
	.comm	_HighWram,8,3                   ; @HighWram
	.comm	_LowWram,8,3                    ; @LowWram
	.comm	_yabsys,28,2                    ; @yabsys
	.comm	_YABSYS_TIMING_BITS,4,2         ; @YABSYS_TIMING_BITS
	.comm	_VIDCore,8,3                    ; @VIDCore
	.comm	_OSDMSG_STATUS,4,2              ; @OSDMSG_STATUS
l_.str.12:                              ; @.str.12
	.asciz	"STATE LOADED"

	.comm	_GL_RGBA,4,2                    ; @GL_RGBA
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
	.comm	_VIDCORE_OGL,8,3                ; @VIDCORE_OGL
	.comm	_VIDCORE_SOFT,8,3               ; @VIDCORE_SOFT
.subsections_via_symbols
