	.file	"527902.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Please provide arguments."
	.align 8
.LC1:
	.string	"Could not convert -i to number."
	.align 8
.LC2:
	.string	"Value not provided for option: %c\n"
.LC3:
	.string	"Unknown option: %c\n"
.LC4:
	.string	":c:f:i:"
	.align 8
.LC5:
	.string	"[dmn] INTERNAL ERR: Fork failure."
	.align 8
.LC6:
	.string	"[dmn] Initiated with pid: %d \n"
	.align 8
.LC7:
	.string	"[dmn] INTERNAL ERR: setsid failure."
.LC8:
	.string	"/"
.LC9:
	.string	"w+"
	.align 8
.LC10:
	.string	"[dmn] New iteration. Command: %s\n"
.LC11:
	.string	"r"
	.align 8
.LC12:
	.string	"[dmn] Failed to run command: %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, 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
	mov	DWORD PTR -1108[rbp], 0
	mov	DWORD PTR -1104[rbp], 0
	cmp	DWORD PTR -1140[rbp], 1
	jg	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	DWORD PTR -1120[rbp], 1
	mov	DWORD PTR -1116[rbp], 0
	jmp	.L3
.L10:
	cmp	DWORD PTR -1100[rbp], 105
	je	.L4
	cmp	DWORD PTR -1100[rbp], 105
	jg	.L3
	cmp	DWORD PTR -1100[rbp], 102
	je	.L5
	cmp	DWORD PTR -1100[rbp], 102
	jg	.L3
	cmp	DWORD PTR -1100[rbp], 99
	je	.L6
	cmp	DWORD PTR -1100[rbp], 99
	jg	.L3
	cmp	DWORD PTR -1100[rbp], 58
	je	.L7
	cmp	DWORD PTR -1100[rbp], 63
	je	.L8
	jmp	.L3
.L6:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -1088[rbp], rax
	jmp	.L3
.L5:
	mov	DWORD PTR -1116[rbp], 1
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -1080[rbp], rax
	jmp	.L3
.L4:
	mov	DWORD PTR -1120[rbp], 0
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtoimax@PLT
	mov	QWORD PTR -1064[rbp], rax
	cmp	QWORD PTR -1064[rbp], -1
	jne	.L9
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 34
	jne	.L9
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	rax, QWORD PTR -1064[rbp]
	mov	DWORD PTR -1124[rbp], eax
	jmp	.L3
.L7:
	mov	eax, DWORD PTR optopt[rip]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR optopt[rip]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rcx, QWORD PTR -1152[rbp]
	mov	eax, DWORD PTR -1140[rbp]
	lea	rdx, .LC4[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -1100[rbp], eax
	cmp	DWORD PTR -1100[rbp], -1
	jne	.L10
	call	fork@PLT
	mov	DWORD PTR -1108[rbp], eax
	cmp	DWORD PTR -1108[rbp], 0
	jns	.L11
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	cmp	DWORD PTR -1108[rbp], 0
	jle	.L12
	mov	eax, DWORD PTR -1108[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L12:
	mov	edi, 0
	call	umask@PLT
	call	setsid@PLT
	mov	DWORD PTR -1104[rbp], eax
	cmp	DWORD PTR -1104[rbp], 0
	jns	.L13
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	lea	rdi, .LC8[rip]
	call	chdir@PLT
	mov	edi, 0
	call	close@PLT
	mov	edi, 1
	call	close@PLT
	mov	edi, 2
	call	close@PLT
	cmp	DWORD PTR -1116[rbp], 0
	je	.L14
	mov	rax, QWORD PTR -1080[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1096[rbp], rax
.L14:
	mov	DWORD PTR -1112[rbp], 1
	jmp	.L15
.L22:
	mov	edi, 1
	call	sleep@PLT
	cmp	DWORD PTR -1116[rbp], 0
	je	.L16
	mov	rdx, QWORD PTR -1088[rbp]
	mov	rax, QWORD PTR -1096[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -1096[rbp]
	mov	rdi, rax
	call	fflush@PLT
.L16:
	mov	rax, QWORD PTR -1088[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	popen@PLT
	mov	QWORD PTR -1072[rbp], rax
	cmp	QWORD PTR -1072[rbp], 0
	jne	.L17
	mov	rdx, QWORD PTR -1088[rbp]
	mov	rax, QWORD PTR -1096[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	cmp	DWORD PTR -1116[rbp], 0
	je	.L18
	jmp	.L19
.L20:
	mov	rdx, QWORD PTR -1096[rbp]
	lea	rax, -1056[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
.L19:
	mov	rdx, QWORD PTR -1072[rbp]
	lea	rax, -1056[rbp]
	mov	esi, 1035
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L20
.L18:
	mov	rax, QWORD PTR -1072[rbp]
	mov	rdi, rax
	call	pclose@PLT
	cmp	DWORD PTR -1120[rbp], 0
	jne	.L15
	sub	DWORD PTR -1124[rbp], 1
	cmp	DWORD PTR -1124[rbp], 0
	jne	.L15
	mov	DWORD PTR -1112[rbp], 0
.L15:
	cmp	DWORD PTR -1112[rbp], 0
	jne	.L22
	cmp	DWORD PTR -1116[rbp], 0
	je	.L23
	mov	rax, QWORD PTR -1096[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L23:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.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	"527902.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Please provide arguments.\000"
	.align	2
.LC1:
	.ascii	"Could not convert -i to number.\000"
	.align	2
.LC2:
	.ascii	"Value not provided for option: %c\012\000"
	.align	2
.LC3:
	.ascii	"Unknown option: %c\012\000"
	.align	2
.LC4:
	.ascii	":c:f:i:\000"
	.align	2
.LC5:
	.ascii	"[dmn] INTERNAL ERR: Fork failure.\000"
	.align	2
.LC6:
	.ascii	"[dmn] Initiated with pid: %d \012\000"
	.align	2
.LC7:
	.ascii	"[dmn] INTERNAL ERR: setsid failure.\000"
	.align	2
.LC8:
	.ascii	"/\000"
	.align	2
.LC9:
	.ascii	"w+\000"
	.align	2
.LC10:
	.ascii	"[dmn] New iteration. Command: %s\012\000"
	.align	2
.LC11:
	.ascii	"r\000"
	.align	2
.LC12:
	.ascii	"[dmn] Failed to run command: %s\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1096
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1088
	sub	sp, sp, #8
	str	r0, [fp, #-1096]
	str	r1, [fp, #-1100]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1064]
	mov	r3, #0
	str	r3, [fp, #-1060]
	ldr	r3, [fp, #-1096]
	cmp	r3, #1
	bgt	.L2
	ldr	r0, .L26+4
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	mov	r3, #1
	str	r3, [fp, #-1076]
	mov	r3, #0
	str	r3, [fp, #-1072]
	b	.L3
.L10:
	ldr	r3, [fp, #-1056]
	cmp	r3, #105
	beq	.L4
	ldr	r3, [fp, #-1056]
	cmp	r3, #105
	bgt	.L3
	ldr	r3, [fp, #-1056]
	cmp	r3, #102
	beq	.L5
	ldr	r3, [fp, #-1056]
	cmp	r3, #102
	bgt	.L3
	ldr	r3, [fp, #-1056]
	cmp	r3, #99
	beq	.L6
	ldr	r3, [fp, #-1056]
	cmp	r3, #99
	bgt	.L3
	ldr	r3, [fp, #-1056]
	cmp	r3, #58
	beq	.L7
	ldr	r3, [fp, #-1056]
	cmp	r3, #63
	beq	.L8
	b	.L3
.L6:
	ldr	r3, .L26+8
	ldr	r3, [r3]
	str	r3, [fp, #-1088]
	b	.L3
.L5:
	mov	r3, #1
	str	r3, [fp, #-1072]
	ldr	r3, .L26+8
	ldr	r3, [r3]
	str	r3, [fp, #-1084]
	b	.L3
.L4:
	mov	r3, #0
	str	r3, [fp, #-1076]
	ldr	r3, .L26+8
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtoimax
	mov	r2, r0
	mov	r3, r1
	mov	r3, r2
	str	r3, [fp, #-1048]
	ldr	r3, [fp, #-1048]
	cmn	r3, #1
	bne	.L9
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #34
	bne	.L9
	ldr	r0, .L26+12
	bl	printf
	mov	r0, #1
	bl	exit
.L9:
	ldr	r3, [fp, #-1048]
	str	r3, [fp, #-1080]
	b	.L3
.L7:
	ldr	r3, .L26+16
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+20
	bl	printf
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, .L26+16
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+24
	bl	printf
	mov	r0, #1
	bl	exit
.L3:
	ldr	r2, .L26+28
	ldr	r1, [fp, #-1100]
	ldr	r0, [fp, #-1096]
	bl	getopt
	str	r0, [fp, #-1056]
	ldr	r3, [fp, #-1056]
	cmn	r3, #1
	bne	.L10
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-1064]
	ldr	r3, [fp, #-1064]
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L26+32
	bl	puts
	mov	r0, #1
	bl	exit
.L11:
	ldr	r3, [fp, #-1064]
	cmp	r3, #0
	ble	.L12
	ldr	r1, [fp, #-1064]
	ldr	r0, .L26+36
	bl	printf
	mov	r0, #0
	bl	exit
.L12:
	mov	r0, #0
	bl	umask
	bl	setsid
	str	r0, [fp, #-1060]
	ldr	r3, [fp, #-1060]
	cmp	r3, #0
	bge	.L13
	ldr	r0, .L26+40
	bl	puts
	mov	r0, #1
	bl	exit
.L13:
	ldr	r0, .L26+44
	bl	chdir
	mov	r0, #0
	bl	close
	mov	r0, #1
	bl	close
	mov	r0, #2
	bl	close
	ldr	r3, [fp, #-1072]
	cmp	r3, #0
	beq	.L14
	ldr	r1, .L26+48
	ldr	r0, [fp, #-1084]
	bl	fopen
	str	r0, [fp, #-1092]
.L14:
	mov	r3, #1
	str	r3, [fp, #-1068]
	b	.L15
.L22:
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-1072]
	cmp	r3, #0
	beq	.L16
	ldr	r2, [fp, #-1088]
	ldr	r1, .L26+52
	ldr	r0, [fp, #-1092]
	bl	fprintf
	ldr	r0, [fp, #-1092]
	bl	fflush
.L16:
	ldr	r1, .L26+56
	ldr	r0, [fp, #-1088]
	bl	popen
	str	r0, [fp, #-1052]
	ldr	r3, [fp, #-1052]
	cmp	r3, #0
	bne	.L17
	ldr	r2, [fp, #-1088]
	ldr	r1, .L26+60
	ldr	r0, [fp, #-1092]
	bl	fprintf
	mov	r0, #1
	bl	exit
.L17:
	ldr	r3, [fp, #-1072]
	cmp	r3, #0
	beq	.L18
	b	.L19
.L20:
	sub	r3, fp, #1040
	sub	r3, r3, #4
	ldr	r1, [fp, #-1092]
	mov	r0, r3
	bl	fputs
.L19:
	sub	r3, fp, #1040
	sub	r3, r3, #4
	ldr	r2, [fp, #-1052]
	ldr	r1, .L26+64
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L20
.L18:
	ldr	r0, [fp, #-1052]
	bl	pclose
	ldr	r3, [fp, #-1076]
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-1080]
	sub	r3, r3, #1
	str	r3, [fp, #-1080]
	ldr	r3, [fp, #-1080]
	cmp	r3, #0
	bne	.L15
	mov	r3, #0
	str	r3, [fp, #-1068]
.L15:
	ldr	r3, [fp, #-1068]
	cmp	r3, #0
	bne	.L22
	ldr	r3, [fp, #-1072]
	cmp	r3, #0
	beq	.L23
	ldr	r0, [fp, #-1092]
	bl	fclose
.L23:
	mov	r3, #0
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC13
	.word	.LC0
	.word	optarg
	.word	.LC1
	.word	optopt
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	1035
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
