	.file	"561705.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/var/run/daemon.pid"
.LC1:
	.string	"open file error"
.LC2:
	.string	"lock file error"
.LC3:
	.string	"%ld"
	.text
	.globl	already_running
	.type	already_running, @function
already_running:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 432
	mov	esi, 66
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jns	.L2
	lea	rsi, .LC1[rip]
	mov	edi, 3
	mov	eax, 0
	call	syslog@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	lockfile@PLT
	test	eax, eax
	jns	.L3
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 13
	je	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	jne	.L5
.L4:
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 1
	jmp	.L7
.L5:
	lea	rsi, .LC2[rip]
	mov	edi, 3
	mov	eax, 0
	call	syslog@PLT
	mov	edi, 0
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, 0
	mov	edi, eax
	call	ftruncate@PLT
	call	getpid@PLT
	movsx	rdx, eax
	lea	rax, -32[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, 0
.L7:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	already_running, .-already_running
	.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	"561705.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/var/run/daemon.pid\000"
	.align	2
.LC1:
	.ascii	"open file error\000"
	.align	2
.LC2:
	.ascii	"lock file error\000"
	.align	2
.LC3:
	.ascii	"%ld\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	already_running
	.syntax unified
	.arm
	.fpu softvfp
	.type	already_running, %function
already_running:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #432
	mov	r1, #66
	ldr	r0, .L9+4
	bl	open
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L2
	ldr	r1, .L9+8
	mov	r0, #3
	bl	syslog
	mov	r0, #1
	bl	exit
.L2:
	ldr	r0, [fp, #-28]
	bl	lockfile
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #13
	beq	.L4
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	bne	.L5
.L4:
	ldr	r0, [fp, #-28]
	bl	close
	mov	r3, #1
	b	.L7
.L5:
	ldr	r1, .L9+12
	mov	r0, #3
	bl	syslog
	mov	r0, #0
	bl	exit
.L3:
	mov	r1, #0
	ldr	r0, [fp, #-28]
	bl	ftruncate
	bl	getpid
	mov	r2, r0
	sub	r3, fp, #24
	ldr	r1, .L9+16
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #24
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	write
	mov	r3, #0
.L7:
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	already_running, .-already_running
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
