	.file	"extr_http.c_Read.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"got disconnected, trying to reconnect"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"reconnection failed"
	.text
	.p2align 4
	.type	Read, @function
Read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rbx, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR 24[rbx], 0
	je	.L7
	mov	rbp, rdi
	mov	edi, DWORD PTR [rbx]
	mov	ecx, edx
	test	edi, edi
	jle	.L4
	mov	eax, DWORD PTR UINT64_MAX[rip]
	mov	edi, DWORD PTR 4[rbx]
	mov	r8d, eax
	sub	r8d, edx
	cmp	r8d, edi
	jl	.L5
	lea	eax, [rdi+rdx]
.L6:
	mov	edx, DWORD PTR 8[rbx]
	mov	r9d, edx
	sub	r9d, edi
	cmp	edx, eax
	cmovl	ecx, r9d
.L4:
	lea	r8, 4[rsp]
	mov	rdx, rsi
	mov	rdi, rbp
	mov	DWORD PTR 4[rsp], 0
	mov	rsi, r8
	call	ReadData@PLT
	test	rax, rax
	jne	.L7
	mov	r12d, DWORD PTR 4[rsp]
	test	r12d, r12d
	js	.L10
	jne	.L9
	mov	rdi, rbp
	call	Disconnect@PLT
	cmp	QWORD PTR 16[rbx], 0
	jne	.L18
.L7:
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	edi, 1
	call	assert@PLT
	mov	eax, DWORD PTR 4[rbx]
	mov	r12d, DWORD PTR 4[rsp]
	mov	edx, DWORD PTR [rbx]
	add	eax, r12d
	mov	DWORD PTR 4[rbx], eax
	test	edx, edx
	jle	.L1
	cmp	eax, DWORD PTR 8[rbx]
	jne	.L1
	mov	rdi, rbp
	call	ReadICYMeta@PLT
	test	rax, rax
	jne	.L7
	mov	eax, DWORD PTR [rbx]
	add	eax, DWORD PTR 4[rbx]
	mov	DWORD PTR 8[rbx], eax
	mov	r12d, DWORD PTR 4[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	ecx, eax
	sub	ecx, edi
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, rbp
	lea	rsi, .LC0[rip]
	call	msg_Dbg@PLT
	mov	rdi, rbp
	call	Connect@PLT
	test	rax, rax
	je	.L10
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	msg_Dbg@PLT
	jmp	.L1
.L10:
	mov	r12d, -1
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	Read, .-Read
	.comm	UINT64_MAX,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_http.c_Read.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"got disconnected, trying to reconnect\000"
	.align	2
.LC1:
	.ascii	"reconnection failed\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Read, %function
Read:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r5, [r0]
	mov	r4, r0
	ldr	r0, [r5, #16]
	mov	r3, r2
	mov	r2, r1
	ldr	r1, .L23
	sub	sp, sp, #8
	cmp	r0, #0
	ldr	r1, [r1]
	str	r1, [sp, #4]
	mov	r1,#0
	beq	.L7
	ldr	r1, [r5]
	cmp	r1, #0
	ble	.L4
	ldr	r1, .L23+4
	ldr	r0, [r5, #4]
	ldr	r1, [r1]
	sub	ip, r1, r3
	cmp	ip, r0
	ldr	ip, [r5, #8]
	addge	r1, r0, r3
	sublt	r3, r1, r0
	cmp	ip, r1
	sublt	r3, ip, r0
.L4:
	mov	ip, #0
	mov	r1, sp
	mov	r0, r4
	str	ip, [sp]
	bl	ReadData
	cmp	r0, #0
	bne	.L7
	ldr	r6, [sp]
	cmp	r6, #0
	blt	.L10
	bne	.L9
	mov	r0, r4
	bl	Disconnect
	ldr	r3, [r5, #12]
	cmp	r3, #0
	bne	.L21
.L7:
	mov	r6, #0
.L1:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	mov	r0, r6
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L9:
	mov	r0, #1
	bl	assert
	ldm	r5, {r2, r3}
	ldr	r6, [sp]
	cmp	r2, #0
	add	r3, r6, r3
	str	r3, [r5, #4]
	ble	.L1
	ldr	r2, [r5, #8]
	cmp	r3, r2
	bne	.L1
	mov	r0, r4
	bl	ReadICYMeta
	cmp	r0, #0
	bne	.L7
	ldm	r5, {r2, r3}
	add	r3, r3, r2
	ldr	r6, [sp]
	str	r3, [r5, #8]
	b	.L1
.L21:
	ldr	r1, .L23+8
	mov	r0, r4
	bl	msg_Dbg
	mov	r0, r4
	bl	Connect
	cmp	r0, #0
	beq	.L10
	mov	r0, r4
	ldr	r1, .L23+12
	bl	msg_Dbg
	b	.L1
.L10:
	mvn	r6, #0
	b	.L1
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	.LC2
	.word	UINT64_MAX
	.word	.LC0
	.word	.LC1
	.size	Read, .-Read
	.comm	UINT64_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
