// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3e.cpp
// Function: bamboo::encode_rtcm3(bamboo::rtcm_t*, int, int)
extern int encode_rtcm3(rtcm_t *rtcm, int type, int sync)
{
    int ret=0;
    
    trace(3,"encode_rtcm3: type=%d sync=%d\n",type,sync);
    
    switch (type) {
        case 1001: ret=encode_type1001(rtcm,sync);     break;
        case 1002: ret=encode_type1002(rtcm,sync);     break;
        case 1003: ret=encode_type1003(rtcm,sync);     break;
        case 1004: ret=encode_type1004(rtcm,sync);     break;
        case 1005: ret=encode_type1005(rtcm,sync);     break;
        case 1006: ret=encode_type1006(rtcm,sync);     break;
        case 1007: ret=encode_type1007(rtcm,sync);     break;
        case 1008: ret=encode_type1008(rtcm,sync);     break;
        case 1009: ret=encode_type1009(rtcm,sync);     break;
        case 1010: ret=encode_type1010(rtcm,sync);     break;
        case 1011: ret=encode_type1011(rtcm,sync);     break;
        case 1012: ret=encode_type1012(rtcm,sync);     break;
        case 1019: ret=encode_type1019(rtcm,sync);     break;
        case 1020: ret=encode_type1020(rtcm,sync);     break;
        case 1033: ret=encode_type1033(rtcm,sync);     break;
        case 1042: ret=encode_type1042(rtcm,sync);     break;
        case 1044: ret=encode_type1044(rtcm,sync);     break;
        case 1045: ret=encode_type1045(rtcm,sync);     break;
        case 1046: ret=encode_type1046(rtcm,sync);     break;
        case   63: ret=encode_type63  (rtcm,sync);     break; /* draft */
        case 1057: ret=encode_ssr1(rtcm,SYS_GPS,sync); break;
        case 1058: ret=encode_ssr2(rtcm,SYS_GPS,sync); break;
        case 1059: ret=encode_ssr3(rtcm,SYS_GPS,sync); break;
        case 1060: ret=encode_ssr4(rtcm,SYS_GPS,sync); break;
        case 1061: ret=encode_ssr5(rtcm,SYS_GPS,sync); break;
        case 1062: ret=encode_ssr6(rtcm,SYS_GPS,sync); break;
        case 1063: ret=encode_ssr1(rtcm,SYS_GLO,sync); break;
        case 1064: ret=encode_ssr2(rtcm,SYS_GLO,sync); break;
        case 1065: ret=encode_ssr3(rtcm,SYS_GLO,sync); break;
        case 1066: ret=encode_ssr4(rtcm,SYS_GLO,sync); break;
        case 1067: ret=encode_ssr5(rtcm,SYS_GLO,sync); break;
        case 1068: ret=encode_ssr6(rtcm,SYS_GLO,sync); break;
        case 1071: ret=encode_msm1(rtcm,SYS_GPS,sync); break;
        case 1072: ret=encode_msm2(rtcm,SYS_GPS,sync); break;
        case 1073: ret=encode_msm3(rtcm,SYS_GPS,sync); break;
        case 1074: ret=encode_msm4(rtcm,SYS_GPS,sync); break;
        case 1075: ret=encode_msm5(rtcm,SYS_GPS,sync); break;
        case 1076: ret=encode_msm6(rtcm,SYS_GPS,sync); break;
        case 1077: ret=encode_msm7(rtcm,SYS_GPS,sync); break;
        case 1081: ret=encode_msm1(rtcm,SYS_GLO,sync); break;
        case 1082: ret=encode_msm2(rtcm,SYS_GLO,sync); break;
        case 1083: ret=encode_msm3(rtcm,SYS_GLO,sync); break;
        case 1084: ret=encode_msm4(rtcm,SYS_GLO,sync); break;
        case 1085: ret=encode_msm5(rtcm,SYS_GLO,sync); break;
        case 1086: ret=encode_msm6(rtcm,SYS_GLO,sync); break;
        case 1087: ret=encode_msm7(rtcm,SYS_GLO,sync); break;
        case 1091: ret=encode_msm1(rtcm,SYS_GAL,sync); break;
        case 1092: ret=encode_msm2(rtcm,SYS_GAL,sync); break;
        case 1093: ret=encode_msm3(rtcm,SYS_GAL,sync); break;
        case 1094: ret=encode_msm4(rtcm,SYS_GAL,sync); break;
        case 1095: ret=encode_msm5(rtcm,SYS_GAL,sync); break;
        case 1096: ret=encode_msm6(rtcm,SYS_GAL,sync); break;
        case 1097: ret=encode_msm7(rtcm,SYS_GAL,sync); break;
        case 1101: ret=encode_msm1(rtcm,SYS_SBS,sync); break;
        case 1102: ret=encode_msm2(rtcm,SYS_SBS,sync); break;
        case 1103: ret=encode_msm3(rtcm,SYS_SBS,sync); break;
        case 1104: ret=encode_msm4(rtcm,SYS_SBS,sync); break;
        case 1105: ret=encode_msm5(rtcm,SYS_SBS,sync); break;
        case 1106: ret=encode_msm6(rtcm,SYS_SBS,sync); break;
        case 1107: ret=encode_msm7(rtcm,SYS_SBS,sync); break;
        case 1111: ret=encode_msm1(rtcm,SYS_QZS,sync); break;
        case 1112: ret=encode_msm2(rtcm,SYS_QZS,sync); break;
        case 1113: ret=encode_msm3(rtcm,SYS_QZS,sync); break;
        case 1114: ret=encode_msm4(rtcm,SYS_QZS,sync); break;
        case 1115: ret=encode_msm5(rtcm,SYS_QZS,sync); break;
        case 1116: ret=encode_msm6(rtcm,SYS_QZS,sync); break;
        case 1117: ret=encode_msm7(rtcm,SYS_QZS,sync); break;
        case 1121: ret=encode_msm1(rtcm,SYS_CMP,sync); break;
        case 1122: ret=encode_msm2(rtcm,SYS_CMP,sync); break;
        case 1123: ret=encode_msm3(rtcm,SYS_CMP,sync); break;
        case 1124: ret=encode_msm4(rtcm,SYS_CMP,sync); break;
        case 1125: ret=encode_msm5(rtcm,SYS_CMP,sync); break;
        case 1126: ret=encode_msm6(rtcm,SYS_CMP,sync); break;
        case 1127: ret=encode_msm7(rtcm,SYS_CMP,sync); break;
        case 1240: ret=encode_ssr1(rtcm,SYS_GAL,sync); break;
        case 1241: ret=encode_ssr2(rtcm,SYS_GAL,sync); break;
        case 1242: ret=encode_ssr3(rtcm,SYS_GAL,sync); break;
        case 1243: ret=encode_ssr4(rtcm,SYS_GAL,sync); break;
        case 1244: ret=encode_ssr5(rtcm,SYS_GAL,sync); break;
        case 1245: ret=encode_ssr6(rtcm,SYS_GAL,sync); break;
        case 1246: ret=encode_ssr1(rtcm,SYS_QZS,sync); break;
        case 1247: ret=encode_ssr2(rtcm,SYS_QZS,sync); break;
        case 1248: ret=encode_ssr3(rtcm,SYS_QZS,sync); break;
        case 1249: ret=encode_ssr4(rtcm,SYS_QZS,sync); break;
        case 1250: ret=encode_ssr5(rtcm,SYS_QZS,sync); break;
        case 1251: ret=encode_ssr6(rtcm,SYS_QZS,sync); break;
        case 1252: ret=encode_ssr1(rtcm,SYS_SBS,sync); break;
        case 1253: ret=encode_ssr2(rtcm,SYS_SBS,sync); break;
        case 1254: ret=encode_ssr3(rtcm,SYS_SBS,sync); break;
        case 1255: ret=encode_ssr4(rtcm,SYS_SBS,sync); break;
        case 1256: ret=encode_ssr5(rtcm,SYS_SBS,sync); break;
        case 1257: ret=encode_ssr6(rtcm,SYS_SBS,sync); break;
        case 1258: ret=encode_ssr1(rtcm,SYS_CMP,sync); break;
        case 1259: ret=encode_ssr2(rtcm,SYS_CMP,sync); break;
        case 1260: ret=encode_ssr3(rtcm,SYS_CMP,sync); break;
        case 1261: ret=encode_ssr4(rtcm,SYS_CMP,sync); break;
        case 1262: ret=encode_ssr5(rtcm,SYS_CMP,sync); break;
        case 1263: ret=encode_ssr6(rtcm,SYS_CMP,sync); break;
        case   11: ret=encode_ssr7(rtcm,SYS_GPS,sync); break; /* tentative */
        case   12: ret=encode_ssr7(rtcm,SYS_GAL,sync); break; /* tentative */
        case   13: ret=encode_ssr7(rtcm,SYS_QZS,sync); break; /* tentative */
        case   14: ret=encode_ssr7(rtcm,SYS_CMP,sync); break; /* tentative */
    }
    if (ret>0) {
        type-=1000;
        if      (   1<=type&&type<= 299) rtcm->nmsg3[type    ]++; /* 1001-1299 */
        else if (1000<=type&&type<=1099) rtcm->nmsg3[type-700]++; /* 2000-2099 */
        else rtcm->nmsg3[0]++;
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r12d
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x2c751(%rip), %rsi     # 0x702a0
xorl %r15d, %r15d
movl $0x3, %edi
movl %r14d, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x4d55d
cmpl $0x4d7, %r14d           # imm = 0x4D7
jg 0x43b99
leal -0x3e9(%r14), %eax
cmpl $0x7e, %eax
ja 0x43bc6
leaq 0x2c070(%rip), %rcx     # 0x6fbf0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4419a
jmp 0x44171
leal -0x4d8(%r14), %eax
cmpl $0x17, %eax
ja 0x4418e
leaq 0x2c23c(%rip), %rcx     # 0x6fdec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x440df
leal -0xb(%r14), %eax
cmpl $0x3, %eax
ja 0x43bec
leaq 0x2c00a(%rip), %rcx     # 0x6fbe0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x44157
cmpl $0x3f, %r14d
jne 0x4418e
movq %rbx, %rdi
movl %r12d, %esi
callq 0x48480
jmp 0x4415f
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x43f5b
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x43f5b
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x43ff7
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x43fe2
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x43ff7
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x43f99
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x43f7a
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x43ff7
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x43f5b
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x43fae
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x43fc3
movq %rbx, %rdi
movl %r12d, %esi
callq 0x47d59
jmp 0x4415f
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x43f7a
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x44131
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x4410d
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x43f99
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x4410d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x45ee0
jmp 0x4415f
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x440fb
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x43f7a
movq %rbx, %rdi
movl %r12d, %esi
callq 0x47002
jmp 0x4415f
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x440b6
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x43f99
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x43fe2
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x43fe2
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x4411f
movq %rbx, %rdi
movl %r12d, %esi
callq 0x44f21
jmp 0x44171
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4497b
jmp 0x44171
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4510b
jmp 0x44171
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x43f7a
movq %rbx, %rdi
movl %r12d, %esi
callq 0x45587
jmp 0x44171
movq %rbx, %rdi
movl %r12d, %esi
callq 0x44346
jmp 0x44171
movq %rbx, %rdi
movl %r12d, %esi
callq 0x44adb
jmp 0x44171
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x440df
movq %rbx, %rdi
movl %r12d, %esi
callq 0x44527
jmp 0x44171
movq %rbx, %rdi
movl %r12d, %esi
callq 0x44db3
jmp 0x44171
movq %rbx, %rdi
movl %r12d, %esi
callq 0x44732
jmp 0x44171
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x43fc3
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4694f
jmp 0x4415f
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x43fc3
movq %rbx, %rdi
movl %r12d, %esi
callq 0x46683
jmp 0x44171
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x440b6
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x43ff7
movq %rbx, %rdi
movl %r12d, %esi
callq 0x45333
jmp 0x44171
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x44131
movq %rbx, %rdi
movl %r12d, %esi
callq 0x4581b
jmp 0x4415f
movq %rbx, %rdi
movl %r12d, %esi
callq 0x476bb
jmp 0x4415f
movq %rbx, %rdi
movl %r12d, %esi
callq 0x44cab
jmp 0x44171
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x43f7a
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x43fae
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x440df
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x43fae
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x43fe2
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x43f5b
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x4411f
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x43f5b
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x440fb
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x43fae
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x43f99
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x43fc3
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x43f99
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x43fae
movq %rbx, %rdi
movl $0x10, %esi
movl %r12d, %edx
callq 0x49fdb
jmp 0x4415f
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x43fe2
movq %rbx, %rdi
movl $0x4, %esi
movl %r12d, %edx
callq 0x4a5ff
jmp 0x4415f
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x43fc3
movq %rbx, %rdi
movl $0x20, %esi
movl %r12d, %edx
callq 0x4a124
jmp 0x4415f
movq %rbx, %rdi
movl $0x2, %esi
movl %r12d, %edx
callq 0x49e94
jmp 0x4415f
movq %rbx, %rdi
movl $0x20, %esi
movl %r12d, %edx
callq 0x49dbd
jmp 0x4415f
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x43ff7
movq %rbx, %rdi
movl $0x20, %esi
movl %r12d, %edx
callq 0x4a29e
jmp 0x4415f
movq %rbx, %rdi
movl $0x10, %esi
movl %r12d, %edx
callq 0x4a485
jmp 0x4415f
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x4410d
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x440fb
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x44131
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x4410d
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x440df
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x440b6
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x440fb
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x440b6
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x440b6
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x4411f
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x4411f
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x44131
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x440fb
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x44131
movq %rbx, %rdi
movl $0x20, %esi
movl %r12d, %edx
callq 0x494ed
jmp 0x4415f
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x4411f
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x440df
movq %rbx, %rdi
movl $0x20, %esi
movl %r12d, %edx
callq 0x48b33
jmp 0x4415f
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x4410d
movq %rbx, %rdi
movl $0x10, %esi
movl %r12d, %edx
callq 0x491c5
jmp 0x4415f
movq %rbx, %rdi
movl $0x20, %esi
movl %r12d, %edx
callq 0x49993
jmp 0x4415f
movq %rbx, %rdi
movl $0x20, %esi
movl %r12d, %edx
callq 0x48f11
jmp 0x4415f
movq %rbx, %rdi
movl $0x20, %esi
movl %r12d, %edx
callq 0x49b9c
jmp 0x4415f
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x44157
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x44157
movq %rbx, %rdi
movl $0x8, %esi
movl %r12d, %edx
callq 0x4a7e6
testl %eax, %eax
je 0x4418e
leal -0x3e9(%r14), %eax
cmpl $0x12a, %eax            # imm = 0x12A
ja 0x44182
addl $0xfffffc18, %r14d      # imm = 0xFFFFFC18
incl 0x9f708(%rbx,%r14,4)
jmp 0x44188
incl 0x9f708(%rbx)
movl $0x1, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq