// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::reppaths(char const*, char**, int, bamboo::gtime_t, bamboo::gtime_t, char const*, char const*)
extern int reppaths(const char *path, char *rpath[], int nmax, gtime_t ts,
                    gtime_t te, const char *rov, const char *base)
{
    gtime_t time;
    double tow,tint=86400.0;
    int i,n=0,week;
    
    trace(3,"reppaths: path =%s nmax=%d rov=%s base=%s\n",path,nmax,rov,base);
    
    if (ts.time==0||te.time==0||timediff(ts,te)>0.0) return 0;
    
    if (strstr(path,"%S")||strstr(path,"%M")||strstr(path,"%t")) tint=900.0;
    else if (strstr(path,"%h")||strstr(path,"%H")) tint=3600.0;
    
    tow=time2gpst(ts,&week);
    time=gpst2time(week,floor(tow/tint)*tint);
    
    while (timediff(time,te)<=0.0&&n<nmax) {
        reppath(path,rpath[n],time,rov,base);
        if (n==0||strcmp(rpath[n],rpath[n-1])) n++;
        time=timeadd(time,tint);
    }
    for (i=0;i<n;i++) trace(3,"reppaths: rpath=%s\n",rpath[i]);
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, -0x58(%rbp)
movq %rcx, %r15
movl %edx, -0x3c(%rbp)
testq %rcx, %rcx
sete %al
testq %r8, %r8
sete %cl
xorl %ebx, %ebx
orb %al, %cl
jne 0x4b6ea
movq %r8, %r13
movq %rsi, %r12
movq %rdi, %r14
movq %r15, %rdi
movq %r8, %rsi
movsd %xmm1, -0x48(%rbp)
movsd %xmm0, -0x30(%rbp)
callq 0x8340
addsd -0x30(%rbp), %xmm0
ucomisd -0x48(%rbp), %xmm0
jbe 0x4b6fb
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1fcae(%rip), %rsi     # 0x6b3b0
movq %r14, %rdi
callq 0x8170
movsd 0x15396(%rip), %xmm0    # 0x60aa8
movsd %xmm0, -0x38(%rbp)
testq %rax, %rax
jne 0x4b77d
leaq 0x1fc8a(%rip), %rsi     # 0x6b3ad
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
jne 0x4b77d
leaq 0x1fc8d(%rip), %rsi     # 0x6b3c4
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
jne 0x4b77d
leaq 0x1fc5f(%rip), %rsi     # 0x6b3aa
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
jne 0x4b770
leaq 0x1fc62(%rip), %rsi     # 0x6b3c1
movq %r14, %rdi
callq 0x8170
testq %rax, %rax
je 0x4b854
movsd 0x15138(%rip), %xmm0    # 0x608b0
movsd %xmm0, -0x38(%rbp)
movq %r14, -0x50(%rbp)
leaq -0x5c(%rbp), %rbx
movq %r15, %rdi
movsd -0x30(%rbp), %xmm0
movq %rbx, %rsi
callq 0x470f1
movl (%rbx), %ebx
divsd -0x38(%rbp), %xmm0
callq 0x8ac0
mulsd -0x38(%rbp), %xmm0
movl %ebx, %edi
callq 0x4708a
movq %rax, %r15
movsd %xmm0, -0x30(%rbp)
xorl %ebx, %ebx
movq %r15, %rdi
movq %r13, %rsi
callq 0x8340
movsd -0x30(%rbp), %xmm2
addsd %xmm2, %xmm0
subsd -0x48(%rbp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jb 0x4b6ea
cmpl -0x3c(%rbp), %ebx
jge 0x4b6ea
movapd %xmm2, %xmm0
movq %r13, %r14
movslq %ebx, %r13
movq (%r12,%r13,8), %rsi
movq -0x50(%rbp), %rdi
movq %r15, %rdx
movq -0x58(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0x4b018
testl %ebx, %ebx
je 0x4b81f
movq -0x8(%r12,%r13,8), %rsi
movq (%r12,%r13,8), %rdi
callq 0x8890
testl %eax, %eax
je 0x4b821
incl %ebx
movq %r14, %r13
movsd -0x30(%rbp), %xmm0
addsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x8ac0
cvttsd2si %xmm0, %eax
cltq
addq %rax, %r15
movsd -0x30(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
jmp 0x4b7b7
movsd 0x15064(%rip), %xmm0    # 0x608c0
jmp 0x4b778