	.file	"150139856.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.ascii	"Use: god [options] [--] program [arguments]\nOptions:\n-h --"
	.ascii	"help           show this help and exit\n-v --version        "
	.ascii	"show version and exit\n-f --foreground     run in foreground"
	.ascii	"\n-n --nohup          make the program immune to SIGHUP\n-l "
	.ascii	"--logfile FILE   write the program's stdout and stderr to FI"
	.ascii	"LE\n-p --pidfile FILE   write pid to FILE\n-r --rundir DIR  "
	.ascii	"   switch to D"
	.string	"IR before executing the program\n-u --user USER      switch to USER before executing the program\n-g --group GROUP    switch to GROUP before executing the program\n\nThe program's output go to a blackhole if no logfile is set.\nLog files are recycled on SIGHUP."
	.text
	.globl	usage
	.type	usage, @function
usage:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	usage, .-usage
	.local	nohup
	.comm	nohup,4,4
	.local	logfd
	.comm	logfd,8,8
	.local	childpid
	.comm	childpid,4,4
	.local	logfp
	.comm	logfp,8,8
	.local	pidfp
	.comm	pidfp,8,8
	.local	logfile
	.comm	logfile,4096,32
	.local	pidfile
	.comm	pidfile,4096,32
	.local	linebuf
	.comm	linebuf,1024,32
	.local	pwd
	.comm	pwd,8,8
	.local	grp
	.comm	grp,8,8
	.local	logger_mutex
	.comm	logger_mutex,40,32
	.section	.rodata
.LC1:
	.string	"l:p:r:u:g:hvfns"
.LC2:
	.string	"Go daemon v1.2"
	.align 8
.LC3:
	.string	"http://github.com/fiorix/go-daemon"
.LC4:
	.string	"failed to switch to rundir"
	.align 8
.LC5:
	.string	"failed to switch to user %s: %s\n"
	.align 8
.LC6:
	.string	"failed to switch to group %s: %s\n"
.LC7:
	.string	"a"
.LC8:
	.string	"failed to open logfile"
.LC9:
	.string	"w+"
.LC10:
	.string	"failed to open pidfile"
.LC11:
	.string	"failed to stat %s: %s\n"
.LC12:
	.string	"permission denied: %s\n"
.LC13:
	.string	"fork"
	.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 320
	mov	DWORD PTR -4404[rbp], edi
	mov	QWORD PTR -4416[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -4396[rbp], 0
	mov	edx, 4096
	mov	esi, 0
	lea	rdi, logfile[rip]
	call	memset@PLT
	mov	edx, 4096
	mov	esi, 0
	lea	rdi, pidfile[rip]
	call	memset@PLT
	lea	rax, -4112[rbp]
	mov	edx, 4096
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -4240[rbp]
	mov	edx, 64
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -4176[rbp]
	mov	edx, 64
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
.L17:
	mov	rsi, QWORD PTR -4416[rbp]
	mov	eax, DWORD PTR -4404[rbp]
	mov	r8d, 0
	lea	rcx, opts.0[rip]
	lea	rdx, .LC1[rip]
	mov	edi, eax
	call	getopt_long@PLT
	mov	DWORD PTR -4392[rbp], eax
	cmp	DWORD PTR -4392[rbp], -1
	je	.L38
	mov	eax, DWORD PTR -4392[rbp]
	sub	eax, 102
	cmp	eax, 16
	ja	.L5
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L7[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L7[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L7:
	.long	.L14-.L7
	.long	.L13-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L12-.L7
	.long	.L5-.L7
	.long	.L11-.L7
	.long	.L5-.L7
	.long	.L10-.L7
	.long	.L5-.L7
	.long	.L9-.L7
	.long	.L5-.L7
	.long	.L5-.L7
	.long	.L8-.L7
	.long	.L6-.L7
	.text
.L6:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L35
.L14:
	mov	DWORD PTR -4396[rbp], 1
	jmp	.L16
.L11:
	mov	DWORD PTR nohup[rip], 1
	jmp	.L16
.L12:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 4095
	mov	rsi, rax
	lea	rdi, logfile[rip]
	call	strncpy@PLT
	jmp	.L16
.L10:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 4095
	mov	rsi, rax
	lea	rdi, pidfile[rip]
	call	strncpy@PLT
	jmp	.L16
.L9:
	mov	rcx, QWORD PTR optarg[rip]
	lea	rax, -4112[rbp]
	mov	edx, 4095
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	jmp	.L16
.L8:
	mov	rcx, QWORD PTR optarg[rip]
	lea	rax, -4240[rbp]
	mov	edx, 63
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	jmp	.L16
.L13:
	mov	rcx, QWORD PTR optarg[rip]
	lea	rax, -4176[rbp]
	mov	edx, 63
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	jmp	.L16
.L5:
	mov	eax, 0
	call	usage
.L16:
	jmp	.L17
.L38:
	nop
	mov	eax, DWORD PTR optind[rip]
	cmp	DWORD PTR -4404[rbp], eax
	jg	.L18
	mov	eax, 0
	call	usage
.L18:
	movzx	eax, BYTE PTR -4112[rbp]
	test	al, al
	je	.L19
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	chdir@PLT
	cmp	eax, -1
	jne	.L19
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L35
.L19:
	movzx	eax, BYTE PTR -4240[rbp]
	test	al, al
	je	.L20
	lea	rax, -4240[rbp]
	mov	rdi, rax
	call	getpwnam@PLT
	mov	QWORD PTR pwd[rip], rax
	mov	rax, QWORD PTR pwd[rip]
	test	rax, rax
	jne	.L20
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -4240[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L35
.L20:
	movzx	eax, BYTE PTR -4176[rbp]
	test	al, al
	je	.L21
	lea	rax, -4176[rbp]
	mov	rdi, rax
	call	getgrnam@PLT
	mov	QWORD PTR grp[rip], rax
	mov	rax, QWORD PTR grp[rip]
	test	rax, rax
	jne	.L21
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -4176[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L35
.L21:
	movzx	eax, BYTE PTR logfile[rip]
	test	al, al
	je	.L22
	lea	rsi, .LC7[rip]
	lea	rdi, logfile[rip]
	call	fopen@PLT
	mov	QWORD PTR logfp[rip], rax
	mov	rax, QWORD PTR logfp[rip]
	test	rax, rax
	jne	.L22
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L35
.L22:
	mov	rax, QWORD PTR logfp[rip]
	test	rax, rax
	je	.L23
	mov	rax, QWORD PTR logfp[rip]
	mov	ecx, 1024
	mov	edx, 1
	lea	rsi, linebuf[rip]
	mov	rdi, rax
	call	setvbuf@PLT
.L23:
	movzx	eax, BYTE PTR pidfile[rip]
	test	al, al
	je	.L24
	lea	rsi, .LC9[rip]
	lea	rdi, pidfile[rip]
	call	fopen@PLT
	mov	QWORD PTR pidfp[rip], rax
	mov	rax, QWORD PTR pidfp[rip]
	test	rax, rax
	jne	.L24
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L35
.L24:
	mov	rax, QWORD PTR grp[rip]
	test	rax, rax
	je	.L25
	mov	rax, QWORD PTR grp[rip]
	mov	eax, DWORD PTR 16[rax]
	mov	edi, eax
	call	setegid@PLT
	cmp	eax, -1
	jne	.L25
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -4176[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L35
.L25:
	mov	rax, QWORD PTR pwd[rip]
	test	rax, rax
	je	.L26
	mov	rax, QWORD PTR pwd[rip]
	mov	eax, DWORD PTR 16[rax]
	mov	edi, eax
	call	seteuid@PLT
	cmp	eax, -1
	jne	.L26
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -4240[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L35
.L26:
	mov	eax, DWORD PTR optind[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -4416[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rdx, -4384[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	jns	.L27
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR optind[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -4416[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L35
.L27:
	mov	eax, DWORD PTR -4360[rbp]
	and	eax, 73
	test	eax, eax
	jne	.L28
	mov	eax, DWORD PTR optind[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -4416[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L35
.L28:
	cmp	DWORD PTR -4396[rbp], 0
	je	.L29
	mov	eax, DWORD PTR optind[rip]
	mov	rdx, QWORD PTR -4416[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	daemon_main
	jmp	.L30
.L29:
	call	fork@PLT
	mov	DWORD PTR -4388[rbp], eax
	cmp	DWORD PTR -4388[rbp], 0
	je	.L31
	mov	eax, DWORD PTR -4388[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
	jmp	.L30
.L31:
	cmp	DWORD PTR -4388[rbp], 0
	jne	.L32
	call	fork@PLT
	mov	DWORD PTR -4388[rbp], eax
	cmp	DWORD PTR -4388[rbp], 0
	je	.L33
	mov	edi, 0
	call	exit@PLT
.L33:
	cmp	DWORD PTR -4388[rbp], 0
	jne	.L34
	mov	edi, 0
	call	close@PLT
	mov	edi, 1
	call	close@PLT
	mov	edi, 2
	call	close@PLT
	mov	eax, DWORD PTR optind[rip]
	mov	rdx, QWORD PTR -4416[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	daemon_main
	jmp	.L30
.L34:
	lea	rdi, .LC13[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L32:
	lea	rdi, .LC13[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L30:
	mov	eax, 0
.L35:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
.LC14:
	.string	"%d\n"
.LC15:
	.string	"\033%s"
	.text
	.globl	daemon_main
	.type	daemon_main, @function
daemon_main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR pidfp[rip]
	test	rax, rax
	je	.L40
	call	getpid@PLT
	mov	edx, eax
	mov	rax, QWORD PTR pidfp[rip]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR pidfp[rip]
	mov	rdi, rax
	call	fclose@PLT
.L40:
	mov	DWORD PTR -20[rbp], 1
	jmp	.L41
.L43:
	mov	eax, DWORD PTR -20[rbp]
	lea	rsi, sigfwd[rip]
	mov	edi, eax
	call	signal@PLT
	cmp	rax, 1
	jne	.L42
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 1
	mov	edi, eax
	call	signal@PLT
.L42:
	add	DWORD PTR -20[rbp], 1
.L41:
	cmp	DWORD PTR -20[rbp], 32
	jle	.L43
	lea	rsi, sighup[rip]
	mov	edi, 1
	call	signal@PLT
	lea	rdi, logfd[rip]
	call	pipe@PLT
	call	fork@PLT
	mov	DWORD PTR childpid[rip], eax
	mov	eax, DWORD PTR childpid[rip]
	test	eax, eax
	je	.L44
	mov	eax, DWORD PTR logfd[rip+4]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	lea	rax, -16[rbp]
	mov	rcx, rdx
	lea	rdx, logger_thread[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	eax, DWORD PTR childpid[rip]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	jmp	.L45
.L44:
	mov	eax, DWORD PTR childpid[rip]
	test	eax, eax
	jne	.L46
	mov	eax, DWORD PTR logfd[rip]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	close@PLT
	mov	edi, 1
	call	close@PLT
	mov	edi, 2
	call	close@PLT
	mov	eax, DWORD PTR logfd[rip+4]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR logfd[rip+4]
	mov	esi, 2
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR logfd[rip+4]
	mov	edi, eax
	call	close@PLT
	mov	edi, 1
	call	close@PLT
	mov	edi, 2
	call	close@PLT
	jmp	.L45
.L46:
	lea	rdi, .LC13[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L45:
	mov	rax, QWORD PTR pidfp[rip]
	test	rax, rax
	je	.L49
	lea	rdi, pidfile[rip]
	call	unlink@PLT
.L49:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L48
	call	__stack_chk_fail@PLT
.L48:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	daemon_main, .-daemon_main
	.section	.rodata
.LC16:
	.string	"%s: %s\n"
	.text
	.globl	logger_thread
	.type	logger_thread, @function
logger_thread:
.LFB9:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -4128[rbp], 0
.L55:
	mov	eax, DWORD PTR logfd[rip]
	lea	rcx, -4112[rbp]
	mov	edx, 4096
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4124[rbp], eax
	cmp	DWORD PTR -4124[rbp], 0
	jle	.L58
	mov	eax, DWORD PTR -4124[rbp]
	cdqe
	mov	BYTE PTR -4112[rbp+rax], 0
	cmp	DWORD PTR -4128[rbp], 0
	jne	.L53
	mov	DWORD PTR -4128[rbp], 1
	movzx	eax, BYTE PTR -4112[rbp]
	cmp	al, 27
	jne	.L53
	lea	rax, -4112[rbp]
	mov	QWORD PTR -4120[rbp], rax
	add	QWORD PTR -4120[rbp], 1
	mov	rdx, QWORD PTR -4120[rbp]
	mov	rax, QWORD PTR -4136[rbp]
	mov	rsi, rax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR logfd[rip]
	mov	edi, eax
	call	close@PLT
	jmp	.L52
.L53:
	lea	rdi, logger_mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR logfp[rip]
	test	rax, rax
	je	.L54
	mov	rcx, QWORD PTR logfp[rip]
	mov	eax, DWORD PTR -4124[rbp]
	movsx	rdx, eax
	lea	rax, -4112[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
.L54:
	lea	rdi, logger_mutex[rip]
	call	pthread_mutex_unlock@PLT
	jmp	.L55
.L58:
	nop
.L52:
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L57
	call	__stack_chk_fail@PLT
.L57:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	logger_thread, .-logger_thread
	.globl	sighup
	.type	sighup, @function
sighup:
.LFB10:
	.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	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR pwd[rip]
	test	rax, rax
	je	.L60
	call	getuid@PLT
	mov	edi, eax
	call	seteuid@PLT
.L60:
	mov	rax, QWORD PTR grp[rip]
	test	rax, rax
	je	.L61
	call	getgid@PLT
	mov	edi, eax
	call	setegid@PLT
.L61:
	lea	rdi, logger_mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR logfp[rip]
	test	rax, rax
	je	.L62
	lea	rsi, .LC7[rip]
	lea	rdi, logfile[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L62
	mov	rax, QWORD PTR logfp[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR logfp[rip], rax
	mov	rax, QWORD PTR logfp[rip]
	mov	ecx, 1024
	mov	edx, 1
	lea	rsi, linebuf[rip]
	mov	rdi, rax
	call	setvbuf@PLT
.L62:
	mov	rax, QWORD PTR grp[rip]
	test	rax, rax
	je	.L63
	mov	rax, QWORD PTR grp[rip]
	mov	eax, DWORD PTR 16[rax]
	mov	edi, eax
	call	setegid@PLT
.L63:
	mov	rax, QWORD PTR pwd[rip]
	test	rax, rax
	je	.L64
	mov	rax, QWORD PTR pwd[rip]
	mov	eax, DWORD PTR 16[rax]
	mov	edi, eax
	call	seteuid@PLT
.L64:
	lea	rdi, logger_mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, DWORD PTR nohup[rip]
	test	eax, eax
	jne	.L66
	mov	eax, DWORD PTR childpid[rip]
	test	eax, eax
	je	.L66
	mov	eax, DWORD PTR childpid[rip]
	mov	edx, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	kill@PLT
.L66:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	sighup, .-sighup
	.globl	sigfwd
	.type	sigfwd, @function
sigfwd:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR childpid[rip]
	test	eax, eax
	je	.L69
	mov	eax, DWORD PTR childpid[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	kill@PLT
.L69:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	sigfwd, .-sigfwd
	.section	.rodata
.LC17:
	.string	"help"
.LC18:
	.string	"version"
.LC19:
	.string	"foreground"
.LC20:
	.string	"nohup"
.LC21:
	.string	"logfile"
.LC22:
	.string	"pidfile"
.LC23:
	.string	"rundir"
.LC24:
	.string	"user"
.LC25:
	.string	"group"
	.section	.data.rel.local,"aw"
	.align 32
	.type	opts.0, @object
	.size	opts.0, 320
opts.0:
	.quad	.LC17
	.long	0
	.zero	4
	.quad	0
	.long	104
	.zero	4
	.quad	.LC18
	.long	0
	.zero	4
	.quad	0
	.long	118
	.zero	4
	.quad	.LC19
	.long	0
	.zero	4
	.quad	0
	.long	102
	.zero	4
	.quad	.LC20
	.long	0
	.zero	4
	.quad	0
	.long	110
	.zero	4
	.quad	.LC21
	.long	1
	.zero	4
	.quad	0
	.long	108
	.zero	4
	.quad	.LC22
	.long	1
	.zero	4
	.quad	0
	.long	112
	.zero	4
	.quad	.LC23
	.long	1
	.zero	4
	.quad	0
	.long	114
	.zero	4
	.quad	.LC24
	.long	1
	.zero	4
	.quad	0
	.long	117
	.zero	4
	.quad	.LC25
	.long	1
	.zero	4
	.quad	0
	.long	103
	.zero	4
	.quad	0
	.long	0
	.zero	4
	.quad	0
	.long	0
	.zero	4
	.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	"150139856.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Use: god [options] [--] program [arguments]\012Opti"
	.ascii	"ons:\012-h --help           show this help and exit"
	.ascii	"\012-v --version        show version and exit\012-f"
	.ascii	" --foreground     run in foreground\012-n --nohup  "
	.ascii	"        make the program immune to SIGHUP\012-l --l"
	.ascii	"ogfile FILE   write the program's stdout and stderr"
	.ascii	" to FILE\012-p --pidfile FILE   write pid to FILE\012"
	.ascii	"-r --rundir DIR     switch to DIR before executing "
	.ascii	"the program\012-u --user USER      switch to USER b"
	.ascii	"efore executing the program\012-g --group GROUP    "
	.ascii	"switch to GROUP before executing the program\012\012"
	.ascii	"The program's output go to a blackhole if no logfil"
	.ascii	"e is set.\012Log files are recycled on SIGHUP.\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L2
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	usage, .-usage
	.local	nohup
	.comm	nohup,4,4
	.local	logfd
	.comm	logfd,8,4
	.local	childpid
	.comm	childpid,4,4
	.local	logfp
	.comm	logfp,4,4
	.local	pidfp
	.comm	pidfp,4,4
	.local	logfile
	.comm	logfile,4096,4
	.local	pidfile
	.comm	pidfile,4096,4
	.local	linebuf
	.comm	linebuf,1024,4
	.local	pwd
	.comm	pwd,4,4
	.local	grp
	.comm	grp,4,4
	.local	logger_mutex
	.comm	logger_mutex,24,4
	.section	.rodata
	.align	2
.LC1:
	.ascii	"l:p:r:u:g:hvfns\000"
	.align	2
.LC2:
	.ascii	"Go daemon v1.2\000"
	.align	2
.LC3:
	.ascii	"http://github.com/fiorix/go-daemon\000"
	.align	2
.LC4:
	.ascii	"failed to switch to rundir\000"
	.align	2
.LC5:
	.ascii	"failed to switch to user %s: %s\012\000"
	.align	2
.LC6:
	.ascii	"failed to switch to group %s: %s\012\000"
	.align	2
.LC7:
	.ascii	"a\000"
	.align	2
.LC8:
	.ascii	"failed to open logfile\000"
	.align	2
.LC9:
	.ascii	"w+\000"
	.align	2
.LC10:
	.ascii	"failed to open pidfile\000"
	.align	2
.LC11:
	.ascii	"failed to stat %s: %s\012\000"
	.align	2
.LC12:
	.ascii	"permission denied: %s\012\000"
	.align	2
.LC13:
	.ascii	"fork\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4344
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #4352
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-244]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-248]
	ldr	r3, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-236]
	mov	r2, #4096
	mov	r1, #0
	ldr	r0, .L41+4
	bl	memset
	mov	r2, #4096
	mov	r1, #0
	ldr	r0, .L41+8
	bl	memset
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #4096
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4224
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #64
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4160
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #64
	mov	r1, #0
	mov	r0, r3
	bl	memset
.L19:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	str	r3, [sp]
	ldr	r3, .L41+12
	ldr	r2, .L41+16
	ldr	r1, [r1, #-248]
	ldr	r0, [r0, #-244]
	bl	getopt_long
	str	r0, [r4, #-232]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-232]
	cmn	r3, #1
	beq	.L40
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-232]
	sub	r3, r3, #102
	cmp	r3, #16
	ldrls	pc, [pc, r3, asl #2]
	b	.L7
.L9:
	.word	.L16
	.word	.L15
	.word	.L7
	.word	.L7
	.word	.L7
	.word	.L7
	.word	.L14
	.word	.L7
	.word	.L13
	.word	.L7
	.word	.L12
	.word	.L7
	.word	.L11
	.word	.L7
	.word	.L7
	.word	.L10
	.word	.L8
.L8:
	ldr	r0, .L41+20
	bl	puts
	ldr	r0, .L41+24
	bl	puts
	mov	r3, #0
	b	.L37
.L16:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-236]
	b	.L18
.L13:
	ldr	r3, .L41+28
	mov	r2, #1
	str	r2, [r3]
	b	.L18
.L14:
	ldr	r3, .L41+32
	ldr	r3, [r3]
	ldr	r2, .L41+36
	mov	r1, r3
	ldr	r0, .L41+4
	bl	strncpy
	b	.L18
.L12:
	ldr	r3, .L41+32
	ldr	r3, [r3]
	ldr	r2, .L41+36
	mov	r1, r3
	ldr	r0, .L41+8
	bl	strncpy
	b	.L18
.L11:
	ldr	r3, .L41+32
	ldr	r1, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, .L41+36
	mov	r0, r3
	bl	strncpy
	b	.L18
.L10:
	ldr	r3, .L41+32
	ldr	r1, [r3]
	sub	r3, fp, #4224
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #63
	mov	r0, r3
	bl	strncpy
	b	.L18
.L15:
	ldr	r3, .L41+32
	ldr	r1, [r3]
	sub	r3, fp, #4160
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #63
	mov	r0, r3
	bl	strncpy
	b	.L18
.L7:
	bl	usage
.L18:
	b	.L19
.L40:
	nop
	ldr	r3, .L41+40
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-244]
	cmp	r2, r3
	bgt	.L20
	bl	usage
.L20:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-4]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L21
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L21
	ldr	r0, .L41+44
	bl	perror
	mov	r3, #1
	b	.L37
.L21:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-132]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L22
	sub	r3, fp, #4224
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	getpwnam
	mov	r3, r0
	ldr	r2, .L41+48
	str	r3, [r2]
	ldr	r3, .L41+48
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L22
	ldr	r3, .L41+52
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	sub	r2, fp, #4224
	sub	r2, r2, #12
	sub	r2, r2, #4
	ldr	r1, .L41+56
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L37
.L22:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-68]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L23
	sub	r3, fp, #4160
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	getgrnam
	mov	r3, r0
	ldr	r2, .L41+60
	str	r3, [r2]
	ldr	r3, .L41+60
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L23
	ldr	r3, .L41+52
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	sub	r2, fp, #4160
	sub	r2, r2, #12
	sub	r2, r2, #4
	ldr	r1, .L41+64
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L37
.L23:
	ldr	r3, .L41+4
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L24
	ldr	r1, .L41+68
	ldr	r0, .L41+4
	bl	fopen
	mov	r3, r0
	ldr	r2, .L41+72
	str	r3, [r2]
	ldr	r3, .L41+72
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L24
	ldr	r0, .L41+76
	bl	perror
	mov	r3, #1
	b	.L37
.L24:
	ldr	r3, .L41+72
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L25
	ldr	r3, .L41+72
	ldr	r0, [r3]
	mov	r3, #1024
	mov	r2, #1
	ldr	r1, .L41+80
	bl	setvbuf
.L25:
	ldr	r3, .L41+8
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L26
	ldr	r1, .L41+84
	ldr	r0, .L41+8
	bl	fopen
	mov	r3, r0
	ldr	r2, .L41+88
	str	r3, [r2]
	ldr	r3, .L41+88
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L26
	ldr	r0, .L41+92
	bl	perror
	mov	r3, #1
	b	.L37
.L26:
	ldr	r3, .L41+60
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L27
	ldr	r3, .L41+60
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	setegid
	mov	r3, r0
	cmn	r3, #1
	bne	.L27
	ldr	r3, .L41+52
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	sub	r2, fp, #4160
	sub	r2, r2, #12
	sub	r2, r2, #4
	ldr	r1, .L41+64
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L37
.L27:
	ldr	r3, .L41+48
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L28
	ldr	r3, .L41+48
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	seteuid
	mov	r3, r0
	cmn	r3, #1
	bne	.L28
	ldr	r3, .L41+52
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	sub	r2, fp, #4224
	sub	r2, r2, #12
	sub	r2, r2, #4
	ldr	r1, .L41+56
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L37
.L28:
	ldr	r3, .L41+40
	ldr	r3, [r3]
	lsl	r3, r3, #2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-248]
	add	r3, r2, r3
	ldr	r2, [r3]
	sub	r3, fp, #4288
	sub	r3, r3, #12
	sub	r3, r3, #32
	mov	r1, r3
	mov	r0, r2
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	bge	.L29
	ldr	r3, .L41+52
	ldr	r4, [r3]
	ldr	r3, .L41+40
	ldr	r3, [r3]
	lsl	r3, r3, #2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-248]
	add	r3, r2, r3
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L41+96
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L37
.L29:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-208]
	and	r3, r3, #73
	cmp	r3, #0
	bne	.L30
	ldr	r3, .L41+52
	ldr	r0, [r3]
	ldr	r3, .L41+40
	ldr	r3, [r3]
	lsl	r3, r3, #2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-248]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L41+100
	bl	fprintf
	mov	r3, #1
	b	.L37
.L30:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-236]
	cmp	r3, #0
	beq	.L31
	ldr	r3, .L41+40
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r1, [r2, #-248]
	mov	r0, r3
	bl	daemon_main
	b	.L32
.L31:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	bl	fork
	mov	r3, r0
	str	r3, [r4, #-228]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-228]
	cmp	r3, #0
	beq	.L33
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [r3, #-228]
	bl	waitpid
	b	.L32
.L33:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-228]
	cmp	r3, #0
	bne	.L34
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	bl	fork
	mov	r3, r0
	str	r3, [r4, #-228]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-228]
	cmp	r3, #0
	beq	.L35
	mov	r0, #0
	bl	exit
.L35:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-228]
	cmp	r3, #0
	bne	.L36
	mov	r0, #0
	bl	close
	mov	r0, #1
	bl	close
	mov	r0, #2
	bl	close
	ldr	r3, .L41+40
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r1, [r2, #-248]
	mov	r0, r3
	bl	daemon_main
	b	.L32
.L36:
	ldr	r0, .L41+104
	bl	perror
	mov	r0, #1
	bl	exit
.L34:
	ldr	r0, .L41+104
	bl	perror
	mov	r0, #1
	bl	exit
.L32:
	mov	r3, #0
.L37:
	ldr	r2, .L41
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L38
	bl	__stack_chk_fail
.L38:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC14
	.word	logfile
	.word	pidfile
	.word	opts.7071
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	nohup
	.word	optarg
	.word	4095
	.word	optind
	.word	.LC4
	.word	pwd
	.word	stderr
	.word	.LC5
	.word	grp
	.word	.LC6
	.word	.LC7
	.word	logfp
	.word	.LC8
	.word	linebuf
	.word	.LC9
	.word	pidfp
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.section	.rodata
	.align	2
.LC15:
	.ascii	"%d\012\000"
	.align	2
.LC16:
	.ascii	"\033%s\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	daemon_main
	.syntax unified
	.arm
	.fpu softvfp
	.type	daemon_main, %function
daemon_main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L54
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L54+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L44
	ldr	r3, .L54+4
	ldr	r4, [r3]
	bl	getpid
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L54+8
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L54+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
.L44:
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L45
.L47:
	ldr	r1, .L54+12
	ldr	r0, [fp, #-20]
	bl	signal
	mov	r3, r0
	cmp	r3, #1
	bne	.L46
	mov	r1, #1
	ldr	r0, [fp, #-20]
	bl	signal
.L46:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L45:
	ldr	r3, [fp, #-20]
	cmp	r3, #32
	ble	.L47
	ldr	r1, .L54+16
	mov	r0, #1
	bl	signal
	ldr	r0, .L54+20
	bl	pipe
	bl	fork
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L54+24
	str	r2, [r3]
	ldr	r3, .L54+24
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L48
	ldr	r3, .L54+20
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r0, fp, #24
	ldr	r2, .L54+28
	mov	r1, #0
	bl	pthread_create
	ldr	r3, .L54+24
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	waitpid
	ldr	r3, [fp, #-24]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	b	.L49
.L48:
	ldr	r3, .L54+24
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L50
	ldr	r3, .L54+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r0, #0
	bl	close
	mov	r0, #1
	bl	close
	mov	r0, #2
	bl	close
	ldr	r3, .L54+20
	ldr	r3, [r3, #4]
	mov	r1, #1
	mov	r0, r3
	bl	dup2
	ldr	r3, .L54+20
	ldr	r3, [r3, #4]
	mov	r1, #2
	mov	r0, r3
	bl	dup2
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	mov	r1, r3
	bl	execvp
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L54+32
	bl	printf
	ldr	r3, .L54+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L54+20
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	mov	r0, #1
	bl	close
	mov	r0, #2
	bl	close
	b	.L49
.L50:
	ldr	r0, .L54+40
	bl	perror
	mov	r0, #1
	bl	exit
.L49:
	ldr	r3, .L54+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L53
	ldr	r0, .L54+44
	bl	unlink
.L53:
	nop
	ldr	r3, .L54
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L52
	bl	__stack_chk_fail
.L52:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L55:
	.align	2
.L54:
	.word	.LC17
	.word	pidfp
	.word	.LC15
	.word	sigfwd
	.word	sighup
	.word	logfd
	.word	childpid
	.word	logger_thread
	.word	.LC16
	.word	stdout
	.word	.LC13
	.word	pidfile
	.size	daemon_main, .-daemon_main
	.section	.rodata
	.align	2
.LC18:
	.ascii	"%s: %s\012\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	logger_thread
	.syntax unified
	.arm
	.fpu softvfp
	.type	logger_thread, %function
logger_thread:
	@ args = 0, pretend = 0, frame = 4120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-20]
	ldr	r3, .L65
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-16]
.L61:
	ldr	r3, .L65+4
	ldr	r0, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #4096
	mov	r1, r3
	bl	read
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	ble	.L64
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	add	r3, r2, r3
	sub	r3, r3, #4
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmp	r3, #0
	bne	.L59
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-16]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-4]	@ zero_extendqisi2
	cmp	r3, #27
	bne	.L59
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	str	r3, [r2, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	add	r3, r3, #1
	str	r3, [r2, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-8]
	ldr	r1, [r3, #-20]
	ldr	r0, .L65+8
	bl	printf
	ldr	r3, .L65+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	b	.L58
.L59:
	ldr	r0, .L65+12
	bl	pthread_mutex_lock
	ldr	r3, .L65+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L60
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-12]
	ldr	r3, .L65+16
	ldr	r3, [r3]
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #4
	mov	r1, #1
	bl	fwrite
.L60:
	ldr	r0, .L65+12
	bl	pthread_mutex_unlock
	b	.L61
.L64:
	nop
.L58:
	mov	r3, #0
	ldr	r2, .L65
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L63
	bl	__stack_chk_fail
.L63:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L66:
	.align	2
.L65:
	.word	.LC19
	.word	logfd
	.word	.LC18
	.word	logger_mutex
	.word	logfp
	.size	logger_thread, .-logger_thread
	.align	2
	.global	sighup
	.syntax unified
	.arm
	.fpu softvfp
	.type	sighup, %function
sighup:
	@ 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]
	ldr	r3, .L75
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L68
	bl	getuid
	mov	r3, r0
	mov	r0, r3
	bl	seteuid
.L68:
	ldr	r3, .L75+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L69
	bl	getgid
	mov	r3, r0
	mov	r0, r3
	bl	setegid
.L69:
	ldr	r0, .L75+8
	bl	pthread_mutex_lock
	ldr	r3, .L75+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L70
	ldr	r1, .L75+16
	ldr	r0, .L75+20
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L70
	ldr	r3, .L75+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r2, .L75+12
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, .L75+12
	ldr	r0, [r3]
	mov	r3, #1024
	mov	r2, #1
	ldr	r1, .L75+24
	bl	setvbuf
.L70:
	ldr	r3, .L75+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L71
	ldr	r3, .L75+4
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	setegid
.L71:
	ldr	r3, .L75
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L72
	ldr	r3, .L75
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	seteuid
.L72:
	ldr	r0, .L75+8
	bl	pthread_mutex_unlock
	ldr	r3, .L75+28
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L74
	ldr	r3, .L75+32
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L74
	ldr	r3, .L75+32
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	kill
.L74:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L76:
	.align	2
.L75:
	.word	pwd
	.word	grp
	.word	logger_mutex
	.word	logfp
	.word	.LC7
	.word	logfile
	.word	linebuf
	.word	nohup
	.word	childpid
	.size	sighup, .-sighup
	.align	2
	.global	sigfwd
	.syntax unified
	.arm
	.fpu softvfp
	.type	sigfwd, %function
sigfwd:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, .L80
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L79
	ldr	r3, .L80
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	kill
.L79:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L81:
	.align	2
.L80:
	.word	childpid
	.size	sigfwd, .-sigfwd
	.section	.rodata
	.align	2
.LC20:
	.ascii	"help\000"
	.align	2
.LC21:
	.ascii	"version\000"
	.align	2
.LC22:
	.ascii	"foreground\000"
	.align	2
.LC23:
	.ascii	"nohup\000"
	.align	2
.LC24:
	.ascii	"logfile\000"
	.align	2
.LC25:
	.ascii	"pidfile\000"
	.align	2
.LC26:
	.ascii	"rundir\000"
	.align	2
.LC27:
	.ascii	"user\000"
	.align	2
.LC28:
	.ascii	"group\000"
	.data
	.align	2
	.type	opts.7071, %object
	.size	opts.7071, 160
opts.7071:
	.word	.LC20
	.word	0
	.word	0
	.word	104
	.word	.LC21
	.word	0
	.word	0
	.word	118
	.word	.LC22
	.word	0
	.word	0
	.word	102
	.word	.LC23
	.word	0
	.word	0
	.word	110
	.word	.LC24
	.word	1
	.word	0
	.word	108
	.word	.LC25
	.word	1
	.word	0
	.word	112
	.word	.LC26
	.word	1
	.word	0
	.word	114
	.word	.LC27
	.word	1
	.word	0
	.word	117
	.word	.LC28
	.word	1
	.word	0
	.word	103
	.word	0
	.word	0
	.word	0
	.word	0
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
