	.file	"590536.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"error write STDOUT : "
.LC1:
	.string	"error writing STDOUT : "
	.text
	.globl	read_write_loop
	.type	read_write_loop, @function
read_write_loop:
.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, 2240
	mov	DWORD PTR -2228[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -2208[rbp], 6
	mov	QWORD PTR -2200[rbp], 0
	mov	DWORD PTR -2224[rbp], 0
	jmp	.L2
.L5:
	lea	rax, -2064[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -1040[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -2192[rbp]
	mov	rdi, rdx
#APP
# 37 "the_stack_data/590536.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -2220[rbp], edx
	mov	DWORD PTR -2216[rbp], eax
	mov	rax, QWORD PTR -2192[rbp]
	or	rax, 1
	mov	QWORD PTR -2192[rbp], rax
	mov	eax, DWORD PTR -2228[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2192[rbp+rax*8]
	mov	eax, DWORD PTR -2228[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	mov	rcx, rax
	mov	eax, DWORD PTR -2228[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	or	rsi, rcx
	mov	rdx, rsi
	cdqe
	mov	QWORD PTR -2192[rbp+rax*8], rdx
	mov	eax, DWORD PTR -2228[rbp]
	lea	edi, 1[rax]
	lea	rdx, -2208[rbp]
	lea	rax, -2192[rbp]
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	mov	rax, QWORD PTR -2192[rbp]
	and	eax, 1
	test	rax, rax
	je	.L3
	lea	rax, -2064[rbp]
	mov	edx, 1024
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	mov	DWORD PTR -2212[rbp], eax
	cmp	DWORD PTR -2212[rbp], 0
	jle	.L3
	mov	eax, DWORD PTR -2212[rbp]
	movsx	rdx, eax
	lea	rcx, -2064[rbp]
	mov	eax, DWORD PTR -2228[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jle	.L3
	lea	rdi, .LC0[rip]
	call	perror@PLT
.L3:
	mov	eax, DWORD PTR -2228[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -2192[rbp+rax*8]
	mov	eax, DWORD PTR -2228[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L4
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -2228[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -2212[rbp], eax
	cmp	DWORD PTR -2212[rbp], 0
	jle	.L4
	mov	eax, DWORD PTR -2212[rbp]
	movsx	rdx, eax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	test	rax, rax
	jns	.L4
	lea	rdi, .LC1[rip]
	call	perror@PLT
.L4:
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	feof@PLT
	mov	DWORD PTR -2224[rbp], eax
.L2:
	cmp	DWORD PTR -2224[rbp], 0
	je	.L5
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_write_loop, .-read_write_loop
	.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	"590536.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"error write STDOUT : \000"
	.align	2
.LC1:
	.ascii	"error writing STDOUT : \000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_write_loop
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_write_loop, %function
read_write_loop:
	@ args = 0, pretend = 0, frame = 2216
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2224
	str	r0, [fp, #-2216]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #6
	str	r3, [fp, #-2192]
	mov	r3, #0
	str	r3, [fp, #-2188]
	mov	r3, #0
	str	r3, [fp, #-2208]
	b	.L2
.L7:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #2176
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-2200]
	mov	r3, #0
	str	r3, [fp, #-2204]
	b	.L3
.L4:
	ldr	r3, [fp, #-2200]
	ldr	r2, [fp, #-2204]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-2204]
	add	r3, r3, #1
	str	r3, [fp, #-2204]
.L3:
	ldr	r3, [fp, #-2204]
	cmp	r3, #31
	bls	.L4
	ldr	r3, [fp, #-2184]
	orr	r3, r3, #1
	str	r3, [fp, #-2184]
	ldr	r3, [fp, #-2216]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-2180]
	ldr	r3, [fp, #-2216]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	mov	r0, r3
	ldr	r3, [fp, #-2216]
	add	r1, r3, #31
	cmp	r3, #0
	movlt	r3, r1
	movge	r3, r3
	asr	r3, r3, #5
	orr	r2, r2, r0
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-2180]
	ldr	r3, [fp, #-2216]
	add	r0, r3, #1
	sub	r1, fp, #2176
	sub	r1, r1, #4
	sub	r1, r1, #4
	sub	r3, fp, #2176
	sub	r3, r3, #4
	sub	r3, r3, #12
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	ldr	r3, [fp, #-2184]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L5
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	mov	r0, #0
	bl	read
	str	r0, [fp, #-2196]
	ldr	r3, [fp, #-2196]
	cmp	r3, #0
	ble	.L5
	ldr	r2, [fp, #-2196]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2216]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	ble	.L5
	ldr	r0, .L9+4
	bl	perror
.L5:
	ldr	r3, [fp, #-2216]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-2180]
	ldr	r3, [fp, #-2216]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L6
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-2216]
	bl	read
	str	r0, [fp, #-2196]
	ldr	r3, [fp, #-2196]
	cmp	r3, #0
	ble	.L6
	ldr	r2, [fp, #-2196]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L9+8
	bl	perror
.L6:
	ldr	r3, .L9+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	str	r0, [fp, #-2208]
.L2:
	ldr	r3, [fp, #-2208]
	cmp	r3, #0
	beq	.L7
	nop
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.word	stdin
	.size	read_write_loop, .-read_write_loop
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
