// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/filemanage.cc
// Function: FileManage::testDevelopmentPath(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool FileManage::testDevelopmentPath(const vector<string> &pathels,int level,string &root)

{ // Given pathels[level] is "Ghidra", determine if this is a Ghidra development layout
  if (level + 2 >= pathels.size()) return false;
  string parent = pathels[level + 1];
  if (parent.size() < 11) return false;
  string piecestr = parent.substr(0,7);
  if (piecestr != "ghidra.") return false;
  piecestr = parent.substr(parent.size() - 4);
  if (piecestr != ".git") return false;
  root = buildPath(pathels,level+2);
  vector<string> testpaths1;
  vector<string> testpaths2;
  scanDirectoryRecursive(testpaths1,"ghidra.git",root,1);
  if (testpaths1.size() != 1) return false;
  scanDirectoryRecursive(testpaths2,"Ghidra",testpaths1[0],1);
  return (testpaths2.size() == 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rdx, %rbx
leal 0x2(%rsi), %ebp
movslq %ebp, %rcx
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %rcx, %rdx
jbe 0x5de7d
movq %rdi, %r14
movslq %esi, %rcx
shlq $0x5, %rcx
leaq (%rax,%rcx), %rsi
addq $0x20, %rsi
leaq 0x90(%rsp), %r15
movq %r15, %rdi
callq 0x50630
cmpq $0xb, 0x8(%r15)
jae 0x5de84
xorl %ebx, %ebx
jmp 0x5dff3
xorl %ebx, %ebx
jmp 0x5e000
leaq 0x70(%rsp), %rdi
leaq 0x90(%rsp), %rsi
pushq $0x7
popq %rcx
xorl %edx, %edx
callq 0x4f700
leaq 0x28ef0(%rip), %rsi     # 0x86d92
leaq 0x70(%rsp), %rdi
callq 0x4ee50
testb %al, %al
jne 0x5defd
leaq 0x90(%rsp), %rsi
movq 0x8(%rsi), %rdx
addq $-0x4, %rdx
leaq 0x10(%rsp), %rdi
pushq $-0x1
popq %rcx
callq 0x4f700
leaq 0x70(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x4fef0
movq %r12, %rdi
callq 0x4e020
leaq 0x28eaf(%rip), %rsi     # 0x86da0
movq %r15, %rdi
callq 0x4ee50
testb %al, %al
je 0x5df04
xorl %ebx, %ebx
jmp 0x5dfe9
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x51780
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4fef0
movq %r14, %rdi
callq 0x4e020
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
andq $0x0, 0x60(%rsp)
leaq 0x28e4f(%rip), %rsi     # 0x86d9a
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x515e0
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x1
popq %rcx
movq %rbx, %rdx
callq 0x51e40
leaq 0x10(%rsp), %rdi
callq 0x4e020
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
cmpq $0x20, %rax
jne 0x5dfd3
leaq 0x28e15(%rip), %rsi     # 0x86da5
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x515e0
movq 0x30(%rsp), %rdx
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x1
popq %rcx
callq 0x51e40
leaq 0x10(%rsp), %rdi
callq 0x4e020
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
cmpq $0x20, %rax
sete %bl
jmp 0x5dfd5
xorl %ebx, %ebx
leaq 0x50(%rsp), %rdi
callq 0x4ea80
leaq 0x30(%rsp), %rdi
callq 0x4ea80
leaq 0x70(%rsp), %rdi
callq 0x4e020
leaq 0x90(%rsp), %rdi
callq 0x4e020
movl %ebx, %eax
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5e016
jmp 0x5e025
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4e020
jmp 0x5e028
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x4ea80
leaq 0x30(%rsp), %rdi
callq 0x4ea80
jmp 0x5e04a
jmp 0x5e047
jmp 0x5e047
movq %rax, %rbx
jmp 0x5e054
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x4e020
leaq 0x90(%rsp), %rdi
callq 0x4e020
movq %rbx, %rdi
callq 0x518c0
nop