// File: /workspace/github_cpp_makefile_star2_O1/waltersharpWEI[P]CommentEliminator/main.cpp
// Function: initializeSourceFileDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int initializeSourceFileDir(string Dir) {
    if (DIR* Dp = opendir(Dir.c_str())) {
        //if can not open the Directory, display the error
        if (Dp == NULL) {
            cout << strerror(errno);
        }
        //read every item in the directory
        while (struct dirent * Ep = readdir(Dp)) {
            //if it's a regular file
            if (Ep->d_type == DT_REG) {
                // and it's a source file
                if (isSource(Ep->d_name)) {
                    //construct the full path of the source file
                    string FilePath = Dir + "/" + Ep->d_name;
                    cout << "Adding source file " << FilePath << endl;
                    int TempFileSize = 0;
                    struct stat StatBuffer;
                    if (stat(FilePath.c_str(),&StatBuffer) < 0) {
                        //just use 0
                    } else {
                        TempFileSize = StatBuffer.st_size;
                    }

                    FileList.push_back(FileRecord(FilePath,TempFileSize));
                    cout << "Source file added" << endl;
                }
            //if it's a directory
            } else if (Ep->d_type == DT_DIR) {
                //if it's not a (current directory or father directory)
                if (strncmp(Ep->d_name,".",100000) != 0 && strncmp(Ep->d_name,"..",100000) != 0){
                    cout << "Entering Directory " << Dir << endl;
                    //recursive call to the child directory
                    initializeSourceFileDir(Dir + "/" + Ep->d_name);
                    cout << "Leaving Directory " << endl;
                }
            }
        }
        //close the directory handle
        closedir(Dp);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdi, -0x50(%rbp)
movq (%rdi), %rdi
callq 0x2280
movq %rax, -0x58(%rbp)
testq %rax, %rax
je 0x2efd
movq 0x551e(%rip), %rbx      # 0x7fc8
movq -0x58(%rbp), %rdi
callq 0x2290
testq %rax, %rax
je 0x2ef4
movq %rax, %r15
movzbl 0x12(%rax), %eax
cmpl $0x4, %eax
je 0x2baf
cmpl $0x8, %eax
jne 0x2eeb
leaq 0x13(%r15), %r12
leaq -0xa8(%rbp), %rbx
movq %rbx, -0xb8(%rbp)
movq %r12, %rdi
callq 0x20b0
leaq (%r15,%rax), %rdx
addq $0x13, %rdx
leaq -0xb8(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x3e22
movq %r14, %rdi
callq 0x2905
movl %eax, %r13d
movq -0xb8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x2b2f
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x21e0
testb %r13b, %r13b
leaq -0x38(%rbp), %r13
movq 0x548b(%rip), %rbx      # 0x7fc8
je 0x2eeb
leaq -0x138(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x148(%rbp), %r14
movq %r14, %rdi
callq 0x3d4a
movq %r14, %rdi
leaq 0x24d7(%rip), %rsi      # 0x504f
callq 0x2340
movq %r14, %rdi
movq %r12, %rsi
callq 0x2340
movq %r13, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2caf
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x2cb7
leaq 0x13(%r15), %r12
movl $0x186a0, %edx          # imm = 0x186A0
movq %r12, %rdi
leaq 0x24b6(%rip), %rsi      # 0x5078
callq 0x20c0
testl %eax, %eax
je 0x2eeb
movl $0x186a0, %edx          # imm = 0x186A0
movq %r12, %rdi
leaq 0x2499(%rip), %rsi      # 0x5077
callq 0x20c0
testl %eax, %eax
je 0x2eeb
movl $0x13, %edx
movq %rbx, %rdi
leaq 0x2480(%rip), %rsi      # 0x507a
callq 0x2200
movq %rbx, %rdi
movq -0x50(%rbp), %rbx
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x2200
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
leaq -0x138(%rbp), %rax
movq %rax, -0x148(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x148(%rbp), %rbx
movq %rbx, %rdi
callq 0x3d4a
movq %rbx, %rdi
leaq 0x23e2(%rip), %rsi      # 0x504f
callq 0x2340
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2340
leaq -0x68(%rbp), %r12
movq %r12, -0x78(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq 0x532f(%rip), %rbx      # 0x7fc8
je 0x2e51
movq %rdx, -0x78(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x68(%rbp)
jmp 0x2e59
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x2cf0
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x21e0
movl $0x13, %edx
movq %rbx, %rdi
leaq 0x2352(%rip), %rsi      # 0x5051
callq 0x2200
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x2200
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq -0x48(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x2180
movl %eax, %r13d
movq -0x118(%rbp), %r12
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x98(%rbp), %r14
movq %r14, %rdi
callq 0x3d4a
testl %r13d, %r13d
movl $0x0, %eax
cmovsl %eax, %r12d
leaq -0x170(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x3af8
leaq 0x5430(%rip), %rdi      # 0x81d8
movq %r13, %rsi
leaq -0x38(%rbp), %r12
callq 0x3ebc
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x2dd6
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x21e0
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x2df8
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21e0
movl $0x11, %edx
movq %rbx, %rdi
leaq 0x225e(%rip), %rsi      # 0x5065
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x2eeb
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21e0
jmp 0x2eeb
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x70(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x78(%rbp), %rdi
callq 0x2a76
movq -0x78(%rbp), %rdi
cmpq %r12, %rdi
je 0x2e8e
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21e0
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x2eb0
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x21e0
movl $0x12, %edx
movq %rbx, %rdi
leaq 0x21cf(%rip), %rsi      # 0x508e
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
testq %r15, %r15
jne 0x2aaa
movq -0x58(%rbp), %rdi
callq 0x22d0
xorl %eax, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x78(%rbp), %rdi
cmpq %r12, %rdi
je 0x2f84
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21e0
jmp 0x2f84
jmp 0x2f81
jmp 0x2f81
movq %rax, %r14
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x2f59
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x21e0
jmp 0x2f59
movq %rax, %r14
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x2fbd
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x21e0
jmp 0x2fbd
jmp 0x2fba
jmp 0x2f81
movq %rax, %r14
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x2fd6
movq -0x138(%rbp), %rsi
jmp 0x2fce
movq %rax, %r14
movq -0xb8(%rbp), %rdi
cmpq %rbx, %rdi
je 0x2fd6
movq -0xa8(%rbp), %rsi
jmp 0x2fce
jmp 0x2fba
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2fd6
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21e0
movq %r14, %rdi
callq 0x2300