	.file	"198581117.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s <filename>\n"
.LC1:
	.string	"Error opening\n"
.LC2:
	.string	"File already claimed by (%d)\n"
.LC3:
	.string	"Press any key to remove lock"
.LC4:
	.string	"Error unlocking\n"
.LC5:
	.string	"Unlocked"
	.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, 336
	mov	DWORD PTR -324[rbp], edi
	mov	QWORD PTR -336[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -324[rbp], 1
	jne	.L2
	mov	rax, QWORD PTR -336[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L8
.L2:
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -308[rbp], eax
	cmp	DWORD PTR -308[rbp], -1
	jne	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L8
.L4:
	mov	WORD PTR -304[rbp], 1
	mov	WORD PTR -302[rbp], 0
	mov	QWORD PTR -296[rbp], 0
	mov	QWORD PTR -288[rbp], 100
	lea	rdx, -304[rbp]
	mov	eax, DWORD PTR -308[rbp]
	mov	esi, 6
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	test	eax, eax
	jne	.L5
	mov	edi, 20
	call	sleep@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	call	getchar@PLT
	lea	rdx, -304[rbp]
	mov	eax, DWORD PTR -308[rbp]
	mov	esi, 2
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	cmp	eax, -1
	jne	.L7
	jmp	.L10
.L5:
	lea	rdx, -304[rbp]
	mov	eax, DWORD PTR -308[rbp]
	mov	esi, 5
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	eax, DWORD PTR -280[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L8
.L10:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L8
.L7:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -308[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L8:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"198581117.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s <filename>\012\000"
	.align	2
.LC1:
	.ascii	"Error opening\012\000"
	.align	2
.LC2:
	.ascii	"File already claimed by (%d)\012\000"
	.align	2
.LC3:
	.ascii	"Press any key to remove lock\000"
	.align	2
.LC4:
	.ascii	"Error unlocking\012\000"
	.align	2
.LC5:
	.ascii	"Unlocked\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #288
	str	r0, [fp, #-288]
	str	r1, [fp, #-292]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-288]
	cmp	r3, #1
	bne	.L2
	ldr	r3, [fp, #-292]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+4
	bl	printf
	mov	r3, #1
	b	.L8
.L2:
	ldr	r3, [fp, #-292]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-284]
	ldr	r3, [fp, #-284]
	cmn	r3, #1
	bne	.L4
	ldr	r3, .L11+8
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L11+12
	bl	fwrite
	mov	r3, #1
	b	.L8
.L4:
	sub	r3, fp, #4
	sub	r3, r3, #276
	mov	r2, #1
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #4
	sub	r3, r3, #276
	mov	r2, #0
	strh	r2, [r3, #2]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-276]
	mov	r3, #100
	str	r3, [fp, #-272]
	sub	r3, fp, #280
	mov	r2, r3
	mov	r1, #6
	ldr	r0, [fp, #-284]
	bl	fcntl
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	mov	r0, #20
	bl	sleep
	ldr	r0, .L11+16
	bl	puts
	bl	getchar
	sub	r3, fp, #280
	mov	r2, r3
	mov	r1, #2
	ldr	r0, [fp, #-284]
	bl	fcntl
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	b	.L10
.L5:
	sub	r3, fp, #280
	mov	r2, r3
	mov	r1, #5
	ldr	r0, [fp, #-284]
	bl	fcntl
	ldr	r3, [fp, #-268]
	mov	r1, r3
	ldr	r0, .L11+20
	bl	printf
	mov	r3, #1
	b	.L8
.L10:
	ldr	r3, .L11+8
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L11+24
	bl	fwrite
	mov	r3, #1
	b	.L8
.L7:
	ldr	r0, .L11+28
	bl	puts
	ldr	r0, [fp, #-284]
	bl	close
	mov	r3, #0
.L8:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC6
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC3
	.word	.LC2
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
