	.file	"719550.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Number of arguments %d\r\n"
	.align 8
.LC1:
	.string	"ERROR: the file requires two arguments\r"
	.align 8
.LC2:
	.string	"The arguments should be in the following order\r"
.LC3:
	.string	"1. The full path to a file \r"
	.align 8
.LC4:
	.string	"2. Text string that is to written to the file\r"
	.align 8
.LC5:
	.string	"Invalid number of arguments: %d"
.LC6:
	.string	"w+"
	.align 8
.LC7:
	.string	"Error: file not opened properly"
.LC8:
	.string	"Writing %s to %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	edx, 8
	mov	esi, 0
	mov	edi, 0
	call	openlog@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -36[rbp], 3
	je	.L2
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, 1
	mov	edx, eax
	lea	rsi, .LC5[rip]
	mov	edi, 3
	mov	eax, 0
	call	syslog@PLT
	mov	eax, 1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L4
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	lea	rsi, .LC8[rip]
	mov	edi, 7
	mov	eax, 0
	call	syslog@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	call	closelog@PLT
	mov	eax, 0
.L3:
	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	"719550.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Number of arguments %d\015\012\000"
	.align	2
.LC1:
	.ascii	"ERROR: the file requires two arguments\015\000"
	.align	2
.LC2:
	.ascii	"The arguments should be in the following order\015\000"
	.align	2
.LC3:
	.ascii	"1. The full path to a file \015\000"
	.align	2
.LC4:
	.ascii	"2. Text string that is to written to the file\015\000"
	.align	2
.LC5:
	.ascii	"Invalid number of arguments: %d\000"
	.align	2
.LC6:
	.ascii	"w+\000"
	.align	2
.LC7:
	.ascii	"Error: file not opened properly\000"
	.align	2
.LC8:
	.ascii	"Writing %s to %s\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r2, #8
	mov	r1, #0
	mov	r0, #0
	bl	openlog
	ldr	r1, [fp, #-24]
	ldr	r0, .L5
	bl	printf
	ldr	r3, [fp, #-24]
	cmp	r3, #3
	beq	.L2
	ldr	r0, .L5+4
	bl	puts
	ldr	r0, .L5+8
	bl	puts
	ldr	r0, .L5+12
	bl	puts
	ldr	r0, .L5+16
	bl	puts
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r1, .L5+20
	mov	r0, #3
	bl	syslog
	mov	r3, #1
	b	.L3
.L2:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-12]
	ldr	r1, .L5+24
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L5+28
	bl	printf
	mov	r0, #1
	bl	exit
.L4:
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	fputs
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	ldr	r1, .L5+32
	mov	r0, #7
	bl	syslog
	ldr	r0, [fp, #-8]
	bl	fclose
	bl	closelog
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
