// File: 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
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x93d0
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x93d0
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x93d0
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x93d0
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x93d0
movl $0x24, -0xbc(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
addl $0xc, %esi
movl $0x8, %edx
callq 0x8bfc0
movl %eax, -0xc8(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
addl $0x1c, %esi
movl -0xc8(%rbp), %eax
shll $0x3, %eax
addl %eax, %esi
movl $0x8, %edx
callq 0x8bfc0
movl %eax, -0xcc(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
addl $0x24, %esi
movl -0xc8(%rbp), %eax
addl -0xcc(%rbp), %eax
shll $0x3, %eax
addl %eax, %esi
movl $0x8, %edx
callq 0x8bfc0
movl %eax, -0xd0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
addl $0x2c, %esi
movl -0xc8(%rbp), %eax
addl -0xcc(%rbp), %eax
addl -0xd0(%rbp), %eax
shll $0x3, %eax
addl %eax, %esi
movl $0x8, %edx
callq 0x8bfc0
movl %eax, -0xd4(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
addl $0x34, %esi
movl -0xc8(%rbp), %eax
addl -0xcc(%rbp), %eax
addl -0xd0(%rbp), %eax
addl -0xd4(%rbp), %eax
shll $0x3, %eax
addl %eax, %esi
movl $0x8, %edx
callq 0x8bfc0
movl %eax, -0xd8(%rbp)
movl -0xbc(%rbp), %eax
addl $0x3c, %eax
movl -0xc8(%rbp), %ecx
addl -0xcc(%rbp), %ecx
addl -0xd0(%rbp), %ecx
addl -0xd4(%rbp), %ecx
addl -0xd8(%rbp), %ecx
shll $0x3, %ecx
addl %ecx, %eax
movq -0x10(%rbp), %rcx
movl 0x9f0c0(%rcx), %ecx
shll $0x3, %ecx
cmpl %ecx, %eax
jg 0x72dcd
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
movl $0xc, %edx
callq 0x8bfc0
movl %eax, -0xc4(%rbp)
movl -0xbc(%rbp), %eax
addl $0x14, %eax
movl %eax, -0xbc(%rbp)
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %ecx
xorl %eax, %eax
cmpl -0xc8(%rbp), %ecx
movb %al, -0xdd(%rbp)
jge 0x72b04
cmpl $0x1f, -0xc0(%rbp)
setl %al
movb %al, -0xdd(%rbp)
movb -0xdd(%rbp), %al
testb $0x1, %al
jne 0x72b10
jmp 0x72b58
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
movl $0x8, %edx
callq 0x8bfc0
movb %al, %cl
movslq -0xc0(%rbp), %rax
movb %cl, -0x30(%rbp,%rax)
movl -0xbc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xbc(%rbp)
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x72ade
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
movl $0x8, %edx
callq 0x8bfc0
movl %eax, -0xdc(%rbp)
movl -0xbc(%rbp), %eax
addl $0x10, %eax
movl %eax, -0xbc(%rbp)
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %ecx
xorl %eax, %eax
cmpl -0xcc(%rbp), %ecx
movb %al, -0xde(%rbp)
jge 0x72bb8
cmpl $0x1f, -0xc0(%rbp)
setl %al
movb %al, -0xde(%rbp)
movb -0xde(%rbp), %al
testb $0x1, %al
jne 0x72bc4
jmp 0x72c0c
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
movl $0x8, %edx
callq 0x8bfc0
movb %al, %cl
movslq -0xc0(%rbp), %rax
movb %cl, -0x50(%rbp,%rax)
movl -0xbc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xbc(%rbp)
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x72b92
movl -0xbc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xbc(%rbp)
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %ecx
xorl %eax, %eax
cmpl -0xd0(%rbp), %ecx
movb %al, -0xdf(%rbp)
jge 0x72c4b
cmpl $0x1f, -0xc0(%rbp)
setl %al
movb %al, -0xdf(%rbp)
movb -0xdf(%rbp), %al
testb $0x1, %al
jne 0x72c57
jmp 0x72c9f
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
movl $0x8, %edx
callq 0x8bfc0
movb %al, %cl
movslq -0xc0(%rbp), %rax
movb %cl, -0x70(%rbp,%rax)
movl -0xbc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xbc(%rbp)
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x72c25
movl -0xbc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xbc(%rbp)
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %ecx
xorl %eax, %eax
cmpl -0xd4(%rbp), %ecx
movb %al, -0xe0(%rbp)
jge 0x72cde
cmpl $0x1f, -0xc0(%rbp)
setl %al
movb %al, -0xe0(%rbp)
movb -0xe0(%rbp), %al
testb $0x1, %al
jne 0x72cea
jmp 0x72d35
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
movl $0x8, %edx
callq 0x8bfc0
movb %al, %cl
movslq -0xc0(%rbp), %rax
movb %cl, -0x90(%rbp,%rax)
movl -0xbc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xbc(%rbp)
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x72cb8
movl -0xbc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xbc(%rbp)
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %ecx
xorl %eax, %eax
cmpl -0xd8(%rbp), %ecx
movb %al, -0xe1(%rbp)
jge 0x72d74
cmpl $0x1f, -0xc0(%rbp)
setl %al
movb %al, -0xe1(%rbp)
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x72d80
jmp 0x72dcb
movq -0x10(%rbp), %rdi
addq $0x9f0c4, %rdi          # imm = 0x9F0C4
movl -0xbc(%rbp), %esi
movl $0x8, %edx
callq 0x8bfc0
movb %al, %cl
movslq -0xc0(%rbp), %rax
movb %cl, -0xb0(%rbp,%rax)
movl -0xbc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xbc(%rbp)
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x72d4e
jmp 0x72df6
movq -0x10(%rbp), %rax
movl 0x9f0c0(%rax), %edx
movl $0x2, %edi
leaq 0x4e8fd(%rip), %rsi     # 0xc16e0
movb $0x0, %al
callq 0x8b980
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x72fc7
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x72e50
movq -0x10(%rbp), %rax
addq $0x9b9d0, %rax          # imm = 0x9B9D0
movq %rax, -0xf0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x9b9d0, %rdi          # imm = 0x9B9D0
callq 0x92e0
movq %rax, %rcx
movq -0xf0(%rbp), %rax
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
movl -0xc4(%rbp), %edx
leaq 0x4e4c0(%rip), %rsi     # 0xc1309
movb $0x0, %al
callq 0x9150
movq -0x10(%rbp), %rdi
movl -0xc4(%rbp), %esi
callq 0x79f30
cmpl $0x0, %eax
jne 0x72e70
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x72fc7
movq -0x10(%rbp), %rdi
addq $0x6ef38, %rdi          # imm = 0x6EF38
addq $0x80, %rdi
leaq -0x30(%rbp), %rsi
movslq -0xc8(%rbp), %rdx
callq 0x93b0
movq -0x10(%rbp), %rax
movslq -0xc8(%rbp), %rcx
movb $0x0, 0x6efb8(%rax,%rcx)
movl -0xdc(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x6f0f8(%rax)
movq -0x10(%rbp), %rdi
addq $0x6ef38, %rdi          # imm = 0x6EF38
addq $0xc0, %rdi
leaq -0x50(%rbp), %rsi
movslq -0xcc(%rbp), %rdx
callq 0x93b0
movq -0x10(%rbp), %rax
movslq -0xcc(%rbp), %rcx
movb $0x0, 0x6eff8(%rax,%rcx)
movq -0x10(%rbp), %rdi
addq $0x6ef38, %rdi          # imm = 0x6EF38
addq $0x100, %rdi            # imm = 0x100
leaq -0x70(%rbp), %rsi
movslq -0xd0(%rbp), %rdx
callq 0x93b0
movq -0x10(%rbp), %rax
movslq -0xd0(%rbp), %rcx
movb $0x0, 0x6f038(%rax,%rcx)
movq -0x10(%rbp), %rdi
addq $0x6ef38, %rdi          # imm = 0x6EF38
addq $0x140, %rdi            # imm = 0x140
leaq -0x90(%rbp), %rsi
movslq -0xd4(%rbp), %rdx
callq 0x93b0
movq -0x10(%rbp), %rax
movslq -0xd4(%rbp), %rcx
movb $0x0, 0x6f078(%rax,%rcx)
movq -0x10(%rbp), %rdi
addq $0x6ef38, %rdi          # imm = 0x6EF38
addq $0x180, %rdi            # imm = 0x180
leaq -0xb0(%rbp), %rsi
movslq -0xd8(%rbp), %rdx
callq 0x93b0
movq -0x10(%rbp), %rax
movslq -0xd8(%rbp), %rcx
movb $0x0, 0x6f0b8(%rax,%rcx)
leaq -0x30(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x70(%rbp), %r8
leaq -0x90(%rbp), %r9
leaq -0xb0(%rbp), %rax
movl $0x3, %edi
leaq 0x4e74c(%rip), %rsi     # 0xc1701
movq %rax, (%rsp)
movb $0x0, %al
callq 0x8b980
movl $0x5, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)