// File: DoubleString[P]RtConverter/src/VrsObs/VrsNtripClient.cpp
// Function: bamboo::VrsNtripClient::m_makeupItems(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bamboo::rtcm_t*)
RtConvItem VrsNtripClient::m_makeupItems(string staname, rtcm_t* rtcm) {
	int iobs, isys, ifreq, gotobs = false;
	RtConvItem item;
	char cprn[16] = { 0 }, code[4] = { 0 };
	map<string, RtSatObs> mapObs;
	for (iobs = 0; iobs < rtcm->obs.n; iobs++) {
		RtSatObs sat;
		satno2id(rtcm->obs.data[iobs].sat, cprn);
		if (-1 == pointer_string(configs_sav.nprn, configs_sav.cprn, cprn))
			continue;
		isys = index_string(SYS, cprn[0]);
		for (ifreq = 0; ifreq < sizeof(rtcm->obs.data[iobs].L) / sizeof(double); ifreq++) {
			if (rtcm->obs.data[iobs].P[ifreq] != 0.0)
				gotobs = true;
			strcpy(code, code2obs(rtcm->obs.data[iobs].code[ifreq], NULL));
			sat.obs[ifreq] = rtcm->obs.data[iobs].L[ifreq];
			sat.fob[ifreq] = "L" + string(code);

			sat.obs[MAXFREQ + ifreq] = rtcm->obs.data[iobs].P[ifreq];
			sat.fob[MAXFREQ + ifreq] = "C" + string(code);

			sat.snr[ifreq] = rtcm->obs.data[iobs].SNR[ifreq] / 4;
		}
		if (gotobs) mapObs[cprn] = sat;
	}
	item.curt = rtcm->time;
	if (mapObs.size() > 0)
		item.obslist[staname] = mapObs;
	return item;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq %rdx, -0x2a0(%rbp)
movq %rdi, -0x298(%rbp)
movq %rdi, %rax
movq %rax, -0x290(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x288(%rbp)
movl $0x0, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
callq 0x45730
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x93d0
leaq -0x54(%rbp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x93d0
leaq -0x88(%rbp), %rdi
callq 0x45760
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jge 0xb00c3
leaq -0x190(%rbp), %rdi
callq 0x45780
jmp 0xafb8f
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x24(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x5, %rcx
movzbl 0x10(%rax,%rcx), %edi
leaq -0x50(%rbp), %rsi
callq 0x8b6b0
jmp 0xafbb3
movq -0x288(%rbp), %rax
movl 0x5c(%rax), %ecx
movl %ecx, -0x2b4(%rbp)
addq $0x6c0, %rax            # imm = 0x6C0
movq %rax, -0x2b0(%rbp)
leaq -0x1c1(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x9d30
movq -0x2a8(%rbp), %rdx
leaq -0x1c0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9a30
jmp 0xafbfc
movq -0x2b0(%rbp), %rsi
movl -0x2b4(%rbp), %edi
leaq -0x1c0(%rbp), %rdx
callq 0x33fc0
movl %eax, -0x2b8(%rbp)
jmp 0xafc1d
leaq -0x1c0(%rbp), %rdi
callq 0x9480
leaq -0x1c1(%rbp), %rdi
callq 0x97e0
movl -0x2b8(%rbp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0xafcc8
movl $0x4, -0x1c8(%rbp)
jmp 0xb0088
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0xb0149
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0xb00b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0xafcb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x9480
leaq -0x1c1(%rbp), %rdi
callq 0x97e0
jmp 0xb00b2
movsbl -0x50(%rbp), %esi
leaq 0x1c3ce(%rip), %rdi     # 0xcc0a1
callq 0x340b0
movl %eax, -0x2bc(%rbp)
jmp 0xafce0
movl -0x2bc(%rbp), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq $0x3, %rax
jae 0xaffbd
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
movsd 0x38(%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xafd28
jp 0xafd28
jmp 0xafd2f
movl $0x1, -0x30(%rbp)
leaq -0x54(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rcx
movslq -0x24(%rbp), %rax
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq %rax, %rcx
movslq -0x2c(%rbp), %rax
movzbl 0x18(%rax,%rcx), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x8bb90
movq %rax, -0x2c8(%rbp)
jmp 0xafd6c
movq -0x2c8(%rbp), %rsi
movq -0x2d0(%rbp), %rdi
callq 0x96f0
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rcx
movslq -0x24(%rbp), %rax
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq %rax, %rcx
movslq -0x2c(%rbp), %rax
movsd 0x20(%rcx,%rax,8), %xmm0
movsd %xmm0, -0x190(%rbp,%rax,8)
leaq -0x209(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x9d30
movq -0x2d8(%rbp), %rdx
leaq -0x208(%rbp), %rdi
leaq -0x54(%rbp), %rsi
callq 0x9a30
jmp 0xafdd5
leaq 0x1130f(%rip), %rsi     # 0xc10eb
leaq -0x1e8(%rbp), %rdi
leaq -0x208(%rbp), %rdx
callq 0x14630
jmp 0xafdf1
movslq -0x2c(%rbp), %rax
shlq $0x5, %rax
leaq -0x148(%rbp,%rax), %rdi
leaq -0x1e8(%rbp), %rsi
movq %rsi, -0x2e8(%rbp)
callq 0x9920
movq -0x2e8(%rbp), %rdi
callq 0x9480
leaq -0x208(%rbp), %rdi
callq 0x9480
leaq -0x209(%rbp), %rdi
callq 0x97e0
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rcx
movslq -0x24(%rbp), %rax
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq %rax, %rcx
movslq -0x2c(%rbp), %rax
movsd 0x38(%rcx,%rax,8), %xmm0
movsd %xmm0, -0x178(%rbp,%rax,8)
leaq -0x251(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x9d30
movq -0x2e0(%rbp), %rdx
leaq -0x250(%rbp), %rdi
leaq -0x54(%rbp), %rsi
callq 0x9a30
jmp 0xafe8e
leaq 0x1122c(%rip), %rsi     # 0xc10c1
leaq -0x230(%rbp), %rdi
leaq -0x250(%rbp), %rdx
callq 0x14630
jmp 0xafeaa
leaq -0x190(%rbp), %rdi
addq $0x48, %rdi
movl -0x2c(%rbp), %eax
addl $0x3, %eax
cltq
shlq $0x5, %rax
addq %rax, %rdi
leaq -0x230(%rbp), %rsi
callq 0x9920
leaq -0x230(%rbp), %rdi
callq 0x9480
leaq -0x250(%rbp), %rdi
callq 0x9480
leaq -0x251(%rbp), %rdi
callq 0x97e0
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
movzbl 0x12(%rax,%rcx), %eax
movl $0x4, %ecx
cltd
idivl %ecx
cvtsi2sd %eax, %xmm0
movslq -0x2c(%rbp), %rax
movsd %xmm0, -0x160(%rbp,%rax,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xafcf0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0xaff69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x9480
leaq -0x209(%rbp), %rdi
callq 0x97e0
jmp 0xb00b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0xaffac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x9480
leaq -0x251(%rbp), %rdi
callq 0x97e0
jmp 0xb00b2
cmpl $0x0, -0x30(%rbp)
je 0xb007e
leaq -0x279(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x9d30
movq -0x2f0(%rbp), %rdx
leaq -0x278(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9a30
jmp 0xafff3
leaq -0x88(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0xb0820
movq %rax, -0x2f8(%rbp)
jmp 0xb000f
movq -0x2f8(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x458d0
jmp 0xb0024
leaq -0x278(%rbp), %rdi
callq 0x9480
leaq -0x279(%rbp), %rdi
callq 0x97e0
jmp 0xb007e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0xb0070
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x9480
leaq -0x279(%rbp), %rdi
callq 0x97e0
jmp 0xb00b2
movl $0x0, -0x1c8(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x45950
movl -0x1c8(%rbp), %eax
testl %eax, %eax
je 0xb00a2
jmp 0xb00a0
jmp 0xb00a4
jmp 0xb00a4
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xafb71
leaq -0x190(%rbp), %rdi
callq 0x45950
jmp 0xb0149
movq -0x298(%rbp), %rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x10(%rax)
leaq -0x88(%rbp), %rdi
callq 0x459a0
cmpq $0x0, %rax
jbe 0xb0127
movq -0x2a0(%rbp), %rsi
movq -0x298(%rbp), %rdi
addq $0x18, %rdi
callq 0x459c0
movq %rax, -0x300(%rbp)
jmp 0xb0110
movq -0x300(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x45aa0
jmp 0xb0125
jmp 0xb0127
movb $0x1, -0x31(%rbp)
movl $0x1, -0x1c8(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x45ad0
testb $0x1, -0x31(%rbp)
jne 0xb016f
jmp 0xb0163
leaq -0x88(%rbp), %rdi
callq 0x45ad0
movq -0x298(%rbp), %rdi
callq 0x456b0
jmp 0xb017f
movq -0x298(%rbp), %rdi
callq 0x456b0
movq -0x290(%rbp), %rax
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
movq -0x198(%rbp), %rdi
callq 0x9d20
nopl (%rax,%rax)