	.file	"extr_tcp.c_o2net_advance_rx.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"receiving\n"
.LC1:
	.string	"at page_off %zu\n"
.LC2:
	.string	"ret = %d\n"
	.text
	.p2align 4
	.type	o2net_advance_rx, @function
o2net_advance_rx:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	rsi, .LC0[rip]
	xor	eax, eax
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	sclog@PLT
	mov	rdi, rbp
	call	o2net_set_advance_start_time@PLT
	xor	edi, edi
	cmp	QWORD PTR 0[rbp], 0
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L20
	xor	r12d, r12d
	cmp	DWORD PTR 8[rbp], 3
	mov	edi, DWORD PTR 16[rbp]
	jbe	.L21
.L6:
	call	page_address@PLT
	mov	edx, DWORD PTR 8[rbp]
	lea	rsi, .LC1[rip]
	mov	r13, rax
	mov	rdi, rax
	call	msglog@PLT
	mov	edi, DWORD PTR 0[r13]
	movsx	rbx, DWORD PTR 8[rbp]
	call	be16_to_cpu@PLT
	sub	rbx, 4
	cdqe
	cmp	rbx, rax
	jb	.L9
	mov	ebx, DWORD PTR 8[rbp]
.L10:
	mov	edi, DWORD PTR 0[r13]
	movsx	rbx, ebx
	sub	rbx, 4
	call	be16_to_cpu@PLT
	cdqe
	cmp	rbx, rax
	jne	.L5
	mov	rsi, r13
	mov	rdi, rbp
	call	o2net_process_message@PLT
	mov	DWORD PTR 8[rbp], 0
	mov	r12d, eax
	test	eax, eax
	mov	eax, 1
	cmove	r12d, eax
.L5:
	mov	edx, r12d
	mov	rdi, rbp
	xor	eax, eax
	lea	rsi, .LC2[rip]
	call	sclog@PLT
	mov	rdi, rbp
	call	o2net_set_advance_stop_time@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	call	page_address@PLT
	movsx	rsi, DWORD PTR 8[rbp]
	mov	edi, DWORD PTR 12[rbp]
	mov	edx, 4
	sub	rdx, rsi
	add	rsi, rax
	call	o2net_recv_tcp_msg@PLT
	mov	r12d, eax
	test	eax, eax
	jle	.L5
	mov	eax, DWORD PTR 8[rbp]
	add	eax, r12d
	mov	DWORD PTR 8[rbp], eax
	cmp	eax, 4
	je	.L22
.L7:
	cmp	eax, 3
	jbe	.L5
	mov	edi, DWORD PTR 16[rbp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, DWORD PTR 8[rbp]
	xor	r12d, r12d
	cmp	eax, 3
	jbe	.L23
.L3:
	cmp	eax, 4
	jne	.L5
	mov	rdi, rbp
	call	o2net_check_handshake@PLT
	xor	edi, edi
	cmp	QWORD PTR 0[rbp], 0
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L5
	mov	r12d, DWORD PTR EPROTO[rip]
	neg	r12d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, DWORD PTR 16[rbp]
	call	page_address@PLT
	movsx	r12, DWORD PTR 8[rbp]
	mov	edi, DWORD PTR 0[r13]
	add	r12, rax
	call	be16_to_cpu@PLT
	movsx	rcx, DWORD PTR 8[rbp]
	mov	edi, DWORD PTR 12[rbp]
	mov	rsi, r12
	mov	edx, 4
	cdqe
	sub	rdx, rcx
	add	rdx, rax
	call	o2net_recv_tcp_msg@PLT
	mov	r12d, eax
	test	eax, eax
	jle	.L5
	mov	ebx, DWORD PTR 8[rbp]
	add	ebx, eax
	mov	DWORD PTR 8[rbp], ebx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L23:
	mov	edi, DWORD PTR 16[rbp]
	call	page_address@PLT
	movsx	rsi, DWORD PTR 8[rbp]
	mov	edi, DWORD PTR 12[rbp]
	mov	edx, 4
	sub	rdx, rsi
	add	rsi, rax
	call	o2net_recv_tcp_msg@PLT
	mov	r12d, eax
	test	eax, eax
	jle	.L24
	mov	eax, DWORD PTR 8[rbp]
	add	eax, r12d
	mov	DWORD PTR 8[rbp], eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L24:
	mov	eax, DWORD PTR 8[rbp]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edi, DWORD PTR 16[rbp]
	call	page_address@PLT
	mov	edi, DWORD PTR [rax]
	call	be16_to_cpu@PLT
	cmp	eax, DWORD PTR O2NET_MAX_PAYLOAD_BYTES[rip]
	jle	.L18
	mov	eax, DWORD PTR EOVERFLOW[rip]
	mov	r12d, eax
	neg	r12d
	test	eax, eax
	jns	.L5
.L18:
	mov	eax, DWORD PTR 8[rbp]
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	o2net_advance_rx, .-o2net_advance_rx
	.comm	O2NET_MAX_PAYLOAD_BYTES,4,4
	.comm	EPROTO,4,4
	.comm	EOVERFLOW,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.c_o2net_advance_rx.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"receiving\012\000"
	.align	2
.LC1:
	.ascii	"at page_off %zu\012\000"
	.align	2
.LC2:
	.ascii	"ret = %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	o2net_advance_rx, %function
o2net_advance_rx:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r1, .L23
	bl	sclog
	mov	r0, r4
	bl	o2net_set_advance_start_time
	ldr	r0, [r4]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	subs	r5, r0, #0
	ldr	r3, [r4, #4]
	bne	.L19
	cmp	r3, #3
	ldr	r0, [r4, #12]
	bls	.L20
.L6:
	bl	page_address
	mov	r6, r0
	ldr	r2, [r4, #4]
	ldr	r1, .L23+4
	bl	msglog
	ldr	r0, [r6]
	ldr	r7, [r4, #4]
	bl	be16_to_cpu
	sub	r7, r7, #4
	cmp	r7, r0
	bcc	.L9
	ldr	r7, [r4, #4]
.L10:
	ldr	r0, [r6]
	bl	be16_to_cpu
	sub	r7, r7, #4
	cmp	r7, r0
	bne	.L5
	mov	r1, r6
	mov	r0, r4
	bl	o2net_process_message
	mov	r3, #0
	subs	r5, r0, #0
	moveq	r5, #1
	str	r3, [r4, #4]
.L5:
	mov	r2, r5
	ldr	r1, .L23+8
	mov	r0, r4
	bl	sclog
	mov	r0, r4
	bl	o2net_set_advance_stop_time
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	bl	page_address
	mov	r1, r0
	ldr	r2, [r4, #4]
	ldr	r0, [r4, #8]
	add	r1, r1, r2
	rsb	r2, r2, #4
	bl	o2net_recv_tcp_msg
	subs	r5, r0, #0
	ble	.L5
	ldr	r3, [r4, #4]
	add	r3, r5, r3
	cmp	r3, #4
	str	r3, [r4, #4]
	beq	.L21
.L7:
	cmp	r3, #3
	bls	.L5
	ldr	r0, [r4, #12]
	b	.L6
.L19:
	cmp	r3, #3
	movhi	r5, #0
	bls	.L22
.L3:
	cmp	r3, #4
	bne	.L5
	mov	r0, r4
	bl	o2net_check_handshake
	ldr	r0, [r4]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	cmp	r0, #0
	ldrne	r3, .L23+12
	ldrne	r0, [r3]
	rsbne	r5, r0, #0
	b	.L5
.L9:
	ldr	r0, [r4, #12]
	bl	page_address
	mov	r5, r0
	ldr	r1, [r4, #4]
	ldr	r0, [r6]
	add	r5, r5, r1
	bl	be16_to_cpu
	ldr	r3, [r4, #4]
	mov	r1, r5
	rsb	r3, r3, #4
	add	r2, r3, r0
	ldr	r0, [r4, #8]
	bl	o2net_recv_tcp_msg
	subs	r5, r0, #0
	ble	.L5
	ldr	r7, [r4, #4]
	add	r7, r5, r7
	str	r7, [r4, #4]
	b	.L10
.L22:
	ldr	r0, [r4, #12]
	bl	page_address
	mov	r1, r0
	ldr	r2, [r4, #4]
	ldr	r0, [r4, #8]
	add	r1, r1, r2
	rsb	r2, r2, #4
	bl	o2net_recv_tcp_msg
	ldr	r3, [r4, #4]
	subs	r5, r0, #0
	addgt	r3, r5, r3
	strgt	r3, [r4, #4]
	b	.L3
.L21:
	ldr	r0, [r4, #12]
	bl	page_address
	ldr	r0, [r0]
	bl	be16_to_cpu
	ldr	r3, .L23+16
	ldr	r3, [r3]
	cmp	r0, r3
	ble	.L17
	ldr	r3, .L23+20
	ldr	r0, [r3]
	cmp	r0, #0
	rsb	r5, r0, #0
	bge	.L5
.L17:
	ldr	r3, [r4, #4]
	b	.L7
.L24:
	.align	2
.L23:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	EPROTO
	.word	O2NET_MAX_PAYLOAD_BYTES
	.word	EOVERFLOW
	.size	o2net_advance_rx, .-o2net_advance_rx
	.comm	O2NET_MAX_PAYLOAD_BYTES,4,4
	.comm	EPROTO,4,4
	.comm	EOVERFLOW,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
