// File: /workspace/github_cpp_makefile_star2_O2/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 0x1bcb8
leaq 0x44e96(%rip), %rcx     # 0x60ae0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x456ae(%rip), %rsi     # 0x61308
movq %r14, %rdi
callq 0x8170
movsd 0x44cee(%rip), %xmm0    # 0x60958
testq %rax, %rax
jne 0x1bdb0
leaq 0x45691(%rip), %rsi     # 0x6130b
movq %r14, %rdi
callq 0x8170
movsd 0x44cce(%rip), %xmm0    # 0x60958
testq %rax, %rax
jne 0x1bdb0
leaq 0x456c7(%rip), %rsi     # 0x61361
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
je 0x1be84
movsd 0x44cad(%rip), %xmm0    # 0x60960
jmp 0x1bdb0
cmpl $0x52, %edi
jne 0x1bea5
movl %edx, %r15d
leaq 0x4563d(%rip), %rsi     # 0x61308
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
je 0x1bddd
cvtsi2sd %r15d, %xmm0
mulsd 0x44c8f(%rip), %xmm0    # 0x60978
addsd 0x44c8f(%rip), %xmm0    # 0x60980
jmp 0x1bdb0
leaq 0x4560b(%rip), %rsi     # 0x61308
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
jne 0x1bda8
leaq 0x455f6(%rip), %rsi     # 0x6130b
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
jne 0x1bd8a
leaq 0x455e5(%rip), %rsi     # 0x6130e
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
jne 0x1be24
leaq 0x4561d(%rip), %rsi     # 0x6135e
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
jne 0x1be42
leaq 0x45655(%rip), %rdi     # 0x613ae
jmp 0x1bec7
leaq 0x455a3(%rip), %rsi     # 0x61308
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
jne 0x1bda8
leaq 0x45592(%rip), %rsi     # 0x6130b
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
je 0x1be0c
movsd 0x44bae(%rip), %xmm0    # 0x60940
jmp 0x1bdb0
leaq 0x4556d(%rip), %rsi     # 0x61308
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
je 0x1bdbf
movsd 0x44b88(%rip), %xmm0    # 0x60938
movsd %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x45595(%rip), %rsi     # 0x6135b
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
je 0x1be2e
movsd 0x44b95(%rip), %xmm0    # 0x60970
jmp 0x1bdb0
leaq 0x45527(%rip), %rsi     # 0x6130b
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
je 0x1beae
cvtsi2sd %r15d, %xmm0
mulsd 0x44b86(%rip), %xmm0    # 0x60988
addsd 0x44b86(%rip), %xmm0    # 0x60990
jmp 0x1bdb0
leaq 0x454fb(%rip), %rsi     # 0x6130e
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
je 0x1beb7
movsd 0x44b1c(%rip), %xmm0    # 0x60948
jmp 0x1bdb0
leaq 0x45529(%rip), %rsi     # 0x6135e
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
je 0x1be4f
movsd 0x44b06(%rip), %xmm0    # 0x60950
jmp 0x1bdb0
leaq 0x454b8(%rip), %rsi     # 0x6130e
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
jne 0x1be24
leaq 0x454f7(%rip), %rsi     # 0x61361
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
jne 0x1bcab
leaq 0x454e2(%rip), %rdi     # 0x61364
jmp 0x1bec7
leaq 0x454d3(%rip), %rsi     # 0x6135e
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
je 0x1bec0
movsd 0x44ac8(%rip), %xmm0    # 0x60968
jmp 0x1bdb0
leaq 0x45526(%rip), %rdi     # 0x613d2
jmp 0x1bec7
leaq 0x4547f(%rip), %rdi     # 0x61334
jmp 0x1bec7
leaq 0x45453(%rip), %rdi     # 0x61311
jmp 0x1bec7
leaq 0x454c4(%rip), %rdi     # 0x6138b
movq %r14, %rsi
xorl %eax, %eax
callq 0x8070
pushq $0x1
popq %rdi
callq 0x8790