	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidc_getchar
_vidc_getchar:                          ## @vidc_getchar
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_KEYBUFSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.1:
	movq	_keybuf@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rsi,4), %eax
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_2
LBB0_4:
	xorl	%eax, %eax
	callq	_vidc_ischar
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	_v86@GOTPCREL(%rip), %rbx
	movq	$0, 8(%rbx)
	movq	$22, (%rbx)
	xorl	%eax, %eax
	callq	_v86int
	movl	4(%rbx), %ecx
	movl	%ecx, %eax
	andl	$255, %eax
	jne	LBB0_15
## %bb.6:
	andl	$65280, %ecx                    ## imm = 0xFF00
	addl	$-18432, %ecx                   ## imm = 0xB800
	shrl	$8, %ecx
	cmpl	$8, %ecx
	ja	LBB0_10
## %bb.7:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rcx,4), %rcx
	addq	%rax, %rcx
	movl	$-1, %eax
	jmpq	*%rcx
LBB0_8:
	movq	_keybuf@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movabsq	$279172874331, %rcx             ## imm = 0x410000005B
	jmp	LBB0_14
LBB0_9:
	movl	$0, (%rdx,%rsi,4)
	jmp	LBB0_15
LBB0_10:
	movl	$-1, %eax
	jmp	LBB0_15
LBB0_11:
	movq	_keybuf@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movabsq	$292057776219, %rcx             ## imm = 0x440000005B
	jmp	LBB0_14
LBB0_12:
	movq	_keybuf@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movabsq	$287762808923, %rcx             ## imm = 0x430000005B
	jmp	LBB0_14
LBB0_13:
	movq	_keybuf@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movabsq	$283467841627, %rcx             ## imm = 0x420000005B
LBB0_14:
	movq	%rcx, (%rax)
	movl	$27, %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_15
	.long	L0_0_set_15
	.long	L0_0_set_11
	.long	L0_0_set_15
	.long	L0_0_set_12
	.long	L0_0_set_15
	.long	L0_0_set_15
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_KEYBUFSZ,4,2                   ## @KEYBUFSZ
	.comm	_keybuf,8,3                     ## @keybuf
	.comm	_v86,16,3                       ## @v86
	.no_dead_strip	_vidc_getchar
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function vidc_getchar
lCPI0_0:
	.long	22                              ; 0x16
	.long	0                               ; 0x0
lCPI0_1:
	.long	91                              ; 0x5b
	.long	66                              ; 0x42
lCPI0_2:
	.long	91                              ; 0x5b
	.long	67                              ; 0x43
lCPI0_3:
	.long	91                              ; 0x5b
	.long	68                              ; 0x44
lCPI0_4:
	.long	91                              ; 0x5b
	.long	65                              ; 0x41
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_vidc_getchar:                          ; @vidc_getchar
	.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	x8, _KEYBUFSZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KEYBUFSZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
Lloh3:
	adrp	x9, _keybuf@GOTPAGE
Lloh4:
	ldr	x9, [x9, _keybuf@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x9]
	cbnz	w0, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #4
	subs	x8, x8, #1
	b.ne	LBB0_2
LBB0_4:
	bl	_vidc_ischar
	cbz	x0, LBB0_10
; %bb.5:
Lloh6:
	adrp	x19, _v86@GOTPAGE
Lloh7:
	ldr	x19, [x19, _v86@GOTPAGEOFF]
	str	xzr, [x19, #8]
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	bl	_v86int
	ldr	w8, [x19, #4]
	ands	w0, w8, #0xff
	b.ne	LBB0_15
; %bb.6:
	and	w8, w8, #0xff00
	mov	w9, #-18432
	add	w8, w8, w9
	lsr	w8, w8, #8
	mov	w0, #-1
	cmp	w8, #8
	b.hi	LBB0_15
; %bb.7:
Lloh10:
	adrp	x9, lJTI0_0@PAGE
Lloh11:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
Lloh12:
	adrp	x8, _keybuf@GOTPAGE
Lloh13:
	ldr	x8, [x8, _keybuf@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, lCPI0_4@PAGE
Lloh16:
	ldr	d0, [x9, lCPI0_4@PAGEOFF]
	b	LBB0_14
LBB0_9:
	str	wzr, [x9]
	b	LBB0_15
LBB0_10:
	mov	w0, #-1
	b	LBB0_15
LBB0_11:
Lloh17:
	adrp	x8, _keybuf@GOTPAGE
Lloh18:
	ldr	x8, [x8, _keybuf@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, lCPI0_3@PAGE
Lloh21:
	ldr	d0, [x9, lCPI0_3@PAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh22:
	adrp	x8, _keybuf@GOTPAGE
Lloh23:
	ldr	x8, [x8, _keybuf@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
Lloh25:
	adrp	x9, lCPI0_2@PAGE
Lloh26:
	ldr	d0, [x9, lCPI0_2@PAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh27:
	adrp	x8, _keybuf@GOTPAGE
Lloh28:
	ldr	x8, [x8, _keybuf@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
Lloh30:
	adrp	x9, lCPI0_1@PAGE
Lloh31:
	ldr	d0, [x9, lCPI0_1@PAGEOFF]
LBB0_14:
	str	d0, [x8]
	mov	w0, #27
LBB0_15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdr	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdr	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdr	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdr	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_15-LBB0_8)>>2
	.byte	(LBB0_15-LBB0_8)>>2
	.byte	(LBB0_11-LBB0_8)>>2
	.byte	(LBB0_15-LBB0_8)>>2
	.byte	(LBB0_12-LBB0_8)>>2
	.byte	(LBB0_15-LBB0_8)>>2
	.byte	(LBB0_15-LBB0_8)>>2
	.byte	(LBB0_13-LBB0_8)>>2
                                        ; -- End function
	.comm	_KEYBUFSZ,4,2                   ; @KEYBUFSZ
	.comm	_keybuf,8,3                     ; @keybuf
	.comm	_v86,16,3                       ; @v86
	.no_dead_strip	_vidc_getchar
.subsections_via_symbols
