	.file	"extr_tsocket.c_taosNonblockwrite.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"fd %d timeout, no enough space to write"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"select error, %d (%s)"
.LC2:
	.string	"write error, %d (%s)"
	.text
	.p2align 4
	.globl	taosNonblockwrite
	.type	taosNonblockwrite, @function
taosNonblockwrite:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	mov	esi, 1
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	DWORD PTR 12[rsp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	taosSetNonblocking@PLT
	test	r12d, r12d
	jle	.L12
	lea	r15d, 1[rbp]
	lea	rbx, 28[rsp]
	lea	r14, 32[rsp]
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, rbx
	mov	DWORD PTR 32[rsp], 30
	mov	QWORD PTR 40[rsp], 0
	call	FD_ZERO@PLT
	mov	rsi, rbx
	mov	edi, ebp
	call	FD_SET@PLT
	xor	ecx, ecx
	xor	esi, esi
	mov	r8, r14
	mov	rdx, rbx
	mov	edi, r15d
	call	select@PLT
	test	eax, eax
	je	.L15
	jns	.L4
	mov	edi, DWORD PTR errno[rip]
	cmp	edi, DWORD PTR EINTR[rip]
	je	.L9
	call	strerror@PLT
	mov	esi, DWORD PTR errno[rip]
	lea	rdi, .LC1[rip]
	mov	r12d, -1
	mov	edx, eax
	xor	eax, eax
	call	pError@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	ecx, DWORD PTR MSG_NOSIGNAL[rip]
	movsx	rdx, r12d
	mov	rsi, r13
	mov	edi, ebp
	call	send@PLT
	test	eax, eax
	jle	.L16
	sub	r12d, eax
	cdqe
	add	r13, rax
	test	r12d, r12d
	jg	.L9
	mov	eax, DWORD PTR 12[rsp]
	sub	eax, r12d
	mov	r12d, eax
.L2:
	xor	esi, esi
	mov	edi, ebp
	call	taosSetNonblocking@PLT
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	edi, DWORD PTR errno[rip]
	cmp	edi, DWORD PTR EAGAIN[rip]
	je	.L9
	cmp	edi, DWORD PTR EINTR[rip]
	je	.L9
	call	strerror@PLT
	mov	esi, DWORD PTR errno[rip]
	lea	rdi, .LC2[rip]
	mov	r12d, -1
	mov	edx, eax
	xor	eax, eax
	call	pError@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	eax, DWORD PTR ETIMEDOUT[rip]
	mov	esi, ebp
	lea	rdi, .LC0[rip]
	mov	DWORD PTR errno[rip], eax
	xor	eax, eax
	call	pError@PLT
	mov	eax, DWORD PTR 12[rsp]
	sub	eax, r12d
	mov	r12d, eax
	jmp	.L2
.L12:
	xor	r12d, r12d
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	taosNonblockwrite, .-taosNonblockwrite
	.comm	errno,4,4
	.comm	MSG_NOSIGNAL,4,4
	.comm	ETIMEDOUT,4,4
	.comm	EINTR,4,4
	.comm	EAGAIN,4,4
	.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_tsocket.c_taosNonblockwrite.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"fd %d timeout, no enough space to write\000"
	.align	2
.LC1:
	.ascii	"select error, %d (%s)\000"
	.align	2
.LC2:
	.ascii	"write error, %d (%s)\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	taosNonblockwrite
	.syntax unified
	.arm
	.fpu softvfp
	.type	taosNonblockwrite, %function
taosNonblockwrite:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r2
	sub	sp, sp, #36
	ldr	r3, .L18
	str	r2, [sp, #12]
	mov	r6, r1
	mov	r1, #1
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	mov	r4, r0
	bl	taosSetNonblocking
	cmp	r5, #0
	ble	.L12
	mov	r10, #30
	mov	r9, #0
	ldr	fp, .L18+4
	add	r8, r4, #1
	add	r7, sp, #20
.L9:
	add	r0, sp, #16
	str	r10, [sp, #20]
	str	r9, [sp, #24]
	bl	FD_ZERO
	add	r1, sp, #16
	mov	r0, r4
	bl	FD_SET
	mov	r3, #0
	mov	r0, r8
	mov	r1, r3
	str	r7, [sp]
	add	r2, sp, #16
	bl	select
	cmp	r0, #0
	beq	.L15
	bge	.L4
	ldr	r3, .L18+8
	ldr	r1, [r3]
	ldr	r3, [fp]
	cmp	r1, r3
	beq	.L9
	mov	r0, r1
	str	r1, [sp, #12]
	bl	strerror
	ldr	r1, [sp, #12]
	mov	r2, r0
	ldr	r0, .L18+12
	bl	pError
	mvn	r5, #0
	b	.L1
.L4:
	ldr	r3, .L18+16
	mov	r2, r5
	mov	r1, r6
	mov	r0, r4
	ldr	r3, [r3]
	bl	send
	cmp	r0, #0
	ble	.L16
	sub	r5, r5, r0
	cmp	r5, #0
	add	r6, r6, r0
	bgt	.L9
	ldr	r3, [sp, #12]
	sub	r5, r3, r5
.L2:
	mov	r0, r4
	mov	r1, #0
	bl	taosSetNonblocking
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, r5
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r3, .L18+8
	ldr	r1, [r3]
	ldr	r3, .L18+20
	ldr	r3, [r3]
	cmp	r1, r3
	beq	.L9
	ldr	r3, [fp]
	cmp	r1, r3
	beq	.L9
	mov	r0, r1
	str	r1, [sp, #12]
	bl	strerror
	ldr	r1, [sp, #12]
	mov	r2, r0
	ldr	r0, .L18+24
	bl	pError
	mvn	r5, #0
	b	.L1
.L15:
	ldr	r2, .L18+28
	ldr	r0, [sp, #12]
	ldr	r3, .L18+8
	ldr	r2, [r2]
	sub	r5, r0, r5
	mov	r1, r4
	ldr	r0, .L18+32
	str	r2, [r3]
	bl	pError
	b	.L2
.L12:
	mov	r5, #0
	b	.L2
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC3
	.word	EINTR
	.word	errno
	.word	.LC1
	.word	MSG_NOSIGNAL
	.word	EAGAIN
	.word	.LC2
	.word	ETIMEDOUT
	.word	.LC0
	.size	taosNonblockwrite, .-taosNonblockwrite
	.comm	errno,4,4
	.comm	MSG_NOSIGNAL,4,4
	.comm	ETIMEDOUT,4,4
	.comm	EINTR,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
