// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/Rtklib/rtcm3.cpp
// Function: bamboo::decode_type1033(bamboo::rtcm_t*)
static int decode_type1033(rtcm_t *rtcm)
{
    char des[32]="",sno[32]="",rec[32]="",ver[32]="",rsn[32]="";
    char *msg;
    int i=24+12,j,staid,n,m,n1,n2,n3,setup;
    
    n =getbitu(rtcm->buff,i+12,8);
    m =getbitu(rtcm->buff,i+28+8*n,8);
    n1=getbitu(rtcm->buff,i+36+8*(n+m),8);
    n2=getbitu(rtcm->buff,i+44+8*(n+m+n1),8);
    n3=getbitu(rtcm->buff,i+52+8*(n+m+n1+n2),8);
    
    if (i+60+8*(n+m+n1+n2+n3)<=rtcm->len*8) {
        staid=getbitu(rtcm->buff,i,12); i+=12+8;
        for (j=0;j<n&&j<31;j++) {
            des[j]=(char)getbitu(rtcm->buff,i,8); i+=8;
        }
        setup=getbitu(rtcm->buff,i, 8); i+=8+8;
        for (j=0;j<m&&j<31;j++) {
            sno[j]=(char)getbitu(rtcm->buff,i,8); i+=8;
        }
        i+=8;
        for (j=0;j<n1&&j<31;j++) {
            rec[j]=(char)getbitu(rtcm->buff,i,8); i+=8;
        }
        i+=8;
        for (j=0;j<n2&&j<31;j++) {
            ver[j]=(char)getbitu(rtcm->buff,i,8); i+=8;
        }
        i+=8;
        for (j=0;j<n3&&j<31;j++) {
            rsn[j]=(char)getbitu(rtcm->buff,i,8); i+=8;
        }
    }
    else {
        trace(2,"rtcm3 1033 length error: len=%d\n",rtcm->len);
        return -1;
    }
    if (rtcm->outtype) {
        msg=rtcm->msgtype+strlen(rtcm->msgtype);
        sprintf(msg," staid=%4d",staid);
    }
    /* test station id */
    if (!test_staid(rtcm,staid)) return -1;
    
    strncpy(rtcm->sta.antdes, des,n ); rtcm->sta.antdes [n] ='\0';
    rtcm->sta.antsetup=setup;
    strncpy(rtcm->sta.antsno, sno,m ); rtcm->sta.antsno [m] ='\0';
    strncpy(rtcm->sta.rectype,rec,n1); rtcm->sta.rectype[n1]='\0';
    strncpy(rtcm->sta.recver, ver,n2); rtcm->sta.recver [n2]='\0';
    strncpy(rtcm->sta.recsno, rsn,n3); rtcm->sta.recsno [n3]='\0';
    
    trace(3,"rtcm3 1033: ant=%s:%s rec=%s:%s:%s\n",des,sno,rec,ver,rsn);
    return 5;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0xf0(%rbp)
movaps %xmm0, -0x100(%rbp)
movaps %xmm0, -0xd0(%rbp)
movaps %xmm0, -0xe0(%rbp)
leaq 0x9f0c4(%rdi), %r15
movq %r15, %rdi
movl $0x30, %esi
movl $0x8, %edx
callq 0x4e341
movl %eax, %ebx
leal 0x40(,%rbx,8), %esi
movq %r15, %rdi
movl $0x8, %edx
callq 0x4e341
movq %rax, -0x50(%rbp)
leal (%rax,%rbx), %r12d
leal 0x48(,%r12,8), %esi
movq %r15, %rdi
movl $0x8, %edx
callq 0x4e341
movl %eax, %r13d
addl %eax, %r12d
leal 0x50(,%r12,8), %esi
movq %r15, %rdi
movl $0x8, %edx
callq 0x4e341
movq %rax, -0x48(%rbp)
addl %eax, %r12d
leal 0x58(,%r12,8), %esi
movq %r15, %rdi
movl $0x8, %edx
callq 0x4e341
movq %rax, -0x30(%rbp)
addl %eax, %r12d
leal 0x60(,%r12,8), %eax
movq %r14, -0x58(%rbp)
movl 0x9f0c0(%r14), %edx
leal (,%rdx,8), %ecx
cmpl %ecx, %eax
jle 0x3e18b
leaq 0x31341(%rip), %rsi     # 0x6f4bb
movl $0x2, %edi
xorl %eax, %eax
callq 0x4ded0
jmp 0x3e458
movq %r13, -0x40(%rbp)
movq %r15, %rdi
movl $0x24, %esi
movl $0xc, %edx
callq 0x4e341
movl %eax, -0x38(%rbp)
testl %ebx, %ebx
movq %rbx, %rax
jle 0x3e1ef
movq %rax, %rbx
decl %eax
cmpl $0x1e, %eax
movl $0x1e, %r14d
cmovbl %eax, %r14d
incl %r14d
movl $0x38, %r12d
xorl %r13d, %r13d
movq %r15, %rdi
movl %r12d, %esi
movl $0x8, %edx
callq 0x4e341
movb %al, -0xc0(%rbp,%r13)
addl $0x8, %r12d
incq %r13
cmpq %r13, %r14
jne 0x3e1c9
jmp 0x3e1f8
movq %rax, %rbx
movl $0x38, %r12d
movq %r15, %rdi
movl %r12d, %esi
movl $0x8, %edx
callq 0x4e341
movl %eax, -0x34(%rbp)
addl $0x10, %r12d
movq -0x50(%rbp), %rax
testl %eax, %eax
jle 0x3e250
decl %eax
cmpl $0x1e, %eax
movl $0x1e, %r14d
cmovbl %eax, %r14d
incl %r14d
xorl %r13d, %r13d
movq %r15, %rdi
movl %r12d, %esi
movl $0x8, %edx
callq 0x4e341
movb %al, -0xa0(%rbp,%r13)
addl $0x8, %r12d
incq %r13
cmpq %r13, %r14
jne 0x3e22c
movq -0x40(%rbp), %rax
testl %eax, %eax
jle 0x3e28e
decl %eax
cmpl $0x1e, %eax
movl $0x1e, %r14d
cmovbl %eax, %r14d
incl %r14d
xorl %r13d, %r13d
addl $0x8, %r12d
movq %r15, %rdi
movl %r12d, %esi
movl $0x8, %edx
callq 0x4e341
movb %al, -0x80(%rbp,%r13)
incq %r13
cmpq %r13, %r14
jne 0x3e26d
addl $0x10, %r12d
movq -0x48(%rbp), %rax
testl %eax, %eax
jle 0x3e2d3
decl %eax
cmpl $0x1e, %eax
movl $0x1e, %r14d
cmovbl %eax, %r14d
incl %r14d
xorl %r13d, %r13d
movq %r15, %rdi
movl %r12d, %esi
movl $0x8, %edx
callq 0x4e341
movb %al, -0x100(%rbp,%r13)
addl $0x8, %r12d
incq %r13
cmpq %r13, %r14
jne 0x3e2af
cmpl $0x0, -0x30(%rbp)
jle 0x3e31a
movq -0x30(%rbp), %rax
decl %eax
cmpl $0x1e, %eax
movl $0x1e, %r14d
cmovbl %eax, %r14d
incl %r14d
addl $0x8, %r12d
xorl %r13d, %r13d
movq %r15, %rdi
movl %r12d, %esi
movl $0x8, %edx
callq 0x4e341
movb %al, -0xe0(%rbp,%r13)
incq %r13
addl $0x8, %r12d
cmpq %r13, %r14
jne 0x3e2f6
movq -0x58(%rbp), %r15
cmpl $0x0, 0xc(%r15)
movl -0x38(%rbp), %r14d
je 0x3e351
leaq 0x9b9d0(%r15), %rdi
callq 0x8290
leaq (%r15,%rax), %rdi
addq $0x9b9d0, %rdi          # imm = 0x9B9D0
leaq 0x30d9d(%rip), %rsi     # 0x6f0e4
movl %r14d, %edx
xorl %eax, %eax
callq 0x8120
movq %r15, %rdi
movl %r14d, %esi
callq 0x42f7e
testl %eax, %eax
movq -0x50(%rbp), %r14
je 0x3e458
leaq 0x6efb8(%r15), %rdi
movslq %ebx, %r12
leaq -0xc0(%rbp), %rsi
movq %r12, %rdx
callq 0x8350
xorl %eax, %eax
movb %al, 0x6efb8(%r15,%r12)
xorl %r12d, %r12d
movl -0x34(%rbp), %eax
movl %eax, 0x6f0f8(%r15)
leaq 0x6eff8(%r15), %rdi
movslq %r14d, %r13
leaq -0xa0(%rbp), %rsi
movq %r13, %rdx
callq 0x8350
movb %r12b, 0x6eff8(%r15,%r13)
leaq 0x6f038(%r15), %rdi
movq %r15, %rbx
movslq -0x40(%rbp), %r15
leaq -0x80(%rbp), %rsi
movq %r15, %rdx
callq 0x8350
movb %r12b, 0x6f038(%rbx,%r15)
leaq 0x6f078(%rbx), %rdi
movslq -0x48(%rbp), %r15
leaq -0x100(%rbp), %r13
movq %r13, %rsi
movq %r15, %rdx
callq 0x8350
movb %r12b, 0x6f078(%rbx,%r15)
leaq 0x6f0b8(%rbx), %rdi
movslq -0x30(%rbp), %r14
leaq -0xe0(%rbp), %r15
movq %r15, %rsi
movq %r14, %rdx
callq 0x8350
movb %r12b, 0x6f0b8(%rbx,%r14)
movq %r15, (%rsp)
leaq 0x310ac(%rip), %rsi     # 0x6f4dc
movl $0x3, %edi
leaq -0xc0(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
leaq -0x80(%rbp), %r8
movq %r13, %r9
xorl %eax, %eax
callq 0x4ded0
movl $0x5, %eax
jmp 0x3e45d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq