	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function GetCharacterTimeout
_GetCharacterTimeout:                   ## @GetCharacterTimeout
	.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	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_STD_INPUT_HANDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GetStdHandle
	movl	%eax, %ebx
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_WaitForSingleObject
	movq	_WAIT_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_GC_TIMEOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	leaq	-56(%rbp), %rsi
	leaq	-28(%rbp), %rcx
	movl	%ebx, %edi
	movl	$1, %edx
	callq	_ReadConsoleInput
	movq	-56(%rbp), %rcx
	movq	_KEY_EVENT@GOTPCREL(%rip), %rdx
	movq	_GC_NOKEY@GOTPCREL(%rip), %rax
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.3:
	movq	-48(%rbp), %rcx
	movq	_FALSE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_5
## %bb.4:
	movl	-40(%rbp), %eax
	movl	%eax, (%r14)
	movq	_GC_KEYREAD@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STD_INPUT_HANDLE,4,2           ## @STD_INPUT_HANDLE
	.comm	_WAIT_TIMEOUT,8,3               ## @WAIT_TIMEOUT
	.comm	_GC_TIMEOUT,4,2                 ## @GC_TIMEOUT
	.comm	_KEY_EVENT,8,3                  ## @KEY_EVENT
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_GC_KEYREAD,4,2                 ## @GC_KEYREAD
	.comm	_GC_NOKEY,4,2                   ## @GC_NOKEY
	.no_dead_strip	_GetCharacterTimeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function GetCharacterTimeout
_GetCharacterTimeout:                   ; @GetCharacterTimeout
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _STD_INPUT_HANDLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STD_INPUT_HANDLE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_GetStdHandle
	mov	x20, x0
	mov	x1, x21
	bl	_WaitForSingleObject
Lloh3:
	adrp	x8, _WAIT_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WAIT_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _GC_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GC_TIMEOUT@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	mov	x1, sp
	add	x3, sp, #28
	mov	x0, x20
	mov	w2, #1
	bl	_ReadConsoleInput
	ldr	x8, [sp]
Lloh8:
	adrp	x9, _KEY_EVENT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _KEY_EVENT@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [sp, #8]
Lloh11:
	adrp	x9, _FALSE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _GC_NOKEY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GC_NOKEY@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	ldr	w8, [sp, #16]
	str	w8, [x19]
Lloh16:
	adrp	x8, _GC_KEYREAD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GC_KEYREAD@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_STD_INPUT_HANDLE,4,2           ; @STD_INPUT_HANDLE
	.comm	_WAIT_TIMEOUT,8,3               ; @WAIT_TIMEOUT
	.comm	_GC_TIMEOUT,4,2                 ; @GC_TIMEOUT
	.comm	_KEY_EVENT,8,3                  ; @KEY_EVENT
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_GC_KEYREAD,4,2                 ; @GC_KEYREAD
	.comm	_GC_NOKEY,4,2                   ; @GC_NOKEY
	.no_dead_strip	_GetCharacterTimeout
.subsections_via_symbols
