	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mode_menu
_mode_menu:                             ## @mode_menu
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	leaq	L_.str(%rip), %rdi
	callq	_puts
	xorl	%eax, %eax
	callq	_kbd_flush
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_getchar_timeout
	testl	$-33, %eax
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$13, %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$7, %edi
	callq	_putchar
	jmp	LBB0_1
LBB0_2:
	movq	_VIDEO_CURRENT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
LBB0_5:
	xorl	%eax, %eax
	callq	_display_menu
	leaq	L_.str.1(%rip), %rdi
	callq	_puts
	xorl	%eax, %eax
	callq	_get_entry
	movq	_SCAN@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jne	LBB0_8
## %bb.6:
	leaq	L_.str.1(%rip), %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_probe_cards
	xorl	%eax, %eax
	callq	_display_menu
	movq	%rbx, %rdi
	callq	_puts
	xorl	%eax, %eax
	callq	_get_entry
	cmpl	(%r14), %eax
	je	LBB0_7
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Press <ENTER> to see video modes available, <SPACE> to continue, or wait 30 sec\n"

	.comm	_VIDEO_CURRENT_MODE,4,2         ## @VIDEO_CURRENT_MODE
L_.str.1:                               ## @.str.1
	.asciz	"Enter a video mode or \"scan\" to scan for additional modes: "

	.comm	_SCAN,4,2                       ## @SCAN
	.no_dead_strip	_mode_menu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mode_menu
_mode_menu:                             ; @mode_menu
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_puts
	bl	_kbd_flush
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_getchar_timeout
	tst	w0, #0xffffffdf
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #13
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #7
	bl	_putchar
	b	LBB0_1
LBB0_4:
Lloh2:
	adrp	x8, _VIDEO_CURRENT_MODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VIDEO_CURRENT_MODE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_5:
	bl	_display_menu
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_puts
	bl	_get_entry
Lloh7:
	adrp	x20, _SCAN@GOTPAGE
Lloh8:
	ldr	x20, [x20, _SCAN@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.6:
Lloh9:
	adrp	x19, l_.str.1@PAGE
Lloh10:
	add	x19, x19, l_.str.1@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_probe_cards
	bl	_display_menu
	mov	x0, x19
	bl	_puts
	bl	_get_entry
	ldr	w8, [x20]
	cmp	w0, w8
	b.eq	LBB0_7
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Press <ENTER> to see video modes available, <SPACE> to continue, or wait 30 sec\n"

	.comm	_VIDEO_CURRENT_MODE,4,2         ; @VIDEO_CURRENT_MODE
l_.str.1:                               ; @.str.1
	.asciz	"Enter a video mode or \"scan\" to scan for additional modes: "

	.comm	_SCAN,4,2                       ; @SCAN
	.no_dead_strip	_mode_menu
.subsections_via_symbols
