	.file	"499818.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/"
.LC1:
	.string	"firstdaemon"
	.text
	.type	skeleton_daemon, @function
skeleton_daemon:
.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, 16
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L2
	mov	edi, 1
	call	exit@PLT
.L2:
	cmp	DWORD PTR -4[rbp], 0
	jle	.L3
	mov	edi, 0
	call	exit@PLT
.L3:
	call	setsid@PLT
	test	eax, eax
	jns	.L4
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	esi, 1
	mov	edi, 17
	call	signal@PLT
	mov	esi, 1
	mov	edi, 1
	call	signal@PLT
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L5
	mov	edi, 1
	call	exit@PLT
.L5:
	cmp	DWORD PTR -4[rbp], 0
	jle	.L6
	mov	edi, 0
	call	exit@PLT
.L6:
	mov	edi, 0
	call	umask@PLT
	lea	rdi, .LC0[rip]
	call	chdir@PLT
	mov	edi, 4
	call	sysconf@PLT
	mov	DWORD PTR -8[rbp], eax
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	close@PLT
	sub	DWORD PTR -8[rbp], 1
.L7:
	cmp	DWORD PTR -8[rbp], 0
	jns	.L8
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	openlog@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	skeleton_daemon, .-skeleton_daemon
	.section	.rodata
.LC2:
	.string	"First daemon started."
.LC3:
	.string	"First daemon terminated."
	.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
	mov	eax, 0
	call	skeleton_daemon
	lea	rsi, .LC2[rip]
	mov	edi, 5
	mov	eax, 0
	call	syslog@PLT
	mov	edi, 20
	call	sleep@PLT
	nop
	lea	rsi, .LC3[rip]
	mov	edi, 5
	mov	eax, 0
	call	syslog@PLT
	call	closelog@PLT
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.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	"499818.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/\000"
	.align	2
.LC1:
	.ascii	"firstdaemon\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	skeleton_daemon, %function
skeleton_daemon:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L2
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L3
	mov	r0, #0
	bl	exit
.L3:
	bl	setsid
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	mov	r0, #1
	bl	exit
.L4:
	mov	r1, #1
	mov	r0, #17
	bl	signal
	mov	r1, #1
	mov	r0, #1
	bl	signal
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L5
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L6
	mov	r0, #0
	bl	exit
.L6:
	mov	r0, #0
	bl	umask
	ldr	r0, .L9
	bl	chdir
	mov	r0, #4
	bl	sysconf
	str	r0, [fp, #-12]
	b	.L7
.L8:
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L7:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L8
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L9+4
	bl	openlog
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	.LC1
	.size	skeleton_daemon, .-skeleton_daemon
	.section	.rodata
	.align	2
.LC2:
	.ascii	"First daemon started.\000"
	.align	2
.LC3:
	.ascii	"First daemon terminated.\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	skeleton_daemon
	ldr	r1, .L13
	mov	r0, #5
	bl	syslog
	mov	r0, #20
	bl	sleep
	nop
	ldr	r1, .L13+4
	mov	r0, #5
	bl	syslog
	bl	closelog
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
