// File: /workspace/github_cpp_makefile_star2_O3/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 0x1b02c(%rip), %rsi     # 0x75e40
movl $0x4, %edi
xorl %eax, %eax
callq 0x5342c
leaq 0x30(%rbx), %r14
movq %r14, %rdi
callq 0x8900
movq 0x58(%rbx), %r15
testq %r15, %r15
je 0x5ae8e
movl (%rbx), %eax
decl %eax
cmpl $0xd, %eax
ja 0x5b262
leaq 0x1ae8f(%rip), %rcx     # 0x75cd8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl (%r15), %r12d
testl %r12d, %r12d
je 0x5b5d1
movq %rbx, -0x38(%rbp)
movq %r14, -0x40(%rbp)
movabsq $0xa3a706972746e, %rax  # imm = 0xA3A706972746E
movq %rax, (%r13)
leaq 0x7(%r13), %rdi
leaq 0x1c4f1(%rip), %rsi     # 0x77370
movl %r12d, %edx
xorl %eax, %eax
callq 0x8120
jmp 0x5b616
movq %r14, %rdi
callq 0x84b0
movl 0x8(%rbx), %r12d
jmp 0x5b75c
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 0x1c4aa(%rip), %rsi     # 0x77370
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
cmpl $0x0, -0x2c(%rbp)
je 0x5b754
movq %rbx, -0x38(%rbp)
movq %r14, -0x40(%rbp)
cltq
addq %rax, %r13
movl 0x4(%r15), %edx
leaq 0x1c5d3(%rip), %rsi     # 0x774c8
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r13, %rbx
leaq 0x8(%r15), %rdx
leaq 0x1c5e8(%rip), %rsi     # 0x774f8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
leaq 0x108(%r15), %rdx
leaq 0x1c5da(%rip), %rsi     # 0x77508
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
leaq 0x208(%r15), %rdx
leaq 0x1c5cc(%rip), %rsi     # 0x77518
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 0x5ea3a
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 0x5b03e
movq %r14, %rdi
leaq 0x1c4c9(%rip), %rsi     # 0x7747d
movl %ecx, -0x44(%rbp)
movl -0x44(%rbp), %edx
xorl %eax, %eax
callq 0x8120
movslq %eax, %r13
addq %r14, %r13
movq 0x338(%r15), %rdi
addq %rbx, %rdi
movq %r13, %rsi
callq 0x5ea3a
movslq %eax, %r14
addq %r13, %r14
movq %r14, %rdi
leaq 0x1c54f(%rip), %rsi     # 0x77538
movq %r12, %rdx
xorl %eax, %eax
callq 0x8120
movslq %eax, %r13
addq %r14, %r13
leaq 0x100(%r12), %rdx
movq %r13, %rdi
leaq 0x1c53d(%rip), %rsi     # 0x77548
xorl %eax, %eax
callq 0x8120
movslq %eax, %r15
addq %r13, %r15
movl 0x200(%r12), %edx
movq %r15, %rdi
leaq 0x1c52e(%rip), %rsi     # 0x77558
xorl %eax, %eax
callq 0x8120
movl -0x44(%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 0x5af99
jmp 0x5b3bd
movl (%r15), %edx
xorl %eax, %eax
cmpl $0x3, %edx
setl %cl
testl %edx, %edx
je 0x5b73c
movb %cl, %al
leal -0x1(,%rax,4), %r12d
jmp 0x5b754
movl (%r15), %edx
movl %edx, -0x2c(%rbp)
movabsq $0xa3a727673706475, %rax # imm = 0xA3A727673706475
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1c2ca(%rip), %rsi     # 0x77370
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
cmpl $0x0, -0x2c(%rbp)
je 0x5b754
cltq
addq %rax, %r13
movl 0x4(%r15), %edx
leaq 0x1c3fb(%rip), %rsi     # 0x774c8
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
movq %r15, %r12
movq %rbx, %r15
movslq %eax, %rbx
addq %r13, %rbx
movl 0x11c(%r12), %edx
leaq 0x1c47f(%rip), %rsi     # 0x77571
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rdi
addq %rbx, %rdi
movq %r15, %rbx
movl 0x8(%r12), %edx
jmp 0x5b247
movl (%r15), %edx
movl %edx, -0x2c(%rbp)
movabsq $0xa3a6675626d656d, %rax # imm = 0xA3A6675626D656D
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1c23d(%rip), %rsi     # 0x77370
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
cmpl $0x0, -0x2c(%rbp)
je 0x5b754
cltq
addq %rax, %r13
movl 0xc(%r15), %edx
leaq 0x1c450(%rip), %rsi     # 0x775aa
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
movq %r15, %r12
movq %rbx, %r15
movslq %eax, %rbx
addq %r13, %rbx
movl 0x4(%r12), %edx
leaq 0x1c43e(%rip), %rsi     # 0x775ba
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rdi
addq %rbx, %rdi
movq %r15, %rbx
movl 0x8(%r12), %edx
leaq 0x1c42f(%rip), %rsi     # 0x775ca
jmp 0x5b24e
movl (%r15), %edx
movl %edx, -0x2c(%rbp)
movabsq $0xa3a727673706475, %rax # imm = 0xA3A727673706475
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1c1ac(%rip), %rsi     # 0x77370
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
cmpl $0x0, -0x2c(%rbp)
je 0x5b754
cltq
addq %rax, %r13
movl 0x4(%r15), %edx
leaq 0x1c2dd(%rip), %rsi     # 0x774c8
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
movq %rbx, %r12
movslq %eax, %rbx
addq %r13, %rbx
movl 0x11c(%r15), %edx
leaq 0x1c365(%rip), %rsi     # 0x77571
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movq %r15, %r13
movq %r14, %r15
movslq %eax, %r14
addq %rbx, %r14
movq %r12, %rbx
leaq 0xc(%r13), %rdx
leaq 0x1c361(%rip), %rsi     # 0x77591
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rdi
addq %r14, %rdi
movq %r15, %r14
movl 0x8(%r13), %edx
leaq 0x1c333(%rip), %rsi     # 0x77581
xorl %eax, %eax
callq 0x8120
jmp 0x5b3c5
movl (%r15), %r15d
jmp 0x5b733
movb $0x0, (%r13)
movq %r14, %rdi
callq 0x84b0
xorl %r12d, %r12d
jmp 0x5b75c
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 0x1c0c8(%rip), %rsi     # 0x77370
movl %r12d, %edx
xorl %eax, %eax
callq 0x8120
cltq
movq %r15, %rcx
movq %rbx, %r15
leaq (%rax,%r13), %rbx
addq $0x8, %rbx
movl (%rcx), %edx
movq %rcx, %r13
leaq 0x1c0b2(%rip), %rsi     # 0x77380
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rdi
addq %rbx, %rdi
movq %r15, %rbx
movl %r12d, %r15d
movl 0x4(%r13), %edx
leaq 0x1c0a1(%rip), %rsi     # 0x77390
xorl %eax, %eax
callq 0x8120
jmp 0x5b733
movl (%r15), %edx
movl %edx, -0x2c(%rbp)
movabsq $0xa3a727673706374, %rax # imm = 0xA3A727673706374
movq %rax, (%r13)
movb $0x0, 0x8(%r13)
addq $0x8, %r13
leaq 0x1c051(%rip), %rsi     # 0x77370
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x8120
cmpl $0x0, -0x2c(%rbp)
je 0x5b754
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 0x5ea3a
cltq
leaq (%rax,%rbx), %r12
addq $0x7, %r12
addq $0x128, %r15            # imm = 0x128
leaq 0x1c103(%rip), %rbx     # 0x7747d
xorl %r14d, %r14d
cmpl $0x0, (%r15)
je 0x5b3aa
movq %r12, %rdi
movq %rbx, %rsi
movl %r14d, %edx
xorl %eax, %eax
callq 0x8120
movslq %eax, %r13
addq %r12, %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x5ea3a
movslq %eax, %r12
addq %r13, %r12
incq %r14
addq $0x128, %r15            # imm = 0x128
cmpq $0x100, %r14            # imm = 0x100
jne 0x5b37d
movq -0x40(%rbp), %r14
movq -0x38(%rbp), %rbx
movl -0x2c(%rbp), %r15d
jmp 0x5b733
movl $0xa3a65, 0x3(%r13)     # imm = 0xA3A65
movl $0x656c6966, (%r13)     # imm = 0x656C6966
leaq 0x6(%r13), %rdi
leaq 0x1bf87(%rip), %rsi     # 0x77370
movl $0x2, %edx
xorl %eax, %eax
callq 0x8120
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 %r13, %rsi
movl $0x3, %edx
callq 0x4fcf1
movq 0x848(%r15), %rdi
movsd 0x850(%r15), %xmm0
leaq -0x70(%rbp), %r12
movq %r12, %rsi
movl $0x3, %edx
callq 0x4fcf1
leaq 0x20(%r15), %rdx
leaq 0x1bf54(%rip), %rsi     # 0x773a7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movq %r14, -0x40(%rbp)
movslq %eax, %r14
addq %rbx, %r14
leaq 0x420(%r15), %rdx
leaq 0x1bf42(%rip), %rsi     # 0x773b7
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
movl 0x820(%r15), %edx
leaq 0x1bf34(%rip), %rsi     # 0x773c7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
movl 0x824(%r15), %edx
leaq 0x1bf26(%rip), %rsi     # 0x773d7
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
movl 0x828(%r15), %edx
leaq 0x1bf18(%rip), %rsi     # 0x773e7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
movl 0x82c(%r15), %edx
leaq 0x1bf0a(%rip), %rsi     # 0x773f7
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
leaq 0x1bf03(%rip), %rsi     # 0x77407
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
leaq 0x1bef9(%rip), %rsi     # 0x77417
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
movl 0x858(%r15), %edx
leaq 0x1bee8(%rip), %rsi     # 0x77427
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
movl 0x85c(%r15), %edx
leaq 0x1beda(%rip), %rsi     # 0x77437
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
movsd 0x870(%r15), %xmm0
leaq 0x1beca(%rip), %rsi     # 0x77447
movq %rbx, %rdi
movb $0x1, %al
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
movq -0x38(%rbp), %rbx
movsd 0x878(%r15), %xmm0
leaq 0x1beb8(%rip), %rsi     # 0x77459
movq %r14, %rdi
movb $0x1, %al
callq 0x8120
movslq %eax, %rdi
addq %r14, %rdi
movq -0x40(%rbp), %r14
movsd 0x880(%r15), %xmm0
leaq 0x1bea6(%rip), %rsi     # 0x7746b
movb $0x1, %al
callq 0x8120
jmp 0x5b73c
movq 0x8510(%r15), %rax
movl (%rax), %edx
movl %edx, -0x2c(%rbp)
movabsq $0xa3a706972746e, %rax  # imm = 0xA3A706972746E
movq %rax, (%r13)
leaq 0x7(%r13), %rdi
leaq 0x1bd7a(%rip), %rsi     # 0x77370
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x8120
movl -0x2c(%rbp), %edx
testl %edx, %edx
je 0x5b754
movq %rbx, -0x38(%rbp)
movq %r14, -0x40(%rbp)
movl %edx, %r12d
cltq
leaq (%rax,%r13), %rbx
leaq (%rax,%r13), %rdi
addq $0x7, %rdi
leaq 0x1bd45(%rip), %rsi     # 0x77370
movl %r12d, %edx
xorl %eax, %eax
callq 0x8120
cltq
addq %rax, %rbx
addq $0x7, %rbx
movq %r15, %r13
movl 0x4(%r15), %edx
leaq 0x1be7c(%rip), %rsi     # 0x774c8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movl %r12d, %r15d
movslq %eax, %r14
addq %rbx, %r14
movl 0x8(%r13), %edx
leaq 0x1be6e(%rip), %rsi     # 0x774d8
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
leaq 0xc(%r13), %rdx
leaq 0x1be63(%rip), %rsi     # 0x774e8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
leaq 0x10c(%r13), %rdx
leaq 0x1be55(%rip), %rsi     # 0x774f8
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
leaq 0x20c(%r13), %rdx
leaq 0x1be47(%rip), %rsi     # 0x77508
movq %rbx, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %r14
addq %rbx, %r14
leaq 0x30c(%r13), %rdx
leaq 0x1be39(%rip), %rsi     # 0x77518
movq %r14, %rdi
xorl %eax, %eax
callq 0x8120
movslq %eax, %rbx
addq %r14, %rbx
leaq 0x40c(%r13), %rdx
leaq 0x1be2b(%rip), %rsi     # 0x77528
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(%r13), %rdi
callq 0x5ea3a
movq -0x40(%rbp), %r14
movq -0x38(%rbp), %rbx
movl %r15d, %r12d
cmpl $0x2, %r15d
jne 0x5b754
callq 0x4fece
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