	.file	"extr_subr_terminal.c_terminal_input_char.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	terminal_input_char
	.type	terminal_input_char, @function
terminal_input_char:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	r12, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	r12, r12
	je	.L1
	mov	edi, esi
	mov	ebp, esi
	call	TCHAR_FORMAT@PLT
	test	DWORD PTR TF_CJK_RIGHT[rip], eax
	je	.L12
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	edi, ebp
	call	TCHAR_CHARACTER@PLT
	mov	rdi, r12
	mov	ebp, eax
	call	tty_lock@PLT
	cmp	ebp, 127
	jle	.L14
	mov	edx, ebp
	mov	eax, ebp
	and	edx, 63
	sar	eax, 6
	or	edx, -128
	cmp	ebp, 2047
	jle	.L15
	mov	ecx, ebp
	and	eax, 63
	sar	ecx, 12
	or	eax, -128
	cmp	ebp, 65535
	jg	.L8
	mov	BYTE PTR 6[rsp], dl
	or	ecx, -32
	lea	rsi, 4[rsp]
	mov	rdi, r12
	mov	edx, 3
	mov	BYTE PTR 4[rsp], cl
	mov	BYTE PTR 5[rsp], al
	call	ttydisc_rint_simple@PLT
.L6:
	mov	rdi, r12
	call	ttydisc_rint_done@PLT
	mov	rdi, r12
	call	tty_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	BYTE PTR 5[rsp], dl
	or	eax, -64
	lea	rsi, 4[rsp]
	mov	rdi, r12
	mov	edx, 2
	mov	BYTE PTR 4[rsp], al
	call	ttydisc_rint_simple@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	xor	edx, edx
	mov	esi, ebp
	mov	rdi, r12
	call	ttydisc_rint@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	sar	ebp, 18
	and	ecx, 63
	mov	BYTE PTR 7[rsp], dl
	lea	rsi, 4[rsp]
	or	ebp, -16
	or	ecx, -128
	mov	edx, 4
	mov	rdi, r12
	mov	BYTE PTR 4[rsp], bpl
	mov	BYTE PTR 5[rsp], cl
	mov	BYTE PTR 6[rsp], al
	call	ttydisc_rint_simple@PLT
	jmp	.L6
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	terminal_input_char, .-terminal_input_char
	.comm	TF_CJK_RIGHT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_subr_terminal.c_terminal_input_char.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	terminal_input_char
	.syntax unified
	.arm
	.fpu softvfp
	.type	terminal_input_char, %function
terminal_input_char:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r5, [r0]
	ldr	r3, .L16
	sub	sp, sp, #8
	cmp	r5, #0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	beq	.L1
	mov	r0, r1
	mov	r4, r1
	bl	TCHAR_FORMAT
	ldr	r3, .L16+4
	ldr	r6, [r3]
	ands	r6, r0, r6
	beq	.L12
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L12:
	mov	r0, r4
	bl	TCHAR_CHARACTER
	mov	r4, r0
	mov	r0, r5
	bl	tty_lock
	cmp	r4, #127
	ble	.L14
	asr	r3, r4, #6
	lsl	r3, r3, #24
	and	ip, r4, #63
	cmp	r4, #2048
	mvn	r1, #127
	asr	r3, r3, #24
	orr	ip, ip, #128
	blt	.L15
	asr	r2, r4, #12
	and	r3, r3, #63
	lsl	r2, r2, #24
	cmp	r4, #65536
	orr	r3, r3, #128
	asr	r2, r2, #24
	bge	.L8
	mvn	r0, r2, lsl #27
	mvn	r0, r0, lsr #27
	mov	r2, #3
	strb	r0, [sp]
	mov	r1, sp
	mov	r0, r5
	strb	r3, [sp, #1]
	strb	ip, [sp, #2]
	bl	ttydisc_rint_simple
.L6:
	mov	r0, r5
	bl	ttydisc_rint_done
	mov	r0, r5
	bl	tty_unlock
	b	.L1
.L15:
	mvn	r3, r3, lsl #26
	mvn	r3, r3, lsr #26
	mov	r2, #2
	mov	r1, sp
	mov	r0, r5
	strb	r3, [sp]
	strb	ip, [sp, #1]
	bl	ttydisc_rint_simple
	b	.L6
.L14:
	mov	r2, r6
	mov	r1, r4
	mov	r0, r5
	bl	ttydisc_rint
	b	.L6
.L8:
	mvn	r0, #15
	and	r2, r2, #63
	orr	lr, r1, r2
	orr	r4, r0, r4, asr #18
	mov	r2, #4
	mov	r1, sp
	mov	r0, r5
	strb	lr, [sp, #1]
	strb	r3, [sp, #2]
	strb	ip, [sp, #3]
	strb	r4, [sp]
	bl	ttydisc_rint_simple
	b	.L6
.L13:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	TF_CJK_RIGHT
	.size	terminal_input_char, .-terminal_input_char
	.comm	TF_CJK_RIGHT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
