// File: /workspace/github_cpp_makefile_star2_O1/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 0x1f7e6
leaq 0x4b378(%rip), %rcx     # 0x6aaf0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x4bb90(%rip), %rsi     # 0x6b318
movq %r14, %rdi
callq 0x8160
movsd 0x4b1d0(%rip), %xmm0    # 0x6a968
testq %rax, %rax
jne 0x1f8de
leaq 0x4bb73(%rip), %rsi     # 0x6b31b
movq %r14, %rdi
callq 0x8160
movsd 0x4b1b0(%rip), %xmm0    # 0x6a968
testq %rax, %rax
jne 0x1f8de
leaq 0x4bba9(%rip), %rsi     # 0x6b371
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f9b2
movsd 0x4b18f(%rip), %xmm0    # 0x6a970
jmp 0x1f8de
cmpl $0x52, %edi
jne 0x1f9d3
movl %edx, %r15d
leaq 0x4bb1f(%rip), %rsi     # 0x6b318
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f90b
cvtsi2sd %r15d, %xmm0
mulsd 0x4b171(%rip), %xmm0    # 0x6a988
addsd 0x4b171(%rip), %xmm0    # 0x6a990
jmp 0x1f8de
leaq 0x4baed(%rip), %rsi     # 0x6b318
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f8d6
leaq 0x4bad8(%rip), %rsi     # 0x6b31b
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f8b8
leaq 0x4bac7(%rip), %rsi     # 0x6b31e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f952
leaq 0x4baff(%rip), %rsi     # 0x6b36e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f970
leaq 0x4bb37(%rip), %rdi     # 0x6b3be
jmp 0x1f9f5
leaq 0x4ba85(%rip), %rsi     # 0x6b318
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f8d6
leaq 0x4ba74(%rip), %rsi     # 0x6b31b
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f93a
movsd 0x4b090(%rip), %xmm0    # 0x6a950
jmp 0x1f8de
leaq 0x4ba4f(%rip), %rsi     # 0x6b318
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f8ed
movsd 0x4b06a(%rip), %xmm0    # 0x6a948
movsd %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4ba77(%rip), %rsi     # 0x6b36b
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f95c
movsd 0x4b077(%rip), %xmm0    # 0x6a980
jmp 0x1f8de
leaq 0x4ba09(%rip), %rsi     # 0x6b31b
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f9dc
cvtsi2sd %r15d, %xmm0
mulsd 0x4b068(%rip), %xmm0    # 0x6a998
addsd 0x4b068(%rip), %xmm0    # 0x6a9a0
jmp 0x1f8de
leaq 0x4b9dd(%rip), %rsi     # 0x6b31e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f9e5
movsd 0x4affe(%rip), %xmm0    # 0x6a958
jmp 0x1f8de
leaq 0x4ba0b(%rip), %rsi     # 0x6b36e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f97d
movsd 0x4afe8(%rip), %xmm0    # 0x6a960
jmp 0x1f8de
leaq 0x4b99a(%rip), %rsi     # 0x6b31e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f952
leaq 0x4b9d9(%rip), %rsi     # 0x6b371
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
jne 0x1f7d9
leaq 0x4b9c4(%rip), %rdi     # 0x6b374
jmp 0x1f9f5
leaq 0x4b9b5(%rip), %rsi     # 0x6b36e
movq %r14, %rdi
callq 0x8160
testq %rax, %rax
je 0x1f9ee
movsd 0x4afaa(%rip), %xmm0    # 0x6a978
jmp 0x1f8de
leaq 0x4ba08(%rip), %rdi     # 0x6b3e2
jmp 0x1f9f5
leaq 0x4b961(%rip), %rdi     # 0x6b344
jmp 0x1f9f5
leaq 0x4b935(%rip), %rdi     # 0x6b321
jmp 0x1f9f5
leaq 0x4b9a6(%rip), %rdi     # 0x6b39b
movq %r14, %rsi
xorl %eax, %eax
callq 0x8080
movl $0x1, %edi
callq 0x87c0