// File: /workspace/github_cpp_makefile_star2_O2/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 $0x1f8, %rsp            # imm = 0x1F8
movq %rcx, %r14
movq %rdx, -0x68(%rbp)
movq %rsi, %rbx
movq %rdi, -0x50(%rbp)
callq 0x22e7e
xorpd %xmm0, %xmm0
leaq -0x60(%rbp), %r12
movapd %xmm0, (%r12)
leaq -0x34(%rbp), %rax
andl $0x0, (%rax)
leaq -0xf0(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq %rbx, -0x78(%rbp)
leaq 0x6c0(%rbx), %rax
movq %r14, %rbx
movq %rax, -0x70(%rbp)
xorl %r14d, %r14d
leaq -0x220(%rbp), %r13
xorl %ecx, %ecx
movl $0x0, -0x30(%rbp)
movq %rbx, -0x40(%rbp)
movslq 0x30(%rbx), %rax
cmpq %rax, %rcx
jge 0x5965e
movq %r13, %rdi
movq %rbx, %r15
movq %rcx, %rbx
callq 0x22ea2
movq 0x38(%r15), %rax
movq %rbx, -0x80(%rbp)
imulq $0x60, %rbx, %rcx
movzbl 0x10(%rax,%rcx), %edi
movq %r12, %rsi
callq 0x45495
movq %r12, %rsi
movq -0x78(%rbp), %rax
movl 0x5c(%rax), %ebx
leaq -0x118(%rbp), %r12
movq %r12, %rdi
movq %rsi, %r15
leaq -0xa8(%rbp), %rdx
callq 0x8260
movl %ebx, %edi
movq -0x70(%rbp), %rsi
movq %r12, %rdx
callq 0x1a53f
movl %eax, %ebx
movq %r12, %rdi
callq 0x82c0
cmpl $-0x1, %ebx
je 0x59627
movsbl -0x60(%rbp), %esi
leaq 0x15ec3(%rip), %rdi     # 0x6f31f
callq 0x1a5f7
leaq -0xc8(%rbp), %rbx
pushq $0x48
popq %rax
movq %rax, -0x48(%rbp)
xorl %r13d, %r13d
movq %r14, -0x88(%rbp)
cmpq $0x3, %r13
je 0x595d1
movq -0x40(%rbp), %r12
movq 0x38(%r12), %rax
addq %r14, %rax
xorpd %xmm0, %xmm0
ucomisd 0x38(%rax,%r13,8), %xmm0
pushq $0x1
popq %rcx
movl -0x30(%rbp), %edx
cmovnel %ecx, %edx
cmovpl %ecx, %edx
movl %edx, -0x30(%rbp)
movzbl 0x18(%r13,%rax), %edi
xorl %esi, %esi
callq 0x456f5
leaq -0x34(%rbp), %rdi
movq %rax, %rsi
callq 0x85c0
movq %r12, %r15
movq 0x38(%r12), %rax
addq %r14, %rax
movsd 0x20(%rax,%r13,8), %xmm0
movsd %xmm0, -0x220(%rbp,%r13,8)
movq %rbx, %rdi
leaq -0x34(%rbp), %rsi
leaq -0x29(%rbp), %rdx
callq 0x8260
leaq -0xa8(%rbp), %r14
movq %r14, %rdi
leaq 0xb9c3(%rip), %rsi      # 0x64ec2
movq %rbx, %rdx
callq 0xe8ad
movq -0x48(%rbp), %rax
leaq (%rax,%rbp), %rdi
addq $-0x220, %rdi           # imm = 0xFDE0
movq %r14, %rsi
callq 0x87a0
movq %r14, %rdi
callq 0x82c0
movq %rbx, %rdi
callq 0x82c0
movq %r15, %r12
movq 0x38(%r15), %rax
movq -0x88(%rbp), %r15
addq %r15, %rax
movsd 0x38(%rax,%r13,8), %xmm0
movsd %xmm0, -0x208(%rbp,%r13,8)
movq %rbx, %rdi
leaq -0x34(%rbp), %rsi
leaq -0x29(%rbp), %rdx
callq 0x8260
movq %r14, %rdi
leaq 0xb92b(%rip), %rsi      # 0x64e95
movq %rbx, %rdx
callq 0xe8ad
movq %r14, %rsi
movq -0x48(%rbp), %r14
leaq (%r14,%rbp), %rdi
addq $-0x1c0, %rdi           # imm = 0xFE40
callq 0x87a0
leaq -0xa8(%rbp), %rdi
callq 0x82c0
movq %rbx, %rdi
callq 0x82c0
movq 0x38(%r12), %rax
addq %r15, %rax
movb 0x12(%r13,%rax), %al
shrb $0x2, %al
movzbl %al, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x1f0(%rbp,%r13,8)
incq %r13
addq $0x20, %r14
movq %r14, -0x48(%rbp)
movq %r15, %r14
jmp 0x59479
cmpl $0x0, -0x30(%rbp)
je 0x59630
leaq -0xa8(%rbp), %r15
movq %r15, %rdi
leaq -0x60(%rbp), %r12
movq %r12, %rsi
leaq -0xc8(%rbp), %rdx
callq 0x8260
leaq -0x220(%rbp), %r13
leaq -0xf8(%rbp), %rdi
movq %r15, %rsi
callq 0x598d0
movq -0x40(%rbp), %rbx
movq %rax, %rdi
movq %r13, %rsi
callq 0x22f4a
leaq -0xa8(%rbp), %rdi
callq 0x82c0
jmp 0x59646
movq -0x40(%rbp), %rbx
movq %r15, %r12
jmp 0x59646
movl $0x0, -0x30(%rbp)
leaq -0x60(%rbp), %r12
leaq -0x220(%rbp), %r13
movq -0x40(%rbp), %rbx
movq %r13, %rdi
callq 0x22f8e
movq -0x80(%rbp), %rcx
incq %rcx
addq $0x60, %r14
jmp 0x593d9
movupd 0x10(%rbx), %xmm0
movq -0x50(%rbp), %rbx
movupd %xmm0, 0x8(%rbx)
cmpq $0x0, -0xd0(%rbp)
je 0x59692
leaq 0x18(%rbx), %rdi
movq -0x68(%rbp), %rsi
callq 0x22fb6
leaq -0xf8(%rbp), %rsi
movq %rax, %rdi
callq 0x23b1a
leaq -0xf8(%rbp), %rdi
callq 0x23fc6
movq %rbx, %rax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x596fc
jmp 0x596ed
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
jmp 0x596e6
jmp 0x596ed
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
jmp 0x596e6
jmp 0x596ed
jmp 0x596ed
jmp 0x596dc
jmp 0x596ed
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x82c0
jmp 0x596f0
movq %rax, %rbx
leaq -0x220(%rbp), %rdi
callq 0x22f8e
leaq -0xf8(%rbp), %rdi
callq 0x23fc6
movq -0x50(%rbp), %rdi
addq $0x18, %rdi
callq 0x23a3a
movq %rbx, %rdi
callq 0x8b30
nop