// File: /workspace/github_cpp_makefile_star2_O1/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, %r15d
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x2be65(%rip), %rsi     # 0x702a0
xorl %r12d, %r12d
movl $0x3, %edi
movl %r14d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x4ded0
cmpl $0x4d7, %r14d           # imm = 0x4D7
jg 0x44485
leal -0x3e9(%r14), %eax
cmpl $0x7e, %eax
ja 0x444b2
leaq 0x2b784(%rip), %rcx     # 0x6fbf0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl %r15d, %esi
callq 0x44a99
jmp 0x4478d
leal -0x4d8(%r14), %eax
cmpl $0x17, %eax
ja 0x44a4e
leaq 0x2b950(%rip), %rcx     # 0x6fdec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x449cb
leal -0xb(%r14), %eax
cmpl $0x3, %eax
ja 0x444d8
leaq 0x2b71e(%rip), %rcx     # 0x6fbe0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x44a43
cmpl $0x3f, %r14d
jne 0x44a4e
movq %rbx, %rdi
movl %r15d, %esi
callq 0x48e0f
jmp 0x44a4b
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x44847
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x44847
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x448e3
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x448ce
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x448e3
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x44885
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x44866
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x448e3
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x44847
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x4489a
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x448af
movq %rbx, %rdi
movl %r15d, %esi
callq 0x486e8
jmp 0x44a4b
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x44866
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x44a1d
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x449f9
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x44885
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x449f9
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4686f
jmp 0x44a4b
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x449e7
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x44866
movq %rbx, %rdi
movl %r15d, %esi
callq 0x47991
jmp 0x44a4b
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x449a2
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x44885
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x448ce
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x448ce
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x44a0b
movq %rbx, %rdi
movl %r15d, %esi
callq 0x45863
jmp 0x4478d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x452bd
jmp 0x4478d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x45a69
jmp 0x4478d
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x44866
movq %rbx, %rdi
movl %r15d, %esi
callq 0x45f06
jmp 0x4478d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x44c5e
jmp 0x4478d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4541d
jmp 0x4478d
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x449cb
movq %rbx, %rdi
movl %r15d, %esi
callq 0x44e4d
jmp 0x4478d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x456f5
jmp 0x4478d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x45066
jmp 0x4478d
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x448af
movq %rbx, %rdi
movl %r15d, %esi
callq 0x472de
jmp 0x44a4b
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x448af
movq %rbx, %rdi
movl %r15d, %esi
callq 0x47012
jmp 0x4478d
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x449a2
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x448e3
movq %rbx, %rdi
movl %r15d, %esi
callq 0x45ca2
jmp 0x4478d
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x44a1d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x461aa
jmp 0x44a4b
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4804a
jmp 0x44a4b
movq %rbx, %rdi
movl %r15d, %esi
callq 0x455ed
movl $0x1, %r12d
jmp 0x44a4e
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x44866
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x4489a
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x449cb
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x4489a
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x448ce
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x44847
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x44a0b
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x44847
movq %rbx, %rdi
movl $0x4, %esi
jmp 0x449e7
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x4489a
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x44885
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x448af
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x44885
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x4489a
movq %rbx, %rdi
movl $0x10, %esi
movl %r15d, %edx
callq 0x4a971
jmp 0x44a4b
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x448ce
movq %rbx, %rdi
movl $0x4, %esi
movl %r15d, %edx
callq 0x4af95
jmp 0x44a4b
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x448af
movq %rbx, %rdi
movl $0x20, %esi
movl %r15d, %edx
callq 0x4aaba
jmp 0x44a4b
movq %rbx, %rdi
movl $0x2, %esi
movl %r15d, %edx
callq 0x4a82a
jmp 0x44a4b
movq %rbx, %rdi
movl $0x20, %esi
movl %r15d, %edx
callq 0x4a753
jmp 0x44a4b
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x448e3
movq %rbx, %rdi
movl $0x20, %esi
movl %r15d, %edx
callq 0x4ac34
jmp 0x44a4b
movq %rbx, %rdi
movl $0x10, %esi
movl %r15d, %edx
callq 0x4ae1b
jmp 0x44a4b
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x449f9
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x449e7
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x44a1d
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x449f9
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x449cb
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x449a2
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x449e7
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x449a2
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x449a2
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x44a0b
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x44a0b
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x44a1d
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x449e7
movq %rbx, %rdi
movl $0x8, %esi
jmp 0x44a1d
movq %rbx, %rdi
movl $0x20, %esi
movl %r15d, %edx
callq 0x49e83
jmp 0x44a4b
movq %rbx, %rdi
movl $0x2, %esi
jmp 0x44a0b
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x449cb
movq %rbx, %rdi
movl $0x20, %esi
movl %r15d, %edx
callq 0x494c2
jmp 0x44a4b
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x449f9
movq %rbx, %rdi
movl $0x10, %esi
movl %r15d, %edx
callq 0x49b54
jmp 0x44a4b
movq %rbx, %rdi
movl $0x20, %esi
movl %r15d, %edx
callq 0x4a329
jmp 0x44a4b
movq %rbx, %rdi
movl $0x20, %esi
movl %r15d, %edx
callq 0x498a0
jmp 0x44a4b
movq %rbx, %rdi
movl $0x20, %esi
movl %r15d, %edx
callq 0x4a532
jmp 0x44a4b
movq %rbx, %rdi
movl $0x10, %esi
jmp 0x44a43
movq %rbx, %rdi
movl $0x20, %esi
jmp 0x44a43
movq %rbx, %rdi
movl $0x8, %esi
movl %r15d, %edx
callq 0x4b17c
movl %eax, %r12d
testl %r12d, %r12d
je 0x44a8d
leal -0x3e9(%r14), %eax
cmpl $0x12a, %eax            # imm = 0x12A
ja 0x44a6a
addl $0xfffffc18, %r14d      # imm = 0xFFFFFC18
jmp 0x44a7d
leal -0x7d0(%r14), %eax
cmpl $0x63, %eax
ja 0x44a87
addl $0xfffff95c, %r14d      # imm = 0xFFFFF95C
incl 0x9f708(%rbx,%r14,4)
jmp 0x44a8d
incl 0x9f708(%rbx)
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq