	.file	"40209.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"-a"
.LC1:
	.string	"%s: unable to allocate: %s\n"
.LC2:
	.string	"%s: %s: %s\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
	push	rbx
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 88
	.cfi_offset 3, -24
	mov	DWORD PTR -4180[rbp], edi
	mov	QWORD PTR -4192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -4192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L2
	mov	DWORD PTR -4160[rbp], 1024
	mov	eax, DWORD PTR -4180[rbp]
	sub	eax, 1
	mov	DWORD PTR -4136[rbp], eax
	mov	DWORD PTR -4164[rbp], 2
	jmp	.L3
.L2:
	mov	DWORD PTR -4160[rbp], 512
	mov	eax, DWORD PTR -4180[rbp]
	mov	DWORD PTR -4136[rbp], eax
	mov	DWORD PTR -4164[rbp], 1
.L3:
	mov	eax, DWORD PTR -4136[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -4144[rbp], rax
	mov	rax, QWORD PTR -4144[rbp]
	test	rax, rax
	jne	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -4192[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L16
.L4:
	mov	rax, QWORD PTR -4144[rbp]
	mov	DWORD PTR [rax], 1
	jmp	.L6
.L8:
	mov	eax, DWORD PTR -4160[rbp]
	or	eax, 65
	mov	ecx, eax
	mov	eax, DWORD PTR -4164[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -4192[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, QWORD PTR -4144[rbp]
	mov	edx, DWORD PTR -4164[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	lea	rbx, [rsi+rdx]
	mov	edx, 438
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR [rbx], eax
	mov	rdx, QWORD PTR -4144[rbp]
	mov	eax, DWORD PTR -4164[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L7
	mov	eax, 1
	jmp	.L16
.L7:
	add	DWORD PTR -4164[rbp], 1
.L6:
	mov	eax, DWORD PTR -4164[rbp]
	cmp	eax, DWORD PTR -4180[rbp]
	jl	.L8
	jmp	.L9
.L13:
	mov	DWORD PTR -4164[rbp], 0
	jmp	.L10
.L12:
	mov	rdx, QWORD PTR -4152[rbp]
	mov	rcx, QWORD PTR -4144[rbp]
	mov	eax, DWORD PTR -4164[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	lea	rcx, -4128[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	QWORD PTR -4152[rbp], rax
	je	.L11
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	eax, DWORD PTR -4164[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -4192[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -4192[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rsi
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L16
.L11:
	add	DWORD PTR -4164[rbp], 1
.L10:
	mov	eax, DWORD PTR -4164[rbp]
	cmp	eax, DWORD PTR -4180[rbp]
	jl	.L12
.L9:
	lea	rax, -4128[rbp]
	mov	edx, 4096
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	mov	QWORD PTR -4152[rbp], rax
	cmp	QWORD PTR -4152[rbp], 0
	jg	.L13
	mov	DWORD PTR -4156[rbp], 0
	mov	DWORD PTR -4164[rbp], 1
	jmp	.L14
.L15:
	mov	rdx, QWORD PTR -4144[rbp]
	mov	eax, DWORD PTR -4164[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	close@PLT
	add	DWORD PTR -4164[rbp], 1
.L14:
	mov	eax, DWORD PTR -4164[rbp]
	cmp	eax, DWORD PTR -4180[rbp]
	jl	.L15
	mov	rax, QWORD PTR -4144[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -4156[rbp]
.L16:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	mov	rbx, QWORD PTR -8[rbp]
	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	"40209.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"-a\000"
	.align	2
.LC1:
	.ascii	"%s: unable to allocate: %s\012\000"
	.align	2
.LC2:
	.ascii	"%s: %s: %s\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #4096
	sub	sp, sp, #52
	sub	r3, fp, #4096
	sub	r3, r3, #20
	str	r0, [r3, #-36]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	str	r1, [r3, #-40]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-40]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L18+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	mov	r3, #1024
	str	r3, [r2, #-24]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-36]
	sub	r3, r3, #1
	sub	r2, fp, #4096
	sub	r2, r2, #20
	str	r3, [r2, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	mov	r3, #2
	str	r3, [r2, #-28]
	b	.L3
.L2:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	mov	r3, #512
	str	r3, [r2, #-24]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-36]
	str	r3, [r2, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-28]
.L3:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-8]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #20
	str	r2, [r3, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L18+8
	ldr	r4, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-40]
	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, .L18+12
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L16
.L4:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-12]
	mov	r2, #1
	str	r2, [r3]
	b	.L6
.L8:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-28]
	lsl	r3, r3, #2
	sub	r2, fp, #4096
	sub	r2, r2, #20
	ldr	r2, [r2, #-40]
	add	r3, r2, r3
	ldr	r0, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-24]
	orr	r1, r3, #65
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r2, [r3, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-28]
	lsl	r3, r3, #2
	add	r4, r2, r3
	ldr	r2, .L18+16
	bl	open
	mov	r3, r0
	str	r3, [r4]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r2, [r3, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L7
	mov	r3, #1
	b	.L16
.L7:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-28]
	add	r3, r3, #1
	str	r3, [r2, #-28]
.L6:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r2, [r2, #-28]
	ldr	r3, [r3, #-36]
	cmp	r2, r3
	blt	.L8
	b	.L9
.L13:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-28]
	b	.L10
.L12:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r2, [r3, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r0, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r2, [r3, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	sub	r3, r3, #4
	mov	r1, r3
	bl	write
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-20]
	cmp	r3, r2
	beq	.L11
	ldr	r3, .L18+8
	ldr	r4, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-40]
	ldr	r5, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-28]
	lsl	r3, r3, #2
	sub	r2, fp, #4096
	sub	r2, r2, #20
	ldr	r2, [r2, #-40]
	add	r3, r2, r3
	ldr	r6, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	ldr	r1, .L18+20
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L16
.L11:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-28]
	add	r3, r3, #1
	str	r3, [r2, #-28]
.L10:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r2, [r2, #-28]
	ldr	r3, [r3, #-36]
	cmp	r2, r3
	blt	.L12
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #20
	sub	r3, r3, #4
	mov	r2, #4096
	mov	r1, r3
	mov	r0, #0
	bl	read
	str	r0, [r4, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bgt	.L13
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-16]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-28]
	b	.L14
.L15:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r2, [r3, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-28]
	add	r3, r3, #1
	str	r3, [r2, #-28]
.L14:
	sub	r3, fp, #4096
	sub	r3, r3, #20
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r2, [r2, #-28]
	ldr	r3, [r3, #-36]
	cmp	r2, r3
	blt	.L15
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-12]
	mov	r0, r3
	bl	free
	sub	r3, fp, #4096
	sub	r3, r3, #20
	ldr	r3, [r3, #-16]
.L16:
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC3
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	438
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
