	.file	"1004578.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Incorrect name of process\n"
.LC1:
	.string	"^Name:\t(.+)$"
	.align 8
.LC2:
	.string	"Could not compile process name regex\n"
.LC3:
	.string	"^[0-9]+$"
	.align 8
.LC4:
	.string	"Could not compile process dir regex\n"
.LC5:
	.string	"/status"
.LC6:
	.string	"/proc/"
.LC7:
	.string	"r"
.LC8:
	.string	"Regex match failed: %s\n"
	.align 8
.LC9:
	.string	"Process dir name regex match failed: %s\n"
.LC10:
	.string	"%d\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
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 760
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	DWORD PTR -788[rbp], edi
	mov	QWORD PTR -800[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	cmp	DWORD PTR -788[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -800[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -768[rbp], rax
	lea	rax, -704[rbp]
	mov	edx, 5
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	regcomp@PLT
	test	eax, eax
	je	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 37
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L3
.L4:
	lea	rax, -640[rbp]
	mov	edx, 5
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	regcomp@PLT
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 36
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	lea	rax, -704[rbp]
	mov	rdi, rax
	call	regfree@PLT
	mov	eax, 1
	jmp	.L3
.L5:
	mov	QWORD PTR -760[rbp], 2
	mov	rax, QWORD PTR -760[rbp]
	mov	rdx, rax
	sub	rdx, 1
	mov	QWORD PTR -752[rbp], rdx
	mov	r14, rax
	mov	r15d, 0
	mov	r12, rax
	mov	r13d, 0
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L6:
	cmp	rsp, rdx
	je	.L7
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L6
.L7:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L8
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L8:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -744[rbp], rax
	lea	rax, .LC5[rip]
	mov	QWORD PTR -736[rbp], rax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -728[rbp], rax
	mov	rax, QWORD PTR -728[rbp]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -720[rbp], rax
	mov	DWORD PTR -784[rbp], 0
	jmp	.L9
.L18:
	mov	rax, QWORD PTR -712[rbp]
	lea	rsi, 19[rax]
	lea	rax, -640[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	rdi, rax
	call	regexec@PLT
	mov	DWORD PTR -780[rbp], eax
	cmp	DWORD PTR -780[rbp], 0
	jne	.L10
	mov	rdx, QWORD PTR -728[rbp]
	lea	rax, -320[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -712[rbp]
	lea	rdx, 19[rax]
	lea	rax, -320[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	rdx, QWORD PTR -736[rbp]
	lea	rax, -320[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rax, -320[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -776[rbp], rax
	jmp	.L11
.L16:
	mov	rcx, QWORD PTR -744[rbp]
	mov	rdx, QWORD PTR -760[rbp]
	lea	rsi, -576[rbp]
	lea	rax, -704[rbp]
	mov	r8d, 0
	mov	rdi, rax
	call	regexec@PLT
	mov	DWORD PTR -780[rbp], eax
	cmp	DWORD PTR -780[rbp], 0
	jne	.L12
	mov	rax, QWORD PTR -744[rbp]
	mov	eax, DWORD PTR 12[rax]
	cdqe
	mov	BYTE PTR -576[rbp+rax], 0
	mov	rax, QWORD PTR -744[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	rdx, -576[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -768[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcmp@PLT
	test	eax, eax
	jne	.L21
	add	DWORD PTR -784[rbp], 1
	jmp	.L21
.L12:
	cmp	DWORD PTR -780[rbp], 1
	jne	.L15
	jmp	.L11
.L15:
	lea	rdx, -576[rbp]
	lea	rsi, -704[rbp]
	mov	eax, DWORD PTR -780[rbp]
	mov	ecx, 255
	mov	edi, eax
	call	regerror@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -576[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -720[rbp]
	mov	rdi, rax
	call	closedir@PLT
	mov	rax, QWORD PTR -776[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rax, -640[rbp]
	mov	rdi, rax
	call	regfree@PLT
	lea	rax, -704[rbp]
	mov	rdi, rax
	call	regfree@PLT
	mov	eax, 1
	jmp	.L3
.L11:
	mov	rdx, QWORD PTR -776[rbp]
	lea	rax, -576[rbp]
	mov	esi, 255
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L16
	jmp	.L9
.L21:
	nop
	jmp	.L9
.L10:
	cmp	DWORD PTR -780[rbp], 1
	jne	.L17
	jmp	.L9
.L17:
	lea	rdx, -576[rbp]
	lea	rsi, -640[rbp]
	mov	eax, DWORD PTR -780[rbp]
	mov	ecx, 255
	mov	edi, eax
	call	regerror@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -576[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -720[rbp]
	mov	rdi, rax
	call	closedir@PLT
	mov	rax, QWORD PTR -776[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rax, -640[rbp]
	mov	rdi, rax
	call	regfree@PLT
	lea	rax, -704[rbp]
	mov	rdi, rax
	call	regfree@PLT
	mov	eax, 1
	jmp	.L3
.L9:
	mov	rax, QWORD PTR -720[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -712[rbp], rax
	cmp	QWORD PTR -712[rbp], 0
	jne	.L18
	mov	eax, DWORD PTR -784[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -720[rbp]
	mov	rdi, rax
	call	closedir@PLT
	mov	rax, QWORD PTR -776[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rax, -640[rbp]
	mov	rdi, rax
	call	regfree@PLT
	lea	rax, -704[rbp]
	mov	rdi, rax
	call	regfree@PLT
	mov	eax, 0
.L3:
	mov	rsp, rbx
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"1004578.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Incorrect name of process\012\000"
	.align	2
.LC1:
	.ascii	"^Name:\011(.+)$\000"
	.align	2
.LC2:
	.ascii	"Could not compile process name regex\012\000"
	.align	2
.LC3:
	.ascii	"^[0-9]+$\000"
	.align	2
.LC4:
	.ascii	"Could not compile process dir regex\012\000"
	.align	2
.LC5:
	.ascii	"/status\000"
	.align	2
.LC6:
	.ascii	"/proc/\000"
	.align	2
.LC7:
	.ascii	"r\000"
	.align	2
.LC8:
	.ascii	"Regex match failed: %s\012\000"
	.align	2
.LC9:
	.ascii	"Process dir name regex match failed: %s\012\000"
	.align	2
.LC10:
	.ascii	"%d\012\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 632
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #644
	str	r0, [fp, #-640]
	str	r1, [fp, #-644]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, [fp, #-640]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L19+8
	bl	fwrite
	mov	r3, #1
	b	.L3
.L2:
	ldr	r3, [fp, #-644]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-628]
	sub	r3, fp, #592
	mov	r2, #5
	ldr	r1, .L19+12
	mov	r0, r3
	bl	regcomp
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, #37
	mov	r1, #1
	ldr	r0, .L19+16
	bl	fwrite
	mov	r3, #1
	b	.L3
.L4:
	sub	r3, fp, #560
	mov	r2, #5
	ldr	r1, .L19+20
	mov	r0, r3
	bl	regcomp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, #36
	mov	r1, #1
	ldr	r0, .L19+24
	bl	fwrite
	sub	r3, fp, #592
	mov	r0, r3
	bl	regfree
	mov	r3, #1
	b	.L3
.L5:
	mov	r3, #2
	str	r3, [fp, #-624]
	ldr	ip, [fp, #-624]
	mov	r3, ip
	sub	r3, r3, #1
	str	r3, [fp, #-620]
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	mov	r0, ip
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	lsl	r3, ip, #3
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	add	r3, sp, #8
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-616]
	ldr	r3, .L19+28
	str	r3, [fp, #-612]
	ldr	r3, .L19+32
	str	r3, [fp, #-608]
	ldr	r0, [fp, #-608]
	bl	opendir
	str	r0, [fp, #-604]
	mov	r3, #0
	str	r3, [fp, #-636]
	b	.L6
.L15:
	ldr	r3, [fp, #-600]
	add	r1, r3, #11
	sub	r0, fp, #560
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	regexec
	str	r0, [fp, #-596]
	ldr	r3, [fp, #-596]
	cmp	r3, #0
	bne	.L7
	sub	r3, fp, #272
	ldr	r1, [fp, #-608]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-600]
	add	r2, r3, #11
	sub	r3, fp, #272
	mov	r1, r2
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #272
	ldr	r1, [fp, #-612]
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #272
	ldr	r1, .L19+36
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-632]
	b	.L8
.L13:
	sub	r1, fp, #528
	sub	r0, fp, #592
	mov	r3, #0
	str	r3, [sp]
	ldr	r3, [fp, #-616]
	ldr	r2, [fp, #-624]
	bl	regexec
	str	r0, [fp, #-596]
	ldr	r3, [fp, #-596]
	cmp	r3, #0
	bne	.L9
	ldr	r3, [fp, #-616]
	ldr	r3, [r3, #12]
	sub	r2, fp, #12
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-516]
	ldr	r3, [fp, #-616]
	ldr	r3, [r3, #8]
	sub	r2, fp, #528
	add	r3, r2, r3
	ldr	r1, [fp, #-628]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L18
	ldr	r3, [fp, #-636]
	add	r3, r3, #1
	str	r3, [fp, #-636]
	b	.L18
.L9:
	ldr	r3, [fp, #-596]
	cmp	r3, #1
	bne	.L12
	b	.L8
.L12:
	sub	r2, fp, #528
	sub	r1, fp, #592
	mov	r3, #255
	ldr	r0, [fp, #-596]
	bl	regerror
	ldr	r3, .L19+4
	ldr	r3, [r3]
	sub	r2, fp, #528
	ldr	r1, .L19+40
	mov	r0, r3
	bl	fprintf
	ldr	r0, [fp, #-604]
	bl	closedir
	ldr	r0, [fp, #-632]
	bl	fclose
	sub	r3, fp, #560
	mov	r0, r3
	bl	regfree
	sub	r3, fp, #592
	mov	r0, r3
	bl	regfree
	mov	r3, #1
	b	.L3
.L8:
	sub	r3, fp, #528
	ldr	r2, [fp, #-632]
	mov	r1, #255
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	b	.L6
.L18:
	nop
	b	.L6
.L7:
	ldr	r3, [fp, #-596]
	cmp	r3, #1
	bne	.L14
	b	.L6
.L14:
	sub	r2, fp, #528
	sub	r1, fp, #560
	mov	r3, #255
	ldr	r0, [fp, #-596]
	bl	regerror
	ldr	r3, .L19+4
	ldr	r3, [r3]
	sub	r2, fp, #528
	ldr	r1, .L19+44
	mov	r0, r3
	bl	fprintf
	ldr	r0, [fp, #-604]
	bl	closedir
	ldr	r0, [fp, #-632]
	bl	fclose
	sub	r3, fp, #560
	mov	r0, r3
	bl	regfree
	sub	r3, fp, #592
	mov	r0, r3
	bl	regfree
	mov	r3, #1
	b	.L3
.L6:
	ldr	r0, [fp, #-604]
	bl	readdir
	str	r0, [fp, #-600]
	ldr	r3, [fp, #-600]
	cmp	r3, #0
	bne	.L15
	ldr	r1, [fp, #-636]
	ldr	r0, .L19+48
	bl	printf
	ldr	r0, [fp, #-604]
	bl	closedir
	ldr	r0, [fp, #-632]
	bl	fclose
	sub	r3, fp, #560
	mov	r0, r3
	bl	regfree
	sub	r3, fp, #592
	mov	r0, r3
	bl	regfree
	mov	r3, #0
.L3:
	mov	sp, r4
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC11
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
