	.file	"869686.c"
	.intel_syntax noprefix
	.text
	.globl	test_file
	.section	.rodata
.LC0:
	.string	"/tmp/test_lock"
	.section	.data.rel.local,"aw"
	.align 8
	.type	test_file, @object
	.size	test_file, 8
test_file:
	.quad	.LC0
	.section	.rodata
.LC1:
	.string	"A"
	.align 8
.LC2:
	.string	"Unable to open %s for read/write\n"
.LC3:
	.string	"Process %d locking file\n"
.LC4:
	.string	"Failed to lock region 1\n"
.LC5:
	.string	"Failed to lock region 2\n"
.LC6:
	.string	"Process %d closing file\n"
	.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, 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC1[rip]
	mov	QWORD PTR -88[rbp], rax
	mov	rax, QWORD PTR test_file[rip]
	mov	edx, 438
	mov	esi, 66
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -96[rbp], eax
	cmp	DWORD PTR -96[rbp], 0
	jne	.L2
	mov	rdx, QWORD PTR test_file[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	DWORD PTR -100[rbp], 0
	jmp	.L3
.L4:
	mov	rcx, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR -96[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	add	DWORD PTR -100[rbp], 1
.L3:
	cmp	DWORD PTR -100[rbp], 99
	jle	.L4
	mov	WORD PTR -80[rbp], 0
	mov	WORD PTR -78[rbp], 0
	mov	QWORD PTR -72[rbp], 10
	mov	QWORD PTR -64[rbp], 20
	mov	WORD PTR -48[rbp], 1
	mov	WORD PTR -46[rbp], 0
	mov	QWORD PTR -40[rbp], 40
	mov	QWORD PTR -32[rbp], 10
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -96[rbp]
	mov	esi, 6
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], -1
	jne	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
.L5:
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -96[rbp]
	mov	esi, 6
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], -1
	jne	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
.L6:
	mov	edi, 60
	call	sleep@PLT
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.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	"869686.c"
	.text
	.global	test_file
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/tmp/test_lock\000"
	.data
	.align	2
	.type	test_file, %object
	.size	test_file, 4
test_file:
	.word	.LC0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"A\000"
	.align	2
.LC2:
	.ascii	"Unable to open %s for read/write\012\000"
	.align	2
.LC3:
	.ascii	"Process %d locking file\012\000"
	.align	2
.LC4:
	.ascii	"Failed to lock region 1\012\000"
	.align	2
.LC5:
	.ascii	"Failed to lock region 2\012\000"
	.align	2
.LC6:
	.ascii	"Process %d closing file\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L8+4
	str	r3, [fp, #-52]
	ldr	r3, .L8+8
	ldr	r3, [r3]
	ldr	r2, .L8+12
	mov	r1, #66
	mov	r0, r3
	bl	open
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L8+16
	ldr	r3, [r3]
	ldr	r2, .L8+8
	ldr	r2, [r2]
	ldr	r1, .L8+20
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L3
.L4:
	mov	r2, #1
	ldr	r1, [fp, #-52]
	ldr	r0, [fp, #-48]
	bl	write
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L3:
	ldr	r3, [fp, #-56]
	cmp	r3, #99
	ble	.L4
	mov	r3, #0
	strh	r3, [fp, #-40]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-38]	@ movhi
	mov	r3, #10
	str	r3, [fp, #-36]
	mov	r3, #20
	str	r3, [fp, #-32]
	mov	r3, #1
	strh	r3, [fp, #-24]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-22]	@ movhi
	mov	r3, #40
	str	r3, [fp, #-20]
	mov	r3, #10
	str	r3, [fp, #-16]
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L8+24
	bl	printf
	sub	r3, fp, #40
	mov	r2, r3
	mov	r1, #6
	ldr	r0, [fp, #-48]
	bl	fcntl
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	bne	.L5
	ldr	r3, .L8+16
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L8+28
	bl	fwrite
.L5:
	sub	r3, fp, #24
	mov	r2, r3
	mov	r1, #6
	ldr	r0, [fp, #-48]
	bl	fcntl
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	bne	.L6
	ldr	r3, .L8+16
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L8+32
	bl	fwrite
.L6:
	mov	r0, #60
	bl	sleep
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L8+36
	bl	printf
	ldr	r0, [fp, #-48]
	bl	close
	mov	r0, #0
	bl	exit
.L9:
	.align	2
.L8:
	.word	.LC7
	.word	.LC1
	.word	test_file
	.word	438
	.word	stderr
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
