	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_char
_read_char:                             ## @read_char
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MB_LEN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	xorl	%edx, %edx
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rdx), %r13
	xorl	%r15d, %r15d
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##     Child Loop BB0_15 Depth 2
	movq	8(%r14), %rax
	movl	$0, (%rax)
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14), %edi
	movl	$1, %edx
	movq	%r13, %rsi
	callq	_read
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	8(%r14), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_1
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=2
	cmpl	$129, %eax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	(%r12), %ebx
	testl	%r15d, %r15d
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=2
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_read__fixio
	testq	%rax, %rax
	jne	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=2
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r12)
	movl	$1, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	je	LBB0_5
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rax, %rbx
	leaq	1(%rax), %r12
	leaq	-68(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %r13
	movq	%r15, %rsi
	movq	%r12, %rdx
	leaq	-68(%rbp), %rcx
	callq	_mbrtowc
	cmpl	$-1, %eax
	jne	LBB0_16
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=2
	cmpq	$1, %r12
	jbe	LBB0_20
## %bb.22:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	%r13, %r15
	movzbl	(%r13,%rbx), %eax
	movb	%al, (%r13)
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_EL_REFRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_el_wset
LBB0_1:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_sig_set
	jmp	LBB0_2
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$-2, %eax
	jne	LBB0_23
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_MB_LEN_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r12
	jb	LBB0_21
	jmp	LBB0_18
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	%r12, %r13
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	_errno@GOTPCREL(%rip), %r12
	movl	-60(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_2
LBB0_11:
	movl	%ebx, (%r12)
LBB0_12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movl	$-1, %eax
	jmp	LBB0_24
LBB0_5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_23:
	movl	$1, %eax
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_26
## %bb.25:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_12
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_LEN_MAX,4,2                 ## @MB_LEN_MAX
	.comm	_errno,4,2                      ## @errno
	.comm	_EL_REFRESH,4,2                 ## @EL_REFRESH
	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.no_dead_strip	_read_char
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_char
_read_char:                             ; @read_char
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	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]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x24, _MB_LEN_MAX@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MB_LEN_MAX@GOTPAGEOFF]
	ldr	w8, [x24]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	x28, #0
	mov	w27, #0
Lloh7:
	adrp	x25, _errno@GOTPAGE
Lloh8:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	ldr	w26, [x25]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
                                        ;       Child Loop BB0_3 Depth 3
                                        ;       Child Loop BB0_10 Depth 3
	add	x22, x21, x28
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_3 Depth 3
                                        ;       Child Loop BB0_10 Depth 3
	ldr	x8, [x20, #8]
	str	wzr, [x8]
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_2 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w0, [x20]
	mov	x1, x22
	mov	w2, #1
	bl	_read
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=3
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=3
	cmp	w8, #129
	b.eq	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=3
	ldr	w23, [x25]
	cbnz	w27, LBB0_19
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=3
	ldr	w0, [x20]
	mov	x1, x23
	bl	_read__fixio
	cbnz	x0, LBB0_19
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=3
	str	w26, [x25]
	mov	w27, #1
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=2
	cbz	w0, LBB0_21
LBB0_10:                                ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_2 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	x22, x28, #1
	sub	x0, x29, #92
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	sub	x3, x29, #92
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_mbrtowc
	cmn	w0, #1
	b.ne	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=3
	cmp	x22, #1
	b.ls	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=3
	ldrb	w8, [x21, x28]
	mov	x28, #0
	strb	w8, [x21]
	b	LBB0_10
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=2
Lloh9:
	adrp	x8, _EL_REFRESH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EL_REFRESH@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_el_wset
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	x0, x20
	bl	_sig_set
	b	LBB0_2
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=2
	mov	x28, #0
	add	x22, x21, xzr
	b	LBB0_2
LBB0_16:                                ;   in Loop: Header=BB0_1 Depth=1
	cmn	w0, #2
	b.ne	LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_1 Depth=1
	ldrsw	x8, [x24]
	mov	x28, x22
	cmp	x22, x8
	b.lo	LBB0_1
; %bb.18:
Lloh12:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x25]
	b	LBB0_20
LBB0_19:
	str	w23, [x25]
LBB0_20:
	str	wzr, [x19]
	mov	w0, #-1
	b	LBB0_23
LBB0_21:
	str	wzr, [x19]
	b	LBB0_23
LBB0_22:
	mov	w0, #1
LBB0_23:
	ldur	x8, [x29, #-88]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_LEN_MAX,4,2                 ; @MB_LEN_MAX
	.comm	_errno,4,2                      ; @errno
	.comm	_EL_REFRESH,4,2                 ; @EL_REFRESH
	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.no_dead_strip	_read_char
.subsections_via_symbols
