// File: UTAP[P]APHTTP/utils/utilities.cpp
// Function: readMapFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*)
int readMapFromFile(std::string fname, std::map<std::string, std::string> *m) {
  std::ifstream inputStream(fname);
  if (!inputStream.is_open())
    return -errno;

  std::string line;
  while (std::getline(inputStream, line)) {
    auto tokens = tokenize(line, '=');
    //     KEY         VALUE
    (*m)[tokens[0]] = tokens[(tokens.size() < 2) ? 0 : 1];
  }

  inputStream.close();
  return (*m).size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rsi, %rax
movq %rdi, %rsi
movq %rsi, -0x10(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x220(%rbp), %rdi
movq %rdi, -0x278(%rbp)
movl $0x8, %edx
callq 0x4620
movq -0x278(%rbp), %rdi
callq 0x4610
movb %al, -0x269(%rbp)
jmp 0x16025
movb -0x269(%rbp), %al
testb $0x1, %al
jne 0x16066
jmp 0x16031
callq 0x4070
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x230(%rbp)
jmp 0x161d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x161ec
leaq -0x250(%rbp), %rdi
callq 0x4560
leaq -0x220(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x40d0
movq %rax, -0x280(%rbp)
jmp 0x1608e
movq -0x280(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x44c0
movb %al, -0x281(%rbp)
jmp 0x160ac
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0x160bb
jmp 0x16194
leaq -0x268(%rbp), %rdi
leaq -0x250(%rbp), %rsi
movl $0x3d, %edx
callq 0x159e0
jmp 0x160d5
leaq -0x268(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x137f0
movq -0x2a8(%rbp), %rdi
subq $0x2, %rax
setae %al
movzbl %al, %eax
movl %eax, %esi
callq 0x13660
movq -0x2a8(%rbp), %rdi
movq %rax, -0x2a0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x298(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x13660
movq -0x298(%rbp), %rdi
movq %rax, %rsi
callq 0x16340
movq %rax, -0x290(%rbp)
jmp 0x1613a
movq -0x2a0(%rbp), %rsi
movq -0x290(%rbp), %rdi
callq 0x4060
jmp 0x1614f
leaq -0x268(%rbp), %rdi
callq 0x13680
jmp 0x16072
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
jmp 0x161c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x13680
jmp 0x161c6
leaq -0x220(%rbp), %rdi
callq 0x40e0
jmp 0x161a2
movq -0x18(%rbp), %rdi
callq 0x16420
movl %eax, -0x4(%rbp)
movl $0x1, -0x230(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x4768
jmp 0x161d4
leaq -0x250(%rbp), %rdi
callq 0x4768
jmp 0x161ec
leaq -0x220(%rbp), %rdi
callq 0x4140
movl -0x4(%rbp), %eax
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
leaq -0x220(%rbp), %rdi
callq 0x4140
movq -0x228(%rbp), %rdi
callq 0x46b0
nopw %cs:(%rax,%rax)
nop