// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rtklib/rtkcmn.cpp
// Function: bamboo::read_leaps(char const*)
extern int read_leaps(const char *file)
{
    FILE *fp;
    int i,n;
    
    if (!(fp=fopen(file,"r"))) return 0;
    
    /* read leap seconds table by text or usno */
    if (!(n=read_leaps_text(fp))&&!(n=read_leaps_usno(fp))) {
        fclose(fp);
        return 0;
    }
    for (i=0;i<7;i++) leaps[n][i]=0.0;
    fclose(fp);
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
leaq 0x25cea(%rip), %rsi     # 0x7536c
callq 0x8770
testq %rax, %rax
je 0x4f7c8
movq %rax, -0x30(%rbp)
movq %rax, %rdi
callq 0x80f0
leaq 0x3f9bd(%rip), %r12     # 0x8f060
leaq -0x330(%rbp), %r13
leaq 0x25d83(%rip), %rbx     # 0x75434
leaq -0x170(%rbp), %r14
xorl %r15d, %r15d
movq %r13, %rdi
movl $0x100, %esi            # imm = 0x100
movq -0x30(%rbp), %rdx
callq 0x89e0
testq %rax, %rax
je 0x4f784
cmpq $0x3f, %r15
ja 0x4f784
movq %r13, %rdi
movl $0x23, %esi
callq 0x8250
testq %rax, %rax
je 0x4f6f4
movb $0x0, (%rax)
subq $0x8, %rsp
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
leaq -0x16c(%rbp), %rcx
leaq -0x168(%rbp), %r8
leaq -0x164(%rbp), %r9
xorl %eax, %eax
leaq -0x70(%rbp), %r10
pushq %r10
leaq -0x15c(%rbp), %r10
pushq %r10
leaq -0x160(%rbp), %r10
pushq %r10
callq 0x8610
addq $0x20, %rsp
cmpl $0x7, %eax
jl 0x4f6bb
xorl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sdl -0x170(%rbp,%rax,4), %xmm0
movsd %xmm0, (%r12,%rax,8)
incq %rax
cmpq $0x6, %rax
jne 0x4f744
xorps %xmm0, %xmm0
cvtsi2sdl -0x70(%rbp), %xmm0
imulq $0x38, %r15, %rax
incq %r15
leaq 0x3f8eb(%rip), %rcx     # 0x8f060
movsd %xmm0, 0x30(%rax,%rcx)
addq $0x38, %r12
jmp 0x4f6bb
testq %r15, %r15
movq -0x30(%rbp), %r14
je 0x4f7de
movslq %r15d, %rax
imulq $0x38, %rax, %rax
leaq 0x3f8c5(%rip), %rcx     # 0x8f060
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%rax,%rcx)
movupd %xmm0, 0x10(%rax,%rcx)
movupd %xmm0, (%rax,%rcx)
movq $0x0, 0x30(%rax,%rcx)
movl $0x1, %ebx
movq %r14, %rdi
callq 0x8630
jmp 0x4f7ca
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x330(%rbp), %rdi
xorl %ebx, %ebx
movl $0x1c0, %edx            # imm = 0x1C0
xorl %esi, %esi
callq 0x8390
movq %r14, %rdi
callq 0x80f0
leaq -0x170(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x89e0
testq %rax, %rax
je 0x4f7be
leaq -0x170(%rbp), %rbx
leaq -0x70(%rbp), %r14
leaq 0x22f4a(%rip), %r13     # 0x72770
xorl %eax, %eax
movq %rax, -0x40(%rbp)
subq $0x8, %rsp
movq %rbx, %rdi
leaq 0x25c3f(%rip), %rsi     # 0x75479
leaq -0x38(%rbp), %rdx
movq %r14, %rcx
leaq -0x34(%rbp), %r8
leaq -0x50(%rbp), %r9
xorl %eax, %eax
leaq -0x48(%rbp), %r10
pushq %r10
callq 0x8610
addq $0x10, %rsp
cmpl $0x5, %eax
setl %al
movl -0x38(%rbp), %r15d
cmpl $0x7bc, %r15d           # imm = 0x7BC
setl %cl
orb %al, %cl
jne 0x4f897
movb $0x1, %r12b
xorl %ebx, %ebx
movslq (%rbx,%r13), %rdi
addq %r13, %rdi
movq %r14, %rsi
callq 0x8880
testl %eax, %eax
je 0x4f8ba
incb %r12b
addq $0x4, %rbx
cmpq $0x30, %rbx
jne 0x4f877
leaq -0x170(%rbp), %rbx
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
movq -0x30(%rbp), %rdx
callq 0x89e0
testq %rax, %rax
jne 0x4f82c
jmp 0x4f930
movl %r15d, %ecx
movq -0x40(%rbp), %r15
leaq (,%r15,8), %rax
subq %r15, %rax
movb %cl, -0x330(%rbp,%rax)
movb %r12b, -0x32f(%rbp,%rax)
movb -0x34(%rbp), %cl
movb %cl, -0x32e(%rbp,%rax)
movsd 0x1afdb(%rip), %xmm0    # 0x6a8c8
subsd -0x48(%rbp), %xmm0
cvttsd2si %xmm0, %ecx
leaq 0x1(%r15), %r12
movb %cl, -0x32a(%rbp,%rax)
leaq -0x170(%rbp), %rbx
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
movq -0x30(%rbp), %rdx
callq 0x89e0
testq %rax, %rax
je 0x4f947
cmpq $0x3f, %r15
movq %r12, %rax
movq %r12, %r15
jb 0x4f828
jmp 0x4f94a
movq -0x40(%rbp), %rax
movq %rax, %r15
testq %rax, %rax
jne 0x4f94a
xorl %ebx, %ebx
movq -0x30(%rbp), %r14
jmp 0x4f7be
movq %r12, %r15
movl %r15d, %eax
leaq (,%r15,8), %rcx
subq %r15, %rcx
leaq -0x330(%rbp), %rdx
addq %rdx, %rcx
addq $-0x7, %rcx
leaq 0x3f6f3(%rip), %rdx     # 0x8f060
xorl %esi, %esi
movq -0x30(%rbp), %r14
xorl %edi, %edi
movsbl (%rcx,%rdi), %r8d
xorps %xmm0, %xmm0
cvtsi2sd %r8d, %xmm0
movsd %xmm0, (%rdx,%rdi,8)
incq %rdi
cmpq $0x7, %rdi
jne 0x4f975
incq %rsi
addq $0x38, %rdx
addq $-0x7, %rcx
cmpq %rax, %rsi
jne 0x4f973
testl %r15d, %r15d
jne 0x4f78d
xorl %ebx, %ebx
jmp 0x4f7be