// File: /workspace/github_cpp_makefile_star2_O1/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 0x3e769
movq %rdi, %rbx
leaq 0x9f0c4(%rdi), %r14
movq %r14, %rdi
movl $0x24, %esi
movl $0x4, %edx
callq 0x4e341
movl %eax, %r12d
addl $0xc0, %r12d
movq %r14, %rdi
movl $0x28, %esi
movl $0x10, %edx
callq 0x4e341
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x38(%rbp)
movq %r14, %rdi
movl $0x38, %esi
movl $0x8, %edx
callq 0x4e390
movl %eax, -0xa4(%rbp)
movq %r14, %rdi
movl $0x40, %esi
movl $0x10, %edx
callq 0x4e390
movl %eax, -0x58(%rbp)
movq %r14, %rdi
movl $0x50, %esi
movl $0x16, %edx
callq 0x4e390
movl %eax, -0xa0(%rbp)
movq %r14, %rdi
movl $0x66, %esi
movl $0x8, %edx
callq 0x4e341
movl %eax, %r13d
movq %r14, %rdi
movl $0x6e, %esi
movl $0x10, %edx
callq 0x4e390
movl %eax, -0x50(%rbp)
movq %r14, %rdi
movl $0x7e, %esi
movl $0x10, %edx
callq 0x4e390
movl %eax, -0x88(%rbp)
movq %r14, %rdi
movl $0x8e, %esi
movl $0x20, %edx
callq 0x4e390
movl %eax, -0x80(%rbp)
movq %r14, %rdi
movl $0xae, %esi
movl $0x10, %edx
callq 0x4e390
movl %eax, -0x8c(%rbp)
movq %r14, %rdi
movl $0xbe, %esi
movl $0x20, %edx
callq 0x4e341
movl %eax, -0x9c(%rbp)
movq %r14, %rdi
movl $0xde, %esi
movl $0x10, %edx
callq 0x4e390
movl %eax, -0x7c(%rbp)
movq %r14, %rdi
movl $0xee, %esi
movl $0x20, %edx
callq 0x4e341
movl %eax, -0x98(%rbp)
movq %r14, %rdi
movl $0x10e, %esi            # imm = 0x10E
movl $0x10, %edx
callq 0x4e341
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd 0x2e75f(%rip), %xmm0    # 0x6cd78
movsd %xmm0, -0x48(%rbp)
movq %r14, %rdi
movl $0x11e, %esi            # imm = 0x11E
movl $0x10, %edx
callq 0x4e390
movl %eax, -0x70(%rbp)
movq %r14, %rdi
movl $0x12e, %esi            # imm = 0x12E
movl $0x20, %edx
callq 0x4e390
movl %eax, -0x94(%rbp)
movq %r14, %rdi
movl $0x14e, %esi            # imm = 0x14E
movl $0x10, %edx
callq 0x4e390
movl %eax, -0x6c(%rbp)
movq %r14, %rdi
movl $0x15e, %esi            # imm = 0x15E
movl $0x20, %edx
callq 0x4e390
movl %eax, -0x84(%rbp)
movq %r14, %rdi
movl $0x17e, %esi            # imm = 0x17E
movl $0x10, %edx
callq 0x4e390
movl %eax, -0x64(%rbp)
movq %r14, %rdi
movl $0x18e, %esi            # imm = 0x18E
movl $0x20, %edx
callq 0x4e390
movl %eax, -0x74(%rbp)
movq %r14, %rdi
movl $0x1ae, %esi            # imm = 0x1AE
movl $0x18, %edx
callq 0x4e390
movl %eax, -0x60(%rbp)
movq %r14, %rdi
movl $0x1c6, %esi            # imm = 0x1C6
movl $0xe, %edx
callq 0x4e390
movl %eax, -0x5c(%rbp)
movq %r14, %rdi
movl $0x1d4, %esi            # imm = 0x1D4
movl $0x2, %edx
callq 0x4e341
movl %eax, -0x90(%rbp)
movq %r14, %rdi
movl $0x1d6, %esi            # imm = 0x1D6
movl $0xa, %edx
callq 0x4e341
movl %eax, %r15d
movq %r14, %rdi
movl $0x1e0, %esi            # imm = 0x1E0
movl $0x4, %edx
callq 0x4e341
movl %eax, -0x78(%rbp)
movq %r14, %rdi
movl $0x1e4, %esi            # imm = 0x1E4
movl $0x6, %edx
callq 0x4e341
movl %eax, -0x3c(%rbp)
movq %r14, %rdi
movl $0x1ea, %esi            # imm = 0x1EA
movl $0x8, %edx
callq 0x4e390
movl %eax, -0x68(%rbp)
movq %r14, %rdi
movl $0x1f2, %esi            # imm = 0x1F2
movl $0xa, %edx
callq 0x4e341
movl %eax, -0x2c(%rbp)
movq %r14, %rdi
movl $0x1fc, %esi            # imm = 0x1FC
movl $0x1, %edx
callq 0x4e341
testl %eax, %eax
je 0x3e77a
xorpd %xmm0, %xmm0
jmp 0x3e782
leaq 0x30e3f(%rip), %rsi     # 0x6f5af
movl $0x2, %edi
jmp 0x3eba7
movsd 0x2d62e(%rip), %xmm0    # 0x6bdb0
movsd %xmm0, -0xb0(%rbp)
movsd -0x38(%rbp), %xmm0
mulsd 0x2e5e1(%rip), %xmm0    # 0x6cd78
movsd %xmm0, -0x38(%rbp)
leaq 0x30e2d(%rip), %rsi     # 0x6f5d0
movl $0x4, %edi
movl %r12d, %edx
movl %r13d, %ecx
movsd -0x48(%rbp), %xmm0
movb $0x1, %al
callq 0x4ded0
cmpl $0x0, 0xc(%rbx)
je 0x3e802
leaq 0x9b9d0(%rbx), %rdi
callq 0x8290
leaq (%rbx,%rax), %rdi
addq $0x9b9d0, %rdi          # imm = 0x9B9D0
movl -0x3c(%rbp), %eax
movl %eax, (%rsp)
leaq 0x30e16(%rip), %rsi     # 0x6f5fa
movl %r12d, %edx
movl %r13d, %ecx
movl -0x2c(%rbp), %r8d
movl %r15d, %r9d
movsd -0x48(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movb $0x2, %al
callq 0x8120
movl %r13d, %r14d
movl $0x10, %edi
movl %r12d, %esi
callq 0x4dbc5
testl %eax, %eax
je 0x3eb98
movl %eax, %r13d
movl %r15d, %edi
callq 0x5081e
movl %eax, %r15d
movl %eax, %edi
movsd -0x48(%rbp), %xmm0
callq 0x4fbc6
movq %rax, -0xc0(%rbp)
movsd %xmm0, -0xb8(%rbp)
movl %r15d, %edi
movsd -0x38(%rbp), %xmm0
callq 0x4fbc6
movq %rax, %r12
movsd %xmm0, -0x38(%rbp)
movups 0x10(%rbx), %xmm0
movaps %xmm0, -0xd0(%rbp)
leaq 0x9fd48(%rbx), %rdi
leaq 0x2de56(%rip), %rsi     # 0x6c6c7
callq 0x8160
movslq %r13d, %rcx
testq %rax, %rax
jne 0x3e8ab
movq 0x80(%rbx), %rdx
leaq (%rcx,%rcx,8), %rax
shlq $0x5, %rax
cmpl -0x11c(%rdx,%rax), %r14d
jne 0x3e8ab
addq %rax, %rdx
xorl %eax, %eax
movl -0x2c(%rbp), %edi
cmpl -0x118(%rdx), %edi
je 0x3ebb3
xorps %xmm1, %xmm1
cvtsi2sdl -0x88(%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 -0x8c(%rbp), %xmm6
cvtsi2sdl -0x7c(%rbp), %xmm7
cvtsi2sdl -0x70(%rbp), %xmm8
cvtsi2sdl -0x6c(%rbp), %xmm9
cvtsi2sdl -0x64(%rbp), %xmm10
movsd 0x2e3d6(%rip), %xmm11   # 0x6ccd0
mulsd %xmm11, %xmm1
mulsd %xmm11, %xmm3
mulsd %xmm11, %xmm4
mulsd %xmm11, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd 0x2e3bc(%rip), %xmm11   # 0x6ccd8
mulsd %xmm11, %xmm6
mulsd %xmm11, %xmm7
mulsd %xmm11, %xmm8
mulsd %xmm11, %xmm9
movsd 0x2e3a7(%rip), %xmm11   # 0x6cce0
mulsd %xmm11, %xmm5
movsd %xmm5, -0x50(%rbp)
mulsd %xmm11, %xmm10
movsd 0x2e368(%rip), %xmm0    # 0x6ccb8
mulsd %xmm0, %xmm2
xorps %xmm11, %xmm11
cvtsi2sdl -0x94(%rbp), %xmm11
cvtsi2sdl -0x84(%rbp), %xmm13
mulsd %xmm0, %xmm11
mulsd %xmm0, %xmm13
cvtsi2sdl -0x74(%rbp), %xmm15
mulsd %xmm0, %xmm15
movsd 0x2d420(%rip), %xmm12   # 0x6bda8
mulsd %xmm12, %xmm1
mulsd %xmm12, %xmm2
mulsd %xmm12, %xmm11
mulsd %xmm12, %xmm13
mulsd %xmm12, %xmm15
mulsd %xmm12, %xmm3
mulsd %xmm12, %xmm4
cvtsi2sdl -0xa0(%rbp), %xmm14
mulsd %xmm0, %xmm14
xorps %xmm12, %xmm12
cvtsi2sdl -0x68(%rbp), %xmm12
mulsd %xmm0, %xmm12
leaq (%rcx,%rcx,8), %rax
shlq $0x5, %rax
movq 0x80(%rbx), %rdx
movl %ecx, -0x120(%rdx,%rax)
movl %r14d, -0x11c(%rdx,%rax)
movl -0x2c(%rbp), %esi
movl %esi, -0x118(%rdx,%rax)
movl -0x78(%rbp), %esi
movl %esi, -0x114(%rdx,%rax)
movl -0x3c(%rbp), %esi
movl %esi, -0x110(%rdx,%rax)
movl %r15d, -0x10c(%rdx,%rax)
movl -0x90(%rbp), %esi
movl %esi, -0x108(%rdx,%rax)
movl $0x0, -0x104(%rdx,%rax)
movq -0xc0(%rbp), %rsi
movq %rsi, -0x100(%rdx,%rax)
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0xf8(%rdx,%rax)
movq %r12, -0xf0(%rdx,%rax)
movl -0x98(%rbp), %esi
xorps %xmm0, %xmm0
cvtsi2sd %rsi, %xmm0
movsd -0x38(%rbp), %xmm5
movsd %xmm5, -0xe8(%rdx,%rax)
mulsd 0x2e258(%rip), %xmm0    # 0x6ccc8
movaps -0xd0(%rbp), %xmm5
movups %xmm5, -0xe0(%rdx,%rax)
mulsd %xmm0, %xmm0
movsd %xmm0, -0xd0(%rdx,%rax)
movl -0x9c(%rbp), %esi
xorps %xmm0, %xmm0
cvtsi2sd %rsi, %xmm0
mulsd 0x2e21e(%rip), %xmm0    # 0x6ccc0
movsd %xmm0, -0xc8(%rdx,%rax)
movsd %xmm13, -0xc0(%rdx,%rax)
movsd %xmm11, -0xb8(%rdx,%rax)
movsd %xmm15, -0xb0(%rdx,%rax)
movsd %xmm2, -0xa8(%rdx,%rax)
movsd %xmm1, -0xa0(%rdx,%rax)
movsd %xmm3, -0x98(%rdx,%rax)
movsd %xmm4, -0x90(%rdx,%rax)
movsd %xmm10, -0x88(%rdx,%rax)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x80(%rdx,%rax)
movsd %xmm6, -0x78(%rdx,%rax)
movsd %xmm7, -0x70(%rdx,%rax)
movsd %xmm8, -0x68(%rdx,%rax)
movsd %xmm9, -0x60(%rdx,%rax)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x58(%rdx,%rax)
movsd -0xb0(%rbp), %xmm0
movsd %xmm0, -0x50(%rdx,%rax)
movsd %xmm14, -0x48(%rdx,%rax)
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x40(%rdx,%rax)
xorps %xmm0, %xmm0
cvtsi2sdl -0xa4(%rbp), %xmm0
mulsd 0x2e226(%rip), %xmm0    # 0x6cd80
movsd %xmm0, -0x38(%rdx,%rax)
movsd %xmm12, -0x30(%rdx,%rax)
movq -0xe0(%rbp), %rsi
movq %rsi, -0x8(%rdx,%rax)
movaps -0x100(%rbp), %xmm0
movaps -0xf0(%rbp), %xmm1
movups %xmm1, -0x18(%rdx,%rax)
movups %xmm0, -0x28(%rdx,%rax)
movl %ecx, 0x9bdd4(%rbx)
movl $0x2, %eax
jmp 0x3ebb3
leaq 0x30a9b(%rip), %rsi     # 0x6f63a
movl $0x2, %edi
movl %r12d, %edx
xorl %eax, %eax
callq 0x4ded0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq