// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rnxobs/Com.cpp
// Function: bamboo::getfreq(char, char*, int, double*)
void getfreq(char csys, char* freq, int ifreq, double* val) {
	switch (csys) {
	case 'G':
		if (strstr(freq, "L1") != NULL)
			*val = GPS_L1;
		else if (strstr(freq, "L2") != NULL)
			*val = GPS_L2;
		else if (strstr(freq, "L5") != NULL)
			*val = GPS_L5;
		else {
			printf("freq = %s,unknow frequency for GPS",freq);
			exit(1);
		}
		break;
	case 'R':
		if (strstr(freq, "L1") != NULL)
			*val = GLS_L1 + ifreq * GLS_dL1;
		else if (strstr(freq, "L2") != NULL)
			*val = GLS_L2 + ifreq * GLS_dL2;
		else {
			printf("freq = %s,unknow frequency for GLONASS",freq);
			exit(1);
		}
		break;
	case 'E':
		if (strstr(freq, "L1") != NULL)
			*val = GAL_E1;
		else if (strstr(freq, "L8") != NULL)
			*val = GAL_E5;
		else if (strstr(freq, "L6") != NULL)
			*val = GAL_E6;
		else if (strstr(freq, "L5") != NULL)
			*val = GAL_E5a;
		else if (strstr(freq, "L7") != NULL)
			*val = GAL_E5b;
		else {
			printf("freq = %s,unknow frequency for GALILEO",freq);
			exit(1);
		}
		break;
	case 'C':
		if (strstr(freq, "L1") != NULL || strstr(freq, "L2") != NULL)
			*val = BDS_B1;
		else if (strstr(freq, "L7") != NULL)
			*val = BDS_B2;
		else if (strstr(freq, "L6") != NULL)
			*val = BDS_B3;
		else {
			printf("freq = %s,unknow frequency for BDS",freq);
			exit(1);
		}
		break;
	case 'J':
		if (strstr(freq, "L1") != NULL)
			*val = QZS_L1;
		else if (strstr(freq, "L2") != NULL)
			*val = QZS_L2;
		else if (strstr(freq, "L5") != NULL)
			*val = QZS_L5;
		else if (strstr(freq, "L6") != NULL)
			*val = QZS_LEX;
		else {
			printf("freq = %s,unknow frequency for QZSS",freq);
			exit(1);
		}
		break;
	default:
		printf("freq = %s,unknow frequency",freq);
		exit(1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r14
leal -0x43(%rdi), %eax
cmpl $0x7, %eax
ja 0x1f1b1
leaq 0x4b9ad(%rip), %rcx     # 0x6aaf0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x4c1c5(%rip), %rsi     # 0x6b318
movq %r14, %rdi
callq 0x8160
movsd 0x4b805(%rip), %xmm0    # 0x6a968
testq %rax, %rax
jne 0x1f2a9
leaq 0x4c1a8(%rip), %rsi     # 0x6b31b
movq %r14, %rdi
callq 0x8160
movsd 0x4b7e5(%rip), %xmm0    # 0x6a968
testq %rax, %rax
jne 0x1f2a9
leaq 0x4c1de(%rip), %rsi     # 0x6b371
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f37d
movsd 0x4b7c4(%rip), %xmm0    # 0x6a970
jmp 0x1f2a9
cmpl $0x52, %edi
jne 0x1f39e
movl %edx, %r15d
leaq 0x4c154(%rip), %rsi     # 0x6b318
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f2d6
cvtsi2sd %r15d, %xmm0
mulsd 0x4b7a6(%rip), %xmm0    # 0x6a988
addsd 0x4b7a6(%rip), %xmm0    # 0x6a990
jmp 0x1f2a9
leaq 0x4c122(%rip), %rsi     # 0x6b318
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f2a1
leaq 0x4c10d(%rip), %rsi     # 0x6b31b
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f283
leaq 0x4c0fc(%rip), %rsi     # 0x6b31e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f31d
leaq 0x4c134(%rip), %rsi     # 0x6b36e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f33b
leaq 0x4c16c(%rip), %rdi     # 0x6b3be
jmp 0x1f3c0
leaq 0x4c0ba(%rip), %rsi     # 0x6b318
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f2a1
leaq 0x4c0a9(%rip), %rsi     # 0x6b31b
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f305
movsd 0x4b6c5(%rip), %xmm0    # 0x6a950
jmp 0x1f2a9
leaq 0x4c084(%rip), %rsi     # 0x6b318
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f2b8
movsd 0x4b69f(%rip), %xmm0    # 0x6a948
movsd %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4c0ac(%rip), %rsi     # 0x6b36b
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f327
movsd 0x4b6ac(%rip), %xmm0    # 0x6a980
jmp 0x1f2a9
leaq 0x4c03e(%rip), %rsi     # 0x6b31b
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f3a7
cvtsi2sd %r15d, %xmm0
mulsd 0x4b69d(%rip), %xmm0    # 0x6a998
addsd 0x4b69d(%rip), %xmm0    # 0x6a9a0
jmp 0x1f2a9
leaq 0x4c012(%rip), %rsi     # 0x6b31e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f3b0
movsd 0x4b633(%rip), %xmm0    # 0x6a958
jmp 0x1f2a9
leaq 0x4c040(%rip), %rsi     # 0x6b36e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f348
movsd 0x4b61d(%rip), %xmm0    # 0x6a960
jmp 0x1f2a9
leaq 0x4bfcf(%rip), %rsi     # 0x6b31e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f31d
leaq 0x4c00e(%rip), %rsi     # 0x6b371
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f1a4
leaq 0x4bff9(%rip), %rdi     # 0x6b374
jmp 0x1f3c0
leaq 0x4bfea(%rip), %rsi     # 0x6b36e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f3b9
movsd 0x4b5df(%rip), %xmm0    # 0x6a978
jmp 0x1f2a9
leaq 0x4c03d(%rip), %rdi     # 0x6b3e2
jmp 0x1f3c0
leaq 0x4bf96(%rip), %rdi     # 0x6b344
jmp 0x1f3c0
leaq 0x4bf6a(%rip), %rdi     # 0x6b321
jmp 0x1f3c0
leaq 0x4bfdb(%rip), %rdi     # 0x6b39b
movq %r14, %rsi
xorl %eax, %eax
callq 0x8080
movl $0x1, %edi
callq 0x87b0