	.file	"190767709.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"My friend the nerd\n"
.LC1:
	.string	"Embraced by bits and bytes\n"
.LC2:
	.string	"And yet forever lonely\n"
.LC3:
	.string	"I showed him Playboy sites\n"
.LC4:
	.string	"He visits them \342\200\231text only'"
.LC5:
	.string	"testfile"
.LC6:
	.string	"# wfd:%d rfd:%d\n\n"
.LC7:
	.string	"  rlen:%ld != len:%ld\n"
.LC8:
	.string	"  %s"
.LC9:
	.string	"\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
	sub	rsp, 368
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC0[rip]
	mov	QWORD PTR -320[rbp], rax
	lea	rax, .LC1[rip]
	mov	QWORD PTR -312[rbp], rax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -304[rbp], rax
	lea	rax, .LC3[rip]
	mov	QWORD PTR -296[rbp], rax
	lea	rax, .LC4[rip]
	mov	QWORD PTR -288[rbp], rax
	lea	rax, .LC5[rip]
	mov	QWORD PTR -344[rbp], rax
	mov	DWORD PTR -360[rbp], 0
	mov	rax, QWORD PTR -344[rbp]
	mov	edx, 420
	mov	esi, 577
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -352[rbp], eax
	cmp	DWORD PTR -352[rbp], -1
	jne	.L2
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -344[rbp]
	mov	edx, 420
	mov	esi, 576
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -348[rbp], eax
	cmp	DWORD PTR -348[rbp], -1
	jne	.L3
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	edx, DWORD PTR -348[rbp]
	mov	eax, DWORD PTR -352[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -356[rbp], 0
	jmp	.L4
.L8:
	mov	eax, DWORD PTR -356[rbp]
	cdqe
	mov	rax, QWORD PTR -320[rbp+rax*8]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -336[rbp], rax
	mov	eax, DWORD PTR -356[rbp]
	cdqe
	mov	rcx, QWORD PTR -320[rbp+rax*8]
	mov	rdx, QWORD PTR -336[rbp]
	mov	eax, DWORD PTR -352[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, -1
	jne	.L5
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -348[rbp]
	mov	edx, 255
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -328[rbp], rax
	cmp	QWORD PTR -328[rbp], -1
	jne	.L6
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	DWORD PTR -360[rbp], 1
.L6:
	mov	rax, QWORD PTR -336[rbp]
	cmp	QWORD PTR -328[rbp], rax
	je	.L7
	mov	rdx, QWORD PTR -336[rbp]
	mov	rax, QWORD PTR -328[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	mov	eax, DWORD PTR -356[rbp]
	cdqe
	mov	rax, QWORD PTR -320[rbp+rax*8]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -356[rbp], 1
.L4:
	cmp	DWORD PTR -356[rbp], 4
	jle	.L8
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -352[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L9
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	DWORD PTR -360[rbp], 1
.L9:
	mov	eax, DWORD PTR -348[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L10
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	DWORD PTR -360[rbp], 1
.L10:
	mov	eax, DWORD PTR -360[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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	"190767709.c"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"My friend the nerd\012\000"
	.align	2
.LC1:
	.ascii	"Embraced by bits and bytes\012\000"
	.align	2
.LC2:
	.ascii	"And yet forever lonely\012\000"
	.align	2
.LC3:
	.ascii	"I showed him Playboy sites\012\000"
	.align	2
.LC4:
	.ascii	"He visits them \342\200\231text only'\000"
	.text
	.section	.rodata
	.align	2
.LC7:
	.ascii	"testfile\000"
	.align	2
.LC8:
	.ascii	"# wfd:%d rfd:%d\012\012\000"
	.align	2
.LC9:
	.ascii	"  rlen:%ld != len:%ld\012\000"
	.align	2
.LC10:
	.ascii	"  %s\000"
	.align	2
.LC11:
	.ascii	"\012\000"
	.align	2
.LC6:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 312
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #312
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L13+4
	sub	ip, fp, #284
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	ldr	r3, .L13+8
	str	r3, [fp, #-304]
	mov	r3, #0
	str	r3, [fp, #-312]
	mov	r2, #420
	ldr	r1, .L13+12
	ldr	r0, [fp, #-304]
	bl	open
	str	r0, [fp, #-300]
	ldr	r3, [fp, #-300]
	cmn	r3, #1
	bne	.L2
	ldr	r0, [fp, #-304]
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	mov	r2, #420
	mov	r1, #576
	ldr	r0, [fp, #-304]
	bl	open
	str	r0, [fp, #-296]
	ldr	r3, [fp, #-296]
	cmn	r3, #1
	bne	.L3
	ldr	r0, [fp, #-304]
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	ldr	r2, [fp, #-296]
	ldr	r1, [fp, #-300]
	ldr	r0, .L13+16
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-308]
	b	.L4
.L8:
	ldr	r3, [fp, #-308]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-280]
	mov	r0, r3
	bl	strlen
	str	r0, [fp, #-292]
	ldr	r3, [fp, #-308]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-280]
	ldr	r2, [fp, #-292]
	mov	r1, r3
	ldr	r0, [fp, #-300]
	bl	write
	mov	r3, r0
	cmn	r3, #1
	bne	.L5
	ldr	r0, [fp, #-304]
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	sub	r3, fp, #264
	mov	r2, #255
	mov	r1, r3
	ldr	r0, [fp, #-296]
	bl	read
	str	r0, [fp, #-288]
	ldr	r3, [fp, #-288]
	cmn	r3, #1
	bne	.L6
	ldr	r0, [fp, #-304]
	bl	perror
	mov	r3, #1
	str	r3, [fp, #-312]
.L6:
	ldr	r3, [fp, #-288]
	ldr	r2, [fp, #-292]
	cmp	r2, r3
	beq	.L7
	ldr	r2, [fp, #-292]
	ldr	r1, [fp, #-288]
	ldr	r0, .L13+20
	bl	printf
.L7:
	ldr	r3, [fp, #-308]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-280]
	mov	r1, r3
	ldr	r0, .L13+24
	bl	printf
	ldr	r3, [fp, #-308]
	add	r3, r3, #1
	str	r3, [fp, #-308]
.L4:
	ldr	r3, [fp, #-308]
	cmp	r3, #4
	ble	.L8
	ldr	r0, .L13+28
	bl	puts
	ldr	r0, [fp, #-300]
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
	ldr	r0, [fp, #-304]
	bl	perror
	mov	r3, #1
	str	r3, [fp, #-312]
.L9:
	ldr	r0, [fp, #-296]
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L10
	ldr	r0, [fp, #-304]
	bl	perror
	mov	r3, #1
	str	r3, [fp, #-312]
.L10:
	ldr	r3, [fp, #-312]
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC12
	.word	.LC6
	.word	.LC7
	.word	577
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
