// File: /workspace/github_cpp_makefile_star2_O1/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 $0x138, %rsp            # imm = 0x138
movq %rsi, 0x60(%rsp)
leaq 0x110(%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 0x3eb7
movq %rdi, %r14
addq $-0x18, %rax
leaq 0x50(%rsp), %rbp
leaq 0x30(%rsp), %r12
leaq 0x40(%rsp), %r15
leaq 0x68(%rsp), %r13
movq %rbp, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
movq (%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2370
movq 0x40(%rsp), %rax
cmpb $0x21, (%rax)
je 0x3e89
movq %r13, %rdi
movq %r15, %rsi
movl $0x9, %edx
callq 0x39f7
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rcx
subq %rax, %rcx
cmpq $0x80, %rcx
jne 0x3e81
movq %r12, 0x20(%rsp)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x3722
movq 0x28(%rsp), %rbx
cmpq $0x3, %rbx
leaq 0xe8(%rsp), %rbp
jb 0x3c2f
leaq -0x2(%rbx), %rdx
movq %rbp, %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0x2210
movq %rbp, %rdi
leaq 0x14c8(%rip), %rsi      # 0x50ea
callq 0x2090
testl %eax, %eax
sete %r12b
jmp 0x3c32
xorl %r12d, %r12d
movq %rsp, %r15
cmpq $0x3, %rbx
leaq 0x50(%rsp), %rbp
leaq 0x80(%rsp), %rbx
jb 0x3c70
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x3c6d
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %r15
testb %r12b, %r12b
leaq 0x30(%rsp), %r12
je 0x3cce
movq 0x28(%rsp), %rcx
addq $-0x2, %rcx
movq %rbx, %rdi
movq %rbx, %r15
leaq 0x20(%rsp), %rbx
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2210
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2250
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
movq %r15, %rbx
je 0x3ccb
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %r15
movq 0x68(%rsp), %rax
leaq 0x10(%rsp), %rcx
movq %rcx, (%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x3722
leaq 0x108(%rsp), %rdi
movq %r15, %rsi
callq 0x493e
leaq 0x110(%rsp), %rcx
cmpq %rcx, %rax
jne 0x3daf
leaq 0x108(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x49c8
movq %rbx, %rdi
movq %r15, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x455a
movq 0x60(%rsp), %rdi
movq %rbx, %rsi
callq 0x4b70
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x3d65
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x3d8a
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3daf
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x68(%rsp), %r15
movq 0x20(%rsp), %rdi
callq 0x22d0
movq %rbx, %rdi
movq %r15, %rsi
movq %rsp, %rdx
movl %eax, %ecx
callq 0x455a
movq 0x60(%rsp), %rdi
movq %rbx, %rsi
callq 0x4b70
leaq 0x40(%rsp), %r15
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x3e05
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x3e2a
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3e4f
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3e6a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x3e81
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %r13, %rdi
callq 0x44fe
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3ea0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%r14), %rax
movq -0x18(%rax), %rcx
addq $-0x18, %rax
testb $0x2, 0x20(%r14,%rcx)
je 0x3b6d
leaq 0x108(%rsp), %rdi
callq 0x465e
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3eea
jmp 0x3efe
jmp 0x3efe
jmp 0x3ee0
jmp 0x3ee0
movq %rax, %rbx
jmp 0x3f1c
movq %rax, %rbx
jmp 0x3f38
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x4610
jmp 0x3f01
jmp 0x3efe
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3f1c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3f38
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x68(%rsp), %rdi
callq 0x44fe
jmp 0x3f49
jmp 0x3f46
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3f65
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x108(%rsp), %rdi
callq 0x465e
movq %rbx, %rdi
callq 0x2330