// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rcx, %r15
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xb0(%rbp)
movq %rdi, %r14
leaq 0x20(%rdi), %rax
xorl %ebx, %ebx
movl %ebx, 0x20(%rdi)
movq %rbx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movq %rbx, 0x40(%rdi)
callq 0x85b0
xorpd %xmm0, %xmm0
movapd %xmm0, -0x80(%rbp)
movl %ebx, -0x2c(%rbp)
leaq -0x118(%rbp), %rax
movl %ebx, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rbx, 0x20(%rax)
movq %r15, -0x38(%rbp)
movq $0x0, -0x68(%rbp)
cmpl %ebx, 0x30(%r15)
movq %r14, -0xa8(%rbp)
jle 0x63e09
movq -0xb0(%rbp), %rax
addq $0x6c0, %rax            # imm = 0x6C0
movq %rax, -0xc8(%rbp)
leaq -0xf0(%rbp), %r12
xorl %ecx, %ecx
xorl %edx, %edx
movq %rcx, -0x60(%rbp)
movl $0x58, %eax
leaq (%rax,%rbp), %rcx
addq $-0x230, %rcx           # imm = 0xFDD0
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x118, %rax            # imm = 0x118
jne 0x639ce
xorpd %xmm0, %xmm0
movapd %xmm0, -0x210(%rbp)
movapd %xmm0, -0x220(%rbp)
movapd %xmm0, -0x230(%rbp)
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rax
movq %rdx, -0xd0(%rbp)
leaq (%rdx,%rdx,2), %rcx
shlq $0x5, %rcx
movzbl 0x10(%rax,%rcx), %edi
leaq -0x80(%rbp), %rsi
callq 0x4dd7a
leaq -0xe0(%rbp), %r15
movq -0xb0(%rbp), %rax
movl 0x5c(%rax), %r13d
movq %r15, -0xf0(%rbp)
movq %r12, %r14
leaq -0x80(%rbp), %r12
movq %r12, %rdi
callq 0x8290
leaq (%rax,%rbp), %rdx
addq $-0x80, %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1126a
movl %r13d, %edi
movq -0xc8(%rbp), %rsi
movq %r14, %rdx
callq 0x1dac0
movl %eax, %r13d
movq %r14, %r12
movq -0xf0(%rbp), %rdi
cmpq %r15, %rdi
je 0x63a99
callq 0x85d0
cmpl $-0x1, %r13d
je 0x63db3
movsbl -0x80(%rbp), %esi
leaq 0x158a3(%rip), %rdi     # 0x79351
callq 0x1db90
movl $0x48, %r13d
xorl %r14d, %r14d
movq -0x60(%rbp), %rdx
movq -0x38(%rbp), %rbx
movq 0x38(%rbx), %rax
addq %rdx, %rax
xorpd %xmm0, %xmm0
ucomisd 0x38(%rax,%r14,8), %xmm0
movl $0x1, %ecx
movq -0x68(%rbp), %rsi
cmovnel %ecx, %esi
cmovpl %ecx, %esi
movq %rsi, -0x68(%rbp)
movq %rdx, %r15
movzbl 0x18(%r14,%rax), %edi
xorl %esi, %esi
callq 0x4e015
movq %r13, -0xb8(%rbp)
leaq -0x2c(%rbp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x85c0
movq 0x38(%rbx), %rax
addq %r15, %rax
movsd 0x20(%rax,%r14,8), %xmm0
movsd %xmm0, -0x230(%rbp,%r14,8)
leaq -0x90(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq %r12, %rdi
callq 0x8290
leaq (%rax,%rbp), %rdx
addq $-0x2c, %rdx
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x1126a
movl $0x1, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xb35b(%rip), %rcx      # 0x6eec6
callq 0x8700
leaq -0x48(%rbp), %r15
movq %r15, -0x58(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x63b94
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
jmp 0x63b9d
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq -0xb8(%rbp), %r13
movq 0x8(%rax), %rdx
movq %rdx, -0x50(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x230(,%r13), %rdi
addq %rbp, %rdi
leaq -0x58(%rbp), %rsi
callq 0x87d0
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x63bdd
callq 0x85d0
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
movq -0x38(%rbp), %r15
je 0x63bf9
callq 0x85d0
movq 0x38(%r15), %rax
addq -0x60(%rbp), %rax
movsd 0x38(%rax,%r14,8), %xmm0
movsd %xmm0, -0x218(%rbp,%r14,8)
leaq -0x90(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x2c(%rbp), %r15
movq %r15, %rdi
callq 0x8290
leaq (%rax,%rbp), %rdx
addq $-0x2c, %rdx
leaq -0xa0(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x1126a
movl $0x1, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xb23f(%rip), %rcx      # 0x6ee99
callq 0x8700
leaq -0x48(%rbp), %r15
movq %r15, -0x58(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x63c83
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
jmp 0x63c8c
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x50(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x1d0(,%r13), %rdi
addq %rbp, %rdi
leaq -0x58(%rbp), %rsi
callq 0x87d0
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x63cc5
callq 0x85d0
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
movq -0x38(%rbp), %rbx
je 0x63ce1
callq 0x85d0
movq 0x38(%rbx), %rax
movq -0x60(%rbp), %rdx
addq %rdx, %rax
movb 0x12(%r14,%rax), %al
shrb $0x2, %al
movzbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x200(%rbp,%r14,8)
incq %r14
addq $0x20, %r13
cmpq $0x3, %r14
leaq -0xf0(%rbp), %r12
jne 0x63ac4
cmpl $0x0, -0x68(%rbp)
je 0x63db3
leaq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x80(%rbp), %r14
movq %r14, %rdi
callq 0x8290
leaq (%rax,%rbp), %rdx
addq $-0x80, %rdx
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1126a
leaq -0x120(%rbp), %rdi
movq %r15, %rsi
callq 0x640e2
movq %rax, %r13
movl $0x9, %ecx
movq %rax, %rdi
leaq -0x230(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
addq $0x48, %r13
xorl %r14d, %r14d
leaq (%r14,%r13), %rdi
leaq -0x1e8(%rbp), %rax
leaq (%rax,%r14), %rsi
callq 0x8380
addq $0x20, %r14
cmpq $0xc0, %r14
jne 0x63d80
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x63db3
callq 0x85d0
xorl %r14d, %r14d
movq -0x148(%rbp,%r14), %rdi
leaq -0x138(%rbp), %rax
addq %r14, %rax
cmpq %rdi, %rax
je 0x63dd2
callq 0x85d0
addq $-0x20, %r14
cmpq $-0xc0, %r14
jne 0x63db6
movq -0xd0(%rbp), %rdx
incq %rdx
movq -0x38(%rbp), %rax
movslq 0x30(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x60, %rcx
cmpq %rax, %rdx
movq -0xa8(%rbp), %r14
jl 0x639c5
movq -0x38(%rbp), %rax
movupd 0x10(%rax), %xmm0
movupd %xmm0, 0x8(%r14)
cmpq $0x0, -0xf8(%rbp)
je 0x63e41
leaq 0x18(%r14), %rdi
movq -0xc0(%rbp), %rsi
callq 0x280c2
leaq -0x120(%rbp), %rsi
movq %rax, %rdi
callq 0x289f4
leaq -0x120(%rbp), %rdi
callq 0x28e78
movq %r14, %rax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x63edf
jmp 0x63eb0
jmp 0x63e80
jmp 0x63eb0
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
cmpq %r15, %rdi
jne 0x63ea9
jmp 0x63eb3
jmp 0x63eb0
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
jmp 0x63ea4
jmp 0x63e93
jmp 0x63eb0
jmp 0x63eb0
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x63eb3
callq 0x85d0
jmp 0x63eb3
movq %rax, %rbx
xorl %r14d, %r14d
movq -0x148(%rbp,%r14), %rdi
leaq -0x138(%rbp), %rax
addq %r14, %rax
cmpq %rdi, %rax
je 0x63ed2
callq 0x85d0
addq $-0x20, %r14
cmpq $-0xc0, %r14
jne 0x63eb6
leaq -0x120(%rbp), %rdi
callq 0x28e78
movq -0xa8(%rbp), %rdi
addq $0x18, %rdi
callq 0x28966
movq %rbx, %rdi
callq 0x8b40
nop