	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdd_load                       ## -- Begin function cdd_load
	.p2align	4, 0x90
_cdd_load:                              ## @cdd_load
	.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
	subq	$552, %rsp                      ## imm = 0x228
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	%esi, -564(%rbp)
	xorl	%eax, %eax
	callq	_cdd_unload
	leaq	-564(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_load_cd_image
	testl	%eax, %eax
	jne	LBB0_32
## %bb.1:
	movq	_cdd@GOTPCREL(%rip), %rbx
	movq	24(%rbx), %rax
	movl	8(%rax), %edx
	leaq	-560(%rbp), %r14
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_pm_read
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	$14, %edx
	callq	_memcmp
	movl	$2048, %r15d                    ## imm = 0x800
	movl	$2048, %r14d                    ## imm = 0x800
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	24(%rbx), %rax
	movl	8(%rax), %edx
	leaq	-560(%rbp), %r14
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_pm_read
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	$14, %edx
	callq	_memcmp
	movl	$2352, %r14d                    ## imm = 0x930
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EL_STATUS@GOTPCREL(%rip), %rax
	movq	_EL_ANOMALY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elprintf
LBB0_4:
	movl	%r14d, (%rbx)
	movl	-564(%rbp), %eax
	movq	_CT_BIN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movl	$2352, %eax                     ## imm = 0x930
	cmovel	%eax, %r15d
	cmpl	%r14d, %r15d
	je	LBB0_6
## %bb.5:
	movq	_EL_STATUS@GOTPCREL(%rip), %rax
	movq	_EL_ANOMALY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_elprintf
LBB0_6:
	leaq	-544(%rbp), %rdi
	movq	24(%rbx), %rax
	movl	8(%rax), %edx
	movl	$512, %esi                      ## imm = 0x200
	callq	_pm_read
	movl	16(%rbx), %ecx
	cmpl	$1, %ecx
	jne	LBB0_31
## %bb.7:
	leaq	-176(%rbp), %r14
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	movq	$0, 16(%rbx)
	movq	24(%rbx), %rax
	movq	_toc_snatcher@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	$16, %rax
	xorl	%edx, %edx
	movl	$1, %esi
	movl	$2, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%edx, -16(%rax)
	addl	-4(%rcx,%rsi,4), %edx
	movl	%edx, -12(%rax)
	movl	%edx, 20(%rbx)
	movl	%esi, 16(%rbx)
	cmpq	$21, %rsi
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%edx, -4(%rax)
	addl	(%rcx,%rsi,4), %edx
	movl	%edx, (%rax)
	movl	%edx, 20(%rbx)
	movl	%edi, 16(%rbx)
	addq	$2, %rsi
	addq	$24, %rax
	addl	$2, %edi
	jmp	LBB0_9
LBB0_10:
	movl	$21, %ecx
	jmp	LBB0_31
LBB0_12:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movq	$0, 16(%rbx)
	movq	24(%rbx), %rax
	movq	_toc_lunar@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	$16, %rax
	xorl	%edx, %edx
	movl	$1, %esi
	movl	$2, %edi
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%edx, -16(%rax)
	addl	-4(%rcx,%rsi,4), %edx
	movl	%edx, -12(%rax)
	movl	%edx, 20(%rbx)
	movl	%esi, 16(%rbx)
	movl	%edx, -4(%rax)
	addl	(%rcx,%rsi,4), %edx
	movl	%edx, (%rax)
	movl	%edx, 20(%rbx)
	movl	%edi, 16(%rbx)
	addq	$2, %rsi
	addq	$24, %rax
	addl	$2, %edi
	cmpq	$53, %rsi
	jne	LBB0_14
## %bb.15:
	movl	$52, %ecx
	jmp	LBB0_31
LBB0_16:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_21
## %bb.17:
	movq	$0, 16(%rbx)
	movq	24(%rbx), %rax
	movq	_toc_shadow@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	$16, %rax
	xorl	%edx, %edx
	movl	$1, %esi
	movl	$2, %edi
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	%edx, -16(%rax)
	addl	-4(%rcx,%rsi,4), %edx
	movl	%edx, -12(%rax)
	movl	%edx, 20(%rbx)
	movl	%esi, 16(%rbx)
	cmpq	$15, %rsi
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	%edx, -4(%rax)
	addl	(%rcx,%rsi,4), %edx
	movl	%edx, (%rax)
	movl	%edx, 20(%rbx)
	movl	%edi, 16(%rbx)
	addq	$2, %rsi
	addq	$24, %rax
	addl	$2, %edi
	jmp	LBB0_18
LBB0_19:
	movl	$15, %ecx
	jmp	LBB0_31
LBB0_21:
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	$0, 16(%rbx)
	movq	_toc_dungeon@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rbx), %rcx
	movl	$0, (%rcx)
	movl	(%rax), %edx
	movl	%edx, 4(%rcx)
	movl	%edx, 20(%rbx)
	movl	$1, 16(%rbx)
	movl	%edx, 12(%rcx)
	addl	4(%rax), %edx
	movl	%edx, 16(%rcx)
	movl	%edx, 20(%rbx)
	movl	$2, 16(%rbx)
	movl	%edx, 24(%rcx)
	addl	8(%rax), %edx
	movl	%edx, 28(%rcx)
	movl	%edx, 20(%rbx)
	movl	$3, 16(%rbx)
	movl	%edx, 36(%rcx)
	addl	12(%rax), %edx
	movl	%edx, 40(%rcx)
	movl	%edx, 20(%rbx)
	movl	$4, 16(%rbx)
	movl	%edx, 48(%rcx)
	addl	16(%rax), %edx
	movl	%edx, 52(%rcx)
	movl	%edx, 20(%rbx)
	movl	$5, 16(%rbx)
	movl	%edx, 60(%rcx)
	addl	20(%rax), %edx
	movl	%edx, 64(%rcx)
	movl	%edx, 20(%rbx)
	movl	$6, 16(%rbx)
	movl	%edx, 72(%rcx)
	addl	24(%rax), %edx
	movl	%edx, 76(%rcx)
	movl	%edx, 20(%rbx)
	movl	$7, 16(%rbx)
	movl	%edx, 84(%rcx)
	addl	28(%rax), %edx
	movl	%edx, 88(%rcx)
	movl	%edx, 20(%rbx)
	movl	$8, 16(%rbx)
	movl	%edx, 96(%rcx)
	addl	32(%rax), %edx
	movl	%edx, 100(%rcx)
	movl	%edx, 20(%rbx)
	movl	$9, 16(%rbx)
	movl	%edx, 108(%rcx)
	addl	36(%rax), %edx
	movl	%edx, 112(%rcx)
	movl	%edx, 20(%rbx)
	movl	$10, 16(%rbx)
	movl	%edx, 120(%rcx)
	addl	40(%rax), %edx
	movl	%edx, 124(%rcx)
	movl	%edx, 20(%rbx)
	movl	$11, 16(%rbx)
	movl	%edx, 132(%rcx)
	addl	44(%rax), %edx
	movl	%edx, 136(%rcx)
	movl	%edx, 20(%rbx)
	movl	$12, 16(%rbx)
	movl	%edx, 144(%rcx)
	addl	48(%rax), %edx
	movl	%edx, 148(%rcx)
	movl	%edx, 20(%rbx)
	movl	$13, 16(%rbx)
	movl	$13, %ecx
	jmp	LBB0_31
LBB0_23:
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_26
## %bb.24:
	movq	$0, 16(%rbx)
	movq	24(%rbx), %rax
	movq	_toc_ffight@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	addq	$16, %rax
	xorl	%edx, %edx
	movl	$1, %esi
	movl	$2, %edi
	movl	$26, %ecx
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movl	%edx, -16(%rax)
	addl	-4(%r8,%rsi,4), %edx
	movl	%edx, -12(%rax)
	movl	%edx, 20(%rbx)
	movl	%esi, 16(%rbx)
	movl	%edx, -4(%rax)
	addl	(%r8,%rsi,4), %edx
	movl	%edx, (%rax)
	movl	%edx, 20(%rbx)
	movl	%edi, 16(%rbx)
	addq	$2, %rsi
	addq	$24, %rax
	addl	$2, %edi
	cmpq	$27, %rsi
	jne	LBB0_25
	jmp	LBB0_31
LBB0_26:
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_27
## %bb.28:
	movq	$0, 16(%rbx)
	movq	24(%rbx), %rax
	movq	_toc_ffightj@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	$16, %rax
	xorl	%edx, %edx
	movl	$1, %esi
	movl	$2, %edi
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movl	%edx, -16(%rax)
	addl	-4(%rcx,%rsi,4), %edx
	movl	%edx, -12(%rax)
	movl	%edx, 20(%rbx)
	movl	%esi, 16(%rbx)
	cmpq	$29, %rsi
	je	LBB0_30
## %bb.34:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	%edx, -4(%rax)
	addl	(%rcx,%rsi,4), %edx
	movl	%edx, (%rax)
	movl	%edx, 20(%rbx)
	movl	%edi, 16(%rbx)
	addq	$2, %rsi
	addq	$24, %rax
	addl	$2, %edi
	jmp	LBB0_29
LBB0_30:
	movl	$29, %ecx
	jmp	LBB0_31
LBB0_27:
	movl	$1, %ecx
LBB0_31:
	movl	20(%rbx), %eax
	movq	24(%rbx), %rdx
	movslq	%ecx, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	%eax, (%rdx,%rcx,4)
	movl	$1, 4(%rbx)
	movq	_NO_DISC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
LBB0_32:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_35
## %bb.33:
	addq	$552, %rsp                      ## imm = 0x228
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_cdd,32,3                       ## @cdd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SEGADISCSYSTEM"

	.comm	_EL_STATUS,4,2                  ## @EL_STATUS
	.comm	_EL_ANOMALY,4,2                 ## @EL_ANOMALY
L_.str.1:                               ## @.str.1
	.asciz	"cd: bad cd image?"

	.comm	_CT_BIN,4,2                     ## @CT_BIN
L_.str.2:                               ## @.str.2
	.asciz	"cd: type detection mismatch"

L_.str.3:                               ## @.str.3
	.asciz	"T-95035"

	.comm	_toc_snatcher,8,3               ## @toc_snatcher
L_.str.4:                               ## @.str.4
	.asciz	"T-127015"

	.comm	_toc_lunar,8,3                  ## @toc_lunar
L_.str.5:                               ## @.str.5
	.asciz	"T-113045"

	.comm	_toc_shadow,8,3                 ## @toc_shadow
L_.str.6:                               ## @.str.6
	.asciz	"T-143025"

	.comm	_toc_dungeon,8,3                ## @toc_dungeon
L_.str.7:                               ## @.str.7
	.asciz	"MK-4410"

	.comm	_toc_ffight,8,3                 ## @toc_ffight
L_.str.8:                               ## @.str.8
	.asciz	"G-6013"

	.comm	_toc_ffightj,8,3                ## @toc_ffightj
	.comm	_NO_DISC,4,2                    ## @NO_DISC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdd_load                       ; -- Begin function cdd_load
	.p2align	2
_cdd_load:                              ; @cdd_load
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	sub	sp, sp, #544
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	str	w1, [sp, #4]
	bl	_cdd_unload
	add	x1, sp, #4
	mov	x0, x19
	bl	_load_cd_image
	cbnz	w0, LBB0_23
; %bb.1:
Lloh3:
	adrp	x20, _cdd@GOTPAGE
Lloh4:
	ldr	x20, [x20, _cdd@GOTPAGEOFF]
	ldr	x8, [x20, #24]
	ldr	w2, [x8, #8]
	add	x0, sp, #8
	mov	w1, #16
	bl	_pm_read
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #8
	mov	w2, #14
	bl	_memcmp
	mov	w19, #2048
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x20, #24]
	ldr	w2, [x8, #8]
	add	x0, sp, #8
	mov	w1, #16
	bl	_pm_read
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #8
	mov	w2, #14
	bl	_memcmp
	cbz	x0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _EL_STATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EL_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _EL_ANOMALY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EL_ANOMALY@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w0, w9, w8
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elprintf
LBB0_4:
	mov	w8, #2352
	b	LBB0_6
LBB0_5:
	mov	w8, #2048
LBB0_6:
	str	w8, [x20]
Lloh17:
	adrp	x9, _CT_BIN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CT_BIN@GOTPAGEOFF]
	ldr	w10, [sp, #4]
Lloh19:
	ldr	w9, [x9]
	mov	w11, #2352
	cmp	w10, w9
	csel	w9, w11, w19, eq
	cmp	w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh20:
	adrp	x8, _EL_STATUS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EL_STATUS@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _EL_ANOMALY@GOTPAGE
Lloh24:
	ldr	x9, [x9, _EL_ANOMALY@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w0, w9, w8
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_elprintf
LBB0_8:
	add	x19, sp, #8
	add	x0, x19, #16
	ldr	x8, [x20, #24]
	ldr	w2, [x8, #8]
	mov	w1, #512
	bl	_pm_read
	ldr	w8, [x20, #16]
	cmp	w8, #1
	b.ne	LBB0_22
; %bb.9:
	add	x19, x19, #384
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_strstr
	cbz	x0, LBB0_13
; %bb.10:
	mov	w8, #0
	mov	x9, #0
	str	xzr, [x20, #16]
	ldr	x11, [x20, #24]
Lloh30:
	adrp	x10, _toc_snatcher@GOTPAGE
Lloh31:
	ldr	x10, [x10, _toc_snatcher@GOTPAGEOFF]
Lloh32:
	ldr	x10, [x10]
	add	x11, x11, #4
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	stur	w8, [x11, #-4]
	ldr	w12, [x10, x9, lsl #2]
	add	w8, w12, w8
	str	w8, [x11], #12
	add	x9, x9, #1
	stp	w9, w8, [x20, #16]
	cmp	x9, #21
	b.ne	LBB0_11
; %bb.12:
	mov	w8, #21
	b	LBB0_22
LBB0_13:
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_strstr
	cbz	x0, LBB0_17
; %bb.14:
	mov	w8, #0
	mov	x9, #0
	str	xzr, [x20, #16]
	ldr	x11, [x20, #24]
Lloh35:
	adrp	x10, _toc_lunar@GOTPAGE
Lloh36:
	ldr	x10, [x10, _toc_lunar@GOTPAGEOFF]
Lloh37:
	ldr	x10, [x10]
	add	x11, x11, #4
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	stur	w8, [x11, #-4]
	ldr	w12, [x10, x9, lsl #2]
	add	w8, w12, w8
	str	w8, [x11], #12
	add	x9, x9, #1
	stp	w9, w8, [x20, #16]
	cmp	x9, #52
	b.ne	LBB0_15
; %bb.16:
	mov	w8, #52
	b	LBB0_22
LBB0_17:
Lloh38:
	adrp	x1, l_.str.5@PAGE
Lloh39:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_strstr
	cbz	x0, LBB0_19
; %bb.18:
	str	xzr, [x20, #16]
Lloh40:
	adrp	x8, _toc_shadow@GOTPAGE
Lloh41:
	ldr	x8, [x8, _toc_shadow@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x8]
	ldr	x8, [x20, #24]
	str	wzr, [x8]
	ldr	w10, [x9]
	str	w10, [x8, #4]
	mov	w11, #1
	stp	w11, w10, [x20, #16]
	str	w10, [x8, #12]
	ldr	w11, [x9, #4]
	add	w10, w11, w10
	str	w10, [x8, #16]
	mov	w11, #2
	stp	w11, w10, [x20, #16]
	str	w10, [x8, #24]
	ldr	w11, [x9, #8]
	add	w10, w11, w10
	str	w10, [x8, #28]
	mov	w11, #3
	stp	w11, w10, [x20, #16]
	str	w10, [x8, #36]
	ldr	w11, [x9, #12]
	add	w10, w11, w10
	str	w10, [x8, #40]
	mov	w11, #4
	stp	w11, w10, [x20, #16]
	str	w10, [x8, #48]
	ldr	w11, [x9, #16]
	add	w10, w11, w10
	str	w10, [x8, #52]
	mov	w11, #8
	stp	w11, w10, [x20, #16]
	str	w10, [x8, #60]
	ldr	w12, [x9, #20]
	add	w10, w12, w10
	str	w10, [x8, #64]
	str	w10, [x8, #72]
	ldr	w12, [x9, #24]
	add	w10, w12, w10
	str	w10, [x8, #76]
	str	w10, [x8, #84]
	ldr	w12, [x9, #28]
	add	w10, w12, w10
	str	w10, [x8, #88]
	str	w10, [x8, #96]
	ldr	w11, [x9, #32]
	add	w11, w11, w10
	str	w11, [x8, #100]
	mov	w12, #9
	stp	w12, w10, [x20, #16]
	str	w11, [x8, #108]
	ldr	w10, [x9, #36]
	add	w10, w10, w11
	str	w10, [x8, #112]
	mov	w12, #10
	stp	w12, w11, [x20, #16]
	str	w10, [x8, #120]
	ldr	w11, [x9, #40]
	add	w11, w11, w10
	str	w11, [x8, #124]
	mov	w12, #11
	stp	w12, w10, [x20, #16]
	str	w11, [x8, #132]
	ldr	w10, [x9, #44]
	add	w10, w10, w11
	str	w10, [x8, #136]
	mov	w12, #12
	stp	w12, w11, [x20, #16]
	str	w10, [x8, #144]
	ldr	w11, [x9, #48]
	add	w11, w11, w10
	str	w11, [x8, #148]
	mov	w12, #13
	stp	w12, w10, [x20, #16]
	str	w11, [x8, #156]
	ldr	w10, [x9, #52]
	add	w10, w10, w11
	str	w10, [x8, #160]
	mov	w12, #14
	str	w10, [x8, #168]
	ldr	w9, [x9, #56]
	add	w9, w9, w10
	stp	w12, w11, [x20, #16]
	str	w10, [x20, #20]
	str	w9, [x8, #172]
	mov	w8, #15
	b	LBB0_21
LBB0_19:
Lloh43:
	adrp	x1, l_.str.6@PAGE
Lloh44:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_strstr
	cbz	x0, LBB0_25
; %bb.20:
	str	xzr, [x20, #16]
	ldr	x8, [x20, #24]
Lloh45:
	adrp	x9, _toc_dungeon@GOTPAGE
Lloh46:
	ldr	x9, [x9, _toc_dungeon@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	str	wzr, [x8]
	ldr	w10, [x9]
	str	w10, [x8, #4]
	mov	w11, #1
	stp	w11, w10, [x20, #16]
	str	w10, [x8, #12]
	ldr	w11, [x9, #4]
	add	w10, w11, w10
	str	w10, [x8, #16]
	mov	w11, #2
	stp	w11, w10, [x20, #16]
	str	w10, [x8, #24]
	ldr	w11, [x9, #8]
	add	w10, w11, w10
	str	w10, [x8, #28]
	mov	w11, #3
	stp	w11, w10, [x20, #16]
	str	w10, [x8, #36]
	ldr	w11, [x9, #12]
	add	w10, w11, w10
	str	w10, [x8, #40]
	mov	w11, #4
	stp	w11, w10, [x20, #16]
	str	w10, [x8, #48]
	ldr	w11, [x9, #16]
	add	w10, w11, w10
	str	w10, [x8, #52]
	str	w10, [x20, #20]
	str	w10, [x8, #60]
	ldr	w11, [x9, #20]
	add	w10, w11, w10
	str	w10, [x8, #64]
	str	w10, [x8, #72]
	ldr	w11, [x9, #24]
	add	w10, w11, w10
	str	w10, [x8, #76]
	str	w10, [x8, #84]
	ldr	w11, [x9, #28]
	add	w10, w11, w10
	str	w10, [x8, #88]
	str	w10, [x8, #96]
	ldr	w11, [x9, #32]
	add	w10, w11, w10
	str	w10, [x8, #100]
	str	w10, [x8, #108]
	ldr	w11, [x9, #36]
	add	w10, w11, w10
	str	w10, [x8, #112]
	str	w10, [x8, #120]
	ldr	w11, [x9, #40]
	add	w10, w11, w10
	str	w10, [x8, #124]
	str	w10, [x8, #132]
	ldr	w11, [x9, #44]
	add	w10, w11, w10
	str	w10, [x8, #136]
	str	w10, [x8, #144]
	ldr	w9, [x9, #48]
	add	w9, w9, w10
	str	w9, [x8, #148]
	mov	w8, #13
LBB0_21:
	stp	w8, w9, [x20, #16]
LBB0_22:
	mov	w0, #0
	ldr	w9, [x20, #20]
	ldr	x10, [x20, #24]
	mov	w11, #12
	smull	x8, w8, w11
	str	w9, [x10, x8]
	mov	w8, #1
Lloh48:
	adrp	x9, _NO_DISC@GOTPAGE
Lloh49:
	ldr	x9, [x9, _NO_DISC@GOTPAGEOFF]
Lloh50:
	ldr	w9, [x9]
	stp	w8, w9, [x20, #4]
LBB0_23:
	ldur	x8, [x29, #-40]
Lloh51:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh52:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh53:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_32
; %bb.24:
	add	sp, sp, #544
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_25:
Lloh54:
	adrp	x1, l_.str.7@PAGE
Lloh55:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_strstr
	cbz	x0, LBB0_28
; %bb.26:
	mov	w9, #0
	mov	x10, #0
	str	xzr, [x20, #16]
	ldr	x8, [x20, #24]
Lloh56:
	adrp	x11, _toc_ffight@GOTPAGE
Lloh57:
	ldr	x11, [x11, _toc_ffight@GOTPAGEOFF]
Lloh58:
	ldr	x11, [x11]
	add	x12, x8, #4
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	stur	w9, [x12, #-4]
	ldr	w8, [x11, x10, lsl #2]
	add	w9, w8, w9
	str	w9, [x12], #12
	add	x10, x10, #1
	stp	w10, w9, [x20, #16]
	mov	w8, #26
	cmp	x10, #26
	b.ne	LBB0_27
	b	LBB0_22
LBB0_28:
Lloh59:
	adrp	x1, l_.str.8@PAGE
Lloh60:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_strstr
	cbz	x0, LBB0_31
; %bb.29:
	mov	w9, #0
	mov	x10, #0
	str	xzr, [x20, #16]
	ldr	x8, [x20, #24]
Lloh61:
	adrp	x11, _toc_ffightj@GOTPAGE
Lloh62:
	ldr	x11, [x11, _toc_ffightj@GOTPAGEOFF]
Lloh63:
	ldr	x11, [x11]
	add	x12, x8, #4
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	stur	w9, [x12, #-4]
	ldr	w8, [x11, x10, lsl #2]
	add	w9, w8, w9
	str	w9, [x12], #12
	add	x10, x10, #1
	stp	w10, w9, [x20, #16]
	mov	w8, #29
	cmp	x10, #29
	b.ne	LBB0_30
	b	LBB0_22
LBB0_31:
	mov	w8, #1
	b	LBB0_22
LBB0_32:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.cfi_endproc
                                        ; -- End function
	.comm	_cdd,32,3                       ; @cdd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SEGADISCSYSTEM"

	.comm	_EL_STATUS,4,2                  ; @EL_STATUS
	.comm	_EL_ANOMALY,4,2                 ; @EL_ANOMALY
l_.str.1:                               ; @.str.1
	.asciz	"cd: bad cd image?"

	.comm	_CT_BIN,4,2                     ; @CT_BIN
l_.str.2:                               ; @.str.2
	.asciz	"cd: type detection mismatch"

l_.str.3:                               ; @.str.3
	.asciz	"T-95035"

	.comm	_toc_snatcher,8,3               ; @toc_snatcher
l_.str.4:                               ; @.str.4
	.asciz	"T-127015"

	.comm	_toc_lunar,8,3                  ; @toc_lunar
l_.str.5:                               ; @.str.5
	.asciz	"T-113045"

	.comm	_toc_shadow,8,3                 ; @toc_shadow
l_.str.6:                               ; @.str.6
	.asciz	"T-143025"

	.comm	_toc_dungeon,8,3                ; @toc_dungeon
l_.str.7:                               ; @.str.7
	.asciz	"MK-4410"

	.comm	_toc_ffight,8,3                 ; @toc_ffight
l_.str.8:                               ; @.str.8
	.asciz	"G-6013"

	.comm	_toc_ffightj,8,3                ; @toc_ffightj
	.comm	_NO_DISC,4,2                    ; @NO_DISC
.subsections_via_symbols
