	.file	"750213.c"
	.intel_syntax noprefix
	.text
	.globl	term
	.bss
	.align 32
	.type	term, @object
	.size	term, 60
term:
	.zero	60
	.section	.rodata
	.align 8
.LC0:
	.string	"Interrupted, restoring original terminal settings"
	.text
	.globl	sighandler
	.type	sighandler, @function
sighandler:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 2
	jne	.L3
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, DWORD PTR term[rip+12]
	or	eax, 10
	mov	DWORD PTR term[rip+12], eax
	lea	rdx, term[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	mov	edi, 0
	call	_exit@PLT
.L3:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	sighandler, .-sighandler
	.section	.rodata
	.align 8
.LC1:
	.string	"Starting dump of keyboard input, hit Ctrl-D to stop"
	.align 8
.LC2:
	.string	"---------------------------------------------------"
	.align 8
.LC3:
	.string	"Read character with ASCII code %d "
.LC4:
	.string	" %c\n"
.LC5:
	.string	"<non-printable>"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 1
	lea	rsi, term[rip]
	mov	edi, 0
	call	tcgetattr@PLT
	lea	rsi, sighandler[rip]
	mov	edi, 2
	call	signal@PLT
	mov	eax, DWORD PTR term[rip+12]
	and	eax, -11
	mov	DWORD PTR term[rip+12], eax
	lea	rdx, term[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L5
.L9:
	movzx	eax, BYTE PTR -13[rbp]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	movzx	eax, BYTE PTR -13[rbp]
	movzx	eax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 16384
	test	eax, eax
	je	.L6
	movzx	eax, BYTE PTR -13[rbp]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L6:
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L7:
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 4
	je	.L12
.L5:
	lea	rax, -13[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 1
	je	.L9
	jmp	.L8
.L12:
	nop
.L8:
	mov	eax, DWORD PTR term[rip+12]
	or	eax, 10
	mov	DWORD PTR term[rip+12], eax
	lea	rdx, term[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"750213.c"
	.text
	.comm	term,60,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Interrupted, restoring original terminal settings\000"
	.text
	.align	2
	.global	sighandler
	.syntax unified
	.arm
	.fpu softvfp
	.type	sighandler, %function
sighandler:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	bne	.L3
	ldr	r0, .L4
	bl	puts
	ldr	r3, .L4+4
	ldr	r3, [r3, #12]
	orr	r3, r3, #10
	ldr	r2, .L4+4
	str	r3, [r2, #12]
	ldr	r2, .L4+4
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	mov	r0, #0
	bl	_exit
.L3:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	term
	.size	sighandler, .-sighandler
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Starting dump of keyboard input, hit Ctrl-D to stop"
	.ascii	"\000"
	.align	2
.LC2:
	.ascii	"---------------------------------------------------"
	.ascii	"\000"
	.align	2
.LC3:
	.ascii	"Read character with ASCII code %d \000"
	.align	2
.LC4:
	.ascii	" %c\012\000"
	.align	2
.LC5:
	.ascii	"<non-printable>\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r1, .L15+4
	mov	r0, #0
	bl	tcgetattr
	ldr	r1, .L15+8
	mov	r0, #2
	bl	signal
	ldr	r3, .L15+4
	ldr	r3, [r3, #12]
	bic	r3, r3, #10
	ldr	r2, .L15+4
	str	r3, [r2, #12]
	ldr	r2, .L15+4
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	ldr	r0, .L15+12
	bl	puts
	ldr	r0, .L15+16
	bl	puts
	b	.L7
.L11:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L15+20
	bl	printf
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #16384
	cmp	r3, #0
	beq	.L8
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L15+24
	bl	printf
	b	.L9
.L8:
	ldr	r0, .L15+28
	bl	puts
.L9:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #4
	beq	.L14
.L7:
	sub	r3, fp, #13
	mov	r2, #1
	mov	r1, r3
	mov	r0, #0
	bl	read
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	beq	.L11
	b	.L10
.L14:
	nop
.L10:
	ldr	r3, .L15+4
	ldr	r3, [r3, #12]
	orr	r3, r3, #10
	ldr	r2, .L15+4
	str	r3, [r2, #12]
	ldr	r2, .L15+4
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC6
	.word	term
	.word	sighandler
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
