	.file	"51700362.c"
	.intel_syntax noprefix
	.text
	.local	progname
	.comm	progname,8,8
	.local	deftext
	.comm	deftext,8,8
	.section	.rodata
.LC0:
	.string	"ding!\n"
	.text
	.type	event_hook, @function
event_hook:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 6
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	mov	eax, 0
	call	sleep@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	event_hook, .-event_hook
	.type	set_deftext, @function
set_deftext:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR deftext[rip]
	test	rax, rax
	je	.L4
	mov	rax, QWORD PTR deftext[rip]
	mov	rdi, rax
	call	rl_insert_text@PLT
	mov	QWORD PTR deftext[rip], 0
	mov	QWORD PTR rl_startup_hook[rip], 0
.L4:
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	set_deftext, .-set_deftext
	.section	.rodata
	.align 8
.LC1:
	.string	"%s: usage: %s [-p prompt] [-u unit] [-d default] [-n nchars]\n"
	.text
	.type	usage, @function
usage:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rcx, QWORD PTR progname[rip]
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	usage, .-usage
	.section	.rodata
.LC2:
	.string	"readline$ "
.LC3:
	.string	"%s: bad file descriptor `%s'\n"
.LC4:
	.string	"%s: bad value for -n: `%s'\n"
.LC5:
	.string	"p:u:d:n:"
.LC6:
	.string	"%s: %d: bad file descriptor\n"
.LC7:
	.string	"r"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 224
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, 47
	mov	rdi, rax
	call	strrchr@PLT
	mov	QWORD PTR progname[rip], rax
	mov	rax, QWORD PTR progname[rip]
	test	rax, rax
	jne	.L8
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR progname[rip], rax
	jmp	.L9
.L8:
	mov	rax, QWORD PTR progname[rip]
	add	rax, 1
	mov	QWORD PTR progname[rip], rax
.L9:
	lea	rax, .LC2[rip]
	mov	QWORD PTR -184[rbp], rax
	mov	DWORD PTR -192[rbp], 0
	mov	eax, DWORD PTR -192[rbp]
	mov	DWORD PTR -196[rbp], eax
	mov	QWORD PTR deftext[rip], 0
	jmp	.L10
.L18:
	cmp	DWORD PTR -188[rbp], 117
	je	.L11
	cmp	DWORD PTR -188[rbp], 117
	jg	.L12
	cmp	DWORD PTR -188[rbp], 112
	je	.L13
	cmp	DWORD PTR -188[rbp], 112
	jg	.L12
	cmp	DWORD PTR -188[rbp], 100
	je	.L14
	cmp	DWORD PTR -188[rbp], 110
	je	.L15
	jmp	.L12
.L13:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -184[rbp], rax
	jmp	.L10
.L11:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], 0
	jns	.L10
	mov	rcx, QWORD PTR optarg[rip]
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 2
	call	exit@PLT
.L14:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR deftext[rip], rax
	jmp	.L10
.L15:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	DWORD PTR -192[rbp], eax
	cmp	DWORD PTR -192[rbp], 0
	jns	.L10
	mov	rcx, QWORD PTR optarg[rip]
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 2
	call	exit@PLT
.L12:
	mov	eax, 0
	call	usage
	mov	edi, 2
	call	exit@PLT
.L10:
	mov	rcx, QWORD PTR -224[rbp]
	mov	eax, DWORD PTR -212[rbp]
	lea	rdx, .LC5[rip]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	getopt@PLT
	mov	DWORD PTR -188[rbp], eax
	cmp	DWORD PTR -188[rbp], -1
	jne	.L18
	cmp	DWORD PTR -196[rbp], 0
	je	.L19
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	test	eax, eax
	jns	.L20
	mov	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -196[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	mov	eax, DWORD PTR -196[rbp]
	lea	rsi, .LC7[rip]
	mov	edi, eax
	call	fdopen@PLT
	mov	QWORD PTR -176[rbp], rax
	mov	rax, QWORD PTR -176[rbp]
	mov	QWORD PTR rl_instream[rip], rax
.L19:
	mov	rax, QWORD PTR deftext[rip]
	test	rax, rax
	je	.L21
	mov	rax, QWORD PTR deftext[rip]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L21
	lea	rax, set_deftext[rip]
	mov	QWORD PTR rl_startup_hook[rip], rax
.L21:
	cmp	DWORD PTR -192[rbp], 0
	jle	.L22
	mov	eax, DWORD PTR -192[rbp]
	mov	DWORD PTR rl_num_chars_to_read[rip], eax
.L22:
	lea	rax, event_hook[rip]
	mov	QWORD PTR rl_event_hook[rip], rax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	readline@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jne	.L23
	mov	edi, 1
	call	exit@PLT
.L23:
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE9:
	.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	"51700362.c"
	.text
	.local	progname
	.comm	progname,4,4
	.local	deftext
	.comm	deftext,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ding!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	event_hook, %function
event_hook:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L3
	ldr	r3, [r3]
	mov	r2, #6
	mov	r1, #1
	ldr	r0, .L3+4
	bl	fwrite
	mov	r0, #1
	bl	sleep
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	stderr
	.word	.LC0
	.size	event_hook, .-event_hook
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_deftext, %function
set_deftext:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L8
	ldr	r3, [r3]
	mov	r0, r3
	bl	rl_insert_text
	ldr	r3, .L8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L8+4
	mov	r2, #0
	str	r2, [r3]
.L6:
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	deftext
	.word	rl_startup_hook
	.size	set_deftext, .-set_deftext
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%s: usage: %s [-p prompt] [-u unit] [-d default] [-"
	.ascii	"n nchars]\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L11
	ldr	r0, [r3]
	ldr	r3, .L11+4
	ldr	r2, [r3]
	ldr	r3, .L11+4
	ldr	r3, [r3]
	ldr	r1, .L11+8
	bl	fprintf
	nop
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	stderr
	.word	progname
	.word	.LC1
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC2:
	.ascii	"readline$ \000"
	.align	2
.LC3:
	.ascii	"%s: bad file descriptor `%s'\012\000"
	.align	2
.LC4:
	.ascii	"%s: bad value for -n: `%s'\012\000"
	.align	2
.LC5:
	.ascii	"p:u:d:n:\000"
	.align	2
.LC6:
	.ascii	"%s: %d: bad file descriptor\012\000"
	.align	2
.LC7:
	.ascii	"r\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	str	r0, [fp, #-128]
	str	r1, [fp, #-132]
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-132]
	ldr	r3, [r3]
	mov	r1, #47
	mov	r0, r3
	bl	strrchr
	mov	r3, r0
	ldr	r2, .L32+4
	str	r3, [r2]
	ldr	r3, .L32+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #-132]
	ldr	r3, [r3]
	ldr	r2, .L32+4
	str	r3, [r2]
	b	.L15
.L14:
	ldr	r3, .L32+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L32+4
	str	r3, [r2]
.L15:
	ldr	r3, .L32+8
	str	r3, [fp, #-124]
	mov	r3, #0
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-116]
	str	r3, [fp, #-120]
	ldr	r3, .L32+12
	mov	r2, #0
	str	r2, [r3]
	b	.L16
.L25:
	ldr	r3, [fp, #-112]
	sub	r3, r3, #100
	cmp	r3, #17
	ldrls	pc, [pc, r3, asl #2]
	b	.L17
.L19:
	.word	.L22
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L21
	.word	.L17
	.word	.L20
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L17
	.word	.L18
.L20:
	ldr	r3, .L32+16
	ldr	r3, [r3]
	str	r3, [fp, #-124]
	b	.L16
.L18:
	ldr	r3, .L32+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	bge	.L16
	ldr	r3, .L32+20
	ldr	r0, [r3]
	ldr	r3, .L32+4
	ldr	r2, [r3]
	ldr	r3, .L32+16
	ldr	r3, [r3]
	ldr	r1, .L32+24
	bl	fprintf
	mov	r0, #2
	bl	exit
.L22:
	ldr	r3, .L32+16
	ldr	r3, [r3]
	ldr	r2, .L32+12
	str	r3, [r2]
	b	.L16
.L21:
	ldr	r3, .L32+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	bge	.L16
	ldr	r3, .L32+20
	ldr	r0, [r3]
	ldr	r3, .L32+4
	ldr	r2, [r3]
	ldr	r3, .L32+16
	ldr	r3, [r3]
	ldr	r1, .L32+28
	bl	fprintf
	mov	r0, #2
	bl	exit
.L17:
	bl	usage
	mov	r0, #2
	bl	exit
.L16:
	ldr	r2, .L32+32
	ldr	r1, [fp, #-132]
	ldr	r0, [fp, #-128]
	bl	getopt
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmn	r3, #1
	bne	.L25
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	beq	.L26
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-120]
	bl	fstat
	mov	r3, r0
	cmp	r3, #0
	bge	.L27
	ldr	r3, .L32+20
	ldr	r0, [r3]
	ldr	r3, .L32+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-120]
	ldr	r1, .L32+36
	bl	fprintf
	mov	r0, #1
	bl	exit
.L27:
	ldr	r1, .L32+40
	ldr	r0, [fp, #-120]
	bl	fdopen
	str	r0, [fp, #-108]
	ldr	r2, .L32+44
	ldr	r3, [fp, #-108]
	str	r3, [r2]
.L26:
	ldr	r3, .L32+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L28
	ldr	r3, .L32+12
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L28
	ldr	r3, .L32+48
	ldr	r2, .L32+52
	str	r2, [r3]
.L28:
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	ble	.L29
	ldr	r2, .L32+56
	ldr	r3, [fp, #-116]
	str	r3, [r2]
.L29:
	ldr	r3, .L32+60
	ldr	r2, .L32+64
	str	r2, [r3]
	ldr	r0, [fp, #-124]
	bl	readline
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bne	.L30
	mov	r0, #1
	bl	exit
.L30:
	ldr	r0, [fp, #-104]
	bl	puts
	mov	r0, #0
	bl	exit
.L33:
	.align	2
.L32:
	.word	.LC8
	.word	progname
	.word	.LC2
	.word	deftext
	.word	optarg
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	rl_instream
	.word	rl_startup_hook
	.word	set_deftext
	.word	rl_num_chars_to_read
	.word	rl_event_hook
	.word	event_hook
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
