	.file	"49561.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"tcgetattr() failed.\n"
.LC1:
	.string	"tcsetattr() failed.\n"
	.text
	.globl	setup_terminal
	.type	setup_terminal, @function
setup_terminal:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -80[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	tcgetattr@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	call	abort@PLT
.L2:
	lea	rcx, -80[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, 60
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -9
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -3
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -2
	mov	DWORD PTR -68[rbp], eax
	lea	rax, -80[rbp]
	mov	rdx, rax
	mov	esi, 1
	mov	edi, 0
	call	tcsetattr@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	je	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	call	abort@PLT
.L5:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	setup_terminal, .-setup_terminal
	.globl	restore_terminal
	.type	restore_terminal, @function
restore_terminal:
.LFB7:
	.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	mov	esi, 1
	mov	edi, 0
	call	tcsetattr@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	restore_terminal, .-restore_terminal
	.section	.rodata
.LC2:
	.string	"ioctl() failed.\n"
	.text
	.globl	get_terminal_size
	.type	get_terminal_size, @function
get_terminal_size:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], 0
	lea	rax, -16[rbp]
	mov	rdx, rax
	mov	esi, 21523
	mov	edi, 0
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	je	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	call	abort@PLT
.L8:
	movzx	eax, WORD PTR -14[rbp]
	movzx	edx, ax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	movzx	eax, WORD PTR -16[rbp]
	movzx	edx, ax
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_terminal_size, .-get_terminal_size
	.globl	sizeof_termios
	.type	sizeof_termios, @function
sizeof_termios:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 60
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sizeof_termios, .-sizeof_termios
	.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	"49561.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"tcgetattr() failed.\012\000"
	.align	2
.LC1:
	.ascii	"tcsetattr() failed.\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	setup_terminal
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup_terminal, %function
setup_terminal:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	str	r0, [fp, #-80]
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r1, r3
	mov	r0, #0
	bl	tcgetattr
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L6+4
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L6+8
	bl	fwrite
	bl	abort
.L2:
	sub	r3, fp, #68
	mov	r2, #60
	mov	r1, r3
	ldr	r0, [fp, #-80]
	bl	memcpy
	ldr	r3, [fp, #-56]
	bic	r3, r3, #8
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	bic	r3, r3, #2
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	bic	r3, r3, #1
	str	r3, [fp, #-56]
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #1
	mov	r0, #0
	bl	tcsetattr
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L6+4
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L6+12
	bl	fwrite
	bl	abort
.L5:
	nop
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC2
	.word	stderr
	.word	.LC0
	.word	.LC1
	.size	setup_terminal, .-setup_terminal
	.align	2
	.global	restore_terminal
	.syntax unified
	.arm
	.fpu softvfp
	.type	restore_terminal, %function
restore_terminal:
	@ 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	r2, [fp, #-8]
	mov	r1, #1
	mov	r0, #0
	bl	tcsetattr
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	restore_terminal, .-restore_terminal
	.section	.rodata
	.align	2
.LC3:
	.ascii	"ioctl() failed.\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_terminal_size
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_terminal_size, %function
get_terminal_size:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-24]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3]
	sub	r3, fp, #16
	mov	r2, r3
	ldr	r1, .L12+4
	mov	r0, #0
	bl	ioctl
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L12+8
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L12+12
	bl	fwrite
	bl	abort
.L10:
	ldrh	r3, [fp, #-14]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldrh	r3, [fp, #-16]
	mov	r2, r3
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	nop
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC4
	.word	21523
	.word	stderr
	.word	.LC3
	.size	get_terminal_size, .-get_terminal_size
	.align	2
	.global	sizeof_termios
	.syntax unified
	.arm
	.fpu softvfp
	.type	sizeof_termios, %function
sizeof_termios:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	mov	r3, #60
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	sizeof_termios, .-sizeof_termios
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
