	.file	"7951057.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"cfp:"
.LC1:
	.string	"w"
.LC2:
	.string	"pidfile ``%s''"
.LC3:
	.string	"daemon failed"
.LC4:
	.string	"%ld\n"
.LC5:
	.string	"%s"
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -28[rbp], 1
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -32[rbp], eax
	mov	QWORD PTR -8[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	jmp	.L2
.L7:
	cmp	DWORD PTR -24[rbp], 112
	je	.L3
	cmp	DWORD PTR -24[rbp], 112
	jg	.L4
	cmp	DWORD PTR -24[rbp], 99
	je	.L5
	cmp	DWORD PTR -24[rbp], 102
	je	.L6
	jmp	.L4
.L5:
	mov	DWORD PTR -32[rbp], 0
	jmp	.L2
.L6:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L2
.L3:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L2
.L4:
	call	usage
.L2:
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	lea	rdx, .LC0[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], -1
	jne	.L7
	mov	eax, DWORD PTR optind[rip]
	sub	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR optind[rip]
	cdqe
	sal	rax, 3
	add	QWORD PTR -48[rbp], rax
	cmp	DWORD PTR -36[rbp], 0
	jne	.L8
	call	usage
.L8:
	cmp	QWORD PTR -8[rbp], 0
	je	.L9
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L9
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, rax
	lea	rsi, .LC2[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L9:
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, edx
	mov	edi, eax
	call	daemon@PLT
	cmp	eax, -1
	jne	.L10
	lea	rsi, .LC3[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L10:
	cmp	QWORD PTR -8[rbp], 0
	je	.L11
	call	getpid@PLT
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L11:
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -20[rbp], eax
	cmp	QWORD PTR -8[rbp], 0
	je	.L12
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	unlink@PLT
.L12:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	mov	rcx, rdx
	lea	rdx, .LC5[rip]
	mov	esi, eax
	mov	edi, 1
	mov	eax, 0
	call	errc@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC6:
	.string	"usage: daemon [-cf] [-p pidfile] command arguments ...\n"
	.text
	.type	usage, @function
usage:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 55
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	usage, .-usage
	.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	"7951057.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"cfp:\000"
	.align	2
.LC1:
	.ascii	"w\000"
	.align	2
.LC2:
	.ascii	"pidfile ``%s''\000"
	.align	2
.LC3:
	.ascii	"daemon failed\000"
	.align	2
.LC4:
	.ascii	"%ld\012\000"
	.align	2
.LC5:
	.ascii	"%s\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	mov	r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L2
.L7:
	ldr	r3, [fp, #-12]
	cmp	r3, #112
	beq	.L3
	ldr	r3, [fp, #-12]
	cmp	r3, #112
	bgt	.L4
	ldr	r3, [fp, #-12]
	cmp	r3, #99
	beq	.L5
	ldr	r3, [fp, #-12]
	cmp	r3, #102
	beq	.L6
	b	.L4
.L5:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L2
.L6:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L2
.L3:
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L2
.L4:
	bl	usage
.L2:
	ldr	r2, .L14+4
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	getopt
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L7
	ldr	r3, .L14+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	sub	r3, r2, r3
	str	r3, [fp, #-32]
	ldr	r3, .L14+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L8
	bl	usage
.L8:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L9
	ldr	r1, .L14+12
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L9
	ldr	r2, [fp, #-16]
	ldr	r1, .L14+16
	mov	r0, #1
	bl	err
.L9:
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-28]
	bl	daemon
	mov	r3, r0
	cmn	r3, #1
	bne	.L10
	ldr	r1, .L14+20
	mov	r0, #1
	bl	err
.L10:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L11
	bl	getpid
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L14+24
	ldr	r0, [fp, #-20]
	bl	fprintf
	ldr	r0, [fp, #-20]
	bl	fclose
.L11:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	execvp
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L12
	ldr	r0, [fp, #-16]
	bl	unlink
.L12:
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	ldr	r2, .L14+28
	ldr	r1, [fp, #-8]
	mov	r0, #1
	bl	errc
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	optarg
	.word	.LC0
	.word	optind
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.section	.rodata
	.align	2
.LC6:
	.ascii	"usage: daemon [-cf] [-p pidfile] command arguments "
	.ascii	"...\012\000"
	.text
	.align	2
	.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	r3, .L17
	ldr	r3, [r3]
	mov	r2, #55
	mov	r1, #1
	ldr	r0, .L17+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L18:
	.align	2
.L17:
	.word	stderr
	.word	.LC6
	.size	usage, .-usage
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
