	.file	"870933.c"
	.intel_syntax noprefix
	.text
	.globl	prompt
	.data
	.align 4
	.type	prompt, @object
	.size	prompt, 4
prompt:
	.long	1
	.globl	prompt_buf
	.bss
	.align 32
	.type	prompt_buf, @object
	.size	prompt_buf, 40
prompt_buf:
	.zero	40
	.globl	line_buf
	.align 32
	.type	line_buf, @object
	.size	line_buf, 256
line_buf:
	.zero	256
	.globl	old_lflag
	.align 4
	.type	old_lflag, @object
	.size	old_lflag, 4
old_lflag:
	.zero	4
	.globl	old_vtime
	.type	old_vtime, @object
	.size	old_vtime, 1
old_vtime:
	.zero	1
	.globl	term
	.align 32
	.type	term, @object
	.size	term, 60
term:
	.zero	60
	.section	.rodata
.LC0:
	.string	"tcgetattr"
.LC1:
	.string	"tcsetattr"
.LC2:
	.string	"change-prompt"
.LC3:
	.string	"select"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 168
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rsi, term[rip]
	mov	edi, 0
	call	tcgetattr@PLT
	test	eax, eax
	jns	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	eax, DWORD PTR term[rip+12]
	mov	DWORD PTR old_lflag[rip], eax
	movzx	eax, BYTE PTR term[rip+22]
	mov	BYTE PTR old_vtime[rip], al
	mov	eax, DWORD PTR term[rip+12]
	and	eax, -3
	mov	DWORD PTR term[rip+12], eax
	mov	BYTE PTR term[rip+22], 1
	lea	rdx, term[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	test	eax, eax
	jns	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	edx, 20
	lea	rsi, change_prompt[rip]
	lea	rdi, .LC2[rip]
	call	rl_add_defun@PLT
	call	get_prompt
	lea	rsi, process_line[rip]
	mov	rdi, rax
	call	rl_callback_handler_install@PLT
.L6:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -160[rbp]
	mov	rdi, rdx
#APP
# 129 "the_stack_data/870933.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -168[rbp], edx
	mov	DWORD PTR -164[rbp], eax
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fileno@PLT
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	mov	rbx, rax
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fileno@PLT
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	ecx, eax
	movsx	rax, ecx
	mov	rax, QWORD PTR -160[rbp+rax*8]
	or	rbx, rax
	mov	rdx, rbx
	movsx	rax, ecx
	mov	QWORD PTR -160[rbp+rax*8], rdx
	lea	rax, -160[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 1024
	call	select@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fileno@PLT
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rbx, QWORD PTR -160[rbp+rax*8]
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fileno@PLT
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rbx
	test	rax, rax
	je	.L6
	call	rl_callback_read_char@PLT
	jmp	.L6
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC4:
	.string	"\n"
.LC5:
	.string	"sleep"
.LC6:
	.string	"|%s|\n"
	.text
	.globl	process_line
	.type	process_line, @function
process_line:
.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
	cmp	QWORD PTR -8[rbp], 0
	jne	.L9
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR old_lflag[rip]
	mov	DWORD PTR term[rip+12], eax
	movzx	eax, BYTE PTR old_vtime[rip]
	mov	BYTE PTR term[rip+22], al
	lea	rdx, term[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	test	eax, eax
	jns	.L10
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	edi, 0
	call	exit@PLT
.L9:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L11
	mov	edi, 3
	mov	eax, 0
	call	sleep@PLT
	jmp	.L12
.L11:
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L12:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	process_line, .-process_line
	.globl	change_prompt
	.type	change_prompt, @function
change_prompt:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR prompt[rip]
	test	eax, eax
	sete	al
	movzx	eax, al
	mov	DWORD PTR prompt[rip], eax
	mov	rax, QWORD PTR rl_line_buffer[rip]
	mov	rsi, rax
	lea	rdi, line_buf[rip]
	call	strcpy@PLT
	call	get_prompt
	lea	rsi, process_line[rip]
	mov	rdi, rax
	call	rl_callback_handler_install@PLT
	lea	rdi, line_buf[rip]
	call	rl_insert_text@PLT
	mov	esi, 0
	mov	edi, 0
	call	rl_refresh_line@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	change_prompt, .-change_prompt
	.section	.rodata
.LC7:
	.string	"Hit ctrl-t to toggle prompt> "
.LC8:
	.string	"Pretty cool huh?> "
.LC9:
	.string	"%s"
	.text
	.globl	get_prompt
	.type	get_prompt, @function
get_prompt:
.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, DWORD PTR prompt[rip]
	test	eax, eax
	je	.L15
	lea	rax, .LC7[rip]
	jmp	.L16
.L15:
	lea	rax, .LC8[rip]
.L16:
	mov	rdx, rax
	lea	rsi, .LC9[rip]
	lea	rdi, prompt_buf[rip]
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, prompt_buf[rip]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	get_prompt, .-get_prompt
	.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	"870933.c"
	.text
	.global	prompt
	.data
	.align	2
	.type	prompt, %object
	.size	prompt, 4
prompt:
	.word	1
	.comm	prompt_buf,40,4
	.comm	line_buf,256,4
	.comm	old_lflag,4,4
	.comm	old_vtime,1,1
	.comm	term,60,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"tcgetattr\000"
	.align	2
.LC1:
	.ascii	"tcsetattr\000"
	.align	2
.LC2:
	.ascii	"change-prompt\000"
	.align	2
.LC3:
	.ascii	"select\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #156
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L10+4
	mov	r0, #0
	bl	tcgetattr
	mov	r3, r0
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L10+8
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, .L10+4
	ldr	r3, [r3, #12]
	ldr	r2, .L10+12
	str	r3, [r2]
	ldr	r3, .L10+4
	ldrb	r2, [r3, #22]	@ zero_extendqisi2
	ldr	r3, .L10+16
	strb	r2, [r3]
	ldr	r3, .L10+4
	ldr	r3, [r3, #12]
	bic	r3, r3, #2
	ldr	r2, .L10+4
	str	r3, [r2, #12]
	ldr	r3, .L10+4
	mov	r2, #1
	strb	r2, [r3, #22]
	ldr	r2, .L10+4
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L10+20
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	mov	r2, #20
	ldr	r1, .L10+24
	ldr	r0, .L10+28
	bl	rl_add_defun
	bl	get_prompt
	mov	r3, r0
	ldr	r1, .L10+32
	mov	r0, r3
	bl	rl_callback_handler_install
.L8:
	sub	r3, fp, #144
	str	r3, [fp, #-148]
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L4
.L5:
	ldr	r3, [fp, #-148]
	ldr	r2, [fp, #-152]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L4:
	ldr	r3, [fp, #-152]
	cmp	r3, #31
	bls	.L5
	ldr	r3, .L10+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	fileno
	mov	r3, r0
	rsbs	r2, r3, #0
	and	r3, r3, #31
	and	r2, r2, #31
	rsbpl	r3, r2, #0
	mov	r2, #1
	lsl	r3, r2, r3
	mov	r4, r3
	ldr	r3, .L10+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	fileno
	mov	r3, r0
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	ldr	r3, [r3, #-132]
	orr	r1, r4, r3
	lsl	r3, r2, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	str	r1, [r3, #-132]
	sub	r1, fp, #144
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r0, #1024
	bl	select
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L10+40
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	ldr	r3, .L10+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	fileno
	mov	r3, r0
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r4, [r3, #-132]
	ldr	r3, .L10+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	fileno
	mov	r3, r0
	rsbs	r2, r3, #0
	and	r3, r3, #31
	and	r2, r2, #31
	rsbpl	r3, r2, #0
	mov	r2, #1
	lsl	r3, r2, r3
	and	r3, r3, r4
	cmp	r3, #0
	beq	.L8
	bl	rl_callback_read_char
	b	.L8
.L11:
	.align	2
.L10:
	.word	.LC4
	.word	term
	.word	.LC0
	.word	old_lflag
	.word	old_vtime
	.word	.LC1
	.word	change_prompt
	.word	.LC2
	.word	process_line
	.word	stdin
	.word	.LC3
	.size	main, .-main
	.section	.rodata
	.align	2
.LC5:
	.ascii	"\012\000"
	.align	2
.LC6:
	.ascii	"sleep\000"
	.align	2
.LC7:
	.ascii	"|%s|\012\000"
	.text
	.align	2
	.global	process_line
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_line, %function
process_line:
	@ 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, #0
	bne	.L13
	ldr	r3, .L17
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L17+4
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L17+8
	ldr	r3, [r3]
	ldr	r2, .L17+12
	str	r3, [r2, #12]
	ldr	r3, .L17+16
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, .L17+12
	strb	r2, [r3, #22]
	ldr	r2, .L17+12
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	bge	.L14
	ldr	r0, .L17+20
	bl	perror
	mov	r0, #1
	bl	exit
.L14:
	mov	r0, #0
	bl	exit
.L13:
	ldr	r1, .L17+24
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
	mov	r0, #3
	bl	sleep
	b	.L16
.L15:
	ldr	r3, .L17
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L17+28
	mov	r0, r3
	bl	fprintf
.L16:
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	stderr
	.word	.LC5
	.word	old_lflag
	.word	term
	.word	old_vtime
	.word	.LC1
	.word	.LC6
	.word	.LC7
	.size	process_line, .-process_line
	.align	2
	.global	change_prompt
	.syntax unified
	.arm
	.fpu softvfp
	.type	change_prompt, %function
change_prompt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L20
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L20
	str	r2, [r3]
	ldr	r3, .L20+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L20+8
	bl	strcpy
	bl	get_prompt
	mov	r3, r0
	ldr	r1, .L20+12
	mov	r0, r3
	bl	rl_callback_handler_install
	ldr	r0, .L20+8
	bl	rl_insert_text
	mov	r1, #0
	mov	r0, #0
	bl	rl_refresh_line
	nop
	mov	r0, r3
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	prompt
	.word	rl_line_buffer
	.word	line_buf
	.word	process_line
	.size	change_prompt, .-change_prompt
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Hit ctrl-t to toggle prompt> \000"
	.align	2
.LC9:
	.ascii	"Pretty cool huh?> \000"
	.align	2
.LC10:
	.ascii	"%s\000"
	.text
	.align	2
	.global	get_prompt
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_prompt, %function
get_prompt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L26
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L23
	ldr	r3, .L26+4
	b	.L24
.L23:
	ldr	r3, .L26+8
.L24:
	mov	r2, r3
	ldr	r1, .L26+12
	ldr	r0, .L26+16
	bl	sprintf
	ldr	r3, .L26+16
	mov	r0, r3
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	prompt
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	prompt_buf
	.size	get_prompt, .-get_prompt
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
