// File: /workspace/github_cpp_makefile_star2_O2/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 $0x318, %rsp            # imm = 0x318
leaq 0x23f0b(%rip), %rsi     # 0x6b382
callq 0x8750
testq %rax, %rax
je 0x47583
movq %rax, -0x38(%rbp)
movq %rax, %rdi
callq 0x80e0
leaq 0x3fbd8(%rip), %r14     # 0x87070
leaq -0x340(%rbp), %r13
leaq 0x23fa4(%rip), %r15     # 0x6b44a
leaq -0x180(%rbp), %r12
xorl %ebx, %ebx
movq %r13, %rdi
movl $0x100, %esi            # imm = 0x100
movq -0x38(%rbp), %rdx
callq 0x89d0
testq %rax, %rax
je 0x47572
cmpq $0x3f, %rbx
ja 0x47572
movq %r13, %rdi
pushq $0x23
popq %rsi
callq 0x8250
testq %rax, %rax
je 0x474e6
movb $0x0, (%rax)
subq $0x8, %rsp
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
leaq -0x17c(%rbp), %rcx
leaq -0x178(%rbp), %r8
leaq -0x174(%rbp), %r9
xorl %eax, %eax
leaq -0x80(%rbp), %r10
pushq %r10
leaq -0x16c(%rbp), %r10
pushq %r10
leaq -0x170(%rbp), %r10
pushq %r10
callq 0x8600
addq $0x20, %rsp
cmpl $0x7, %eax
jl 0x474af
xorl %eax, %eax
cmpq $0x6, %rax
je 0x47550
cvtsi2sdl -0x180(%rbp,%rax,4), %xmm0
movsd %xmm0, (%r14,%rax,8)
incq %rax
jmp 0x47536
cvtsi2sdl -0x80(%rbp), %xmm0
imulq $0x38, %rbx, %rax
incq %rbx
leaq 0x3fb0d(%rip), %rcx     # 0x87070
movsd %xmm0, 0x30(%rax,%rcx)
addq $0x38, %r14
jmp 0x474af
testq %rbx, %rbx
je 0x4758b
movslq %ebx, %rax
movq -0x38(%rbp), %rbx
jmp 0x476ed
xorl %r14d, %r14d
jmp 0x4771d
leaq -0x340(%rbp), %rdi
movl $0x1c0, %edx            # imm = 0x1C0
xorl %esi, %esi
callq 0x8390
movq -0x38(%rbp), %rdi
callq 0x80e0
leaq -0x347(%rbp), %r15
leaq -0x80(%rbp), %r13
leaq 0x211b7(%rip), %r14     # 0x68770
movq $0x0, -0x30(%rbp)
leaq -0x180(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movq -0x38(%rbp), %rbx
movq %rbx, %rdx
callq 0x89d0
testq %rax, %rax
je 0x476a9
cmpq $0x40, -0x30(%rbp)
jae 0x476a9
subq $0x8, %rsp
leaq -0x180(%rbp), %rdi
leaq 0x23e90(%rip), %rsi     # 0x6b48f
leaq -0x44(%rbp), %rdx
movq %r13, %rcx
leaq -0x40(%rbp), %r8
leaq -0x58(%rbp), %r9
xorl %eax, %eax
leaq -0x50(%rbp), %r10
pushq %r10
callq 0x8600
popq %rcx
popq %rdx
cmpl $0x5, %eax
setl %al
movl -0x44(%rbp), %ecx
movl %ecx, -0x3c(%rbp)
cmpl $0x7bc, %ecx            # imm = 0x7BC
setl %cl
orb %al, %cl
jne 0x475c1
movb $0x1, %r12b
xorl %ebx, %ebx
cmpq $0x30, %rbx
je 0x475c1
movslq (%rbx,%r14), %rdi
addq %r14, %rdi
movq %r13, %rsi
callq 0x8890
testl %eax, %eax
je 0x4765d
incb %r12b
addq $0x4, %rbx
jmp 0x4763b
movq -0x30(%rbp), %rsi
imulq $0x7, %rsi, %rax
movl -0x3c(%rbp), %ecx
movb %cl, -0x340(%rbp,%rax)
movb %r12b, -0x33f(%rbp,%rax)
movb -0x40(%rbp), %cl
movsd 0x19236(%rip), %xmm0    # 0x608b8
subsd -0x50(%rbp), %xmm0
cvttsd2si %xmm0, %edx
movb %cl, -0x33e(%rbp,%rax)
incq %rsi
movq %rsi, -0x30(%rbp)
movb %dl, -0x33a(%rbp,%rax)
addq $0x7, %r15
jmp 0x475c1
movslq -0x30(%rbp), %rax
movl %eax, %ecx
leaq 0x3f9ba(%rip), %rdx     # 0x87070
xorl %esi, %esi
cmpq %rcx, %rsi
je 0x476e6
xorl %edi, %edi
cmpq $0x7, %rdi
je 0x476d9
movsbl (%r15,%rdi), %r8d
cvtsi2sd %r8d, %xmm0
movsd %xmm0, (%rdx,%rdi,8)
incq %rdi
jmp 0x476bf
incq %rsi
addq $0x38, %rdx
addq $-0x7, %r15
jmp 0x476b8
cmpq $0x0, -0x30(%rbp)
je 0x47712
imulq $0x38, %rax, %rax
xorl %ecx, %ecx
pushq $0x1
popq %r14
leaq 0x3f972(%rip), %rdx     # 0x87070
cmpq $0x7, %rcx
je 0x47715
leaq (%rax,%rcx,8), %rsi
andq $0x0, (%rdx,%rsi)
incq %rcx
jmp 0x476fe
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x8620
movl %r14d, %eax
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq