	.file	"41708.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"no pattern\n"
.LC1:
	.string	"r"
	.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, 1136
	mov	DWORD PTR -1124[rbp], edi
	mov	QWORD PTR -1136[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1124[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 11
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -1136[rbp]
	add	rax, 8
	mov	rcx, QWORD PTR [rax]
	lea	rax, -1104[rbp]
	mov	edx, 5
	mov	rsi, rcx
	mov	rdi, rax
	call	regcomp@PLT
	mov	DWORD PTR -1116[rbp], eax
	cmp	DWORD PTR -1116[rbp], 0
	je	.L3
	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
.L3:
	cmp	DWORD PTR -1124[rbp], 2
	jne	.L4
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	do_slice
	jmp	.L5
.L4:
	mov	DWORD PTR -1120[rbp], 2
	jmp	.L6
.L8:
	mov	eax, DWORD PTR -1120[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1136[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1112[rbp], rax
	cmp	QWORD PTR -1112[rbp], 0
	jne	.L7
	mov	eax, DWORD PTR -1120[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1136[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	rdx, QWORD PTR -1112[rbp]
	lea	rax, -1104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	do_slice
	mov	rax, QWORD PTR -1112[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	DWORD PTR -1120[rbp], 1
.L6:
	mov	eax, DWORD PTR -1120[rbp]
	cmp	eax, DWORD PTR -1124[rbp]
	jl	.L8
.L5:
	lea	rax, -1104[rbp]
	mov	rdi, rax
	call	regfree@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.type	do_slice, @function
do_slice:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 64
	mov	QWORD PTR -4152[rbp], rdi
	mov	QWORD PTR -4160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L11
.L13:
	lea	rdx, -4120[rbp]
	lea	rsi, -4112[rbp]
	mov	rax, QWORD PTR -4152[rbp]
	mov	r8d, 0
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	regexec@PLT
	test	eax, eax
	jne	.L11
	mov	eax, DWORD PTR -4120[rbp]
	cdqe
	lea	rdx, -4112[rbp]
	add	rax, rdx
	mov	QWORD PTR -4128[rbp], rax
	mov	eax, DWORD PTR -4116[rbp]
	mov	edx, DWORD PTR -4120[rbp]
	sub	eax, edx
	mov	DWORD PTR -4132[rbp], eax
	mov	rdx, QWORD PTR stdout[rip]
	mov	eax, DWORD PTR -4132[rbp]
	movsx	rsi, eax
	mov	rax, QWORD PTR -4128[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
.L11:
	mov	rdx, QWORD PTR -4160[rbp]
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L13
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	do_slice, .-do_slice
	.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	"41708.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"no pattern\012\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1080
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1072
	sub	sp, sp, #8
	str	r0, [fp, #-1080]
	str	r1, [fp, #-1084]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1080]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r2, #11
	mov	r1, #1
	ldr	r0, .L10+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-1084]
	add	r3, r3, #4
	ldr	r1, [r3]
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #5
	mov	r0, r3
	bl	regcomp
	str	r0, [fp, #-1072]
	ldr	r3, [fp, #-1072]
	cmp	r3, #0
	beq	.L3
	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, #-1072]
	bl	regerror
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-1080]
	cmp	r3, #2
	bne	.L4
	ldr	r3, .L10+12
	ldr	r2, [r3]
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	do_slice
	b	.L5
.L4:
	mov	r3, #2
	str	r3, [fp, #-1076]
	b	.L6
.L8:
	ldr	r3, [fp, #-1076]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1084]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L10+16
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1068]
	ldr	r3, [fp, #-1068]
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-1076]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1084]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-1068]
	mov	r0, r3
	bl	do_slice
	ldr	r0, [fp, #-1068]
	bl	fclose
	ldr	r3, [fp, #-1076]
	add	r3, r3, #1
	str	r3, [fp, #-1076]
.L6:
	ldr	r2, [fp, #-1076]
	ldr	r3, [fp, #-1080]
	cmp	r2, r3
	blt	.L8
.L5:
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	regfree
	mov	r0, #0
	bl	exit
.L11:
	.align	2
.L10:
	.word	.LC2
	.word	stderr
	.word	.LC0
	.word	stdin
	.word	.LC1
	.size	main, .-main
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_slice, %function
do_slice:
	@ args = 0, pretend = 0, frame = 4128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #4096
	sub	sp, sp, #40
	sub	r3, fp, #4096
	sub	r3, r3, #4
	str	r0, [r3, #-28]
	sub	r3, fp, #4096
	sub	r3, r3, #4
	str	r1, [r3, #-32]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L13
.L15:
	sub	r3, fp, #4096
	sub	r3, r3, #4
	sub	r3, r3, #12
	sub	r1, fp, #4096
	sub	r1, r1, #4
	sub	r1, r1, #4
	sub	r2, fp, #4096
	sub	r2, r2, #4
	mov	r0, r2
	mov	r2, #0
	str	r2, [sp]
	mov	r2, #1
	ldr	r0, [r0, #-28]
	bl	regexec
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	sub	r3, fp, #4096
	sub	r3, r3, #4
	ldr	r3, [r3, #-12]
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #4
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, r1
	str	r3, [r2, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #4
	ldr	r2, [r3, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #4
	ldr	r3, [r3, #-12]
	sub	r1, fp, #4096
	sub	r1, r1, #4
	sub	r3, r2, r3
	str	r3, [r1, #-16]
	sub	r3, fp, #4096
	sub	r3, r3, #4
	ldr	r1, [r3, #-16]
	ldr	r3, .L17+4
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #4
	mov	r0, r2
	mov	r2, #1
	ldr	r0, [r0, #-20]
	bl	fwrite
	ldr	r3, .L17+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
.L13:
	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, #-32]
	mov	r1, #4096
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
	nop
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC3
	.word	stdout
	.size	do_slice, .-do_slice
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
