	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function draw_cd_menu_options
_draw_cd_menu_options:                  ## @draw_cd_menu_options
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_PicoCDBuffers@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	$2, %edx
	jl	LBB0_2
## %bb.1:
	addl	%edx, %edx
	leaq	L_.str(%rip), %rsi
	leaq	-64(%rbp), %rdi
	callq	_sprintf
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	leaq	-64(%rbp), %rdi
	callq	_strcpy
LBB0_3:
	movl	$1, %edi
	callq	_menu_draw_begin
	leal	(%r15,%r15,4), %eax
	leal	(%rax,%rax), %esi
	addl	$60, %esi
	movl	$9, %edi
	movl	$246, %edx
	callq	_menu_draw_selection
	movq	_cdopt_entries@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_CDOPT_ENTRY_COUNT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_menu_cdopt_cust_draw@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$25, %edx
	movl	$60, %ecx
	movq	%r14, %r9
	callq	_me_draw
	movl	(%r12), %edi
	movl	(%rbx), %esi
	movl	%r15d, %edx
	callq	_me_index2id
	movq	%rax, %rbx
	movq	_MA_CDOPT_TESTBIOS_USA@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_5
## %bb.4:
	movl	8(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_9
LBB0_5:
	movq	_MA_CDOPT_TESTBIOS_EUR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_7
## %bb.6:
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_9
LBB0_7:
	movq	_MA_CDOPT_TESTBIOS_JAP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_10
## %bb.8:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
LBB0_9:
	leaq	L_.str.3(%rip), %rdx
	movl	$25, %edi
	movl	$210, %esi
	callq	_text_out16
LBB0_10:
	xorl	%eax, %eax
	callq	_menu_draw_end
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PicoCDBuffers,4,2              ## @PicoCDBuffers
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%5iK"

L_.str.1:                               ## @.str.1
	.asciz	"     OFF"

	.comm	_cdopt_entries,4,2              ## @cdopt_entries
	.comm	_CDOPT_ENTRY_COUNT,4,2          ## @CDOPT_ENTRY_COUNT
	.comm	_menu_cdopt_cust_draw,4,2       ## @menu_cdopt_cust_draw
	.comm	_MA_CDOPT_TESTBIOS_USA,8,3      ## @MA_CDOPT_TESTBIOS_USA
L_.str.2:                               ## @.str.2
	.asciz	"NOT FOUND"

	.comm	_MA_CDOPT_TESTBIOS_EUR,8,3      ## @MA_CDOPT_TESTBIOS_EUR
	.comm	_MA_CDOPT_TESTBIOS_JAP,8,3      ## @MA_CDOPT_TESTBIOS_JAP
L_.str.3:                               ## @.str.3
	.asciz	"Press start to test selected BIOS"

	.no_dead_strip	_draw_cd_menu_options
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function draw_cd_menu_options
_draw_cd_menu_options:                  ; @draw_cd_menu_options
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, #24]
Lloh3:
	adrp	x8, _PicoCDBuffers@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PicoCDBuffers@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_2
; %bb.1:
	lsl	w2, w8, #1
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	bl	_sprintf
	b	LBB0_3
LBB0_2:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #8
	bl	_strcpy
LBB0_3:
	mov	w0, #1
	bl	_menu_draw_begin
	mov	w8, #10
	orr	w9, wzr, #0x3c
	madd	w1, w20, w8, w9
	mov	w0, #9
	mov	w2, #246
	bl	_menu_draw_selection
Lloh10:
	adrp	x21, _cdopt_entries@GOTPAGE
Lloh11:
	ldr	x21, [x21, _cdopt_entries@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh12:
	adrp	x22, _CDOPT_ENTRY_COUNT@GOTPAGE
Lloh13:
	ldr	x22, [x22, _CDOPT_ENTRY_COUNT@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh14:
	adrp	x8, _menu_cdopt_cust_draw@GOTPAGE
Lloh15:
	ldr	x8, [x8, _menu_cdopt_cust_draw@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	mov	w2, #25
	mov	w3, #60
	mov	x5, x19
	bl	_me_draw
	ldr	w0, [x21]
	ldr	w1, [x22]
	mov	x2, x20
	bl	_me_index2id
	mov	x20, x0
Lloh17:
	adrp	x8, _MA_CDOPT_TESTBIOS_USA@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MA_CDOPT_TESTBIOS_USA@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:
	ldr	w0, [x19, #8]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_9
LBB0_5:
Lloh22:
	adrp	x8, _MA_CDOPT_TESTBIOS_EUR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MA_CDOPT_TESTBIOS_EUR@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	cmp	x20, x8
	b.ne	LBB0_7
; %bb.6:
	ldr	w0, [x19, #4]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_9
LBB0_7:
Lloh27:
	adrp	x8, _MA_CDOPT_TESTBIOS_JAP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MA_CDOPT_TESTBIOS_JAP@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x20, x8
	b.ne	LBB0_10
; %bb.8:
	ldr	w0, [x19]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_10
LBB0_9:
Lloh32:
	adrp	x2, l_.str.3@PAGE
Lloh33:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w0, #25
	mov	w1, #210
	bl	_text_out16
LBB0_10:
	bl	_menu_draw_end
	ldr	x8, [sp, #24]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_PicoCDBuffers,4,2              ; @PicoCDBuffers
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%5iK"

l_.str.1:                               ; @.str.1
	.asciz	"     OFF"

	.comm	_cdopt_entries,4,2              ; @cdopt_entries
	.comm	_CDOPT_ENTRY_COUNT,4,2          ; @CDOPT_ENTRY_COUNT
	.comm	_menu_cdopt_cust_draw,4,2       ; @menu_cdopt_cust_draw
	.comm	_MA_CDOPT_TESTBIOS_USA,8,3      ; @MA_CDOPT_TESTBIOS_USA
l_.str.2:                               ; @.str.2
	.asciz	"NOT FOUND"

	.comm	_MA_CDOPT_TESTBIOS_EUR,8,3      ; @MA_CDOPT_TESTBIOS_EUR
	.comm	_MA_CDOPT_TESTBIOS_JAP,8,3      ; @MA_CDOPT_TESTBIOS_JAP
l_.str.3:                               ; @.str.3
	.asciz	"Press start to test selected BIOS"

	.no_dead_strip	_draw_cd_menu_options
.subsections_via_symbols
