// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::readpcv(char const*, bamboo::pcvs_t*)
extern int readpcv(const char *file, pcvs_t *pcvs)
{
    pcv_t *pcv;
    char *ext;
    int i,stat;
    
    trace(3,"readpcv: file=%s\n",file);
    char p_file[1024] = {0};
    strcpy(p_file,file);
    if (!(ext=strrchr(p_file,'.'))) ext="";
    
    if (!strcmp(ext,".atx")||!strcmp(ext,".ATX")) {
        stat=readantex(file,pcvs);
    }
    else {
        stat=readngspcv(file,pcvs);
    }
    for (i=0;i<pcvs->n;i++) {
        pcv=pcvs->pcv+i;
        trace(4,"sat=%2d type=%20s code=%s off=%8.4f %8.4f %8.4f  %8.4f %8.4f %8.4f\n",
              pcv->sat,pcv->type,pcv->code,pcv->off[0][0],pcv->off[0][1],
              pcv->off[0][2],pcv->off[1][0],pcv->off[1][1],pcv->off[1][2]);
    }
    return stat;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rsi, -0x60(%rbp)
movq %rdi, %r14
leaq -0x830(%rbp), %r12
xorl %r15d, %r15d
movl $0x400, %edx            # imm = 0x400
movq %r12, %rdi
xorl %esi, %esi
callq 0x8390
movq %r12, %rdi
movq %r14, %rsi
callq 0x85c0
movq %r12, %rdi
movl $0x2e, %esi
callq 0x86a0
testq %rax, %rax
leaq 0x192f6(%rip), %r12     # 0x6a5f5
cmovneq %rax, %r12
leaq 0x23d91(%rip), %rsi     # 0x7509b
movq %r12, %rdi
callq 0x8880
testl %eax, %eax
je 0x51501
leaq 0x23d7f(%rip), %rsi     # 0x750a0
movq %r12, %rdi
callq 0x8880
testl %eax, %eax
je 0x51501
leaq 0x24034(%rip), %rsi     # 0x7536c
movq %r14, %rdi
callq 0x8770
testq %rax, %rax
je 0x518dc
movq %rax, %r14
xorl %ebx, %ebx
leaq -0x170(%rbp), %r13
leaq 0x1f558(%rip), %r15     # 0x708b4
xorl %r12d, %r12d
movq %r13, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x89e0
testq %rax, %rax
je 0x518b9
movq %r13, %rdi
callq 0x8290
cmpq $0x3e, %rax
jb 0x5138f
cmpb $0x7c, -0x133(%rbp)
je 0x5135f
cmpb $0x20, -0x170(%rbp)
movl %r12d, %eax
cmovnel %ebx, %eax
leal 0x1(%rax), %r12d
cmpl $0x6, %eax
ja 0x5135f
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movl $0x2b8, %edx            # imm = 0x2B8
leaq -0x428(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movl $0x3d, %edx
leaq -0x424(%rbp), %rdi
movq %r13, %rsi
callq 0x8350
movl $0x1, %r12d
jmp 0x5135f
movq %r13, %rdi
movl $0x3, %esi
leaq -0x50(%rbp), %rdx
callq 0x55d8b
movl $0x5, %r12d
cmpl $0x3, %eax
jl 0x5135f
movsd -0x50(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
movsd %xmm1, -0x368(%rbp)
movsd %xmm0, -0x360(%rbp)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x358(%rbp)
jmp 0x5135f
movq %r13, %rdi
movl $0xa, %esi
leaq -0x338(%rbp), %rdx
callq 0x55d8b
movl $0x3, %r12d
jmp 0x5135f
movq %r13, %rdi
movl $0x9, %esi
leaq -0x2e8(%rbp), %rdx
callq 0x55d8b
movl $0x4, %r12d
jmp 0x5135f
movq %r13, %rdi
movl $0x3, %esi
leaq -0x50(%rbp), %rdx
callq 0x55d8b
movl $0x2, %r12d
cmpl $0x3, %eax
jl 0x5135f
movsd -0x50(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
movsd %xmm1, -0x380(%rbp)
movsd %xmm0, -0x378(%rbp)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x370(%rbp)
jmp 0x5135f
movq %r13, %rdi
movl $0xa, %esi
leaq -0x2a0(%rbp), %rdx
callq 0x55d8b
movl $0x6, %r12d
jmp 0x5135f
movq %r13, %rdi
movl $0x9, %esi
leaq -0x250(%rbp), %rdx
callq 0x55d8b
leaq -0x428(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x55d0f
movl $0x7, %r12d
jmp 0x5135f
leaq 0x23e64(%rip), %rsi     # 0x7536c
movq %r14, %rdi
callq 0x8770
testq %rax, %rax
je 0x518c7
movq %rax, %r14
leaq -0x170(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movq %rax, %rdx
callq 0x89e0
testq %rax, %rax
je 0x518b9
leaq -0x134(%rbp), %rbx
leaq -0x338(%rbp), %r13
leaq -0x170(%rbp), %r12
leaq 0x1a3e4(%rip), %r15     # 0x6b939
movl $0x0, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movq %r12, %rdi
callq 0x8290
cmpq $0x3c, %rax
jb 0x516e7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8160
testq %rax, %rax
jne 0x516e7
movq %rbx, %rdi
leaq 0x23f03(%rip), %rsi     # 0x75497
callq 0x8160
testq %rax, %rax
je 0x515c7
movl $0x2b8, %edx            # imm = 0x2B8
leaq -0x428(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movq %rbx, %rdi
leaq 0x23eed(%rip), %rsi     # 0x754a8
callq 0x8160
testq %rax, %rax
jne 0x515db
jmp 0x515fd
movq %rbx, %rdi
leaq 0x23ed7(%rip), %rsi     # 0x754a8
callq 0x8160
testq %rax, %rax
je 0x515f7
leaq -0x428(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x55d0f
movl $0x0, -0x2c(%rbp)
jmp 0x516e7
cmpl $0x0, -0x2c(%rbp)
je 0x515eb
movq %rbx, %rdi
leaq 0x23eb0(%rip), %rsi     # 0x754b7
callq 0x8160
testq %rax, %rax
je 0x5168f
movq %r13, %rbx
movl $0x14, %edx
leaq -0x424(%rbp), %rdi
movq %r12, %rsi
callq 0x8350
xorl %r15d, %r15d
movb %r15b, -0x410(%rbp)
movl $0x14, %edx
leaq -0x3e4(%rbp), %r13
movq %r13, %rdi
leaq -0x15c(%rbp), %rsi
callq 0x8350
movb %r15b, -0x3d0(%rbp)
movl $0x1, -0x2c(%rbp)
movabsq $0x2020202020202020, %rax # imm = 0x2020202020202020
cmpq %rax, -0x3e1(%rbp)
jne 0x5167c
movq %r13, %rdi
callq 0x4d35a
movl %eax, -0x428(%rbp)
movq %rbx, %r13
leaq -0x134(%rbp), %rbx
leaq 0x1a2ac(%rip), %r15     # 0x6b939
jmp 0x516e7
movq %rbx, %rdi
leaq 0x23e38(%rip), %rsi     # 0x754d1
callq 0x8160
testq %rax, %rax
je 0x516b6
movq %r12, %rdi
xorl %esi, %esi
movl $0x2b, %edx
leaq -0x3a0(%rbp), %rcx
jmp 0x516db
movq %rbx, %rdi
leaq 0x23e1c(%rip), %rsi     # 0x754dc
callq 0x8160
testq %rax, %rax
je 0x51705
movq %r12, %rdi
xorl %esi, %esi
movl $0x2b, %edx
leaq -0x390(%rbp), %rcx
callq 0x4eef9
movl $0x1, -0x2c(%rbp)
movq %r12, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x89e0
testq %rax, %rax
jne 0x51564
jmp 0x518b9
movq %rbx, %rdi
leaq 0x23dd9(%rip), %rsi     # 0x754e8
callq 0x8160
testq %rax, %rax
je 0x51761
leaq -0x16c(%rbp), %rdi
leaq 0x24a04(%rip), %rsi     # 0x7612b
leaq -0x54(%rbp), %rdx
xorl %eax, %eax
callq 0x8610
testl %eax, %eax
jle 0x516e0
movl -0x54(%rbp), %eax
cmpl $0x1, %eax
je 0x5181d
movl $0x1, -0x2c(%rbp)
cmpl $0x2, %eax
je 0x51814
cmpl $0x5, %eax
jne 0x516e7
movl $0x3, %eax
jmp 0x51814
movq %rbx, %rdi
leaq 0x23d90(%rip), %rsi     # 0x754fb
callq 0x8160
movl $0x1, -0x2c(%rbp)
testq %rax, %rax
je 0x51789
movq $0x0, -0x38(%rbp)
jmp 0x516e7
movq %rbx, %rdi
leaq 0x23d79(%rip), %rsi     # 0x7550c
callq 0x8160
testq %rax, %rax
je 0x5182b
cmpl $0x0, -0x38(%rbp)
je 0x5177c
movq %r12, %rdi
movl $0x3, %esi
leaq -0x50(%rbp), %rdx
callq 0x55d8b
cmpl $0x3, %eax
jl 0x516e7
movq -0x38(%rbp), %rax
decl %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpl $0x0, -0x428(%rbp)
sete %cl
movsd -0x50(%rbp,%rcx,8), %xmm0
leaq (%rax,%rax,2), %rax
leaq -0x424(%rbp), %rcx
movsd %xmm0, 0xa4(%rcx,%rax,8)
setne %dl
movsd -0x50(%rbp,%rdx,8), %xmm0
movsd %xmm0, 0xac(%rcx,%rax,8)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, 0xb4(%rcx,%rax,8)
jmp 0x516e7
movq %rax, -0x38(%rbp)
jmp 0x516e7
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x516e7
movq %r12, %rdi
leaq 0x23ce9(%rip), %rsi     # 0x7551e
callq 0x8160
testq %rax, %rax
sete %al
movq -0x38(%rbp), %rdx
testl %edx, %edx
sete %cl
orb %al, %cl
jne 0x516e7
leal -0x1(%rdx), %eax
imulq $0x98, %rax, %rax
movq %rax, -0x68(%rbp)
leaq (%rax,%r13), %rdx
leaq -0x168(%rbp), %rdi
movl $0x13, %esi
movq %rdx, -0x70(%rbp)
callq 0x55d8b
leal -0x1(%rax), %ecx
cmpl $0x11, %ecx
ja 0x516e7
movl %eax, %eax
movq -0x68(%rbp), %rcx
leaq (%rcx,%rax,8), %rcx
addq %r13, %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
addq %rdx, %rax
movq -0x70(%rbp), %rsi
movl %eax, %edx
movsd (%rsi,%rdx,8), %xmm0
movsd %xmm0, (%rcx)
addq $0x8, %rcx
incq %rax
cmpl $0x12, %eax
jl 0x5189d
jmp 0x516e7
movq %r14, %rdi
callq 0x8630
movl $0x1, %r15d
movl %r15d, %eax
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x518c7