// File: /workspace/github_cpp_makefile_star2_O3/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 $0x1e8, %rsp            # imm = 0x1E8
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
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, -0x70(%rbp)
movl %ebx, -0x2c(%rbp)
leaq -0x100(%rbp), %rax
movl %ebx, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rbx, 0x20(%rax)
cmpl %ebx, 0x30(%r15)
jle 0x63214
movq %r15, -0x38(%rbp)
movq %r12, -0xa0(%rbp)
movq %r13, -0xb0(%rbp)
leaq 0x6c0(%r13), %rax
movq %rax, -0xa8(%rbp)
leaq -0xd8(%rbp), %r12
xorl %ecx, %ecx
xorl %edx, %edx
movq %r14, -0x98(%rbp)
movq %rcx, -0x60(%rbp)
movl $0x58, %eax
leaq (%rax,%rbp), %rcx
addq $-0x210, %rcx           # imm = 0xFDF0
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x118, %rax            # imm = 0x118
jne 0x62dba
xorpd %xmm0, %xmm0
movapd %xmm0, -0x1f0(%rbp)
movapd %xmm0, -0x200(%rbp)
movapd %xmm0, -0x210(%rbp)
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rax
movq %rdx, -0xb8(%rbp)
leaq (%rdx,%rdx,2), %rcx
shlq $0x5, %rcx
movzbl 0x10(%rax,%rcx), %edi
leaq -0x70(%rbp), %rsi
callq 0x4d442
movq -0xb0(%rbp), %rax
leaq -0xc8(%rbp), %r15
movl 0x5c(%rax), %r13d
movq %r15, -0xd8(%rbp)
movq %r12, %r14
leaq -0x70(%rbp), %r12
movq %r12, %rdi
callq 0x8290
leaq (%rax,%rbp), %rdx
addq $-0x70, %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1100a
movl %r13d, %edi
movq -0xa8(%rbp), %rsi
movq %r14, %rdx
callq 0x1d47b
movl %eax, %r13d
movq %r14, %r12
movq -0xd8(%rbp), %rdi
cmpq %r15, %rdi
je 0x62e85
callq 0x85d0
cmpl $-0x1, %r13d
je 0x63184
movsbl -0x70(%rbp), %esi
leaq 0x164b5(%rip), %rdi     # 0x7934f
callq 0x1d54b
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x48, %r13d
xorl %r14d, %r14d
movq -0x60(%rbp), %rdx
addq %rdx, %rax
xorpd %xmm0, %xmm0
ucomisd 0x38(%rax,%r14,8), %xmm0
movl $0x1, %ecx
cmovnel %ecx, %ebx
cmovpl %ecx, %ebx
movq %rdx, %r15
movzbl 0x18(%r14,%rax), %edi
xorl %esi, %esi
callq 0x4d6a2
leaq -0x2c(%rbp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x85c0
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rax
addq %r15, %rax
movsd 0x20(%rax,%r14,8), %xmm0
movsd %xmm0, -0x210(%rbp,%r14,8)
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
movq %r12, %rdi
callq 0x8290
leaq (%rax,%rbp), %rdx
addq $-0x2c, %rdx
leaq -0x90(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x1100a
movl $0x1, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xbf7d(%rip), %rcx      # 0x6eec6
callq 0x86f0
leaq -0x48(%rbp), %r15
movq %r15, -0x58(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x62f72
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
jmp 0x62f7b
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 -0x210(,%r13), %rdi
addq %rbp, %rdi
leaq -0x58(%rbp), %rsi
callq 0x87c0
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x62fb4
callq 0x85d0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
movq -0x38(%rbp), %r15
je 0x62fcd
callq 0x85d0
movq 0x38(%r15), %rax
addq -0x60(%rbp), %rax
movsd 0x38(%rax,%r14,8), %xmm0
movsd %xmm0, -0x1f8(%rbp,%r14,8)
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x2c(%rbp), %r15
movq %r15, %rdi
callq 0x8290
leaq (%rax,%rbp), %rdx
addq $-0x2c, %rdx
leaq -0x90(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x1100a
movl $0x1, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xbe6e(%rip), %rcx      # 0x6ee99
callq 0x86f0
leaq -0x48(%rbp), %r15
movq %r15, -0x58(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x63054
movq %rdx, -0x58(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x48(%rbp)
jmp 0x6305d
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 -0x1b0(,%r13), %rdi
addq %rbp, %rdi
leaq -0x58(%rbp), %rsi
callq 0x87c0
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x63096
callq 0x85d0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
movq -0x38(%rbp), %r15
je 0x630af
callq 0x85d0
movq 0x38(%r15), %rax
movq -0x60(%rbp), %rdx
leaq (%rax,%rdx), %rcx
movb 0x12(%r14,%rcx), %cl
shrb $0x2, %cl
movzbl %cl, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, -0x1e0(%rbp,%r14,8)
incq %r14
addq $0x20, %r13
cmpq $0x3, %r14
leaq -0xd8(%rbp), %r12
jne 0x62eb4
testl %ebx, %ebx
je 0x63182
leaq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x70(%rbp), %r14
movq %r14, %rdi
callq 0x8290
leaq (%rax,%rbp), %rdx
addq $-0x70, %rdx
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1100a
leaq -0x108(%rbp), %rdi
movq %r15, %rsi
callq 0x634be
movq %rax, %r13
movl $0x9, %ecx
movq %rax, %rdi
leaq -0x210(%rbp), %rsi
rep  movsq (%rsi), %es:(%rdi)
addq $0x48, %r13
xorl %r14d, %r14d
leaq (%r14,%r13), %rdi
leaq -0x1c8(%rbp), %rax
leaq (%rax,%r14), %rsi
callq 0x8380
addq $0x20, %r14
cmpq $0xc0, %r14
jne 0x6314d
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x63184
callq 0x85d0
jmp 0x63184
xorl %ebx, %ebx
xorl %r14d, %r14d
movq -0x128(%rbp,%r14), %rdi
leaq -0x118(%rbp), %rax
addq %r14, %rax
cmpq %rdi, %rax
je 0x631a3
callq 0x85d0
addq $-0x20, %r14
cmpq $-0xc0, %r14
jne 0x63187
movq -0xb8(%rbp), %rdx
incq %rdx
movq -0x38(%rbp), %rax
movslq 0x30(%rax), %rax
movq -0x60(%rbp), %rcx
addq $0x60, %rcx
cmpq %rax, %rdx
movq -0x98(%rbp), %r14
jl 0x62db1
cmpq $0x0, -0xe0(%rbp)
movq -0x38(%rbp), %rax
movupd 0x10(%rax), %xmm0
movupd %xmm0, 0x8(%r14)
je 0x63220
leaq 0x18(%r14), %rdi
movq -0xa0(%rbp), %rsi
callq 0x27c14
leaq -0x108(%rbp), %rsi
movq %rax, %rdi
callq 0x28548
jmp 0x63220
movupd 0x10(%r15), %xmm0
movupd %xmm0, 0x8(%r14)
leaq -0x108(%rbp), %rdi
callq 0x289cc
movq %r14, %rax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x632bb
jmp 0x6328c
jmp 0x6325f
jmp 0x6328c
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
cmpq %r15, %rdi
jne 0x63285
jmp 0x6328f
jmp 0x6328c
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
jmp 0x63280
jmp 0x63272
jmp 0x6328c
jmp 0x6328c
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x6328f
callq 0x85d0
jmp 0x6328f
movq %rax, %rbx
xorl %r14d, %r14d
movq -0x128(%rbp,%r14), %rdi
leaq -0x118(%rbp), %rax
addq %r14, %rax
cmpq %rdi, %rax
je 0x632ae
callq 0x85d0
addq $-0x20, %r14
cmpq $-0xc0, %r14
jne 0x63292
leaq -0x108(%rbp), %rdi
callq 0x289cc
movq -0x98(%rbp), %rdi
addq $0x18, %rdi
callq 0x284ba
movq %rbx, %rdi
callq 0x8b30
nop