// File: /workspace/github_cpp_makefile_star2_O1/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 0x188bd(%rip), %rsi     # 0x76cbb
movl $0x4, %edi
xorl %eax, %eax
callq 0x53ec4
movq 0x338(%rbx), %rdi
movl (%rdi), %eax
movl %eax, (%rbx)
movq %r14, %rsi
callq 0x5d463
testl %eax, %eax
je 0x5ec98
leaq 0x340(%rbx), %r15
leaq 0x208(%rbx), %rax
movq %rax, -0x40(%rbp)
leaq 0x108(%rbx), %rax
movq %rax, -0x58(%rbp)
leaq 0x310(%rbx), %rax
movq %rax, -0x50(%rbp)
leaq 0x344(%rbx), %rax
movq %rax, -0x60(%rbp)
xorl %r12d, %r12d
movq %r15, -0x30(%rbp)
movq %rbx, -0x48(%rbp)
movq 0x338(%rbx), %rax
imulq $0x128, %r12, %r13      # imm = 0x128
cmpl $0x2, 0x128(%rax,%r13)
jne 0x5e8be
imulq $0x820c, %r12, %r14     # imm = 0x820C
cmpl $0x0, (%r15,%r14)
jne 0x5e8be
movl $0x128, %ecx            # imm = 0x128
addq %r13, %rcx
addq %rcx, %rax
addq %r15, %r14
movslq 0x204(%r14), %rcx
leaq (%r14,%rcx), %rsi
addq $0x208, %rsi            # imm = 0x208
movl $0x7fff, %edx           # imm = 0x7FFF
subl %ecx, %edx
movl 0x118(%rax), %edi
callq 0x5d6b4
cmpl $-0x1, %eax
je 0x5e593
testl %eax, %eax
jle 0x5e8be
addl %eax, 0x204(%r14)
cmpl $0x0, 0x4(%rbx)
je 0x5e5d0
movl $0x100, %edx            # imm = 0x100
leaq -0x260(%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 -0x860(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movl $0x3, %edi
leaq 0x187e3(%rip), %rsi     # 0x76d0e
movl %r12d, %edx
xorl %eax, %eax
callq 0x53ec4
leaq 0x208(%r14), %rbx
movslq 0x204(%r14), %rax
movb $0x0, 0x208(%r14,%rax)
movl 0x204(%r14), %edx
movl $0x5, %edi
leaq 0x187c1(%rip), %rsi     # 0x76d20
movq %rbx, %rcx
xorl %eax, %eax
callq 0x53ec4
cmpl $0x7fff, 0x204(%r14) # imm = 0x7FFF
jl 0x5e675
movl $0x1, %edi
leaq 0x187b6(%rip), %rsi     # 0x76d3c
xorl %eax, %eax
callq 0x53ec4
movq -0x48(%rbp), %rbx
jmp 0x5e5c0
callq 0x8070
movl (%rax), %ecx
testl %ecx, %ecx
je 0x5e5c0
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r13), %edx
movl $0x1, %edi
leaq 0x1870f(%rip), %rsi     # 0x76cc8
xorl %eax, %eax
callq 0x53ec4
movq %rbx, %rdi
movl %r12d, %esi
callq 0x5ecaa
jmp 0x5e8be
movl $0x100, %edx            # imm = 0x100
leaq -0x760(%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 -0x160(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movl $0x3, %edi
leaq 0x188af(%rip), %rsi     # 0x76ec4
movl %r12d, %edx
xorl %eax, %eax
callq 0x53ec4
leaq 0x208(%r14), %r15
movslq 0x204(%r14), %rax
movb $0x0, 0x208(%r14,%rax)
movl 0x204(%r14), %edx
movl $0x5, %edi
leaq 0x1888d(%rip), %rsi     # 0x76ed6
movq %r15, %rcx
xorl %eax, %eax
callq 0x53ec4
cmpl $0x7fff, 0x204(%r14) # imm = 0x7FFF
jl 0x5e736
movl $0x1, %edi
leaq 0x18883(%rip), %rsi     # 0x76ef3
jmp 0x5e8a8
movq %rbx, -0x38(%rbp)
movq %rbx, %rdi
leaq 0x186e0(%rip), %rsi     # 0x76d63
callq 0x8160
testq %rax, %rax
je 0x5e71a
movq %rax, %r15
movq %rax, %rdi
leaq 0x187f4(%rip), %rsi     # 0x76e92
callq 0x8160
testq %rax, %rax
je 0x5e71a
movq %rax, %rdi
leaq 0x186b5(%rip), %rsi     # 0x76d67
callq 0x8160
testq %rax, %rax
je 0x5e71a
movq %rax, %rdi
leaq 0x187cc(%rip), %rsi     # 0x76e92
callq 0x8160
testq %rax, %rax
je 0x5e71a
movq %r15, %rdi
leaq 0x186bc(%rip), %rsi     # 0x76d96
leaq -0x260(%rbp), %rdx
leaq -0x860(%rbp), %r15
movq %r15, %rcx
xorl %eax, %eax
callq 0x8610
cmpl $0x1, %eax
movq -0x48(%rbp), %rbx
jg 0x5e8d3
movl $0x2, %edi
leaq 0x1869b(%rip), %rsi     # 0x76da6
movq %r15, %rdx
xorl %eax, %eax
callq 0x53ec4
jmp 0x5e8af
movl $0x2, %edi
leaq 0x1864d(%rip), %rsi     # 0x76d73
xorl %eax, %eax
callq 0x53ec4
movq -0x48(%rbp), %rbx
jmp 0x5e8af
movq %r15, %rdi
leaq 0x187d9(%rip), %rsi     # 0x76f19
callq 0x8160
movq %rax, -0x38(%rbp)
testq %rax, %rax
je 0x5e89c
movq -0x38(%rbp), %rdi
leaq 0x18735(%rip), %rsi     # 0x76e92
callq 0x8160
testq %rax, %rax
je 0x5e89c
movq %rax, %rdi
leaq 0x187ab(%rip), %rsi     # 0x76f20
callq 0x8160
testq %rax, %rax
je 0x5e89c
movq %rax, %rdi
leaq 0x18703(%rip), %rsi     # 0x76e90
callq 0x8160
testq %rax, %rax
je 0x5e89c
movq -0x38(%rbp), %rdi
leaq 0x187ab(%rip), %rsi     # 0x76f51
leaq -0x760(%rbp), %rdx
leaq -0x260(%rbp), %rcx
xorl %eax, %eax
callq 0x8610
movq %r15, %rdi
leaq 0x1879f(%rip), %rsi     # 0x76f64
callq 0x8160
testq %rax, %rax
je 0x5e819
movq %rax, %r15
movq %rax, %rdi
leaq 0x186b6(%rip), %rsi     # 0x76e92
callq 0x8160
testq %rax, %rax
je 0x5e819
addq $0x5, %r15
subq %r15, %rax
movl $0xff, %ecx
cmpq %rcx, %rax
cmovgeq %rcx, %rax
cltq
leaq -0x160(%rbp), %rdi
movq %r15, %rsi
movq %rax, %r15
movq %rax, %rdx
callq 0x8350
movb $0x0, -0x160(%rbp,%r15)
cmpb $0x0, -0x260(%rbp)
movq -0x30(%rbp), %r15
je 0x5e9f6
movq %rbx, %rdi
leaq -0x260(%rbp), %rsi
callq 0x5ed1f
testl %eax, %eax
je 0x5e9f6
movq -0x40(%rbp), %rsi
cmpb $0x0, (%rsi)
je 0x5eb70
leaq -0x760(%rbp), %rdi
callq 0x8890
testl %eax, %eax
je 0x5eb70
movl $0x2, %edi
leaq 0x18719(%rip), %rsi     # 0x76f87
leaq -0x760(%rbp), %rdx
xorl %eax, %eax
callq 0x53ec4
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r13), %edi
leaq 0x1861c(%rip), %rsi     # 0x76eae
movl $0x15, %edx
jmp 0x5ea24
movl $0x2, %edi
leaq 0x18686(%rip), %rsi     # 0x76f2e
xorl %eax, %eax
callq 0x53ec4
movq %rbx, %rdi
movl %r12d, %esi
callq 0x5ecaa
movq -0x30(%rbp), %r15
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x5e463
jmp 0x5ec98
leaq -0x260(%rbp), %rdi
movl $0x2f, %esi
callq 0x8250
testq %rax, %rax
je 0x5e8fb
incq %rax
leaq -0x160(%rbp), %rdi
movq %rax, %rsi
callq 0x85c0
cmpb $0x0, -0x160(%rbp)
movq -0x40(%rbp), %r15
je 0x5ea2e
movq %rbx, %rdi
leaq -0x160(%rbp), %rsi
callq 0x5ed1f
testl %eax, %eax
je 0x5ea2e
cmpb $0x0, (%r15)
je 0x5ec07
leaq -0x960(%rbp), %r15
movq %r15, %rdi
leaq 0x17a11(%rip), %rsi     # 0x7634f
movq -0x58(%rbp), %rdx
movq -0x40(%rbp), %rcx
xorl %eax, %eax
callq 0x8120
movabsq $0x20636973614220, %rax # imm = 0x20636973614220
movq %rax, -0x352(%rbp)
movups 0x180be(%rip), %xmm0    # 0x76a23
movaps %xmm0, -0x360(%rbp)
movq %r15, %rdi
callq 0x8290
leaq -0x34b(%rbp), %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x5e2c9
movq -0x38(%rbp), %rdi
leaq 0x18462(%rip), %rsi     # 0x76df2
callq 0x8160
testq %rax, %rax
je 0x5e9c3
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 0x5ec07
movl $0x2, %edi
leaq 0x18432(%rip), %rsi     # 0x76e01
xorl %eax, %eax
callq 0x53ec4
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r13), %edi
leaq 0x18306(%rip), %rsi     # 0x76cf2
movl $0x1b, %edx
jmp 0x5ec8e
movl $0x2, %edi
leaq 0x18568(%rip), %rsi     # 0x76f6a
xorl %eax, %eax
callq 0x53ec4
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r13), %edi
leaq 0x18476(%rip), %rsi     # 0x76e95
movl $0x18, %edx
callq 0x5edf0
jmp 0x5e5c0
xorl %r14d, %r14d
movl $0x2, %edi
leaq 0x18395(%rip), %rsi     # 0x76dd2
leaq -0x160(%rbp), %rdx
xorl %eax, %eax
callq 0x53ec4
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r13), %eax
movl %eax, -0x38(%rbp)
movq -0x50(%rbp), %rdi
callq 0x8910
movq 0x308(%rbx), %rdi
testq %rdi, %rdi
je 0x5ea7a
callq 0x8290
movq %rax, %r14
movups 0x1814d(%rip), %xmm0    # 0x76bce
movaps %xmm0, -0x760(%rbp)
movabsq $0xa0d4b4f203030, %rax  # imm = 0xA0D4B4F203030
movq %rax, -0x753(%rbp)
leaq -0x74c(%rbp), %r13
movq %r13, %rdi
leaq 0x1838c(%rip), %rsi     # 0x76e36
leaq 0x18395(%rip), %rdx     # 0x76e46
leaq 0x18395(%rip), %rcx     # 0x76e4d
xorl %eax, %eax
callq 0x8120
movslq %eax, %r15
addq %r13, %r15
callq 0x4febe
movq %rax, %rdi
xorl %esi, %esi
callq 0x5077f
movq %r15, %rdi
leaq 0x18376(%rip), %rsi     # 0x76e54
movq %rax, %rdx
xorl %eax, %eax
callq 0x8120
cltq
movups 0x17f1e(%rip), %xmm0    # 0x76a0f
leaq (%rax,%r15), %rdi
addq $0x2d, %rdi
movups %xmm0, -0x2d(%rdi)
movl $0xa0d65, -0x1d(%rdi)   # imm = 0xA0D65
movups 0x18363(%rip), %xmm0    # 0x76e6e
movups %xmm0, -0xf(%rdi)
movups 0x1834d(%rip), %xmm0    # 0x76e63
movups %xmm0, -0x1a(%rdi)
leaq 0x1835d(%rip), %rsi     # 0x76e7e
movl %r14d, %edx
xorl %eax, %eax
callq 0x8120
leaq -0x760(%rbp), %r15
movq %r15, %rdi
callq 0x8290
movl -0x38(%rbp), %r13d
movl %r13d, %edi
movq %r15, %rsi
movl %eax, %edx
callq 0x5edf0
testl %r14d, %r14d
jle 0x5eb62
movq 0x308(%rbx), %rsi
movl %r13d, %edi
movl %r14d, %edx
callq 0x5edf0
movq -0x50(%rbp), %rdi
callq 0x84b0
jmp 0x5e8af
xorl %r15d, %r15d
cmpl $0x0, 0x340(%rbx,%r15)
je 0x5eb9a
movq -0x60(%rbp), %rax
leaq (%rax,%r15), %rsi
leaq -0x260(%rbp), %rdi
callq 0x8890
testl %eax, %eax
je 0x5ec59
addq $0x820c, %r15           # imm = 0x820C
cmpq $0x820c00, %r15         # imm = 0x820C00
jne 0x5eb73
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r13), %edi
leaq 0x17fe2(%rip), %rsi     # 0x76ba2
movl $0xc, %edx
callq 0x5edf0
movl $0x1, (%r14)
movl $0xffffffff, 0x8208(%r14) # imm = 0xFFFFFFFF
leaq 0x4(%r14), %rdi
leaq -0x260(%rbp), %rsi
callq 0x85c0
addq $0x104, %r14            # imm = 0x104
movq %r14, %rdi
leaq -0x160(%rbp), %rsi
callq 0x85c0
jmp 0x5e8ba
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r13), %edi
leaq 0x17f85(%rip), %rsi     # 0x76ba2
movl $0xc, %edx
callq 0x5edf0
movl $0x1, (%r14)
leaq 0x4(%r14), %rdi
leaq -0x160(%rbp), %rsi
callq 0x85c0
movl $0xffffffff, 0x8208(%r14) # imm = 0xFFFFFFFF
movl $0x0, 0x204(%r14)
jmp 0x5e8ba
movl $0x2, %edi
leaq 0x18322(%rip), %rsi     # 0x76f87
leaq -0x760(%rbp), %rdx
xorl %eax, %eax
callq 0x53ec4
movq 0x338(%rbx), %rax
movl 0x240(%rax,%r13), %edi
leaq 0x1820c(%rip), %rsi     # 0x76e95
movl $0x18, %edx
callq 0x5edf0
jmp 0x5e8af
addq $0x938, %rsp            # imm = 0x938
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq