// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::strstatx(bamboo::stream_t*, char*)
extern int strstatx(stream_t *stream, char *msg)
	{
		int state;

		tracet(4, "strstatx:\n");

		strlock(stream);

		if (!stream->port) {
			strunlock(stream);
			return stream->state;
		}
		switch (stream->type) {
		case STR_SERIAL: state = statexserial((serial_t *)stream->port, msg); break;
		case STR_FILE: state = statexfile((file_t   *)stream->port, msg); break;
		case STR_TCPSVR: state = statextcpsvr((tcpsvr_t *)stream->port, msg); break;
		case STR_TCPCLI: state = statextcpcli((tcpcli_t *)stream->port, msg); break;
		case STR_NTRIPSVR:
		case STR_NTRIPCLI: state = statexntrip((ntrip_t  *)stream->port, msg); break;
		case STR_NTRIPC_C:
		case STR_NTRIPC_S: state = statexntripc((ntripc_t *)stream->port, msg); break;
		case STR_UDPSVR: state = statexudpsvr((udp_t    *)stream->port, msg); break;
		case STR_UDPCLI: state = statexudpcli((udp_t    *)stream->port, msg); break;
		case STR_MEMBUF: state = statexmembuf((membuf_t *)stream->port, msg); break;
		case STR_FTP: state = statexftp((ftp_t    *)stream->port, msg); break;
		case STR_HTTP: state = statexftp((ftp_t    *)stream->port, msg); break;
		default:
			msg[0] = '\0';
			strunlock(stream);
			return 0;
		}
		if (state == 2 && (int)(tickget() - stream->tact) <= TINTACT) state = 3;
		strunlock(stream);
		return state;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x1a087(%rip), %rsi     # 0x6be80
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0x4acf2
leaq 0x30(%rbx), %r14
movq %r14, %rdi
callq 0x8900
movq 0x58(%rbx), %r15
testq %r15, %r15
je 0x51f99
movl (%rbx), %eax
decl %eax
cmpl $0xd, %eax
ja 0x52374
leaq 0x19ee8(%rip), %rcx     # 0x6bd18
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl (%r15), %eax
testl %eax, %eax
jne 0x51e49
movq 0x8510(%r15), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movabsq $0xa3a706972746e, %rax  # imm = 0xA3A706972746E
movq %rax, (%r13)
addq $0x7, %r13
leaq 0x1b54b(%rip), %rsi     # 0x6d3b0
xorl %r12d, %r12d
movq %r13, %rdi
movl -0x2c(%rbp), %edx
xorl %eax, %eax
callq 0x8110
cmpl $0x0, -0x2c(%rbp)
je 0x526ff
cltq
addq %rax, %r13
leaq 0x1b525(%rip), %rsi     # 0x6d3b0
movq %r13, %rdi
movl -0x2c(%rbp), %edx
xorl %eax, %eax
callq 0x8110
movq %rbx, %r12
movslq %eax, %rbx
addq %r13, %rbx
movl 0x4(%r15), %edx
leaq 0x1b65c(%rip), %rsi     # 0x6d508
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movq %r15, %r13
movq %r14, %r15
movslq %eax, %r14
addq %rbx, %r14
movl 0x8(%r13), %edx
leaq 0x1b64b(%rip), %rsi     # 0x6d518
movq %r14, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rbx
addq %r14, %rbx
leaq 0xc(%r13), %rdx
leaq 0x1b640(%rip), %rsi     # 0x6d528
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %r14
addq %rbx, %r14
leaq 0x10c(%r13), %rdx
leaq 0x1b632(%rip), %rsi     # 0x6d538
movq %r14, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rbx
addq %r14, %rbx
leaq 0x20c(%r13), %rdx
leaq 0x1b624(%rip), %rsi     # 0x6d548
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %r14
addq %rbx, %r14
leaq 0x30c(%r13), %rdx
leaq 0x1b616(%rip), %rsi     # 0x6d558
movq %r14, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rbx
addq %r14, %rbx
movq %r15, %r14
leaq 0x40c(%r13), %rdx
leaq 0x1b605(%rip), %rsi     # 0x6d568
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
cltq
movabsq $0xa3a7276732020, %rcx  # imm = 0xA3A7276732020
leaq (%rax,%rbx), %rsi
addq $0x7, %rsi
movq %r12, %rbx
movq %rcx, -0x7(%rsi)
movq 0x8510(%r13), %rdi
callq 0x55792
jmp 0x524d7
movq %r14, %rdi
callq 0x84b0
movl 0x8(%rbx), %r12d
jmp 0x52707
movl (%r15), %eax
movl %eax, -0x2c(%rbp)
movabsq $0xa3a63706972746e, %rax # imm = 0xA3A63706972746E
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
movl (%r15), %edx
leaq 0x1b3df(%rip), %rsi     # 0x6d3b0
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x8110
movl -0x2c(%rbp), %ecx
testl %ecx, %ecx
je 0x526ff
movq %rbx, -0x38(%rbp)
movq %r14, -0x40(%rbp)
cltq
addq %rax, %r13
movl 0x4(%r15), %edx
leaq 0x1b507(%rip), %rsi     # 0x6d508
movq %r13, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rbx
addq %r13, %rbx
leaq 0x8(%r15), %rdx
leaq 0x1b51c(%rip), %rsi     # 0x6d538
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %r14
addq %rbx, %r14
leaq 0x108(%r15), %rdx
leaq 0x1b50e(%rip), %rsi     # 0x6d548
movq %r14, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rbx
addq %r14, %rbx
leaq 0x208(%r15), %rdx
leaq 0x1b500(%rip), %rsi     # 0x6d558
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
cltq
leaq (%rbx,%rax), %r14
movabsq $0xa3a7276732020, %rcx  # imm = 0xA3A7276732020
leaq (%rax,%rbx), %rsi
addq $0x7, %rsi
movq %rcx, -0x7(%rsi)
movq 0x338(%r15), %rdi
callq 0x55792
cltq
addq %rax, %r14
addq $0x7, %r14
leaq 0x344(%r15), %r12
movl $0x128, %ecx            # imm = 0x128
xorl %ebx, %ebx
movq %r15, -0x50(%rbp)
cmpq $0x100, %rbx            # imm = 0x100
je 0x524cf
movq 0x338(%r15), %rax
cmpl $0x0, (%rax,%rcx)
je 0x52159
movq %r14, %rdi
leaq 0x1b3f0(%rip), %rsi     # 0x6d4bd
movl %ebx, %edx
xorl %eax, %eax
movq %rcx, -0x48(%rbp)
callq 0x8110
movslq %eax, %r13
addq %r14, %r13
movq 0x338(%r15), %rdi
addq -0x48(%rbp), %rdi
movq %r13, %rsi
callq 0x55792
movslq %eax, %r14
addq %r13, %r14
movq %r14, %rdi
leaq 0x1b475(%rip), %rsi     # 0x6d578
movq %r12, %rdx
xorl %eax, %eax
callq 0x8110
movslq %eax, %r13
addq %r14, %r13
leaq 0x100(%r12), %rdx
movq %r13, %rdi
leaq 0x1b463(%rip), %rsi     # 0x6d588
xorl %eax, %eax
callq 0x8110
movslq %eax, %r15
addq %r13, %r15
movl 0x200(%r12), %edx
movq %r15, %rdi
leaq 0x1b454(%rip), %rsi     # 0x6d598
xorl %eax, %eax
callq 0x8110
movq -0x48(%rbp), %rcx
movslq %eax, %r14
addq %r15, %r14
movq -0x50(%rbp), %r15
incq %rbx
addq $0x820c, %r12           # imm = 0x820C
addq $0x128, %rcx            # imm = 0x128
jmp 0x520a5
movl (%r15), %edx
xorl %eax, %eax
cmpl $0x3, %edx
setl %cl
testl %edx, %edx
je 0x526e7
movb %cl, %al
leal -0x1(,%rax,4), %r12d
jmp 0x526ff
movl (%r15), %edx
movl %edx, -0x2c(%rbp)
movabsq $0xa3a727673706475, %rax # imm = 0xA3A727673706475
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1b1fb(%rip), %rsi     # 0x6d3b0
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x8110
movl -0x2c(%rbp), %ecx
testl %ecx, %ecx
je 0x526ff
cltq
addq %rax, %r13
movl 0x4(%r15), %edx
leaq 0x1b32b(%rip), %rsi     # 0x6d508
movq %r13, %rdi
xorl %eax, %eax
callq 0x8110
movq %r15, %r12
movq %rbx, %r15
movslq %eax, %rbx
addq %r13, %rbx
movl 0x11c(%r12), %edx
leaq 0x1b3af(%rip), %rsi     # 0x6d5b1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rdi
addq %rbx, %rdi
movq %r15, %rbx
movl 0x8(%r12), %edx
jmp 0x52359
movl (%r15), %edx
movl %edx, -0x2c(%rbp)
movabsq $0xa3a6675626d656d, %rax # imm = 0xA3A6675626D656D
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1b16d(%rip), %rsi     # 0x6d3b0
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x8110
movl -0x2c(%rbp), %ecx
testl %ecx, %ecx
je 0x526ff
cltq
addq %rax, %r13
movl 0xc(%r15), %edx
leaq 0x1b37f(%rip), %rsi     # 0x6d5ea
movq %r13, %rdi
xorl %eax, %eax
callq 0x8110
movq %r15, %r12
movq %rbx, %r15
movslq %eax, %rbx
addq %r13, %rbx
movl 0x4(%r12), %edx
leaq 0x1b36d(%rip), %rsi     # 0x6d5fa
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rdi
addq %rbx, %rdi
movq %r15, %rbx
movl 0x8(%r12), %edx
leaq 0x1b35e(%rip), %rsi     # 0x6d60a
jmp 0x52360
movl (%r15), %edx
movl %edx, -0x2c(%rbp)
movabsq $0xa3a727673706475, %rax # imm = 0xA3A727673706475
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1b0db(%rip), %rsi     # 0x6d3b0
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x8110
movl -0x2c(%rbp), %ecx
testl %ecx, %ecx
je 0x526ff
cltq
addq %rax, %r13
movl 0x4(%r15), %edx
leaq 0x1b20b(%rip), %rsi     # 0x6d508
movq %r13, %rdi
xorl %eax, %eax
callq 0x8110
movq %rbx, %r12
movslq %eax, %rbx
addq %r13, %rbx
movl 0x11c(%r15), %edx
leaq 0x1b293(%rip), %rsi     # 0x6d5b1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movq %r15, %r13
movq %r14, %r15
movslq %eax, %r14
addq %rbx, %r14
movq %r12, %rbx
leaq 0xc(%r13), %rdx
leaq 0x1b28f(%rip), %rsi     # 0x6d5d1
movq %r14, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rdi
addq %r14, %rdi
movq %r15, %r14
movl 0x8(%r13), %edx
leaq 0x1b261(%rip), %rsi     # 0x6d5c1
xorl %eax, %eax
callq 0x8110
jmp 0x524d7
movl (%r15), %eax
jmp 0x524da
movb $0x0, (%r13)
movq %r14, %rdi
callq 0x84b0
xorl %r12d, %r12d
jmp 0x52707
xorl %eax, %eax
cmpl 0x4(%r15), %eax
movl $0x0, %r12d
sbbl %r12d, %r12d
orl $0x2, %r12d
movabsq $0xa3a6c6169726573, %rax # imm = 0xA3A6C6169726573
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
leaq 0x8(%r13), %rdi
leaq 0x1aff6(%rip), %rsi     # 0x6d3b0
movl %r12d, %edx
xorl %eax, %eax
callq 0x8110
cltq
movq %rbx, -0x38(%rbp)
leaq (%rax,%r13), %rbx
addq $0x8, %rbx
movl (%r15), %edx
leaq 0x1afe4(%rip), %rsi     # 0x6d3c0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rdi
addq %rbx, %rdi
movq -0x38(%rbp), %rbx
movl 0x4(%r15), %edx
leaq 0x1afd5(%rip), %rsi     # 0x6d3d0
xorl %eax, %eax
callq 0x8110
movl %r12d, %eax
jmp 0x524da
movl (%r15), %edx
movl %edx, -0x2c(%rbp)
movabsq $0xa3a727673706374, %rax # imm = 0xA3A727673706374
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1af82(%rip), %rsi     # 0x6d3b0
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x8110
movl -0x2c(%rbp), %ecx
testl %ecx, %ecx
je 0x526ff
movq %rbx, -0x38(%rbp)
movq %r14, -0x40(%rbp)
cltq
leaq (%rax,%r13), %rbx
movabsq $0xa3a7276732020, %rcx  # imm = 0xA3A7276732020
leaq (%rax,%r13), %rsi
addq $0x7, %rsi
movq %rcx, -0x7(%rsi)
movq %r15, %rdi
callq 0x55792
cltq
leaq (%rax,%rbx), %r14
addq $0x7, %r14
addq $0x128, %r15            # imm = 0x128
leaq 0x1b033(%rip), %rbx     # 0x6d4bd
xorl %r12d, %r12d
cmpq $0x100, %r12            # imm = 0x100
je 0x524cf
cmpl $0x0, (%r15)
je 0x524c3
movq %r14, %rdi
movq %rbx, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x8110
movslq %eax, %r13
addq %r14, %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x55792
movslq %eax, %r14
addq %r13, %r14
incq %r12
addq $0x128, %r15            # imm = 0x128
jmp 0x5248d
movq -0x40(%rbp), %r14
movq -0x38(%rbp), %rbx
movl -0x2c(%rbp), %eax
movl %eax, %r12d
cmpl $0x2, %eax
je 0x526e7
jmp 0x526ff
movl $0xa3a65, 0x3(%r13)     # imm = 0xA3A65
movl $0x656c6966, (%r13)     # imm = 0x656C6966
leaq 0x6(%r13), %rdi
leaq 0x1aeaa(%rip), %rsi     # 0x6d3b0
pushq $0x2
popq %rdx
xorl %eax, %eax
callq 0x8110
cltq
movq %rbx, -0x38(%rbp)
leaq (%rax,%r13), %rbx
addq $0x6, %rbx
movq 0x838(%r15), %rdi
movsd 0x840(%r15), %xmm0
leaq -0x90(%rbp), %r13
movq %r14, -0x40(%rbp)
pushq $0x3
popq %r14
movq %r13, %rsi
movl %r14d, %edx
callq 0x47a48
movq 0x848(%r15), %rdi
movsd 0x850(%r15), %xmm0
leaq -0x70(%rbp), %r12
movq %r12, %rsi
movl %r14d, %edx
callq 0x47a48
leaq 0x20(%r15), %rdx
leaq 0x1ae75(%rip), %rsi     # 0x6d3e7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %r14
addq %rbx, %r14
leaq 0x420(%r15), %rdx
leaq 0x1ae67(%rip), %rsi     # 0x6d3f7
movq %r14, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rbx
addq %r14, %rbx
movl 0x820(%r15), %edx
leaq 0x1ae59(%rip), %rsi     # 0x6d407
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %r14
addq %rbx, %r14
movl 0x824(%r15), %edx
leaq 0x1ae4b(%rip), %rsi     # 0x6d417
movq %r14, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rbx
addq %r14, %rbx
movl 0x828(%r15), %edx
leaq 0x1ae3d(%rip), %rsi     # 0x6d427
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %r14
addq %rbx, %r14
movl 0x82c(%r15), %edx
leaq 0x1ae2f(%rip), %rsi     # 0x6d437
movq %r14, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rbx
addq %r14, %rbx
leaq 0x1ae28(%rip), %rsi     # 0x6d447
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x8110
movslq %eax, %r14
addq %rbx, %r14
leaq 0x1ae1e(%rip), %rsi     # 0x6d457
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x8110
movslq %eax, %rbx
addq %r14, %rbx
movl 0x858(%r15), %edx
leaq 0x1ae0d(%rip), %rsi     # 0x6d467
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %r14
addq %rbx, %r14
movl 0x85c(%r15), %edx
leaq 0x1adff(%rip), %rsi     # 0x6d477
movq %r14, %rdi
xorl %eax, %eax
callq 0x8110
movslq %eax, %rbx
addq %r14, %rbx
movsd 0x870(%r15), %xmm0
leaq 0x1adef(%rip), %rsi     # 0x6d487
movq %rbx, %rdi
movb $0x1, %al
callq 0x8110
movslq %eax, %r14
addq %rbx, %r14
movq -0x38(%rbp), %rbx
movsd 0x878(%r15), %xmm0
leaq 0x1addd(%rip), %rsi     # 0x6d499
movq %r14, %rdi
movb $0x1, %al
callq 0x8110
movslq %eax, %rdi
addq %r14, %rdi
movq -0x40(%rbp), %r14
movsd 0x880(%r15), %xmm0
leaq 0x1adcb(%rip), %rsi     # 0x6d4ab
movb $0x1, %al
callq 0x8110
callq 0x47c01
subl 0x24(%rbx), %eax
xorl %r12d, %r12d
cmpl $0xc9, %eax
setl %r12b
orl $0x2, %r12d
movq %r14, %rdi
callq 0x84b0
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq