	.file	"910852.c"
	.intel_syntax noprefix
	.text
	.local	opt_invert
	.comm	opt_invert,4,4
	.local	opt_ignorecase
	.comm	opt_ignorecase,4,4
	.section	.rodata
.LC0:
	.string	"Usage: %s [-iv] [<file>...]\n"
.LC1:
	.string	"iv"
.LC2:
	.string	"no pattern\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, 1152
	mov	DWORD PTR -1140[rbp], edi
	mov	QWORD PTR -1152[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L2
.L5:
	cmp	DWORD PTR -1120[rbp], 118
	je	.L3
	cmp	DWORD PTR -1120[rbp], 118
	jg	.L2
	cmp	DWORD PTR -1120[rbp], 63
	je	.L4
	cmp	DWORD PTR -1120[rbp], 105
	jne	.L2
	mov	DWORD PTR opt_ignorecase[rip], 1
	jmp	.L2
.L3:
	mov	DWORD PTR opt_invert[rip], 1
	jmp	.L2
.L4:
	mov	rax, QWORD PTR -1152[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rcx, QWORD PTR -1152[rbp]
	mov	eax, DWORD PTR -1140[rbp]
	lea	rdx, .LC1[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -1120[rbp], eax
	cmp	DWORD PTR -1120[rbp], -1
	jne	.L5
	mov	eax, DWORD PTR optind[rip]
	sub	DWORD PTR -1140[rbp], eax
	mov	eax, DWORD PTR optind[rip]
	cdqe
	sal	rax, 3
	add	QWORD PTR -1152[rbp], rax
	cmp	DWORD PTR -1140[rbp], 0
	jg	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 11
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -1152[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -1112[rbp], rax
	sub	DWORD PTR -1140[rbp], 1
	add	QWORD PTR -1152[rbp], 8
	mov	DWORD PTR -1128[rbp], 13
	mov	eax, DWORD PTR opt_ignorecase[rip]
	test	eax, eax
	je	.L7
	or	DWORD PTR -1128[rbp], 2
.L7:
	mov	edx, DWORD PTR -1128[rbp]
	mov	rcx, QWORD PTR -1112[rbp]
	lea	rax, -1104[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	regcomp@PLT
	mov	DWORD PTR -1116[rbp], eax
	cmp	DWORD PTR -1116[rbp], 0
	je	.L8
	lea	rdx, -1040[rbp]
	lea	rsi, -1104[rbp]
	mov	eax, DWORD PTR -1116[rbp]
	mov	ecx, 1024
	mov	edi, eax
	call	regerror@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	cmp	DWORD PTR -1140[rbp], 0
	jne	.L9
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	grep_stream
	jmp	.L10
.L9:
	mov	DWORD PTR -1124[rbp], 0
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -1124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1152[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	grep_file
	add	DWORD PTR -1124[rbp], 1
.L11:
	mov	eax, DWORD PTR -1124[rbp]
	cmp	eax, DWORD PTR -1140[rbp]
	jl	.L12
.L10:
	lea	rax, -1104[rbp]
	mov	rdi, rax
	call	regfree@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC3:
	.string	"r"
	.text
	.type	grep_file, @function
grep_file:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L15
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	grep_stream
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	grep_file, .-grep_file
	.type	grep_stream, @function
grep_stream:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	QWORD PTR -4136[rbp], rdi
	mov	QWORD PTR -4144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L17
.L19:
	lea	rsi, -4112[rbp]
	mov	rax, QWORD PTR -4136[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	rdi, rax
	call	regexec@PLT
	test	eax, eax
	sete	al
	movzx	eax, al
	mov	DWORD PTR -4116[rbp], eax
	mov	eax, DWORD PTR opt_invert[rip]
	test	eax, eax
	je	.L18
	cmp	DWORD PTR -4116[rbp], 0
	sete	al
	movzx	eax, al
	mov	DWORD PTR -4116[rbp], eax
.L18:
	cmp	DWORD PTR -4116[rbp], 0
	je	.L17
	mov	rdx, QWORD PTR stdout[rip]
	lea	rax, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
.L17:
	mov	rdx, QWORD PTR -4144[rbp]
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L19
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	grep_stream, .-grep_stream
	.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	"910852.c"
	.text
	.local	opt_invert
	.comm	opt_invert,4,4
	.local	opt_ignorecase
	.comm	opt_ignorecase,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s [-iv] [<file>...]\012\000"
	.align	2
.LC1:
	.ascii	"iv\000"
	.align	2
.LC2:
	.ascii	"no pattern\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1088
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1088
	str	r0, [fp, #-1088]
	str	r1, [fp, #-1092]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L2
.L5:
	ldr	r3, [fp, #-1076]
	cmp	r3, #118
	beq	.L3
	ldr	r3, [fp, #-1076]
	cmp	r3, #118
	bgt	.L2
	ldr	r3, [fp, #-1076]
	cmp	r3, #63
	beq	.L4
	ldr	r3, [fp, #-1076]
	cmp	r3, #105
	bne	.L2
	ldr	r3, .L14+4
	mov	r2, #1
	str	r2, [r3]
	b	.L2
.L3:
	ldr	r3, .L14+8
	mov	r2, #1
	str	r2, [r3]
	b	.L2
.L4:
	ldr	r3, .L14+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-1092]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L14+16
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r2, .L14+20
	ldr	r1, [fp, #-1092]
	ldr	r0, [fp, #-1088]
	bl	getopt
	str	r0, [fp, #-1076]
	ldr	r3, [fp, #-1076]
	cmn	r3, #1
	bne	.L5
	ldr	r3, .L14+24
	ldr	r3, [r3]
	ldr	r2, [fp, #-1088]
	sub	r3, r2, r3
	str	r3, [fp, #-1088]
	ldr	r3, .L14+24
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1092]
	add	r3, r2, r3
	str	r3, [fp, #-1092]
	ldr	r3, [fp, #-1088]
	cmp	r3, #0
	bgt	.L6
	ldr	r3, .L14+12
	ldr	r3, [r3]
	mov	r2, #11
	mov	r1, #1
	ldr	r0, .L14+28
	bl	fwrite
	mov	r0, #1
	bl	exit
.L6:
	ldr	r3, [fp, #-1092]
	ldr	r3, [r3]
	str	r3, [fp, #-1072]
	ldr	r3, [fp, #-1088]
	sub	r3, r3, #1
	str	r3, [fp, #-1088]
	ldr	r3, [fp, #-1092]
	add	r3, r3, #4
	str	r3, [fp, #-1092]
	mov	r3, #13
	str	r3, [fp, #-1084]
	ldr	r3, .L14+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-1084]
	orr	r3, r3, #2
	str	r3, [fp, #-1084]
.L7:
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1084]
	ldr	r1, [fp, #-1072]
	mov	r0, r3
	bl	regcomp
	str	r0, [fp, #-1068]
	ldr	r3, [fp, #-1068]
	cmp	r3, #0
	beq	.L8
	sub	r2, fp, #1024
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r1, fp, #1056
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #1024
	ldr	r0, [fp, #-1068]
	bl	regerror
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-1088]
	cmp	r3, #0
	bne	.L9
	ldr	r3, .L14+32
	ldr	r2, [r3]
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	grep_stream
	b	.L10
.L9:
	mov	r3, #0
	str	r3, [fp, #-1080]
	b	.L11
.L12:
	ldr	r3, [fp, #-1080]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1092]
	add	r3, r2, r3
	ldr	r2, [r3]
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	grep_file
	ldr	r3, [fp, #-1080]
	add	r3, r3, #1
	str	r3, [fp, #-1080]
.L11:
	ldr	r2, [fp, #-1080]
	ldr	r3, [fp, #-1088]
	cmp	r2, r3
	blt	.L12
.L10:
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	regfree
	mov	r0, #0
	bl	exit
.L15:
	.align	2
.L14:
	.word	.LC3
	.word	opt_ignorecase
	.word	opt_invert
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	optind
	.word	.LC2
	.word	stdin
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.ascii	"r\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	grep_file, %function
grep_file:
	@ 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, .L18
	ldr	r0, [fp, #-20]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L17
	ldr	r0, [fp, #-20]
	bl	perror
	mov	r0, #1
	bl	exit
.L17:
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	grep_stream
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC4
	.size	grep_file, .-grep_file
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	grep_stream, %function
grep_stream:
	@ args = 0, pretend = 0, frame = 4112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #4096
	sub	sp, sp, #24
	sub	r3, fp, #4096
	sub	r3, r3, #4
	str	r0, [r3, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #4
	str	r1, [r3, #-16]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L21
.L23:
	sub	r1, fp, #4096
	sub	r1, r1, #4
	sub	r1, r1, #4
	sub	r3, fp, #4096
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	ldr	r0, [r0, #-12]
	bl	regexec
	mov	r3, r0
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	sub	r2, fp, #4096
	sub	r2, r2, #4
	str	r3, [r2, #-8]
	ldr	r3, .L25+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L22
	sub	r3, fp, #4096
	sub	r3, r3, #4
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	sub	r2, fp, #4096
	sub	r2, r2, #4
	str	r3, [r2, #-8]
.L22:
	sub	r3, fp, #4096
	sub	r3, r3, #4
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	beq	.L21
	ldr	r3, .L25+8
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	fputs
.L21:
	sub	r3, fp, #4096
	sub	r3, r3, #4
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [r2, #-16]
	mov	r1, #4096
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L23
	nop
	ldr	r3, .L25
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC5
	.word	opt_invert
	.word	stdout
	.size	grep_stream, .-grep_stream
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
