	.file	"918508.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"select in Sleep"
	.text
	.globl	Sleep
	.type	Sleep, @function
Sleep:
.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, 304
	mov	DWORD PTR -292[rbp], edi
	mov	DWORD PTR -296[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -296[rbp], 999999
	jle	.L2
	add	DWORD PTR -292[rbp], 1
	mov	eax, DWORD PTR -296[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1125899907
	shr	rdx, 32
	sar	edx, 18
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	edx, edx, 1000000
	sub	eax, edx
	mov	DWORD PTR -296[rbp], eax
.L2:
	mov	eax, DWORD PTR -292[rbp]
	cdqe
	mov	QWORD PTR -288[rbp], rax
	mov	eax, DWORD PTR -296[rbp]
	cdqe
	mov	QWORD PTR -280[rbp], rax
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	sigemptyset@PLT
	lea	rax, -144[rbp]
	mov	esi, 29
	mov	rdi, rax
	call	sigaddset@PLT
	lea	rax, -144[rbp]
	mov	esi, 14
	mov	rdi, rax
	call	sigaddset@PLT
	lea	rdx, -272[rbp]
	lea	rax, -144[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	sigprocmask@PLT
	lea	rax, -288[rbp]
	mov	r8, rax
	mov	ecx, 0
	mov	edx, 0
	mov	esi, 0
	mov	edi, 0
	call	select@PLT
	cmp	eax, -1
	jne	.L3
	lea	rdi, .LC0[rip]
	call	perror@PLT
.L3:
	lea	rax, -272[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 2
	call	sigprocmask@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Sleep, .-Sleep
	.section	.rodata
.LC1:
	.string	"."
	.align 8
.LC2:
	.string	"Iwatch: Run a program when a file is added or deleted from dir."
	.align 8
.LC3:
	.string	"Usage: %s [-s sec] [-d dir] command args ...\n"
	.align 8
.LC4:
	.string	" [-s sec]\tNumber of seconds between checks (%d)\n"
	.align 8
.LC5:
	.string	" [-d dir]\tDirectory to watch ('%s')\n"
	.align 8
.LC6:
	.string	" [-p sec]\tNumber of seconds to not look after command (%d)\n"
	.align 8
.LC7:
	.string	"Watching '%s' %d seconds to run %s\n"
.LC8:
	.string	"stat"
.LC9:
	.string	"exec"
.LC10:
	.string	"%s: Can't fork\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 224
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -184[rbp], -1
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	QWORD PTR -176[rbp], rax
	mov	DWORD PTR -200[rbp], 300
	mov	DWORD PTR -196[rbp], 10
	lea	rax, .LC1[rip]
	mov	QWORD PTR -168[rbp], rax
	cmp	DWORD PTR -212[rbp], 1
	jne	.L10
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L7
.L28:
	nop
	jmp	.L7
.L29:
	nop
.L7:
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -200[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	QWORD PTR -168[rbp], 0
	je	.L8
	mov	rax, QWORD PTR -168[rbp]
	jmp	.L9
.L8:
	lea	rax, .LC1[rip]
.L9:
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -196[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	rax, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 115
	jne	.L11
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -200[rbp], eax
	cmp	DWORD PTR -200[rbp], 0
	jg	.L12
	jmp	.L7
.L11:
	mov	rax, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 112
	jne	.L13
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], 0
	jg	.L12
	jmp	.L7
.L13:
	mov	rax, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 100
	jne	.L12
	mov	rax, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	je	.L28
	mov	rax, QWORD PTR -168[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L28
.L12:
	add	QWORD PTR -176[rbp], 16
	sub	DWORD PTR -212[rbp], 2
.L10:
	mov	rax, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L15
	mov	rax, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	je	.L16
.L15:
	mov	rax, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L29
	mov	rax, QWORD PTR -176[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	edx, DWORD PTR -200[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	je	.L18
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -184[rbp], rax
.L26:
	mov	eax, DWORD PTR -200[rbp]
	mov	esi, 0
	mov	edi, eax
	call	Sleep
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	jne	.L19
	mov	rax, QWORD PTR -72[rbp]
	cmp	QWORD PTR -184[rbp], rax
	je	.L26
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -184[rbp], rax
	call	fork@PLT
	mov	DWORD PTR -192[rbp], eax
	cmp	DWORD PTR -192[rbp], -1
	je	.L21
	cmp	DWORD PTR -192[rbp], 0
	jne	.L24
	mov	rax, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	_exit@PLT
.L21:
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L24
.L30:
	nop
.L24:
	lea	rax, -204[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -188[rbp], eax
	mov	eax, DWORD PTR -188[rbp]
	cmp	eax, DWORD PTR -192[rbp]
	je	.L23
	cmp	DWORD PTR -188[rbp], -1
	jne	.L30
.L23:
	cmp	DWORD PTR -196[rbp], 0
	je	.L25
	mov	eax, DWORD PTR -196[rbp]
	mov	esi, 0
	mov	edi, eax
	call	Sleep
.L25:
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -184[rbp], rax
	jmp	.L26
.L19:
	lea	rdi, .LC8[rip]
	call	perror@PLT
	jmp	.L26
	.cfi_endproc
.LFE7:
	.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	"918508.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"select in Sleep\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Sleep
	.syntax unified
	.arm
	.fpu softvfp
	.type	Sleep, %function
Sleep:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #288
	str	r0, [fp, #-280]
	str	r1, [fp, #-284]
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-284]
	ldr	r2, .L5+4
	cmp	r3, r2
	blt	.L2
	ldr	r3, [fp, #-280]
	add	r3, r3, #1
	str	r3, [fp, #-280]
	ldr	r1, [fp, #-284]
	ldr	r3, .L5+8
	smull	r2, r3, r1, r3
	asr	r2, r3, #18
	asr	r3, r1, #31
	sub	r0, r2, r3
	mov	r2, r0
	lsl	r2, r2, #5
	sub	r2, r2, r0
	lsl	r3, r2, #6
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r0
	lsl	r3, r3, #6
	sub	r3, r1, r3
	str	r3, [fp, #-284]
.L2:
	ldr	r3, [fp, #-280]
	str	r3, [fp, #-272]
	ldr	r3, [fp, #-284]
	str	r3, [fp, #-268]
	sub	r3, fp, #136
	mov	r0, r3
	bl	sigemptyset
	sub	r3, fp, #136
	mov	r1, #29
	mov	r0, r3
	bl	sigaddset
	sub	r3, fp, #136
	mov	r1, #14
	mov	r0, r3
	bl	sigaddset
	sub	r2, fp, #264
	sub	r3, fp, #136
	mov	r1, r3
	mov	r0, #0
	bl	sigprocmask
	sub	r3, fp, #272
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r1, #0
	mov	r0, #0
	bl	select
	mov	r3, r0
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L5+12
	bl	perror
.L3:
	sub	r3, fp, #264
	mov	r2, #0
	mov	r1, r3
	mov	r0, #2
	bl	sigprocmask
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC1
	.word	1000000
	.word	1125899907
	.word	.LC0
	.size	Sleep, .-Sleep
	.section	.rodata
	.align	2
.LC2:
	.ascii	".\000"
	.align	2
.LC3:
	.ascii	"Iwatch: Run a program when a file is added or delet"
	.ascii	"ed from dir.\000"
	.align	2
.LC4:
	.ascii	"Usage: %s [-s sec] [-d dir] command args ...\012\000"
	.align	2
.LC5:
	.ascii	" [-s sec]\011Number of seconds between checks (%d)\012"
	.ascii	"\000"
	.align	2
.LC6:
	.ascii	" [-d dir]\011Directory to watch ('%s')\012\000"
	.align	2
.LC7:
	.ascii	" [-p sec]\011Number of seconds to not look after co"
	.ascii	"mmand (%d)\012\000"
	.align	2
.LC8:
	.ascii	"Watching '%s' %d seconds to run %s\012\000"
	.align	2
.LC9:
	.ascii	"stat\000"
	.align	2
.LC10:
	.ascii	"exec\000"
	.align	2
.LC11:
	.ascii	"%s: Can't fork\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	str	r0, [fp, #-136]
	str	r1, [fp, #-140]
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-128]
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	str	r3, [fp, #-124]
	mov	r3, #300
	str	r3, [fp, #-120]
	mov	r3, #10
	str	r3, [fp, #-116]
	ldr	r3, .L33+4
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-136]
	cmp	r3, #1
	bne	.L12
	ldr	r0, .L33+8
	bl	puts
	b	.L9
.L30:
	nop
	b	.L9
.L31:
	nop
.L9:
	ldr	r3, [fp, #-140]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L33+12
	bl	printf
	ldr	r1, [fp, #-120]
	ldr	r0, .L33+16
	bl	printf
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-112]
	b	.L11
.L10:
	ldr	r3, .L33+4
.L11:
	mov	r1, r3
	ldr	r0, .L33+20
	bl	printf
	ldr	r1, [fp, #-116]
	ldr	r0, .L33+24
	bl	printf
	mov	r0, #1
	bl	exit
.L18:
	ldr	r3, [fp, #-124]
	ldr	r3, [r3]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #115
	bne	.L13
	ldr	r3, [fp, #-124]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	bgt	.L14
	b	.L9
.L13:
	ldr	r3, [fp, #-124]
	ldr	r3, [r3]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #112
	bne	.L15
	ldr	r3, [fp, #-124]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	bgt	.L14
	b	.L9
.L15:
	ldr	r3, [fp, #-124]
	ldr	r3, [r3]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #100
	bne	.L14
	ldr	r3, [fp, #-124]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	beq	.L30
	ldr	r3, [fp, #-112]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L30
.L14:
	ldr	r3, [fp, #-124]
	add	r3, r3, #8
	str	r3, [fp, #-124]
	ldr	r3, [fp, #-136]
	sub	r3, r3, #2
	str	r3, [fp, #-136]
.L12:
	ldr	r3, [fp, #-124]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-124]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	beq	.L18
.L17:
	ldr	r3, [fp, #-124]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L31
	ldr	r3, [fp, #-124]
	ldr	r3, [r3]
	ldr	r2, [fp, #-120]
	ldr	r1, [fp, #-112]
	ldr	r0, .L33+28
	bl	printf
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	ldr	r0, .L33+32
	bl	perror
	mov	r0, #1
	bl	exit
.L20:
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-128]
.L28:
	mov	r1, #0
	ldr	r0, [fp, #-120]
	bl	Sleep
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	bne	.L21
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-128]
	cmp	r2, r3
	beq	.L28
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-128]
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmn	r3, #1
	beq	.L23
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	bne	.L26
	ldr	r3, [fp, #-124]
	ldr	r3, [r3]
	ldr	r1, [fp, #-124]
	mov	r0, r3
	bl	execvp
	ldr	r0, .L33+36
	bl	perror
	mov	r0, #1
	bl	_exit
.L23:
	ldr	r3, [fp, #-140]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L33+40
	bl	printf
	b	.L26
.L32:
	nop
.L26:
	sub	r3, fp, #132
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-104]
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-108]
	cmp	r2, r3
	beq	.L25
	ldr	r3, [fp, #-104]
	cmn	r3, #1
	bne	.L32
.L25:
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	beq	.L27
	mov	r1, #0
	ldr	r0, [fp, #-116]
	bl	Sleep
.L27:
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	stat
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-128]
	b	.L28
.L21:
	ldr	r0, .L33+32
	bl	perror
	b	.L28
.L34:
	.align	2
.L33:
	.word	.LC12
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
