	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReadFromConsole                ## -- Begin function ReadFromConsole
	.p2align	4, 0x90
_ReadFromConsole:                       ## @ReadFromConsole
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	$0, -44(%rbp)
	xorl	%eax, %eax
	callq	_GetProcessHeap
	leal	-1(%r14), %r12d
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_HeapAlloc
	movq	%rax, %r15
	shll	$2, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_ZeroMemory
	movq	_STD_INPUT_HANDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GetStdHandle
	movl	%eax, %r14d
	leaq	-48(%rbp), %rsi
	movl	%eax, %edi
	callq	_GetConsoleMode
	movq	_ENABLE_LINE_INPUT@GOTPCREL(%rip), %rax
	movl	$0, %esi
	testq	%r13, %r13
	je	LBB0_2
## %bb.1:
	movq	_ENABLE_ECHO_INPUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_2:
	orl	(%rax), %esi
	movl	%r14d, %edi
	callq	_SetConsoleMode
	leaq	-44(%rbp), %rcx
	movl	%r14d, %edi
	movl	%r15d, %esi
	movl	%r12d, %edx
	xorl	%r8d, %r8d
	callq	_ReadFile
	movq	_CP_OEMCP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %ecx
	xorl	%esi, %esi
	movq	%r15, %rdx
	movq	%rbx, %r8
	movl	%r12d, %r9d
	callq	_MultiByteToWideChar
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_HeapFree
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$13, %eax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$4, %rbx
	jmp	LBB0_3
LBB0_5:
	movl	$0, (%rbx)
LBB0_6:
	movl	-48(%rbp), %esi
	movl	%r14d, %edi
	callq	_SetConsoleMode
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STD_INPUT_HANDLE,4,2           ## @STD_INPUT_HANDLE
	.comm	_ENABLE_LINE_INPUT,4,2          ## @ENABLE_LINE_INPUT
	.comm	_ENABLE_ECHO_INPUT,4,2          ## @ENABLE_ECHO_INPUT
	.comm	_CP_OEMCP,4,2                   ## @CP_OEMCP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReadFromConsole                ; -- Begin function ReadFromConsole
	.p2align	2
_ReadFromConsole:                       ; @ReadFromConsole
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
	str	wzr, [sp, #8]
	bl	_GetProcessHeap
	sub	w22, w20, #1
	mov	w1, #0
	mov	x2, x22
	bl	_HeapAlloc
	mov	x21, x0
	lsl	w1, w20, #2
	mov	x0, x19
	bl	_ZeroMemory
Lloh0:
	adrp	x8, _STD_INPUT_HANDLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STD_INPUT_HANDLE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_GetStdHandle
	mov	x20, x0
	add	x1, sp, #12
	bl	_GetConsoleMode
Lloh3:
	adrp	x8, _ENABLE_LINE_INPUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENABLE_LINE_INPUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _ENABLE_ECHO_INPUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ENABLE_ECHO_INPUT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x23, #0
	csel	w9, wzr, w9, eq
	orr	w1, w9, w8
	mov	x0, x20
	bl	_SetConsoleMode
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x4, #0
	bl	_ReadFile
Lloh9:
	adrp	x8, _CP_OEMCP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CP_OEMCP@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	w3, [sp, #8]
	mov	w1, #0
	mov	x2, x21
	mov	x4, x19
	mov	x5, x22
	bl	_MultiByteToWideChar
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x21
	bl	_HeapFree
	ldr	w8, [x19]
	cbz	w8, LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, #13
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x19, x19, #4
	ldr	w8, [x19]
	cbnz	w8, LBB0_1
	b	LBB0_4
LBB0_3:
	str	wzr, [x19]
LBB0_4:
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_SetConsoleMode
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_STD_INPUT_HANDLE,4,2           ; @STD_INPUT_HANDLE
	.comm	_ENABLE_LINE_INPUT,4,2          ; @ENABLE_LINE_INPUT
	.comm	_ENABLE_ECHO_INPUT,4,2          ; @ENABLE_ECHO_INPUT
	.comm	_CP_OEMCP,4,2                   ; @CP_OEMCP
.subsections_via_symbols
