// File: jstaursky[P]hutch/src/Sleigh/filemanage.cc
// Function: FileManage::findFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
void FileManage::findFile(string &res,const string &name) const

{				// Search through paths to find file with given name
  vector<string>::const_iterator iter;

  if (name[0] == separator) {
    res = name;
    ifstream s(res.c_str());
    if (s) {
      s.close();
      return;
    }
  }
  else {
    for(iter=pathlist.begin();iter!=pathlist.end();++iter) {
      res = *iter + name;
      ifstream s(res.c_str());
      if (s) {
	s.close();
	return;
      }
    }
  }
  res.clear();			// Can't find it, return empty string
}

// Assembly:
subq $0x488, %rsp            # imm = 0x488
movq %rdi, 0x480(%rsp)
movq %rsi, 0x478(%rsp)
movq %rdx, 0x470(%rsp)
movq 0x480(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x468(%rsp), %rdi
callq 0xd6f70
movq 0x470(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd9290
movsbl (%rax), %eax
movq 0xbe32c(%rip), %rcx     # 0x1c7fd0
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x109d80
movq 0x470(%rsp), %rsi
movq 0x478(%rsp), %rdi
callq 0xce450
movq 0x478(%rsp), %rdi
callq 0xd1d80
movq %rax, %rsi
leaq 0x260(%rsp), %rdi
movl $0x8, %edx
callq 0xe17f0
movq 0x260(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x260(%rsp,%rax), %rdi
callq 0xdaf00
movb %al, 0xf(%rsp)
jmp 0x109d05
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x109d0f
jmp 0x109d51
leaq 0x260(%rsp), %rdi
callq 0xcfa20
jmp 0x109d1e
movl $0x1, 0x250(%rsp)
jmp 0x109d5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
leaq 0x260(%rsp), %rdi
callq 0xd01d0
jmp 0x109edf
movl $0x0, 0x250(%rsp)
leaq 0x260(%rsp), %rdi
callq 0xd01d0
movl 0x250(%rsp), %eax
testl %eax, %eax
je 0x109d7b
jmp 0x109d76
jmp 0x109ed7
jmp 0x109eca
movq 0x10(%rsp), %rdi
callq 0xcf990
movq %rax, 0x248(%rsp)
movq 0x248(%rsp), %rax
movq %rax, 0x468(%rsp)
movq 0x10(%rsp), %rdi
callq 0xd5000
movq %rax, 0x240(%rsp)
leaq 0x468(%rsp), %rdi
leaq 0x240(%rsp), %rsi
callq 0xd5c30
testb $0x1, %al
jne 0x109dd2
jmp 0x109ec8
leaq 0x468(%rsp), %rdi
callq 0xce840
movq %rax, %rsi
movq 0x470(%rsp), %rdx
leaq 0x220(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xe28b0
movq (%rsp), %rsi
movq 0x478(%rsp), %rdi
callq 0xda960
movq (%rsp), %rdi
callq 0xd4550
movq 0x478(%rsp), %rdi
callq 0xd1d80
movq %rax, %rsi
leaq 0x18(%rsp), %rdi
movl $0x8, %edx
callq 0xe17f0
movq 0x18(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x18(%rsp,%rax), %rdi
callq 0xdaf00
movb %al, 0xe(%rsp)
jmp 0x109e4d
movb 0xe(%rsp), %al
testb $0x1, %al
jne 0x109e57
jmp 0x109e90
leaq 0x18(%rsp), %rdi
callq 0xcfa20
jmp 0x109e63
movl $0x1, 0x250(%rsp)
jmp 0x109e9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
leaq 0x18(%rsp), %rdi
callq 0xd01d0
jmp 0x109edf
movl $0x0, 0x250(%rsp)
leaq 0x18(%rsp), %rdi
callq 0xd01d0
movl 0x250(%rsp), %eax
testl %eax, %eax
je 0x109eb4
jmp 0x109eb2
jmp 0x109ed7
jmp 0x109eb6
leaq 0x468(%rsp), %rdi
callq 0xd6a80
jmp 0x109da2
jmp 0x109eca
movq 0x478(%rsp), %rdi
callq 0xdb760
addq $0x488, %rsp            # imm = 0x488
retq
movq 0x258(%rsp), %rdi
callq 0xe0be0
nopl (%rax)