	.file	"625188.c"
	.intel_syntax noprefix
	.text
	.local	buf
	.comm	buf,128,32
	.type	write_all, @function
write_all:
.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 -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -16[rbp], 0
	jmp	.L2
.L8:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -32[rbp]
	lea	rcx, [rdx+rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jns	.L3
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	jne	.L4
	jmp	.L2
.L4:
	cmp	QWORD PTR -16[rbp], 0
	jle	.L5
	mov	rax, QWORD PTR -16[rbp]
	jmp	.L7
.L5:
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L7
.L3:
	mov	rax, QWORD PTR -8[rbp]
	sub	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	add	QWORD PTR -16[rbp], rax
.L2:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L8
	mov	rax, QWORD PTR -16[rbp]
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	write_all, .-write_all
	.section	.rodata
.LC0:
	.string	"select()"
	.align 8
.LC1:
	.string	"Data is available now. retval was %d wcnt=%d\n"
.LC2:
	.string	"read %d bytes\n"
	.align 8
.LC3:
	.string	"No data within five seconds, retval=%d\n"
.LC4:
	.string	"impossible!"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -180[rbp], 2
	mov	DWORD PTR -184[rbp], 0
	jmp	.L10
.L15:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -144[rbp]
	mov	rdi, rdx
#APP
# 65 "the_stack_data/625188.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -176[rbp], edx
	mov	DWORD PTR -172[rbp], eax
	mov	eax, DWORD PTR -180[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -180[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
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -144[rbp+rax*8], rdx
	mov	QWORD PTR -160[rbp], 5
	mov	QWORD PTR -152[rbp], 0
	mov	eax, DWORD PTR -180[rbp]
	lea	edi, 1[rax]
	lea	rdx, -160[rbp]
	lea	rax, -144[rbp]
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	mov	DWORD PTR -168[rbp], eax
	cmp	DWORD PTR -168[rbp], -1
	jne	.L11
	lea	rdi, .LC0[rip]
	call	perror@PLT
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -180[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -180[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	.L12
	mov	edx, DWORD PTR -184[rbp]
	mov	eax, DWORD PTR -168[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -180[rbp]
	mov	edx, 128
	lea	rsi, buf[rip]
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -164[rbp], eax
	mov	eax, DWORD PTR -164[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -164[rbp], 0
	jle	.L10
	mov	eax, DWORD PTR -164[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -180[rbp]
	lea	rsi, buf[rip]
	mov	edi, eax
	call	write_all
	jmp	.L10
.L12:
	cmp	DWORD PTR -168[rbp], 0
	jne	.L13
	mov	eax, DWORD PTR -168[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L14
.L13:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L14
.L10:
	add	DWORD PTR -184[rbp], 1
	cmp	DWORD PTR -184[rbp], 0
	jne	.L15
.L14:
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.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	"625188.c"
	.text
	.local	buf
	.comm	buf,128,4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_all, %function
write_all:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L8:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	write
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L3
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L4
	b	.L2
.L4:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L5
	ldr	r3, [fp, #-12]
	b	.L7
.L5:
	ldr	r3, [fp, #-8]
	b	.L7
.L3:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	sub	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-12]
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	write_all, .-write_all
	.section	.rodata
	.align	2
.LC0:
	.ascii	"select()\000"
	.align	2
.LC1:
	.ascii	"Data is available now. retval was %d wcnt=%d\012\000"
	.align	2
.LC2:
	.ascii	"read %d bytes\012\000"
	.align	2
.LC3:
	.ascii	"No data within five seconds, retval=%d\012\000"
	.align	2
.LC4:
	.ascii	"impossible!\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 = 168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #176
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #2
	str	r3, [fp, #-160]
	mov	r3, #0
	str	r3, [fp, #-168]
	b	.L10
.L17:
	sub	r3, fp, #136
	str	r3, [fp, #-156]
	mov	r3, #0
	str	r3, [fp, #-164]
	b	.L11
.L12:
	ldr	r3, [fp, #-156]
	ldr	r2, [fp, #-164]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-164]
	add	r3, r3, #1
	str	r3, [fp, #-164]
.L11:
	ldr	r3, [fp, #-164]
	cmp	r3, #31
	bls	.L12
	ldr	r3, [fp, #-160]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-132]
	ldr	r3, [fp, #-160]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-132]
	mov	r3, #5
	str	r3, [fp, #-144]
	mov	r3, #0
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-160]
	add	r0, r3, #1
	sub	r1, fp, #136
	sub	r3, fp, #144
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	str	r0, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmn	r3, #1
	bne	.L13
	ldr	r0, .L19+4
	bl	perror
	b	.L10
.L13:
	ldr	r3, [fp, #-160]
	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, #-132]
	ldr	r3, [fp, #-160]
	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	.L14
	ldr	r2, [fp, #-168]
	ldr	r1, [fp, #-152]
	ldr	r0, .L19+8
	bl	printf
	mov	r2, #128
	ldr	r1, .L19+12
	ldr	r0, [fp, #-160]
	bl	read
	str	r0, [fp, #-148]
	ldr	r1, [fp, #-148]
	ldr	r0, .L19+16
	bl	printf
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	ble	.L10
	ldr	r3, [fp, #-148]
	mov	r2, r3
	ldr	r1, .L19+12
	ldr	r0, [fp, #-160]
	bl	write_all
	b	.L10
.L14:
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	bne	.L15
	ldr	r1, [fp, #-152]
	ldr	r0, .L19+20
	bl	printf
	b	.L16
.L15:
	ldr	r0, .L19+24
	bl	puts
	b	.L16
.L10:
	ldr	r3, [fp, #-168]
	add	r3, r3, #1
	str	r3, [fp, #-168]
	ldr	r3, [fp, #-168]
	cmp	r3, #0
	bne	.L17
.L16:
	mov	r0, #0
	bl	exit
.L20:
	.align	2
.L19:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	buf
	.word	.LC2
	.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
