	.file	"extr_tcp_send.c_rds_tcp_xmit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"rm %p tcp nxt %u ack_seq %llu\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"tcp sendpage %p:%u:%u ret %d\n"
	.section	.rodata.str1.8
	.align 8
.LC2:
	.string	"RDS/tcp: send to %pI6c on cp [%d]returned %d, disconnecting and reconnecting\n"
	.text
	.p2align 4
	.globl	rds_tcp_xmit
	.type	rds_tcp_xmit, @function
rds_tcp_xmit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r11d, ecx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, r8d
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR 24[rsi]
	mov	QWORD PTR 40[rsp], rdi
	mov	QWORD PTR 32[rsp], rax
	mov	r15, QWORD PTR 8[rax]
	test	edx, edx
	je	.L29
	cmp	edx, 3
	jbe	.L4
	xor	r10d, r10d
.L5:
	mov	eax, DWORD PTR [r14]
	xor	r9d, r9d
	cmp	eax, 1
	jle	.L8
	mov	r9d, DWORD PTR MSG_MORE[rip]
	or	r9d, DWORD PTR MSG_SENDPAGE_NOTLAST[rip]
.L8:
	cmp	r11d, eax
	jnb	.L7
	mov	DWORD PTR 28[rsp], r10d
	mov	rdi, QWORD PTR 8[r14]
	mov	r12d, r9d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L31:
	mov	rdi, QWORD PTR 8[r14]
	add	DWORD PTR 28[rsp], r13d
	add	ebx, r13d
	mov	r11d, DWORD PTR 24[rsp]
	cmp	DWORD PTR [rdi+rbp], ebx
	jne	.L9
	add	r11d, 1
	xor	ebx, ebx
.L9:
	mov	eax, DWORD PTR [r14]
	mov	esi, 0
	lea	edx, -1[rax]
	cmp	edx, r11d
	cmove	r12d, esi
	cmp	eax, r11d
	jbe	.L30
.L11:
	mov	ebp, r11d
	mov	rax, QWORD PTR [r15]
	mov	r10d, ebx
	mov	r8d, DWORD PTR MSG_DONTWAIT[rip]
	sal	rbp, 4
	or	r8d, DWORD PTR MSG_NOSIGNAL[rip]
	mov	rdx, r10
	mov	DWORD PTR 24[rsp], r11d
	add	rdi, rbp
	mov	rax, QWORD PTR [rax]
	or	r8d, r12d
	mov	QWORD PTR 8[rsp], r10
	mov	ecx, DWORD PTR [rdi]
	add	rdx, QWORD PTR 8[rdi]
	mov	DWORD PTR 20[rsp], r8d
	mov	r13, QWORD PTR [rax]
	mov	QWORD PTR [rsp], rdx
	sub	ecx, ebx
	mov	DWORD PTR 16[rsp], ecx
	call	sg_page@PLT
	mov	r8d, DWORD PTR 20[rsp]
	mov	ecx, DWORD PTR 16[rsp]
	mov	rsi, rax
	mov	rdx, QWORD PTR [rsp]
	mov	rdi, QWORD PTR [r15]
	call	r13
	mov	rdi, QWORD PTR 8[r14]
	mov	r10, QWORD PTR 8[rsp]
	mov	r13d, eax
	add	rdi, rbp
	mov	ecx, DWORD PTR [rdi]
	mov	rdx, QWORD PTR 8[rdi]
	sub	ecx, ebx
	add	rdx, r10
	mov	DWORD PTR 16[rsp], ecx
	mov	QWORD PTR [rsp], rdx
	call	sg_page@PLT
	mov	ecx, DWORD PTR 16[rsp]
	mov	rdx, QWORD PTR [rsp]
	mov	r8d, r13d
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	rdsdebug@PLT
	test	r13d, r13d
	jg	.L31
	mov	r10d, DWORD PTR 28[rsp]
.L6:
	mov	eax, r13d
	add	eax, DWORD PTR EAGAIN[rip]
	mov	DWORD PTR [rsp], r10d
	je	.L32
	mov	rdi, QWORD PTR 32[rsp]
	call	rds_conn_path_up@PLT
	mov	r10d, DWORD PTR [rsp]
	test	rax, rax
	jne	.L33
.L14:
	test	r10d, r10d
	cmove	r10d, r13d
.L1:
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r10d
	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
.L30:
	.cfi_restore_state
	mov	r10d, DWORD PTR 28[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rdi, r15
	mov	DWORD PTR [rsp], ecx
	call	rds_tcp_write_seq@PLT
	mov	edi, DWORD PTR 20[r14]
	mov	QWORD PTR 16[r15], rax
	mov	r12, rax
	call	be32_to_cpu@PLT
	lea	rax, 3[r12+rax]
	lea	r12, 40[r14]
	mov	QWORD PTR 32[r14], rax
	xor	eax, eax
	call	smp_mb__before_atomic@PLT
	mov	edi, DWORD PTR RDS_MSG_HAS_ACK_SEQ[rip]
	mov	rsi, r12
	call	set_bit@PLT
	mov	rax, QWORD PTR 32[r14]
	mov	edi, DWORD PTR RDS_MSG_RETRANSMITTED[rip]
	mov	rsi, r12
	add	rax, 1
	mov	QWORD PTR 8[r15], rax
	call	test_bit@PLT
	mov	r11d, DWORD PTR [rsp]
	test	rax, rax
	jne	.L34
.L3:
	mov	r12, QWORD PTR 32[r14]
	mov	rdi, r15
	mov	DWORD PTR [rsp], r11d
	call	rds_tcp_write_seq@PLT
	mov	rsi, r14
	lea	rdi, .LC0[rip]
	mov	rdx, rax
	mov	ecx, r12d
	xor	eax, eax
	call	rdsdebug@PLT
	mov	r11d, DWORD PTR [rsp]
.L4:
	mov	rax, QWORD PTR [r15]
	mov	edi, DWORD PTR SOCK_NOSPACE[rip]
	mov	DWORD PTR [rsp], r11d
	mov	rax, QWORD PTR 8[rax]
	mov	rsi, QWORD PTR [rax]
	call	set_bit@PLT
	mov	eax, ebp
	mov	rdi, QWORD PTR [r15]
	mov	edx, 8
	sub	edx, ebp
	lea	rsi, 16[r14+rax]
	call	rds_tcp_sendmsg@PLT
	mov	r10d, eax
	test	eax, eax
	js	.L17
	add	ebp, eax
	mov	r11d, DWORD PTR [rsp]
	cmp	ebp, 4
	je	.L5
.L7:
	test	r10d, r10d
	jne	.L1
	xor	r13d, r13d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L34:
	mov	eax, DWORD PTR RDS_FLAG_RETRANSMITTED[rip]
	or	DWORD PTR 16[r14], eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rbx, QWORD PTR 32[rsp]
	mov	rsi, QWORD PTR 40[rsp]
	mov	ecx, r13d
	lea	rdi, .LC2[rip]
	mov	edx, DWORD PTR [rbx]
	call	pr_warn@PLT
	xor	esi, esi
	mov	rdi, rbx
	call	rds_conn_path_drop@PLT
	mov	r10d, DWORD PTR [rsp]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L32:
	mov	edi, DWORD PTR s_tcp_sndbuf_full[rip]
	xor	r13d, r13d
	call	rds_tcp_stats_inc@PLT
	mov	r10d, DWORD PTR [rsp]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L17:
	mov	r13d, eax
	xor	r10d, r10d
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	rds_tcp_xmit, .-rds_tcp_xmit
	.comm	s_tcp_sndbuf_full,4,4
	.comm	SOCK_NOSPACE,4,4
	.comm	RDS_MSG_RETRANSMITTED,4,4
	.comm	RDS_MSG_HAS_ACK_SEQ,4,4
	.comm	RDS_FLAG_RETRANSMITTED,4,4
	.comm	MSG_SENDPAGE_NOTLAST,4,4
	.comm	MSG_NOSIGNAL,4,4
	.comm	MSG_MORE,4,4
	.comm	MSG_DONTWAIT,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_tcp_send.c_rds_tcp_xmit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"rm %p tcp nxt %u ack_seq %llu\012\000"
	.align	2
.LC1:
	.ascii	"tcp sendpage %p:%u:%u ret %d\012\000"
	.align	2
.LC2:
	.ascii	"RDS/tcp: send to %pI6c on cp [%d]returned %d, disco"
	.ascii	"nnecting and reconnecting\012\000"
	.text
	.align	2
	.global	rds_tcp_xmit
	.syntax unified
	.arm
	.fpu softvfp
	.type	rds_tcp_xmit, %function
rds_tcp_xmit:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r1
	ldr	r1, [r1, #16]
	mov	r4, r3
	ldr	r3, [r1, #4]
	sub	sp, sp, #36
	subs	r6, r2, #0
	ldr	r5, [sp, #72]
	str	r1, [sp, #24]
	str	r0, [sp, #28]
	str	r3, [sp, #20]
	beq	.L29
	cmp	r6, #3
	movhi	r10, #0
	bls	.L4
.L5:
	ldr	r3, [r7]
	cmp	r3, #1
	ldrgt	r2, .L33
	ldrgt	r1, .L33+4
	ldrgt	r2, [r2]
	ldrgt	r9, [r1]
	movle	r9, #0
	orrgt	r9, r9, r2
	cmp	r4, r3
	bcs	.L7
	ldr	r0, [r7, #4]
	ldr	fp, .L33+8
	b	.L11
.L30:
	ldr	r0, [r7, #4]
	add	r10, r10, r6
	ldr	r3, [r0, r4, lsl #3]
	cmp	r3, r5
	ldr	r3, [r7]
	addeq	r4, r4, #1
	sub	r2, r3, #1
	moveq	r5, #0
	cmp	r2, r4
	moveq	r9, #0
	cmp	r3, r4
	bls	.L1
.L11:
	ldr	r3, [sp, #20]
	ldr	r1, .L33+12
	ldr	r3, [r3]
	ldr	ip, [r1]
	ldr	r2, [fp]
	ldr	r1, [r3]
	orr	r2, r2, ip
	str	r3, [sp, #16]
	add	r0, r0, r4, lsl #3
	orr	r3, r2, r9
	ldr	r6, [r1]
	str	r3, [sp, #12]
	bl	sg_page
	ldr	ip, [r7, #4]
	ldr	r3, [sp, #16]
	lsl	r8, r4, #3
	add	r2, ip, r8
	mov	r1, r0
	ldr	ip, [ip, r4, lsl #3]
	ldr	r2, [r2, #4]
	mov	r0, r3
	ldr	r3, [sp, #12]
	add	r2, r5, r2
	str	r3, [sp]
	sub	r3, ip, r5
	blx	r6
	ldr	r3, [r7, #4]
	mov	r6, r0
	add	r0, r3, r8
	bl	sg_page
	ldr	r3, [r7, #4]
	mov	r1, r0
	add	r8, r3, r8
	ldr	r2, [r8, #4]
	ldr	r3, [r3, r4, lsl #3]
	add	r2, r5, r2
	sub	r3, r3, r5
	ldr	r0, .L33+16
	str	r6, [sp]
	bl	rdsdebug
	cmp	r6, #0
	add	r5, r5, r6
	bgt	.L30
.L6:
	ldr	r3, .L33+20
	ldr	r3, [r3]
	cmn	r6, r3
	beq	.L31
	ldr	r0, [sp, #24]
	bl	rds_conn_path_up
	cmp	r0, #0
	bne	.L32
.L14:
	cmp	r10, #0
	moveq	r10, r6
.L1:
	mov	r0, r10
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	mov	r0, r3
	mov	r9, r3
	bl	rds_tcp_write_seq
	mov	r8, r0
	ldr	r0, [r7, #12]
	str	r8, [r9, #8]
	bl	be32_to_cpu
	add	r8, r8, r0
	add	r8, r8, #3
	str	r8, [r7, #20]
	bl	smp_mb__before_atomic
	ldr	r3, .L33+24
	add	r8, r7, #24
	mov	r1, r8
	ldr	r0, [r3]
	bl	set_bit
	ldr	r3, [r7, #20]
	ldr	r2, .L33+28
	add	r3, r3, #1
	ldr	r0, [r2]
	str	r3, [r9, #4]
	mov	r1, r8
	bl	test_bit
	cmp	r0, #0
	ldrne	r2, .L33+32
	ldrne	r3, [r7, #8]
	ldrne	r2, [r2]
	ldr	r0, [sp, #20]
	orrne	r3, r3, r2
	strne	r3, [r7, #8]
	bl	rds_tcp_write_seq
	mov	r1, r7
	mov	r2, r0
	ldr	r3, [r7, #20]
	ldr	r0, .L33+36
	bl	rdsdebug
.L4:
	ldr	r8, [sp, #20]
	ldr	r2, .L33+40
	ldr	r3, [r8]
	ldr	r0, [r2]
	ldr	r3, [r3, #4]
	ldr	r1, [r3]
	bl	set_bit
	add	r1, r7, #8
	ldr	r0, [r8]
	add	r1, r1, r6
	rsb	r2, r6, #8
	bl	rds_tcp_sendmsg
	subs	r10, r0, #0
	blt	.L17
	add	r3, r10, r6
	cmp	r3, #4
	beq	.L5
.L7:
	cmp	r10, #0
	moveq	r6, r10
	beq	.L6
	mov	r0, r10
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L32:
	ldr	r4, [sp, #24]
	ldr	r1, [sp, #28]
	mov	r3, r6
	ldr	r2, [r4]
	ldr	r0, .L33+44
	bl	pr_warn
	mov	r0, r4
	mov	r1, #0
	bl	rds_conn_path_drop
	b	.L14
.L31:
	mov	r6, #0
	ldr	r3, .L33+48
	ldr	r0, [r3]
	bl	rds_tcp_stats_inc
	cmp	r10, #0
	moveq	r10, r6
	b	.L1
.L17:
	mov	r6, r10
	mov	r10, #0
	b	.L6
.L34:
	.align	2
.L33:
	.word	MSG_SENDPAGE_NOTLAST
	.word	MSG_MORE
	.word	MSG_DONTWAIT
	.word	MSG_NOSIGNAL
	.word	.LC1
	.word	EAGAIN
	.word	RDS_MSG_HAS_ACK_SEQ
	.word	RDS_MSG_RETRANSMITTED
	.word	RDS_FLAG_RETRANSMITTED
	.word	.LC0
	.word	SOCK_NOSPACE
	.word	.LC2
	.word	s_tcp_sndbuf_full
	.size	rds_tcp_xmit, .-rds_tcp_xmit
	.comm	s_tcp_sndbuf_full,4,4
	.comm	SOCK_NOSPACE,4,4
	.comm	RDS_MSG_RETRANSMITTED,4,4
	.comm	RDS_MSG_HAS_ACK_SEQ,4,4
	.comm	RDS_FLAG_RETRANSMITTED,4,4
	.comm	MSG_SENDPAGE_NOTLAST,4,4
	.comm	MSG_NOSIGNAL,4,4
	.comm	MSG_MORE,4,4
	.comm	MSG_DONTWAIT,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
