// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::wait_ntripc(bamboo::ntripc_t*, char*)
static void wait_ntripc(ntripc_t *ntripc, char *msg)
	{
		unsigned char *buff;
		int i, n, nmax, err;

		tracet(4, "wait_ntripc\n");

		ntripc->state = ntripc->tcp->svr.state;

		if (!waittcpsvr(ntripc->tcp, msg)) return;

		for (i = 0; i < MAXCLI; i++) {
			if (ntripc->tcp->cli[i].state != 2 || ntripc->con[i].state) continue;

			/* receive ntrip-caster request */
			buff = ntripc->con[i].buff + ntripc->con[i].nb;
			nmax = NTRIP_MAXRSP - ntripc->con[i].nb - 1;

			if ((n = recv_nb(ntripc->tcp->cli[i].sock, buff, nmax)) == -1) {
				if ((err = errsock())) {
					tracet(1, "accept_ntripc: recv error sock=%d err=%d\n",
						ntripc->tcp->cli[i].sock, err);
				}
				discon_ntripc(ntripc, i);
				continue;
			}
			if (n <= 0) continue;

			/* test ntrip-caster request */
			ntripc->con[i].nb += n;
			if (ntripc->type) {
				rsp_ntripc_c(ntripc, i);
			}
			else {
				rsp_ntripc_s(ntripc, i);
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x938, %rsp            # imm = 0x938
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1937f(%rip), %rsi     # 0x76c40
movl $0x4, %edi
xorl %eax, %eax
callq 0x5342c
movq 0x338(%rbx), %rdi
movl (%rdi), %eax
movl %eax, (%rbx)
movq %r14, %rsi
callq 0x5c934
testl %eax, %eax
je 0x5e146
leaq 0x340(%rbx), %r15
leaq 0x208(%rbx), %rax
movq %rax, -0x40(%rbp)
leaq 0x108(%rbx), %rax
movq %rax, -0x50(%rbp)
leaq 0x310(%rbx), %rax
movq %rax, -0x48(%rbp)
leaq 0x344(%rbx), %rax
movq %rax, -0x58(%rbp)
xorl %r12d, %r12d
movq %r15, -0x30(%rbp)
movq 0x338(%rbx), %rax
imulq $0x128, %r12, %r14      # imm = 0x128
cmpl $0x2, 0x128(%rax,%r14)
jne 0x5dd6c
imulq $0x820c, %r12, %r13     # imm = 0x820C
cmpl $0x0, (%r15,%r13)
jne 0x5dd6c
movl $0x128, %ecx            # imm = 0x128
addq %r14, %rcx
addq %rcx, %rax
addq %r15, %r13
movslq 0x204(%r13), %rcx
leaq (%rcx,%r13), %rsi
addq $0x208, %rsi            # imm = 0x208
movl $0x7fff, %edx           # imm = 0x7FFF
subl %ecx, %edx
movl 0x118(%rax), %edi
callq 0x5cb70
cmpl $-0x1, %eax
je 0x5da4f
testl %eax, %eax
jle 0x5dd6c
addl %eax, 0x204(%r13)
leaq 0x208(%r13), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, 0x4(%rbx)
je 0x5da85
movl $0x100, %edx            # imm = 0x100
leaq -0x160(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movl $0x100, %edx            # imm = 0x100
leaq -0x260(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movl $0x100, %edx            # imm = 0x100
leaq -0x860(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movl $0x3, %edi
leaq 0x1929e(%rip), %rsi     # 0x76c93
movl %r12d, %edx
xorl %eax, %eax
callq 0x5342c
movslq 0x204(%r13), %rax
movb $0x0, 0x208(%r13,%rax)
movl 0x204(%r13), %edx
movl $0x5, %edi
leaq 0x19283(%rip), %rsi     # 0x76ca5
movq -0x38(%rbp), %rcx
xorl %eax, %eax
callq 0x5342c
cmpl $0x7fff, 0x204(%r13) # imm = 0x7FFF
jl 0x5db36
movl $0x1, %edi
leaq 0x19277(%rip), %rsi     # 0x76cc1
jmp 0x5db1f
callq 0x8070
movl (%rax), %ecx
testl %ecx, %ecx
je 0x5db26
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r14), %edx
movl $0x1, %edi
leaq 0x191d4(%rip), %rsi     # 0x76c4d
xorl %eax, %eax
callq 0x5342c
jmp 0x5db26
movl $0x100, %edx            # imm = 0x100
leaq -0x760(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movl $0x100, %edx            # imm = 0x100
leaq -0x160(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movl $0x100, %edx            # imm = 0x100
leaq -0x260(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movl $0x3, %edi
leaq 0x1937f(%rip), %rsi     # 0x76e49
movl %r12d, %edx
xorl %eax, %eax
callq 0x5342c
movslq 0x204(%r13), %rax
movb $0x0, 0x208(%r13,%rax)
movl 0x204(%r13), %edx
movl $0x5, %edi
leaq 0x19364(%rip), %rsi     # 0x76e5b
movq -0x38(%rbp), %rcx
xorl %eax, %eax
callq 0x5342c
cmpl $0x7fff, 0x204(%r13) # imm = 0x7FFF
jl 0x5dbe5
movl $0x1, %edi
leaq 0x19359(%rip), %rsi     # 0x76e78
xorl %eax, %eax
callq 0x5342c
movq %rbx, %rdi
movl %r12d, %esi
callq 0x5e158
jmp 0x5dd6c
movq -0x38(%rbp), %rdi
leaq 0x191a7(%rip), %rsi     # 0x76ce8
callq 0x8160
testq %rax, %rax
je 0x5dbd4
movq %rax, %r15
movq %rax, %rdi
leaq 0x192bb(%rip), %rsi     # 0x76e17
callq 0x8160
testq %rax, %rax
je 0x5dbd4
movq %rax, %rdi
leaq 0x1917c(%rip), %rsi     # 0x76cec
callq 0x8160
testq %rax, %rax
je 0x5dbd4
movq %rax, %rdi
leaq 0x19293(%rip), %rsi     # 0x76e17
callq 0x8160
testq %rax, %rax
je 0x5dbd4
movq %r15, %rdi
leaq 0x19183(%rip), %rsi     # 0x76d1b
leaq -0x160(%rbp), %rdx
leaq -0x860(%rbp), %r15
movq %r15, %rcx
xorl %eax, %eax
callq 0x8610
cmpl $0x1, %eax
jg 0x5dd81
movl $0x2, %edi
leaq 0x19166(%rip), %rsi     # 0x76d2b
movq %r15, %rdx
xorl %eax, %eax
callq 0x5342c
jmp 0x5dd5d
movl $0x2, %edi
leaq 0x19118(%rip), %rsi     # 0x76cf8
jmp 0x5dd56
movq -0x38(%rbp), %rdi
leaq 0x192ae(%rip), %rsi     # 0x76e9e
callq 0x8160
testq %rax, %rax
je 0x5dd4a
movq %rax, %r15
movq %rax, %rdi
leaq 0x1920c(%rip), %rsi     # 0x76e17
callq 0x8160
testq %rax, %rax
je 0x5dd4a
movq %rax, %rdi
leaq 0x19282(%rip), %rsi     # 0x76ea5
callq 0x8160
testq %rax, %rax
je 0x5dd4a
movq %rax, %rdi
leaq 0x191da(%rip), %rsi     # 0x76e15
callq 0x8160
testq %rax, %rax
je 0x5dd4a
movq %r15, %rdi
leaq 0x19283(%rip), %rsi     # 0x76ed6
leaq -0x760(%rbp), %rdx
leaq -0x160(%rbp), %rcx
xorl %eax, %eax
callq 0x8610
movq -0x38(%rbp), %rdi
leaq 0x19276(%rip), %rsi     # 0x76ee9
callq 0x8160
testq %rax, %rax
je 0x5dcc7
movq %rax, %r15
movq %rax, %rdi
leaq 0x1918d(%rip), %rsi     # 0x76e17
callq 0x8160
testq %rax, %rax
je 0x5dcc7
addq $0x5, %r15
subq %r15, %rax
movl $0xff, %ecx
cmpq %rcx, %rax
cmovgeq %rcx, %rax
cltq
leaq -0x260(%rbp), %rdi
movq %r15, %rsi
movq %rax, %r15
movq %rax, %rdx
callq 0x8350
movb $0x0, -0x260(%rbp,%r15)
cmpb $0x0, -0x160(%rbp)
movq -0x30(%rbp), %r15
je 0x5dfe4
movq %rbx, %rdi
leaq -0x160(%rbp), %rsi
callq 0x5e1cd
testl %eax, %eax
je 0x5dfe4
movq -0x40(%rbp), %rsi
cmpb $0x0, (%rsi)
je 0x5e01c
leaq -0x760(%rbp), %rdi
callq 0x8880
testl %eax, %eax
je 0x5e01c
movl $0x2, %edi
leaq 0x191f0(%rip), %rsi     # 0x76f0c
leaq -0x760(%rbp), %rdx
xorl %eax, %eax
callq 0x5342c
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r14), %edi
leaq 0x190f3(%rip), %rsi     # 0x76e33
movl $0x15, %edx
jmp 0x5e012
movl $0x2, %edi
leaq 0x1915d(%rip), %rsi     # 0x76eb3
xorl %eax, %eax
callq 0x5342c
movq %rbx, %rdi
movl %r12d, %esi
callq 0x5e158
movq -0x30(%rbp), %r15
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x5d922
jmp 0x5e146
leaq -0x160(%rbp), %rdi
movl $0x2f, %esi
callq 0x8250
testq %rax, %rax
leaq -0x260(%rbp), %r15
je 0x5dea6
incq %rax
movq %r15, %rdi
movq %rax, %rsi
callq 0x85c0
cmpb $0x0, -0x260(%rbp)
je 0x5dea6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5e1cd
testl %eax, %eax
je 0x5dea6
movq -0x40(%rbp), %rax
cmpb $0x0, (%rax)
je 0x5e0b4
leaq -0x960(%rbp), %r15
movq %r15, %rdi
leaq 0x184e6(%rip), %rsi     # 0x762d4
movq -0x50(%rbp), %rdx
movq -0x40(%rbp), %rcx
xorl %eax, %eax
callq 0x8120
movabsq $0x20636973614220, %rax # imm = 0x20636973614220
movq %rax, -0x352(%rbp)
movups 0x18b93(%rip), %xmm0    # 0x769a8
movaps %xmm0, -0x360(%rbp)
movq %r15, %rdi
callq 0x8290
leaq -0x34b(%rbp), %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x5d762
movq -0x38(%rbp), %rdi
leaq 0x18f37(%rip), %rsi     # 0x76d77
callq 0x8160
testq %rax, %rax
je 0x5de73
movq %rax, %r15
leaq -0x360(%rbp), %rdi
callq 0x8290
movq %r15, %rdi
leaq -0x360(%rbp), %rsi
movq %rax, %rdx
callq 0x82f0
testl %eax, %eax
je 0x5e0b4
movl $0x2, %edi
leaq 0x18f07(%rip), %rsi     # 0x76d86
xorl %eax, %eax
callq 0x5342c
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r14), %edi
leaq 0x18ddb(%rip), %rsi     # 0x76c77
movl $0x1b, %edx
jmp 0x5e13c
xorl %r13d, %r13d
movl $0x2, %edi
leaq 0x18ea2(%rip), %rsi     # 0x76d57
movq %r15, %rdx
xorl %eax, %eax
callq 0x5342c
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r14), %eax
movl %eax, -0x38(%rbp)
movq -0x48(%rbp), %rdi
callq 0x8900
movq 0x308(%rbx), %rdi
testq %rdi, %rdi
je 0x5deee
callq 0x8290
movq %rax, %r13
movups 0x18c5e(%rip), %xmm0    # 0x76b53
movaps %xmm0, -0x760(%rbp)
movabsq $0xa0d4b4f203030, %rax  # imm = 0xA0D4B4F203030
movq %rax, -0x753(%rbp)
leaq -0x74c(%rbp), %r14
movq %r14, %rdi
leaq 0x18e9d(%rip), %rsi     # 0x76dbb
leaq 0x18ea6(%rip), %rdx     # 0x76dcb
leaq 0x18ea6(%rip), %rcx     # 0x76dd2
xorl %eax, %eax
callq 0x8120
movslq %eax, %r15
addq %r14, %r15
callq 0x4f542
movq %rax, %rdi
xorl %esi, %esi
callq 0x4fdbe
movq %r15, %rdi
leaq 0x18e87(%rip), %rsi     # 0x76dd9
movq %rax, %rdx
xorl %eax, %eax
callq 0x8120
cltq
movups 0x18a2f(%rip), %xmm0    # 0x76994
leaq (%rax,%r15), %rdi
addq $0x2d, %rdi
movups %xmm0, -0x2d(%rdi)
movl $0xa0d6573, -0x1e(%rdi) # imm = 0xA0D6573
movups 0x18e69(%rip), %xmm0    # 0x76de8
movups %xmm0, -0x1a(%rdi)
movups 0x18e69(%rip), %xmm0    # 0x76df3
movups %xmm0, -0xf(%rdi)
leaq 0x18e6e(%rip), %rsi     # 0x76e03
movl %r13d, %edx
xorl %eax, %eax
callq 0x8120
leaq -0x760(%rbp), %r14
movq %r14, %rdi
callq 0x8290
movl -0x38(%rbp), %r15d
movl %r15d, %edi
movq %r14, %rsi
movl %eax, %edx
callq 0x5e2a4
testl %r13d, %r13d
jle 0x5dfd6
movq 0x308(%rbx), %rsi
movl %r15d, %edi
movl %r13d, %edx
callq 0x5e2a4
movq -0x48(%rbp), %rdi
callq 0x84b0
jmp 0x5dd5d
movl $0x2, %edi
leaq 0x18eff(%rip), %rsi     # 0x76eef
xorl %eax, %eax
callq 0x5342c
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r14), %edi
leaq 0x18e0d(%rip), %rsi     # 0x76e1a
movl $0x18, %edx
callq 0x5e2a4
jmp 0x5db26
xorl %r15d, %r15d
cmpl $0x0, 0x340(%rbx,%r15)
je 0x5e046
movq -0x58(%rbp), %rax
leaq (%rax,%r15), %rsi
leaq -0x160(%rbp), %rdi
callq 0x8880
testl %eax, %eax
je 0x5e107
addq $0x820c, %r15           # imm = 0x820C
cmpq $0x820c00, %r15         # imm = 0x820C00
jne 0x5e01f
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r14), %edi
leaq 0x18abb(%rip), %rsi     # 0x76b27
movl $0xc, %edx
callq 0x5e2a4
movl $0x1, (%r13)
movl $0xffffffff, 0x8208(%r13) # imm = 0xFFFFFFFF
leaq 0x4(%r13), %rdi
leaq -0x160(%rbp), %rsi
callq 0x85c0
addq $0x104, %r13            # imm = 0x104
movq %r13, %rdi
leaq -0x260(%rbp), %rsi
callq 0x85c0
jmp 0x5dd68
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r14), %edi
leaq 0x18a5d(%rip), %rsi     # 0x76b27
movl $0xc, %edx
callq 0x5e2a4
movl $0x1, (%r13)
leaq 0x4(%r13), %rdi
leaq -0x260(%rbp), %rsi
callq 0x85c0
movl $0xffffffff, 0x8208(%r13) # imm = 0xFFFFFFFF
movl $0x0, 0x204(%r13)
jmp 0x5dd68
movl $0x2, %edi
leaq 0x18df9(%rip), %rsi     # 0x76f0c
leaq -0x760(%rbp), %rdx
xorl %eax, %eax
callq 0x5342c
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r14), %edi
leaq 0x18ce3(%rip), %rsi     # 0x76e1a
movl $0x18, %edx
callq 0x5e2a4
jmp 0x5dd5d
addq $0x938, %rsp            # imm = 0x938
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq