// File: /workspace/github_c_makefile_star2_O0/arq5x[P]grabix/grabix.cpp
// Function: load_index(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, index_info&)
void load_index(string bgzf_file, index_info &index)
{
    string index_file_name = bgzf_file + ".gbi";
    // open the index file for reading
    ifstream index_file(index_file_name.c_str(), ios::in);

    if ( !index_file ) {
        cerr << "[grabix] could not find index file: " << index_file_name << ". Exiting!" << endl;
        exit (1);
    }
    else {
        string line;
        getline (index_file, line);
        index.header_end = atol(line.c_str());

        getline (index_file, line);
        index.num_lines = atol(line.c_str());

        while (index_file >> line)
        {
            index.chunk_offsets.push_back(atol(line.c_str()));
        }
    }
    index_file.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rsi, %rax
movq %rdi, %rsi
movq %rsi, -0x8(%rbp)
movq %rax, -0x10(%rbp)
leaq 0x4b93(%rip), %rdx      # 0x9383
leaq -0x30(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x5390
movq -0x278(%rbp), %rdi
callq 0x30f0
movq %rax, %rsi
leaq -0x238(%rbp), %rdi
movl $0x8, %edx
callq 0x3530
jmp 0x4822
movq -0x238(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x238(%rbp,%rax), %rdi
callq 0x3130
movb %al, -0x279(%rbp)
jmp 0x4842
movb -0x279(%rbp), %al
testb $0x1, %al
jne 0x4851
jmp 0x48ef
movq 0x8798(%rip), %rdi      # 0xcff0
leaq 0x4b29(%rip), %rsi      # 0x9388
callq 0x32b0
movq %rax, -0x288(%rbp)
jmp 0x486d
movq -0x288(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3280
movq %rax, -0x290(%rbp)
jmp 0x4886
movq -0x290(%rbp), %rdi
leaq 0x4b19(%rip), %rsi      # 0x93ad
callq 0x32b0
movq %rax, -0x298(%rbp)
jmp 0x48a2
movq -0x298(%rbp), %rdi
movq 0x8710(%rip), %rsi      # 0xcfc0
callq 0x32f0
jmp 0x48b7
movl $0x1, %edi
callq 0x33b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
jmp 0x4a5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
jmp 0x4a52
leaq -0x268(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x3420
movq -0x2a0(%rbp), %rsi
leaq -0x238(%rbp), %rdi
callq 0x3060
jmp 0x4917
leaq -0x268(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x30f0
movq %rax, %rdi
callq 0x33a0
movq -0x2a8(%rbp), %rsi
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
leaq -0x238(%rbp), %rdi
callq 0x3060
jmp 0x4951
leaq -0x268(%rbp), %rdi
callq 0x30f0
movq %rax, %rdi
callq 0x33a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
leaq -0x238(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x33f0
movq %rax, -0x2b0(%rbp)
jmp 0x498c
movq -0x2b0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x33e0
movb %al, -0x2b1(%rbp)
jmp 0x49aa
movb -0x2b1(%rbp), %al
testb $0x1, %al
jne 0x49b6
jmp 0x4a1a
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x2c0(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x30f0
movq %rax, %rdi
callq 0x33a0
movq -0x2c0(%rbp), %rdi
movq %rax, -0x270(%rbp)
leaq -0x270(%rbp), %rsi
callq 0x5540
jmp 0x49f5
jmp 0x4970
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x31b0
jmp 0x4a52
leaq -0x268(%rbp), %rdi
callq 0x31b0
leaq -0x238(%rbp), %rdi
callq 0x3070
jmp 0x4a34
leaq -0x238(%rbp), %rdi
callq 0x3080
leaq -0x30(%rbp), %rdi
callq 0x31b0
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
leaq -0x238(%rbp), %rdi
callq 0x3080
leaq -0x30(%rbp), %rdi
callq 0x31b0
movq -0x240(%rbp), %rdi
callq 0x34f0
nopw %cs:(%rax,%rax)