	.file	"extr_run-command.c_pump_io_round.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"poll failed"
	.text
	.p2align 4
	.type	pump_io_round, @function
pump_io_round:
.LFB0:
	.cfi_startproc
	endbr64
	test	esi, esi
	jle	.L32
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	mov	rdi, rdx
	lea	edx, -1[rsi]
	lea	rax, 0[0+rdx*8]
	xor	esi, esi
	sub	rax, rdx
	mov	rdx, rbx
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	lea	rbp, 56[rbx+rax*8]
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rcx, QWORD PTR [rdx]
	test	rcx, rcx
	js	.L4
	movsx	rax, esi
	add	esi, 1
	sal	rax, 4
	add	rax, rdi
	mov	QWORD PTR [rax], rcx
	mov	ecx, DWORD PTR 8[rdx]
	mov	DWORD PTR 8[rax], ecx
	mov	QWORD PTR 48[rdx], rax
.L4:
	add	rdx, 56
	cmp	rdx, rbp
	jne	.L5
	xor	eax, eax
	test	esi, esi
	je	.L1
	mov	edx, -1
	call	poll@PLT
	test	rax, rax
	js	.L33
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, QWORD PTR [rbx]
	test	rdi, rdi
	js	.L10
	mov	ecx, DWORD PTR POLLOUT[rip]
	mov	edx, DWORD PTR POLLIN[rip]
	mov	rsi, QWORD PTR 48[rbx]
	mov	eax, ecx
	or	eax, edx
	or	eax, DWORD PTR POLLHUP[rip]
	or	eax, DWORD PTR POLLERR[rip]
	or	eax, DWORD PTR POLLNVAL[rip]
	test	DWORD PTR 12[rsi], eax
	je	.L10
	mov	eax, DWORD PTR 8[rbx]
	cmp	ecx, eax
	je	.L34
.L12:
	cmp	eax, edx
	je	.L35
.L10:
	add	rbx, 56
	cmp	rbx, rbp
	jne	.L17
.L18:
	mov	eax, 1
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	mov	edx, DWORD PTR 24[rbx]
	mov	edi, DWORD PTR 28[rbx]
	mov	esi, DWORD PTR [rbx]
	call	strbuf_read_once@PLT
	test	rax, rax
	js	.L36
	jne	.L10
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rdx, QWORD PTR 32[rbx]
	mov	esi, DWORD PTR 40[rbx]
	call	xwrite@PLT
	test	rax, rax
	js	.L37
	add	DWORD PTR 40[rbx], eax
	sub	QWORD PTR 32[rbx], rax
	je	.L14
	mov	eax, DWORD PTR 8[rbx]
	mov	edx, DWORD PTR POLLIN[rip]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rax, QWORD PTR EINTR[rip]
	cmp	QWORD PTR errno[rip], rax
	je	.L18
	lea	rdi, .LC0[rip]
	call	die_errno@PLT
	jmp	.L17
.L37:
	mov	rax, QWORD PTR errno[rip]
	mov	QWORD PTR 16[rbx], rax
.L14:
	mov	rdi, QWORD PTR [rbx]
	call	close@PLT
	mov	QWORD PTR [rbx], -1
	mov	eax, DWORD PTR 8[rbx]
	mov	edx, DWORD PTR POLLIN[rip]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L36:
	mov	rax, QWORD PTR errno[rip]
	mov	QWORD PTR 16[rbx], rax
.L16:
	mov	rdi, QWORD PTR [rbx]
	call	close@PLT
	mov	QWORD PTR [rbx], -1
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	pump_io_round, .-pump_io_round
	.comm	errno,8,8
	.comm	POLLOUT,4,4
	.comm	POLLNVAL,4,4
	.comm	POLLIN,4,4
	.comm	POLLHUP,4,4
	.comm	POLLERR,4,4
	.comm	EINTR,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_run-command.c_pump_io_round.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"poll failed\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pump_io_round, %function
pump_io_round:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r6, r1, #0
	ble	.L6
	mov	r4, r0
	mov	r1, #0
	mov	r0, r2
	mov	r3, r4
	add	r6, r4, r6, lsl #5
.L5:
	ldr	ip, [r3]
	add	lr, r1, r1, lsl #1
	cmp	ip, #0
	blt	.L4
	ldr	r2, [r3, #4]
	add	r5, r0, lr, lsl #2
	str	ip, [r0, lr, lsl #2]
	add	r1, r1, #1
	str	r2, [r5, #4]
	str	r5, [r3, #28]
.L4:
	add	r3, r3, #32
	cmp	r3, r6
	bne	.L5
	cmp	r1, #0
	beq	.L6
	mvn	r2, #0
	bl	poll
	cmp	r0, #0
	blt	.L29
.L7:
	ldr	fp, .L34
	ldr	r5, .L34+4
	ldr	r9, .L34+8
	ldr	r8, .L34+12
	ldr	r7, .L34+16
	ldr	r10, .L34+20
.L17:
	ldr	r0, [r4]
	cmp	r0, #0
	blt	.L10
	ldr	r1, [fp]
	ldr	r2, [r5]
	ldr	ip, [r9]
	ldr	lr, [r8]
	orr	r3, r1, r2
	orr	r3, r3, ip
	ldr	ip, [r4, #28]
	orr	r3, r3, lr
	ldr	lr, [r7]
	ldr	ip, [ip, #8]
	orr	r3, r3, lr
	tst	r3, ip
	beq	.L10
	ldr	r3, [r4, #4]
	cmp	r1, r3
	beq	.L30
.L12:
	cmp	r3, r2
	beq	.L31
.L10:
	add	r4, r4, #32
	cmp	r4, r6
	bne	.L17
.L18:
	mov	r0, #1
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L31:
	ldr	r2, [r4, #12]
	ldr	r1, [r4]
	ldr	r0, [r4, #16]
	bl	strbuf_read_once
	cmp	r0, #0
	blt	.L32
	bne	.L10
	b	.L16
.L30:
	ldr	r2, [r4, #20]
	ldr	r1, [r4, #24]
	bl	xwrite
	cmp	r0, #0
	blt	.L33
	ldr	r3, [r4, #20]
	ldr	r2, [r4, #24]
	sub	r3, r3, r0
	cmp	r3, #0
	add	r0, r2, r0
	str	r3, [r4, #20]
	str	r0, [r4, #24]
	beq	.L14
	ldr	r3, [r4, #4]
	ldr	r2, [r5]
	b	.L12
.L29:
	ldr	r2, .L34+20
	ldr	r3, .L34+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L18
	ldr	r0, .L34+28
	bl	die_errno
	b	.L7
.L14:
	ldr	r0, [r4]
	bl	close
	mvn	r1, #0
	ldr	r2, [r5]
	ldr	r3, [r4, #4]
	str	r1, [r4]
	b	.L12
.L32:
	ldr	r3, [r10]
	str	r3, [r4, #8]
.L16:
	ldr	r0, [r4]
	bl	close
	mvn	r3, #0
	str	r3, [r4]
	b	.L10
.L33:
	ldr	r3, [r10]
	ldr	r0, [r4]
	str	r3, [r4, #8]
	bl	close
	mvn	r2, #0
	ldr	r3, [r4, #4]
	str	r2, [r4]
	ldr	r2, [r5]
	b	.L12
.L35:
	.align	2
.L34:
	.word	POLLOUT
	.word	POLLIN
	.word	POLLHUP
	.word	POLLERR
	.word	POLLNVAL
	.word	errno
	.word	EINTR
	.word	.LC0
	.size	pump_io_round, .-pump_io_round
	.comm	errno,4,4
	.comm	POLLOUT,4,4
	.comm	POLLNVAL,4,4
	.comm	POLLIN,4,4
	.comm	POLLHUP,4,4
	.comm	POLLERR,4,4
	.comm	EINTR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
