	.file	"235439.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: ./lab2.2.16 (filename)"
.LC1:
	.string	"Value of errno: %d\n"
.LC2:
	.string	"String related to errno: %s\n"
.LC3:
	.string	"Error %d: %s\n"
	.align 8
.LC4:
	.string	"Error in localtime() function!\n"
.LC5:
	.string	"%H:%M"
	.align 8
.LC6:
	.string	"Error in strftime() function!\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 88
	.cfi_offset 3, -24
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -72[rbp], 0
	cmp	DWORD PTR -84[rbp], 2
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 438
	mov	esi, 577
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jns	.L4
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -76[rbp]
	mov	edx, 0
	mov	esi, 2
	mov	edi, eax
	call	lockf@PLT
	lea	rax, -64[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	test	eax, eax
	je	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -76[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lockf@PLT
	mov	eax, 0
	jmp	.L10
.L5:
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	localtime@PLT
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	jne	.L7
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	jmp	.L8
.L7:
	mov	rdx, QWORD PTR -72[rbp]
	lea	rax, -34[rbp]
	mov	rcx, rdx
	lea	rdx, .LC5[rip]
	mov	esi, 10
	mov	rdi, rax
	call	strftime@PLT
	test	rax, rax
	jne	.L9
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	jmp	.L8
.L9:
	lea	rax, -34[rbp]
	mov	rdi, rax
	call	puts@PLT
.L8:
	mov	edi, 30
	call	sleep@PLT
	mov	eax, DWORD PTR -76[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lockf@PLT
.L3:
	mov	eax, 0
.L10:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"235439.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: ./lab2.2.16 (filename)\000"
	.align	2
.LC1:
	.ascii	"Value of errno: %d\012\000"
	.align	2
.LC2:
	.ascii	"String related to errno: %s\012\000"
	.align	2
.LC3:
	.ascii	"Error %d: %s\012\000"
	.align	2
.LC4:
	.ascii	"Error in localtime() function!\012\000"
	.align	2
.LC5:
	.ascii	"%H:%M\000"
	.align	2
.LC6:
	.ascii	"Error in strftime() function!\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 = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #40
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	beq	.L2
	ldr	r0, .L12+4
	bl	puts
	b	.L3
.L2:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, .L12+8
	ldr	r1, .L12+12
	mov	r0, r3
	bl	open
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bge	.L4
	ldr	r3, .L12+16
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L12+20
	mov	r0, r4
	bl	fprintf
	ldr	r3, .L12+16
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L12+24
	mov	r0, r4
	bl	fprintf
	b	.L3
.L4:
	mov	r2, #0
	mov	r1, #2
	ldr	r0, [fp, #-40]
	bl	lockf
	sub	r3, fp, #36
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L12+16
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L12+28
	mov	r0, r4
	bl	fprintf
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-40]
	bl	lockf
	mov	r3, #0
	b	.L10
.L5:
	sub	r3, fp, #36
	mov	r0, r3
	bl	localtime
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L7
	ldr	r3, .L12+16
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L12+32
	bl	fwrite
	b	.L8
.L7:
	sub	r0, fp, #28
	ldr	r3, [fp, #-44]
	ldr	r2, .L12+36
	mov	r1, #10
	bl	strftime
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	ldr	r3, .L12+16
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L12+40
	bl	fwrite
	b	.L8
.L9:
	sub	r3, fp, #28
	mov	r0, r3
	bl	puts
.L8:
	mov	r0, #30
	bl	sleep
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-40]
	bl	lockf
.L3:
	mov	r3, #0
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC7
	.word	.LC0
	.word	438
	.word	577
	.word	stderr
	.word	.LC1
	.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
