// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtcm3.cpp
// Function: bamboo::decode_type1044(bamboo::rtcm_t*)
static int decode_type1044(rtcm_t *rtcm)
{
    eph_t eph={0};
    double toc,sqrtA;
    char *msg;
    int i=24+12,prn,sat,week,sys=SYS_QZS;
    
    if (i+473<=rtcm->len*8) {
        prn       =getbitu(rtcm->buff,i, 4)+192;          i+= 4;
        toc       =getbitu(rtcm->buff,i,16)*16.0;         i+=16;
        eph.f2    =getbits(rtcm->buff,i, 8)*P2_55;        i+= 8;
        eph.f1    =getbits(rtcm->buff,i,16)*P2_43;        i+=16;
        eph.f0    =getbits(rtcm->buff,i,22)*P2_31;        i+=22;
        eph.iode  =getbitu(rtcm->buff,i, 8);              i+= 8;
        eph.crs   =getbits(rtcm->buff,i,16)*P2_5;         i+=16;
        eph.deln  =getbits(rtcm->buff,i,16)*P2_43*SC2RAD; i+=16;
        eph.M0    =getbits(rtcm->buff,i,32)*P2_31*SC2RAD; i+=32;
        eph.cuc   =getbits(rtcm->buff,i,16)*P2_29;        i+=16;
        eph.e     =getbitu(rtcm->buff,i,32)*P2_33;        i+=32;
        eph.cus   =getbits(rtcm->buff,i,16)*P2_29;        i+=16;
        sqrtA     =getbitu(rtcm->buff,i,32)*P2_19;        i+=32;
        eph.toes  =getbitu(rtcm->buff,i,16)*16.0;         i+=16;
        eph.cic   =getbits(rtcm->buff,i,16)*P2_29;        i+=16;
        eph.OMG0  =getbits(rtcm->buff,i,32)*P2_31*SC2RAD; i+=32;
        eph.cis   =getbits(rtcm->buff,i,16)*P2_29;        i+=16;
        eph.i0    =getbits(rtcm->buff,i,32)*P2_31*SC2RAD; i+=32;
        eph.crc   =getbits(rtcm->buff,i,16)*P2_5;         i+=16;
        eph.omg   =getbits(rtcm->buff,i,32)*P2_31*SC2RAD; i+=32;
        eph.OMGd  =getbits(rtcm->buff,i,24)*P2_43*SC2RAD; i+=24;
        eph.idot  =getbits(rtcm->buff,i,14)*P2_43*SC2RAD; i+=14;
        eph.code  =getbitu(rtcm->buff,i, 2);              i+= 2;
        week      =getbitu(rtcm->buff,i,10);              i+=10;
        eph.sva   =getbitu(rtcm->buff,i, 4);              i+= 4;
        eph.svh   =getbitu(rtcm->buff,i, 6);              i+= 6;
        eph.tgd[0]=getbits(rtcm->buff,i, 8)*P2_31;        i+= 8;
        eph.iodc  =getbitu(rtcm->buff,i,10);              i+=10;
        eph.fit   =getbitu(rtcm->buff,i, 1)?0.0:2.0; /* 0:2hr,1:>2hr */
    }
    else {
        trace(2,"rtcm3 1044 length error: len=%d\n",rtcm->len);
        return -1;
    }
    trace(4,"decode_type1044: prn=%d iode=%d toe=%.0f\n",prn,eph.iode,eph.toes);
    
    if (rtcm->outtype) {
        msg=rtcm->msgtype+strlen(rtcm->msgtype);
        sprintf(msg," prn=%3d iode=%3d iodc=%3d week=%d toe=%6.0f toc=%6.0f svh=%02X",
                prn,eph.iode,eph.iodc,week,eph.toes,toc,eph.svh);
    }
    if (!(sat=satno(sys,prn))) {
        trace(2,"rtcm3 1044 satellite number error: prn=%d\n",prn);
        return -1;
    }
    eph.sat=sat;
    eph.week=adjgpsweek(week);
    eph.toe=gpst2time(eph.week,eph.toes);
    eph.toc=gpst2time(eph.week,toc);
    eph.ttr=rtcm->time;
    eph.A=sqrtA*sqrtA;
    if (!strstr(rtcm->opt,"-EPHALL")) {
        if (eph.iode==rtcm->nav.eph[sat-1].iode&&
            eph.iodc==rtcm->nav.eph[sat-1].iodc) return 0; /* unchanged */
    }
    rtcm->nav.eph[sat-1]=eph;
    rtcm->ephsat=sat;
    return 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, -0xd0(%rbp)
movaps %xmm0, -0x100(%rbp)
movaps %xmm0, -0xf0(%rbp)
movq $0x0, -0xe0(%rbp)
movl 0x9f0c0(%rdi), %edx
cmpl $0x40, %edx
jl 0x3e0ad
movq %rdi, %rbx
leaq 0x9f0c4(%rdi), %r14
movq %r14, %rdi
movl $0x24, %esi
movl $0x4, %edx
callq 0x4d9d6
movl %eax, %r12d
addl $0xc0, %r12d
movq %r14, %rdi
movl $0x28, %esi
movl $0x10, %edx
callq 0x4d9d6
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x38(%rbp)
movq %r14, %rdi
movl $0x38, %esi
movl $0x8, %edx
callq 0x4da25
movl %eax, -0xa4(%rbp)
movq %r14, %rdi
movl $0x40, %esi
movl $0x10, %edx
callq 0x4da25
movl %eax, -0x58(%rbp)
movq %r14, %rdi
movl $0x50, %esi
movl $0x16, %edx
callq 0x4da25
movl %eax, -0xa0(%rbp)
movq %r14, %rdi
movl $0x66, %esi
movl $0x8, %edx
callq 0x4d9d6
movl %eax, -0x2c(%rbp)
movq %r14, %rdi
movl $0x6e, %esi
movl $0x10, %edx
callq 0x4da25
movl %eax, -0x50(%rbp)
movq %r14, %rdi
movl $0x7e, %esi
movl $0x10, %edx
callq 0x4da25
movl %eax, -0x84(%rbp)
movq %r14, %rdi
movl $0x8e, %esi
movl $0x20, %edx
callq 0x4da25
movl %eax, -0x80(%rbp)
movq %r14, %rdi
movl $0xae, %esi
movl $0x10, %edx
callq 0x4da25
movl %eax, -0x90(%rbp)
movq %r14, %rdi
movl $0xbe, %esi
movl $0x20, %edx
callq 0x4d9d6
movl %eax, -0x9c(%rbp)
movq %r14, %rdi
movl $0xde, %esi
movl $0x10, %edx
callq 0x4da25
movl %eax, -0x7c(%rbp)
movq %r14, %rdi
movl $0xee, %esi
movl $0x20, %edx
callq 0x4d9d6
movl %eax, -0x98(%rbp)
movq %r14, %rdi
movl $0x10e, %esi            # imm = 0x10E
movl $0x10, %edx
callq 0x4d9d6
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x2ee1b(%rip), %xmm0    # 0x6cd78
movsd %xmm0, -0x48(%rbp)
movq %r14, %rdi
movl $0x11e, %esi            # imm = 0x11E
movl $0x10, %edx
callq 0x4da25
movl %eax, -0x70(%rbp)
movq %r14, %rdi
movl $0x12e, %esi            # imm = 0x12E
movl $0x20, %edx
callq 0x4da25
movl %eax, -0x94(%rbp)
movq %r14, %rdi
movl $0x14e, %esi            # imm = 0x14E
movl $0x10, %edx
callq 0x4da25
movl %eax, -0x6c(%rbp)
movq %r14, %rdi
movl $0x15e, %esi            # imm = 0x15E
movl $0x20, %edx
callq 0x4da25
movl %eax, -0x88(%rbp)
movq %r14, %rdi
movl $0x17e, %esi            # imm = 0x17E
movl $0x10, %edx
callq 0x4da25
movl %eax, -0x64(%rbp)
movq %r14, %rdi
movl $0x18e, %esi            # imm = 0x18E
movl $0x20, %edx
callq 0x4da25
movl %eax, -0x78(%rbp)
movq %r14, %rdi
movl $0x1ae, %esi            # imm = 0x1AE
movl $0x18, %edx
callq 0x4da25
movl %eax, -0x60(%rbp)
movq %r14, %rdi
movl $0x1c6, %esi            # imm = 0x1C6
movl $0xe, %edx
callq 0x4da25
movl %eax, -0x5c(%rbp)
movq %r14, %rdi
movl $0x1d4, %esi            # imm = 0x1D4
movl $0x2, %edx
callq 0x4d9d6
movl %eax, -0x8c(%rbp)
movq %r14, %rdi
movl $0x1d6, %esi            # imm = 0x1D6
movl $0xa, %edx
callq 0x4d9d6
movl %eax, %r15d
movq %r14, %rdi
movl $0x1e0, %esi            # imm = 0x1E0
movl $0x4, %edx
callq 0x4d9d6
movl %eax, -0x74(%rbp)
movq %r14, %rdi
movl $0x1e4, %esi            # imm = 0x1E4
movl $0x6, %edx
callq 0x4d9d6
movl %eax, -0x3c(%rbp)
movq %r14, %rdi
movl $0x1ea, %esi            # imm = 0x1EA
movl $0x8, %edx
callq 0x4da25
movl %eax, -0x68(%rbp)
movq %r14, %rdi
movl $0x1f2, %esi            # imm = 0x1F2
movl $0xa, %edx
callq 0x4d9d6
movl %eax, %r13d
movq %r14, %rdi
movl $0x1fc, %esi            # imm = 0x1FC
movl $0x1, %edx
callq 0x4d9d6
testl %eax, %eax
je 0x3e0be
xorpd %xmm0, %xmm0
jmp 0x3e0c6
leaq 0x314fb(%rip), %rsi     # 0x6f5af
movl $0x2, %edi
jmp 0x3e4e5
movsd 0x2dcea(%rip), %xmm0    # 0x6bdb0
movsd %xmm0, -0xb0(%rbp)
movsd -0x38(%rbp), %xmm0
mulsd 0x2ec9d(%rip), %xmm0    # 0x6cd78
movsd %xmm0, -0x38(%rbp)
leaq 0x314e9(%rip), %rsi     # 0x6f5d0
movl $0x4, %edi
movl %r12d, %edx
movl -0x2c(%rbp), %r14d
movl %r14d, %ecx
movsd -0x48(%rbp), %xmm0
movb $0x1, %al
callq 0x4d55d
cmpl $0x0, 0xc(%rbx)
je 0x3e149
leaq 0x9b9d0(%rbx), %rdi
callq 0x8290
leaq (%rbx,%rax), %rdi
addq $0x9b9d0, %rdi          # imm = 0x9B9D0
movl -0x3c(%rbp), %eax
movl %eax, (%rsp)
leaq 0x314ce(%rip), %rsi     # 0x6f5fa
movl %r12d, %edx
movl %r14d, %ecx
movl %r13d, %r8d
movl %r15d, %r9d
movsd -0x48(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movb $0x2, %al
callq 0x8120
movl $0x10, %edi
movl %r12d, %esi
callq 0x4d28d
testl %eax, %eax
je 0x3e4d6
movl %eax, %r14d
movl %r15d, %edi
callq 0x4fe5d
movl %eax, %r12d
movl %eax, %edi
movsd -0x48(%rbp), %xmm0
callq 0x4f24a
movq %rax, %r15
movsd %xmm0, -0xc0(%rbp)
movl %r12d, %edi
movsd -0x38(%rbp), %xmm0
callq 0x4f24a
movq %rax, -0xb8(%rbp)
movsd %xmm0, -0x38(%rbp)
movups 0x10(%rbx), %xmm0
movaps %xmm0, -0xd0(%rbp)
leaq 0x9fd48(%rbx), %rdi
leaq 0x2e512(%rip), %rsi     # 0x6c6c7
callq 0x8160
movq 0x80(%rbx), %rcx
movslq %r14d, %rdx
leaq (%rdx,%rdx,8), %rdx
testq %rax, %rax
jne 0x3e1f2
movq %rdx, %rsi
shlq $0x5, %rsi
movl -0x2c(%rbp), %eax
cmpl -0x11c(%rcx,%rsi), %eax
jne 0x3e1f2
addq %rcx, %rsi
xorl %eax, %eax
cmpl -0x118(%rsi), %r13d
je 0x3e4f1
xorps %xmm1, %xmm1
cvtsi2sdl -0x84(%rbp), %xmm1
cvtsi2sdl -0x80(%rbp), %xmm2
cvtsi2sdl -0x60(%rbp), %xmm3
cvtsi2sdl -0x5c(%rbp), %xmm4
xorps %xmm0, %xmm0
cvtsi2sdl -0x58(%rbp), %xmm0
cvtsi2sdl -0x50(%rbp), %xmm5
cvtsi2sdl -0x90(%rbp), %xmm6
cvtsi2sdl -0x7c(%rbp), %xmm7
cvtsi2sdl -0x70(%rbp), %xmm8
cvtsi2sdl -0x6c(%rbp), %xmm9
cvtsi2sdl -0x64(%rbp), %xmm10
movsd 0x2ea8f(%rip), %xmm11   # 0x6ccd0
mulsd %xmm11, %xmm1
mulsd %xmm11, %xmm3
mulsd %xmm11, %xmm4
mulsd %xmm11, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd 0x2ea75(%rip), %xmm11   # 0x6ccd8
mulsd %xmm11, %xmm6
mulsd %xmm11, %xmm7
mulsd %xmm11, %xmm8
mulsd %xmm11, %xmm9
movsd 0x2ea60(%rip), %xmm11   # 0x6cce0
mulsd %xmm11, %xmm5
movsd %xmm5, -0x50(%rbp)
mulsd %xmm11, %xmm10
movsd 0x2ea21(%rip), %xmm0    # 0x6ccb8
mulsd %xmm0, %xmm2
xorps %xmm11, %xmm11
cvtsi2sdl -0x94(%rbp), %xmm11
mulsd %xmm0, %xmm11
cvtsi2sdl -0x88(%rbp), %xmm14
mulsd %xmm0, %xmm14
cvtsi2sdl -0x78(%rbp), %xmm15
mulsd %xmm0, %xmm15
movsd 0x2dad9(%rip), %xmm12   # 0x6bda8
mulsd %xmm12, %xmm1
mulsd %xmm12, %xmm2
mulsd %xmm12, %xmm11
mulsd %xmm12, %xmm14
mulsd %xmm12, %xmm15
mulsd %xmm12, %xmm3
cvtsi2sdl -0xa0(%rbp), %xmm13
mulsd %xmm12, %xmm4
mulsd %xmm0, %xmm13
xorps %xmm12, %xmm12
cvtsi2sdl -0x68(%rbp), %xmm12
mulsd %xmm0, %xmm12
shlq $0x5, %rdx
movl %r14d, -0x120(%rcx,%rdx)
movl -0x2c(%rbp), %eax
movl %eax, -0x11c(%rcx,%rdx)
movl %r13d, -0x118(%rcx,%rdx)
movl -0x74(%rbp), %eax
movl %eax, -0x114(%rcx,%rdx)
movl -0x3c(%rbp), %eax
movl %eax, -0x110(%rcx,%rdx)
movl %r12d, -0x10c(%rcx,%rdx)
movl -0x8c(%rbp), %eax
movl %eax, -0x108(%rcx,%rdx)
movl $0x0, -0x104(%rcx,%rdx)
movq %r15, -0x100(%rcx,%rdx)
movsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0xf8(%rcx,%rdx)
movq -0xb8(%rbp), %rax
movq %rax, -0xf0(%rcx,%rdx)
movl -0x98(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd -0x38(%rbp), %xmm5
movsd %xmm5, -0xe8(%rcx,%rdx)
mulsd 0x2e91b(%rip), %xmm0    # 0x6ccc8
movaps -0xd0(%rbp), %xmm5
movups %xmm5, -0xe0(%rcx,%rdx)
mulsd %xmm0, %xmm0
movsd %xmm0, -0xd0(%rcx,%rdx)
movl -0x9c(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x2e8e1(%rip), %xmm0    # 0x6ccc0
movsd %xmm0, -0xc8(%rcx,%rdx)
movsd %xmm14, -0xc0(%rcx,%rdx)
movsd %xmm11, -0xb8(%rcx,%rdx)
movsd %xmm15, -0xb0(%rcx,%rdx)
movsd %xmm2, -0xa8(%rcx,%rdx)
movsd %xmm1, -0xa0(%rcx,%rdx)
movsd %xmm3, -0x98(%rcx,%rdx)
movsd %xmm4, -0x90(%rcx,%rdx)
movsd %xmm10, -0x88(%rcx,%rdx)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x80(%rcx,%rdx)
movsd %xmm6, -0x78(%rcx,%rdx)
movsd %xmm7, -0x70(%rcx,%rdx)
movsd %xmm8, -0x68(%rcx,%rdx)
movsd %xmm9, -0x60(%rcx,%rdx)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x58(%rcx,%rdx)
movsd -0xb0(%rbp), %xmm0
movsd %xmm0, -0x50(%rcx,%rdx)
movsd %xmm13, -0x48(%rcx,%rdx)
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x40(%rcx,%rdx)
xorps %xmm0, %xmm0
cvtsi2sdl -0xa4(%rbp), %xmm0
mulsd 0x2e8e9(%rip), %xmm0    # 0x6cd80
movsd %xmm0, -0x38(%rcx,%rdx)
movsd %xmm12, -0x30(%rcx,%rdx)
movq -0xe0(%rbp), %rax
movq %rax, -0x8(%rcx,%rdx)
movaps -0x100(%rbp), %xmm0
movaps -0xf0(%rbp), %xmm1
movups %xmm1, -0x18(%rcx,%rdx)
movups %xmm0, -0x28(%rcx,%rdx)
movl %r14d, 0x9bdd4(%rbx)
movl $0x2, %eax
jmp 0x3e4f1
leaq 0x3115d(%rip), %rsi     # 0x6f63a
movl $0x2, %edi
movl %r12d, %edx
xorl %eax, %eax
callq 0x4d55d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq