	.file	"extr_syncio.c_syncWrite.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	syncWrite
	.type	syncWrite, @function
syncWrite:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	eax, eax
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	DWORD PTR 12[rsp], edx
	call	mstime@PLT
	mov	r14, rax
	mov	rax, r13
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	movsx	rdx, eax
	sub	ebx, eax
	add	rbp, rdx
.L4:
	test	ebx, ebx
	je	.L7
	mov	esi, DWORD PTR AE_WRITABLE[rip]
	mov	rdx, r15
	mov	edi, r12d
	call	aeWait@PLT
	xor	eax, eax
	call	mstime@PLT
	sub	rax, r14
	cmp	r13, rax
	jle	.L10
	mov	rcx, r13
	sub	rcx, rax
	mov	rax, rcx
.L6:
	cmp	QWORD PTR SYNCIO__RESOLUTION[rip], rax
	mov	edx, ebx
	mov	rsi, rbp
	mov	edi, r12d
	cmovge	rax, QWORD PTR SYNCIO__RESOLUTION[rip]
	mov	r15, rax
	call	write@PLT
	cmp	eax, -1
	jne	.L2
	mov	rsi, QWORD PTR EAGAIN[rip]
	cmp	QWORD PTR errno[rip], rsi
	je	.L4
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L7:
	.cfi_restore_state
	mov	eax, DWORD PTR 12[rsp]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L10:
	.cfi_restore_state
	mov	rax, QWORD PTR ETIMEDOUT[rip]
	mov	QWORD PTR errno[rip], rax
	add	rsp, 24
	.cfi_def_cfa_offset 56
	mov	eax, -1
	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
	.cfi_endproc
.LFE0:
	.size	syncWrite, .-syncWrite
	.comm	errno,8,8
	.comm	SYNCIO__RESOLUTION,8,8
	.comm	ETIMEDOUT,8,8
	.comm	EAGAIN,8,8
	.comm	AE_WRITABLE,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_syncio.c_syncWrite.c"
	.text
	.align	2
	.global	syncWrite
	.syntax unified
	.arm
	.fpu softvfp
	.type	syncWrite, %function
syncWrite:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #28
	mov	r8, r2
	str	r2, [sp, #20]
	mov	r10, r0
	mov	r9, r1
	bl	mstime
	add	r3, sp, #64
	ldmia	r3, {r2-r3}
	str	r0, [sp, #12]
	stm	sp, {r2-r3}
	str	r1, [sp, #16]
	b	.L7
.L5:
	cmp	r8, #0
	beq	.L8
	ldr	r1, .L12
	mov	r2, r6
	mov	r3, r7
	ldr	r1, [r1]
	mov	r0, r10
	bl	aeWait
	bl	mstime
	ldr	r3, [sp, #12]
	subs	r4, r0, r3
	ldr	r3, [sp, #16]
	sbc	r5, r1, r3
	add	r3, sp, #64
	ldmia	r3, {r2-r3}
	cmp	r4, r2
	sbcs	r3, r5, r3
	bge	.L11
	ldr	r3, [sp, #64]
	subs	r3, r3, r4
	str	r3, [sp]
	ldr	r3, [sp, #68]
	sbc	r3, r3, r5
	str	r3, [sp, #4]
.L7:
	ldr	r3, .L12+4
	ldmia	sp, {fp-ip}
	ldmia	r3, {r6-r7}
	cmp	r6, fp
	sbcs	r3, r7, ip
	mov	r2, r8
	mov	r1, r9
	mov	r0, r10
	movlt	r6, fp
	movlt	r7, ip
	bl	write
	cmn	r0, #1
	addne	r9, r9, r0
	subne	r8, r8, r0
	bne	.L5
	ldr	r3, .L12+8
	ldr	r2, [r3]
	ldr	r3, .L12+12
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L5
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	ldr	r0, [sp, #20]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	mvn	r0, #0
	ldr	r2, .L12+16
	ldr	r3, .L12+8
	ldr	r2, [r2]
	str	r2, [r3]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	.align	2
.L12:
	.word	AE_WRITABLE
	.word	SYNCIO__RESOLUTION
	.word	errno
	.word	EAGAIN
	.word	ETIMEDOUT
	.size	syncWrite, .-syncWrite
	.comm	errno,4,4
	.comm	SYNCIO__RESOLUTION,8,8
	.comm	ETIMEDOUT,4,4
	.comm	EAGAIN,4,4
	.comm	AE_WRITABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
