// File: /workspace/github_cpp_makefile_star2_O3/ahupp[P]mural/tags.cpp
// Function: read_ctags_file(std::basic_ifstream<char, std::char_traits<char>>&, std::vector<TagInfo, std::allocator<TagInfo>>&)
void read_ctags_file(ifstream& tag_stream, vector<TagInfo>& tags) {

  set<string> seen_files;

  while (!tag_stream.eof()) {
    string line;
    getline(tag_stream, line);

    if (line[0] == '!') {
      continue;
    }

    vector<string> splat = split(line, '\t');
    if (splat.size() != 4) {
      continue;
    }

    string row = splat[2];
    if (row.length() > 2 && row.substr(row.length()-2, row.length()) == ";\"") {
      row = row.substr(0, row.length() - 2);
    }

    string filename = splat[1];
    if (seen_files.find(filename) == seen_files.end()) {
      seen_files.insert(filename);
      tags.push_back(TagInfo(filename, filename, 0));
    }

    tags.push_back(TagInfo(splat[0], filename, atoi(row.c_str())));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, 0x20(%rsp)
leaq 0xf0(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq (%rdi), %rax
movq -0x18(%rax), %rcx
testb $0x2, 0x20(%rdi,%rcx)
jne 0x3ec6
movq %rdi, %r14
addq $-0x18, %rax
leaq 0x38(%rsp), %r12
leaq 0x28(%rsp), %r15
leaq 0x48(%rsp), %rbx
leaq 0x80(%rsp), %rbp
leaq 0x60(%rsp), %r13
movq %r12, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movb $0x0, 0x38(%rsp)
movq (%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2370
movq 0x28(%rsp), %rdi
cmpb $0x21, (%rdi)
je 0x3e9d
movq %rbx, %rdi
movq %r15, %rsi
movl $0x9, %edx
callq 0x3a13
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
subq %rax, %rcx
cmpq $0x80, %rcx
jne 0x3e90
leaq 0x10(%rsp), %rcx
movq %rcx, (%rsp)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x3736
movq 0x8(%rsp), %rcx
cmpq $0x3, %rcx
jb 0x3cdb
leaq -0x2(%rcx), %rdx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x2210
movq %rbp, %rdi
leaq 0x1488(%rip), %rsi      # 0x50ea
callq 0x2090
movl %eax, %ebx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3c8e
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21f0
testl %ebx, %ebx
movq %rsp, %rbx
jne 0x3cdb
movq 0x8(%rsp), %rcx
addq $-0x2, %rcx
movq %rbp, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2210
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x2250
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3cdb
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x48(%rsp), %rax
leaq 0x70(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x3736
leaq 0xe8(%rsp), %rdi
movq %r13, %rsi
callq 0x494c
leaq 0xf0(%rsp), %rcx
cmpq %rcx, %rax
jne 0x3dba
leaq 0xe8(%rsp), %rdi
movq %r13, %rsi
callq 0x49d6
movq %rbp, %rdi
movq %r13, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x4560
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x4b7e
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x3d70
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x3d95
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3dba
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x48(%rsp), %rbx
movq (%rsp), %rdi
callq 0x22d0
movq %rbp, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl %eax, %ecx
callq 0x4560
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x4b7e
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
leaq 0x48(%rsp), %rbx
je 0x3e0f
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x3e34
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3e59
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3e75
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3e90
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x4502
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3eaf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%r14), %rax
movq -0x18(%rax), %rcx
addq $-0x18, %rax
testb $0x2, 0x20(%r14,%rcx)
je 0x3bb2
leaq 0xe8(%rsp), %rdi
callq 0x4664
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3eef
jmp 0x3ef9
jmp 0x3f0d
jmp 0x3f0d
jmp 0x3eef
movq %rax, %rbx
jmp 0x3f2c
movq %rax, %rbx
jmp 0x3f47
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x4616
jmp 0x3f10
jmp 0x3f0d
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3f2c
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3f47
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x48(%rsp), %rdi
callq 0x4502
jmp 0x3f58
jmp 0x3f55
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f6f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0xe8(%rsp), %rdi
callq 0x4664
movq %rbx, %rdi
callq 0x2330