	.file	"47412.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"Opening input file"
.LC2:
	.string	"Out of memory\n"
.LC3:
	.string	"Adding another link ..."
	.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, 2112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -2104[rbp], 0
	mov	QWORD PTR -2096[rbp], 0
	movabs	rax, 8371738087539892589
	mov	QWORD PTR -2075[rbp], rax
	mov	WORD PTR -2067[rbp], 29816
	mov	BYTE PTR -2065[rbp], 0
	lea	rax, -2075[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -2088[rbp], rax
	cmp	QWORD PTR -2088[rbp], 0
	jne	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	jmp	.L3
.L9:
	cmp	QWORD PTR -2104[rbp], 0
	jne	.L4
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -2096[rbp], rax
	mov	rax, QWORD PTR -2096[rbp]
	mov	QWORD PTR -2104[rbp], rax
	cmp	QWORD PTR -2104[rbp], 0
	je	.L5
	lea	rax, -2064[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -2104[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -2104[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR -2104[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, -2064[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -2104[rbp]
	mov	QWORD PTR 8[rax], 0
	jmp	.L3
.L6:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L10
.L5:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L10
.L4:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	jmp	.L8
.L3:
	mov	rdx, QWORD PTR -2088[rbp]
	lea	rax, -2064[rbp]
	mov	esi, 2048
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L9
.L8:
	mov	eax, 0
.L10:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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	"47412.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"Opening input file\000"
	.align	2
.LC3:
	.ascii	"Out of memory\012\000"
	.align	2
.LC4:
	.ascii	"Adding another link ...\000"
	.align	2
.LC0:
	.ascii	"malloc.txt\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2080
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2080
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-2080]
	mov	r3, #0
	str	r3, [fp, #-2076]
	ldr	r2, .L12+4
	sub	r3, fp, #2064
	sub	r3, r3, #4
	ldm	r2, {r0, r1, r2}
	stmia	r3!, {r0, r1}
	strh	r2, [r3]	@ movhi
	add	r3, r3, #2
	lsr	r2, r2, #16
	strb	r2, [r3]
	sub	r3, fp, #2064
	sub	r3, r3, #4
	ldr	r1, .L12+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-2072]
	ldr	r3, [fp, #-2072]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L12+12
	bl	perror
	b	.L3
.L9:
	ldr	r3, [fp, #-2080]
	cmp	r3, #0
	bne	.L4
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-2076]
	ldr	r3, [fp, #-2076]
	str	r3, [fp, #-2080]
	ldr	r3, [fp, #-2080]
	cmp	r3, #0
	beq	.L5
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-2080]
	str	r2, [r3]
	ldr	r3, [fp, #-2080]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-2080]
	ldr	r2, [r3]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	ldr	r3, [fp, #-2080]
	mov	r2, #0
	str	r2, [r3, #4]
	b	.L3
.L6:
	ldr	r3, .L12+16
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L12+20
	bl	fwrite
	mvn	r3, #0
	b	.L10
.L5:
	ldr	r3, .L12+16
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L12+20
	bl	fwrite
	mvn	r3, #0
	b	.L10
.L4:
	ldr	r0, .L12+24
	bl	puts
	b	.L8
.L3:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2072]
	mov	r1, #2048
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
.L8:
	mov	r3, #0
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	stderr
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
