// File: /workspace/github_cpp_makefile_star2_O1/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 0x1a4c8(%rip), %rsi     # 0x75e90
movl $0x4, %edi
xorl %eax, %eax
callq 0x53ec4
leaq 0x30(%rbx), %r14
movq %r14, %rdi
callq 0x8910
movq 0x58(%rbx), %r15
testq %r15, %r15
je 0x5bb6f
movl (%rbx), %eax
decl %eax
cmpl $0xd, %eax
ja 0x5bf36
leaq 0x1a327(%rip), %rcx     # 0x75d28
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq %rbx, -0x48(%rbp)
jmpq *%rax
movl (%r15), %ebx
testl %ebx, %ebx
jne 0x5ba1e
movq 0x8510(%r15), %rax
movl (%rax), %ebx
movabsq $0xa3a706972746e, %rax  # imm = 0xA3A706972746E
movq %rax, (%r13)
addq $0x7, %r13
leaq 0x1b9b4(%rip), %rsi     # 0x773eb
xorl %r12d, %r12d
movq %r13, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x8120
testl %ebx, %ebx
je 0x5c286
cltq
addq %rax, %r13
leaq 0x1b991(%rip), %rsi     # 0x773eb
movq %r13, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x8120
movl %ebx, -0x2c(%rbp)
movslq %eax, %rbx
addq %r13, %rbx
movl 0x4(%r15), %edx
leaq 0x1bac9(%rip), %rsi     # 0x77543
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movq %r15, %r12
movq %r14, %r15
movslq %eax, %r14
addq %rbx, %r14
movl 0x8(%r12), %edx
leaq 0x1bab7(%rip), %rsi     # 0x77553
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
leaq 0xc(%r12), %rdx
leaq 0x1baab(%rip), %rsi     # 0x77563
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
leaq 0x10c(%r12), %rdx
leaq 0x1ba9c(%rip), %rsi     # 0x77573
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
leaq 0x20c(%r12), %rdx
leaq 0x1ba8d(%rip), %rsi     # 0x77583
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
leaq 0x30c(%r12), %rdx
leaq 0x1ba7e(%rip), %rsi     # 0x77593
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
movq %r15, %r14
leaq 0x40c(%r12), %rdx
leaq 0x1ba6c(%rip), %rsi     # 0x775a3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
cltq
movabsq $0xa3a7276732020, %rcx  # imm = 0xA3A7276732020
leaq (%rax,%rbx), %rsi
addq $0x7, %rsi
movq %rcx, -0x7(%rsi)
movq 0x8510(%r12), %rdi
callq 0x5f55e
movl -0x2c(%rbp), %r12d
jmp 0x5c286
movq %r14, %rdi
callq 0x84b0
movl 0x8(%rbx), %r12d
jmp 0x5c2b0
movl (%r15), %ebx
movabsq $0xa3a63706972746e, %rax # imm = 0xA3A63706972746E
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
movl (%r15), %edx
leaq 0x1b847(%rip), %rsi     # 0x773eb
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
testl %ebx, %ebx
je 0x5c286
movl %ebx, -0x3c(%rbp)
movq %r14, -0x38(%rbp)
cltq
addq %rax, %r13
movl 0x4(%r15), %edx
leaq 0x1b973(%rip), %rsi     # 0x77543
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r13, %rbx
leaq 0x8(%r15), %rdx
leaq 0x1b988(%rip), %rsi     # 0x77573
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
leaq 0x108(%r15), %rdx
leaq 0x1b97a(%rip), %rsi     # 0x77583
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
leaq 0x208(%r15), %rdx
leaq 0x1b96c(%rip), %rsi     # 0x77593
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
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 0x5f55e
cltq
addq %rax, %r14
addq $0x7, %r14
leaq 0x344(%r15), %r12
movl $0x128, %ebx            # imm = 0x128
xorl %ecx, %ecx
movq %r15, -0x50(%rbp)
movq 0x338(%r15), %rax
cmpl $0x0, (%rax,%rbx)
je 0x5bd19
movq %r14, %rdi
leaq 0x1b869(%rip), %rsi     # 0x774f8
movl %ecx, -0x2c(%rbp)
movl -0x2c(%rbp), %edx
xorl %eax, %eax
callq 0x8120
movslq %eax, %r13
addq %r14, %r13
movq 0x338(%r15), %rdi
addq %rbx, %rdi
movq %r13, %rsi
callq 0x5f55e
movslq %eax, %r14
addq %r13, %r14
movq %r14, %rdi
leaq 0x1b8ef(%rip), %rsi     # 0x775b3
movq %r12, %rdx
xorl %eax, %eax
callq 0x8120
movslq %eax, %r13
addq %r14, %r13
leaq 0x100(%r12), %rdx
movq %r13, %rdi
leaq 0x1b8dd(%rip), %rsi     # 0x775c3
xorl %eax, %eax
callq 0x8120
movslq %eax, %r15
addq %r13, %r15
movl 0x200(%r12), %edx
movq %r15, %rdi
leaq 0x1b8ce(%rip), %rsi     # 0x775d3
xorl %eax, %eax
callq 0x8120
movl -0x2c(%rbp), %ecx
movslq %eax, %r14
addq %r15, %r14
movq -0x50(%rbp), %r15
addq $0x128, %rbx            # imm = 0x128
addq $0x820c, %r12           # imm = 0x820C
incl %ecx
cmpq $0x12928, %rbx          # imm = 0x12928
jne 0x5bc74
movl -0x3c(%rbp), %r12d
jmp 0x5c083
movl (%r15), %eax
xorl %ecx, %ecx
cmpl $0x3, %eax
setl %cl
testl %eax, %eax
leal -0x1(,%rcx,4), %eax
movl $0x2, %r12d
cmovnel %eax, %r12d
jmp 0x5c286
movl (%r15), %ebx
movabsq $0xa3a727673706475, %rax # imm = 0xA3A727673706475
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1b668(%rip), %rsi     # 0x773eb
xorl %r12d, %r12d
movq %r13, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x8120
testl %ebx, %ebx
je 0x5c286
cltq
addq %rax, %r13
movl 0x4(%r15), %edx
leaq 0x1b799(%rip), %rsi     # 0x77543
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
movq %r15, %r12
movq %r14, %r15
movslq %eax, %r14
addq %r13, %r14
movl 0x11c(%r12), %edx
leaq 0x1b81d(%rip), %rsi     # 0x775ec
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rdi
addq %r14, %rdi
movq %r15, %r14
movl 0x8(%r12), %edx
jmp 0x5bf18
movl (%r15), %ebx
movabsq $0xa3a6675626d656d, %rax # imm = 0xA3A6675626D656D
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1b5de(%rip), %rsi     # 0x773eb
xorl %r12d, %r12d
movq %r13, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x8120
testl %ebx, %ebx
je 0x5c286
cltq
addq %rax, %r13
movl 0xc(%r15), %edx
leaq 0x1b7f1(%rip), %rsi     # 0x77625
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
movq %r15, %r12
movq %r14, %r15
movslq %eax, %r14
addq %r13, %r14
movl 0x4(%r12), %edx
leaq 0x1b7df(%rip), %rsi     # 0x77635
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rdi
addq %r14, %rdi
movq %r15, %r14
movl 0x8(%r12), %edx
leaq 0x1b7d0(%rip), %rsi     # 0x77645
jmp 0x5bf1f
movl (%r15), %ebx
movabsq $0xa3a727673706475, %rax # imm = 0xA3A727673706475
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1b550(%rip), %rsi     # 0x773eb
xorl %r12d, %r12d
movq %r13, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x8120
testl %ebx, %ebx
je 0x5c286
cltq
addq %rax, %r13
movl 0x4(%r15), %edx
leaq 0x1b681(%rip), %rsi     # 0x77543
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
movq %r14, %r12
movslq %eax, %r14
addq %r13, %r14
movl 0x11c(%r15), %edx
leaq 0x1b709(%rip), %rsi     # 0x775ec
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movq %r15, %r13
movslq %eax, %r15
addq %r14, %r15
movq %r12, %r14
leaq 0xc(%r13), %rdx
leaq 0x1b708(%rip), %rsi     # 0x7760c
movq %r15, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rdi
addq %r15, %rdi
movl 0x8(%r13), %edx
leaq 0x1b6dd(%rip), %rsi     # 0x775fc
xorl %eax, %eax
callq 0x8120
movl %ebx, %r12d
jmp 0x5c286
movl (%r15), %r12d
jmp 0x5c286
movb $0x0, (%r13)
movq %r14, %rdi
callq 0x84b0
xorl %r12d, %r12d
jmp 0x5c2b0
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 0x1b46f(%rip), %rsi     # 0x773eb
movl %r12d, %edx
xorl %eax, %eax
callq 0x8120
cltq
leaq (%rax,%r13), %rbx
addq $0x8, %rbx
movl (%r15), %edx
leaq 0x1b461(%rip), %rsi     # 0x773fb
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rdi
addq %rbx, %rdi
movl 0x4(%r15), %edx
leaq 0x1b456(%rip), %rsi     # 0x7740b
xorl %eax, %eax
callq 0x8120
jmp 0x5c286
movl (%r15), %ebx
movabsq $0xa3a727673706374, %rax # imm = 0xA3A727673706374
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1b409(%rip), %rsi     # 0x773eb
xorl %r12d, %r12d
movq %r13, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x8120
movl %ebx, -0x2c(%rbp)
testl %ebx, %ebx
je 0x5c286
movq %r14, -0x38(%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 0x5f55e
cltq
leaq (%rax,%rbx), %r13
addq $0x7, %r13
addq $0x128, %r15            # imm = 0x128
leaq 0x1b4bc(%rip), %r14     # 0x774f8
xorl %r12d, %r12d
cmpl $0x0, (%r15)
je 0x5c06c
movq %r13, %rdi
movq %r14, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r13, %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5f55e
movslq %eax, %r13
addq %rbx, %r13
incq %r12
addq $0x128, %r15            # imm = 0x128
cmpq $0x100, %r12            # imm = 0x100
jne 0x5c03f
movl -0x2c(%rbp), %r12d
movq -0x38(%rbp), %r14
jmp 0x5c286
movl $0xa3a65, 0x3(%r13)     # imm = 0xA3A65
movl $0x656c6966, (%r13)     # imm = 0x656C6966
leaq 0x6(%r13), %rdi
leaq 0x1b344(%rip), %rsi     # 0x773eb
movl $0x2, %r12d
movl $0x2, %edx
xorl %eax, %eax
callq 0x8120
cltq
leaq (%rax,%r13), %rbx
addq $0x6, %rbx
movq 0x838(%r15), %rdi
movsd 0x840(%r15), %xmm0
leaq -0x90(%rbp), %r13
movq %r13, %rsi
movl $0x3, %edx
callq 0x50696
movq 0x848(%r15), %rdi
movsd 0x850(%r15), %xmm0
leaq -0x70(%rbp), %rsi
movl $0x3, %edx
callq 0x50696
leaq 0x20(%r15), %rdx
leaq 0x1b312(%rip), %rsi     # 0x77422
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movq %r14, -0x38(%rbp)
movslq %eax, %r14
addq %rbx, %r14
leaq 0x420(%r15), %rdx
leaq 0x1b300(%rip), %rsi     # 0x77432
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
movl 0x820(%r15), %edx
leaq 0x1b2f2(%rip), %rsi     # 0x77442
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
movl 0x824(%r15), %edx
leaq 0x1b2e4(%rip), %rsi     # 0x77452
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
movl 0x828(%r15), %edx
leaq 0x1b2d6(%rip), %rsi     # 0x77462
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
movl 0x82c(%r15), %edx
leaq 0x1b2c8(%rip), %rsi     # 0x77472
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
leaq 0x1b2c1(%rip), %rsi     # 0x77482
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
leaq 0x1b2b7(%rip), %rsi     # 0x77492
movq %r14, %rdi
leaq -0x70(%rbp), %rdx
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
movl 0x858(%r15), %edx
leaq 0x1b2a5(%rip), %rsi     # 0x774a2
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
movl 0x85c(%r15), %edx
leaq 0x1b297(%rip), %rsi     # 0x774b2
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
movsd 0x870(%r15), %xmm0
leaq 0x1b287(%rip), %rsi     # 0x774c2
movq %rbx, %rdi
movb $0x1, %al
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
movsd 0x878(%r15), %xmm0
leaq 0x1b279(%rip), %rsi     # 0x774d4
movq %r14, %rdi
movb $0x1, %al
callq 0x8120
movslq %eax, %rdi
addq %r14, %rdi
movq -0x38(%rbp), %r14
movsd 0x880(%r15), %xmm0
leaq 0x1b267(%rip), %rsi     # 0x774e6
movb $0x1, %al
callq 0x8120
cmpl $0x2, %r12d
jne 0x5c2a8
callq 0x5088f
movq -0x48(%rbp), %rcx
subl 0x24(%rcx), %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