	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	$16777215, -40(%rbp)            ## imm = 0xFFFFFF
	movq	$-256, -48(%rbp)
	movq	_cleanup@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_atexit
	cmpl	$2, %ebx
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_ProgramUsage
LBB0_2:
	movq	_PROG_NAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_VER_NAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_COPYRIGHT_YEAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	8(%r14), %rdi
	movq	_ArchCD@GOTPCREL(%rip), %r15
	callq	*(%r15)
	testq	%rax, %rax
	jne	LBB0_3
## %bb.5:
	movq	_testspassed@GOTPCREL(%rip), %r14
	incl	(%r14)
	xorl	%eax, %eax
	callq	*8(%r15)
	cmpl	$1, %eax
	ja	LBB0_29
## %bb.6:
	incl	(%r14)
	movq	_cdTOC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	*16(%r15)
	cmpl	$408, %eax                      ## imm = 0x198
	jne	LBB0_7
## %bb.8:
	incl	(%r14)
	jmp	LBB0_9
LBB0_7:
	leaq	L_str.20(%rip), %rdi
	callq	_puts
LBB0_9:
	movl	(%rbx), %edi
	callq	_IsTOCValid
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	incl	(%r14)
	jmp	LBB0_12
LBB0_10:
	leaq	L_str.13(%rip), %rdi
	callq	_puts
LBB0_12:
	movq	_cdbuffer@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movl	$150, %edi
	callq	*24(%r15)
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.14:
	incl	(%r14)
	jmp	LBB0_15
LBB0_13:
	leaq	L_str.19(%rip), %rdi
	callq	_puts
LBB0_15:
	movq	(%rbx), %rsi
	leaq	-48(%rbp), %rdi
	movl	$12, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	leaq	L_str.18(%rip), %rdi
	callq	_puts
	jmp	LBB0_18
LBB0_17:
	incl	(%r14)
LBB0_18:
	movq	(%rbx), %rsi
	addq	$16, %rsi
	leaq	L_.str.6(%rip), %rdi
	movl	$15, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	leaq	L_str.17(%rip), %rdi
	callq	_puts
	jmp	LBB0_21
LBB0_20:
	incl	(%r14)
LBB0_21:
	movq	(%rbx), %rsi
	movl	$166, %edi
	callq	*24(%r15)
	cmpl	$1, %eax
	jne	LBB0_22
## %bb.23:
	incl	(%r14)
	jmp	LBB0_24
LBB0_22:
	leaq	L_str.16(%rip), %rdi
	callq	_puts
LBB0_24:
	movq	(%rbx), %rsi
	leaq	-48(%rbp), %rdi
	movl	$12, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	leaq	L_str.15(%rip), %rdi
	callq	_puts
	jmp	LBB0_27
LBB0_26:
	incl	(%r14)
LBB0_27:
	movq	(%rbx), %rsi
	addq	$17, %rsi
	leaq	L_.str.10(%rip), %rdi
	movl	$5, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_30
## %bb.28:
	leaq	L_str.14(%rip), %rdi
	callq	_puts
	jmp	LBB0_31
LBB0_30:
	incl	(%r14)
LBB0_31:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_33
## %bb.32:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_str.21(%rip), %rdi
	jmp	LBB0_4
LBB0_29:
	leaq	L_str(%rip), %rdi
LBB0_4:
	callq	_puts
	movl	$1, %edi
	callq	_exit
LBB0_33:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
l___const.main.syncheader:              ## @__const.main.syncheader
	.asciz	"\000\377\377\377\377\377\377\377\377\377\377"

	.comm	_cleanup,4,2                    ## @cleanup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s v%s - by Cyber Warrior X(c)%s\n"

	.comm	_PROG_NAME,8,3                  ## @PROG_NAME
	.comm	_VER_NAME,8,3                   ## @VER_NAME
	.comm	_COPYRIGHT_YEAR,8,3             ## @COPYRIGHT_YEAR
	.comm	_ArchCD,32,3                    ## @ArchCD
	.comm	_testspassed,4,2                ## @testspassed
	.comm	_cdTOC,4,2                      ## @cdTOC
	.comm	_cdbuffer,8,3                   ## @cdbuffer
L_.str.6:                               ## @.str.6
	.asciz	"SEGA SEGASATURN"

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

L_str:                                  ## @str
	.asciz	"CDGetStatus error: Can't continue the rest of the test - There's either no CD present or the tray is open"

L_str.13:                               ## @str.13
	.asciz	"CDReadToc error: TOC data has some issues"

L_str.14:                               ## @str.14
	.asciz	"CDReadSectorFAD error: LBA 16(FAD 166)'s sector contents were not as expected"

L_str.15:                               ## @str.15
	.asciz	"CDReadSectorFAD error: LBA 16(FAD 166) read is missing sync header"

L_str.16:                               ## @str.16
	.asciz	"CDReadSectorFAD error: Reading of LBA 16(FAD 166) returned false"

L_str.17:                               ## @str.17
	.asciz	"CDReadSectorFAD error: LBA 0(FAD 150)'s sector contents were not as expected"

L_str.18:                               ## @str.18
	.asciz	"CDReadSectorFAD error: LBA 0(FAD 150) read is missing sync header"

L_str.19:                               ## @str.19
	.asciz	"CDReadSectorFAD error: Reading of LBA 0(FAD 150) returned false"

L_str.20:                               ## @str.20
	.asciz	"CDReadToc error: return value was not the correct size"

L_str.21:                               ## @str.21
	.asciz	"CDInit error: Unable to initialize cdrom"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.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	x19, x1
	mov	x20, 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	w8, #16777215
	str	w8, [sp, #32]
	mov	x8, #-256
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _cleanup@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cleanup@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_atexit
	cmp	w20, #2
	b.eq	LBB0_2
; %bb.1:
	bl	_ProgramUsage
LBB0_2:
Lloh6:
	adrp	x8, _PROG_NAME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PROG_NAME@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _VER_NAME@GOTPAGE
Lloh10:
	ldr	x9, [x9, _VER_NAME@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _COPYRIGHT_YEAR@GOTPAGE
Lloh13:
	ldr	x10, [x10, _COPYRIGHT_YEAR@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	ldr	x0, [x19, #8]
Lloh17:
	adrp	x20, _ArchCD@GOTPAGE
Lloh18:
	ldr	x20, [x20, _ArchCD@GOTPAGEOFF]
	ldr	x8, [x20]
	blr	x8
	cbnz	x0, LBB0_30
; %bb.3:
Lloh19:
	adrp	x19, _testspassed@GOTPAGE
Lloh20:
	ldr	x19, [x19, _testspassed@GOTPAGEOFF]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	x8, [x20, #8]
	blr	x8
	cmp	w0, #1
	b.hi	LBB0_31
; %bb.4:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	x8, [x20, #16]
Lloh21:
	adrp	x21, _cdTOC@GOTPAGE
Lloh22:
	ldr	x21, [x21, _cdTOC@GOTPAGEOFF]
	ldr	w0, [x21]
	blr	x8
	cmp	w0, #408
	b.ne	LBB0_6
; %bb.5:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_7
LBB0_6:
Lloh23:
	adrp	x0, l_str.20@PAGE
Lloh24:
	add	x0, x0, l_str.20@PAGEOFF
	bl	_puts
LBB0_7:
	ldr	w0, [x21]
	bl	_IsTOCValid
	cbz	w0, LBB0_9
; %bb.8:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_10
LBB0_9:
Lloh25:
	adrp	x0, l_str.13@PAGE
Lloh26:
	add	x0, x0, l_str.13@PAGEOFF
	bl	_puts
LBB0_10:
	ldr	x8, [x20, #24]
Lloh27:
	adrp	x21, _cdbuffer@GOTPAGE
Lloh28:
	ldr	x21, [x21, _cdbuffer@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	w0, #150
	blr	x8
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.11:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_13
LBB0_12:
Lloh29:
	adrp	x0, l_str.19@PAGE
Lloh30:
	add	x0, x0, l_str.19@PAGEOFF
	bl	_puts
LBB0_13:
	ldr	x1, [x21]
	add	x0, sp, #24
	mov	w2, #12
	bl	_memcmp
	cbz	x0, LBB0_15
; %bb.14:
Lloh31:
	adrp	x0, l_str.18@PAGE
Lloh32:
	add	x0, x0, l_str.18@PAGEOFF
	bl	_puts
	b	LBB0_16
LBB0_15:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_16:
	ldr	x8, [x21]
	add	x1, x8, #16
Lloh33:
	adrp	x0, l_.str.6@PAGE
Lloh34:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	w2, #15
	bl	_memcmp
	cbz	x0, LBB0_18
; %bb.17:
Lloh35:
	adrp	x0, l_str.17@PAGE
Lloh36:
	add	x0, x0, l_str.17@PAGEOFF
	bl	_puts
	b	LBB0_19
LBB0_18:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_19:
	ldr	x8, [x20, #24]
	ldr	x1, [x21]
	mov	w0, #166
	blr	x8
	cmp	w0, #1
	b.ne	LBB0_21
; %bb.20:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_22
LBB0_21:
Lloh37:
	adrp	x0, l_str.16@PAGE
Lloh38:
	add	x0, x0, l_str.16@PAGEOFF
	bl	_puts
LBB0_22:
	ldr	x1, [x21]
	add	x0, sp, #24
	mov	w2, #12
	bl	_memcmp
	cbz	x0, LBB0_24
; %bb.23:
Lloh39:
	adrp	x0, l_str.15@PAGE
Lloh40:
	add	x0, x0, l_str.15@PAGEOFF
	bl	_puts
	b	LBB0_25
LBB0_24:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_25:
	ldr	x8, [x21]
	add	x1, x8, #17
Lloh41:
	adrp	x0, l_.str.10@PAGE
Lloh42:
	add	x0, x0, l_.str.10@PAGEOFF
	mov	w2, #5
	bl	_memcmp
	cbz	x0, LBB0_27
; %bb.26:
Lloh43:
	adrp	x0, l_str.14@PAGE
Lloh44:
	add	x0, x0, l_str.14@PAGEOFF
	bl	_puts
	b	LBB0_28
LBB0_27:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_28:
	ldr	x8, [sp, #40]
Lloh45:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh46:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_33
; %bb.29:
	mov	w0, #0
	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_30:
Lloh48:
	adrp	x0, l_str.21@PAGE
Lloh49:
	add	x0, x0, l_str.21@PAGEOFF
	b	LBB0_32
LBB0_31:
Lloh50:
	adrp	x0, l_str@PAGE
Lloh51:
	add	x0, x0, l_str@PAGEOFF
LBB0_32:
	bl	_puts
	mov	w0, #1
	bl	_exit
LBB0_33:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
l___const.main.syncheader:              ; @__const.main.syncheader
	.asciz	"\000\377\377\377\377\377\377\377\377\377\377"

	.comm	_cleanup,4,2                    ; @cleanup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s v%s - by Cyber Warrior X(c)%s\n"

	.comm	_PROG_NAME,8,3                  ; @PROG_NAME
	.comm	_VER_NAME,8,3                   ; @VER_NAME
	.comm	_COPYRIGHT_YEAR,8,3             ; @COPYRIGHT_YEAR
	.comm	_ArchCD,32,3                    ; @ArchCD
	.comm	_testspassed,4,2                ; @testspassed
	.comm	_cdTOC,4,2                      ; @cdTOC
	.comm	_cdbuffer,8,3                   ; @cdbuffer
l_.str.6:                               ; @.str.6
	.asciz	"SEGA SEGASATURN"

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

l_str:                                  ; @str
	.asciz	"CDGetStatus error: Can't continue the rest of the test - There's either no CD present or the tray is open"

l_str.13:                               ; @str.13
	.asciz	"CDReadToc error: TOC data has some issues"

l_str.14:                               ; @str.14
	.asciz	"CDReadSectorFAD error: LBA 16(FAD 166)'s sector contents were not as expected"

l_str.15:                               ; @str.15
	.asciz	"CDReadSectorFAD error: LBA 16(FAD 166) read is missing sync header"

l_str.16:                               ; @str.16
	.asciz	"CDReadSectorFAD error: Reading of LBA 16(FAD 166) returned false"

l_str.17:                               ; @str.17
	.asciz	"CDReadSectorFAD error: LBA 0(FAD 150)'s sector contents were not as expected"

l_str.18:                               ; @str.18
	.asciz	"CDReadSectorFAD error: LBA 0(FAD 150) read is missing sync header"

l_str.19:                               ; @str.19
	.asciz	"CDReadSectorFAD error: Reading of LBA 0(FAD 150) returned false"

l_str.20:                               ; @str.20
	.asciz	"CDReadToc error: return value was not the correct size"

l_str.21:                               ; @str.21
	.asciz	"CDInit error: Unable to initialize cdrom"

.subsections_via_symbols
