	.file	"948159.c"
	.intel_syntax noprefix
	.text
	.globl	progname
	.bss
	.align 8
	.type	progname, @object
	.size	progname, 8
progname:
	.zero	8
	.globl	emsg
	.align 32
	.type	emsg, @object
	.size	emsg, 81
emsg:
	.zero	81
	.section	.rodata
.LC0:
	.string	"illegal option '%c'"
.LC1:
	.string	"missing pattern"
.LC2:
	.string	"r"
.LC3:
	.string	"\n%s:\n"
	.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
	sub	rsp, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR progname[rip], rax
	mov	DWORD PTR -168[rbp], 0
	mov	eax, DWORD PTR -168[rbp]
	mov	DWORD PTR -172[rbp], eax
	jmp	.L2
.L6:
	cmp	DWORD PTR -164[rbp], 110
	je	.L4
	cmp	DWORD PTR -164[rbp], 120
	jne	.L5
	mov	DWORD PTR -172[rbp], 1
	jmp	.L3
.L4:
	mov	DWORD PTR -168[rbp], 1
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -164[rbp]
	mov	edx, eax
	lea	rsi, .LC0[rip]
	lea	rdi, emsg[rip]
	mov	eax, 0
	call	sprintf@PLT
	lea	rdi, emsg[rip]
	call	errormsg
	nop
.L3:
	mov	rax, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -192[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 0
	jne	.L6
.L2:
	sub	DWORD PTR -180[rbp], 1
	cmp	DWORD PTR -180[rbp], 0
	je	.L7
	add	QWORD PTR -192[rbp], 8
	mov	rax, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	je	.L3
.L7:
	cmp	DWORD PTR -180[rbp], 0
	jne	.L9
	lea	rsi, .LC1[rip]
	lea	rdi, emsg[rip]
	mov	eax, 0
	call	sprintf@PLT
	lea	rdi, emsg[rip]
	call	errormsg
.L9:
	sub	DWORD PTR -180[rbp], 1
	mov	rax, QWORD PTR -192[rbp]
	lea	rdx, 8[rax]
	mov	QWORD PTR -192[rbp], rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -160[rbp], rax
	cmp	DWORD PTR -180[rbp], 0
	jne	.L12
	mov	rcx, QWORD PTR stdin[rip]
	mov	edi, DWORD PTR -172[rbp]
	mov	esi, DWORD PTR -168[rbp]
	mov	rdx, QWORD PTR -160[rbp]
	lea	rax, -144[rbp]
	mov	r9d, edi
	mov	r8d, esi
	mov	esi, 121
	mov	rdi, rax
	call	readinput
	jmp	.L11
.L13:
	mov	rax, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	openfile
	mov	QWORD PTR -152[rbp], rax
	mov	rax, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, DWORD PTR -172[rbp]
	mov	esi, DWORD PTR -168[rbp]
	mov	rcx, QWORD PTR -152[rbp]
	mov	rdx, QWORD PTR -160[rbp]
	lea	rax, -144[rbp]
	mov	r9d, edi
	mov	r8d, esi
	mov	esi, 121
	mov	rdi, rax
	call	readinput
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	QWORD PTR -192[rbp], 8
.L12:
	mov	eax, DWORD PTR -180[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -180[rbp], edx
	test	eax, eax
	jne	.L13
.L11:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC4:
	.string	"%s: %s\n"
	.text
	.globl	errormsg
	.type	errormsg, @function
errormsg:
.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	rdx, QWORD PTR progname[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -8[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	errormsg, .-errormsg
	.section	.rodata
.LC5:
	.string	"can't open file %s"
	.text
	.globl	openfile
	.type	openfile, @function
openfile:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L18
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, rax
	lea	rsi, .LC5[rip]
	lea	rdi, emsg[rip]
	mov	eax, 0
	call	sprintf@PLT
	lea	rdi, emsg[rip]
	call	errormsg
.L18:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	openfile, .-openfile
	.section	.rodata
.LC6:
	.string	"%ld: "
.LC7:
	.string	"%s"
	.text
	.globl	readinput
	.type	readinput, @function
readinput:
.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, 64
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	DWORD PTR -32[rbp], r8d
	mov	DWORD PTR -52[rbp], r9d
	mov	QWORD PTR -8[rbp], 0
	jmp	.L21
.L23:
	add	QWORD PTR -8[rbp], 1
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	setne	al
	movzx	eax, al
	cmp	DWORD PTR -52[rbp], eax
	je	.L21
	cmp	DWORD PTR -32[rbp], 0
	je	.L22
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L22:
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L21:
	mov	rdx, QWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L23
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	readinput, .-readinput
	.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	"948159.c"
	.text
	.comm	progname,4,4
	.comm	emsg,81,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"illegal option '%c'\000"
	.align	2
.LC1:
	.ascii	"missing pattern\000"
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"\012%s:\012\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 = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #168
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-164]
	ldr	r3, [r3]
	ldr	r2, .L16+4
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-148]
	ldr	r3, [fp, #-148]
	str	r3, [fp, #-152]
	b	.L2
.L6:
	ldr	r3, [fp, #-144]
	cmp	r3, #110
	beq	.L4
	ldr	r3, [fp, #-144]
	cmp	r3, #120
	bne	.L5
	mov	r3, #1
	str	r3, [fp, #-152]
	b	.L3
.L4:
	mov	r3, #1
	str	r3, [fp, #-148]
	b	.L3
.L5:
	ldr	r2, [fp, #-144]
	ldr	r1, .L16+8
	ldr	r0, .L16+12
	bl	sprintf
	ldr	r0, .L16+12
	bl	errormsg
	nop
.L3:
	ldr	r3, [fp, #-164]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-164]
	str	r2, [r3]
	ldr	r3, [fp, #-164]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-144]
	ldr	r3, [fp, #-144]
	cmp	r3, #0
	bne	.L6
.L2:
	ldr	r3, [fp, #-160]
	sub	r3, r3, #1
	str	r3, [fp, #-160]
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	str	r3, [fp, #-164]
	ldr	r3, [fp, #-164]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	beq	.L3
.L7:
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	bne	.L9
	ldr	r1, .L16+16
	ldr	r0, .L16+12
	bl	sprintf
	ldr	r0, .L16+12
	bl	errormsg
.L9:
	ldr	r3, [fp, #-160]
	sub	r3, r3, #1
	str	r3, [fp, #-160]
	ldr	r3, [fp, #-164]
	add	r2, r3, #4
	str	r2, [fp, #-164]
	ldr	r3, [r3]
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L16+20
	ldr	r2, [r3]
	sub	r0, fp, #132
	ldr	r3, [fp, #-152]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-148]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-140]
	mov	r1, #121
	bl	readinput
	b	.L11
.L13:
	ldr	r3, [fp, #-164]
	ldr	r3, [r3]
	ldr	r1, .L16+24
	mov	r0, r3
	bl	openfile
	str	r0, [fp, #-136]
	ldr	r3, [fp, #-164]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L16+28
	bl	printf
	sub	r0, fp, #132
	ldr	r3, [fp, #-152]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-148]
	str	r3, [sp]
	ldr	r3, [fp, #-136]
	ldr	r2, [fp, #-140]
	mov	r1, #121
	bl	readinput
	ldr	r0, [fp, #-136]
	bl	fclose
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	str	r3, [fp, #-164]
.L12:
	ldr	r3, [fp, #-160]
	sub	r2, r3, #1
	str	r2, [fp, #-160]
	cmp	r3, #0
	bne	.L13
.L11:
	mov	r3, #0
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC4
	.word	progname
	.word	.LC0
	.word	emsg
	.word	.LC1
	.word	stdin
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%s: %s\012\000"
	.text
	.align	2
	.global	errormsg
	.syntax unified
	.arm
	.fpu softvfp
	.type	errormsg, %function
errormsg:
	@ 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, .L19
	ldr	r0, [r3]
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r1, .L19+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L20:
	.align	2
.L19:
	.word	stderr
	.word	progname
	.word	.LC5
	.size	errormsg, .-errormsg
	.section	.rodata
	.align	2
.LC6:
	.ascii	"can't open file %s\000"
	.text
	.align	2
	.global	openfile
	.syntax unified
	.arm
	.fpu softvfp
	.type	openfile, %function
openfile:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L22
	ldr	r2, [fp, #-16]
	ldr	r1, .L24
	ldr	r0, .L24+4
	bl	sprintf
	ldr	r0, .L24+4
	bl	errormsg
.L22:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC6
	.word	emsg
	.size	openfile, .-openfile
	.section	.rodata
	.align	2
.LC7:
	.ascii	"%ld: \000"
	.align	2
.LC8:
	.ascii	"%s\000"
	.text
	.align	2
	.global	readinput
	.syntax unified
	.arm
	.fpu softvfp
	.type	readinput, %function
readinput:
	@ args = 8, 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L27
.L29:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, [fp, #8]
	cmp	r3, r2
	beq	.L27
	ldr	r3, [fp, #4]
	cmp	r3, #0
	beq	.L28
	ldr	r1, [fp, #-8]
	ldr	r0, .L30
	bl	printf
.L28:
	ldr	r1, [fp, #-16]
	ldr	r0, .L30+4
	bl	printf
.L27:
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L29
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC7
	.word	.LC8
	.size	readinput, .-readinput
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
