// File: /workspace/github_cpp_makefile_star2_O3/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 0x2270
testq %rax, %rax
je 0x2ed0
movq %rax, %r14
movq %rax, %rdi
callq 0x2280
testq %rax, %rax
je 0x2ec8
movq %rax, %r12
movq 0x5517(%rip), %r15      # 0x7fc8
movzbl 0x12(%r12), %eax
cmpl $0x4, %eax
je 0x2ba9
cmpl $0x8, %eax
jne 0x2eb4
movq %r15, %rbx
movq %r14, %r15
leaq 0x13(%r12), %r13
leaq -0xa0(%rbp), %r14
movq %r14, -0xb0(%rbp)
movq %r13, %rdi
callq 0x20b0
leaq (%r12,%rax), %rdx
addq $0x13, %rdx
leaq -0xb0(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x3e0a
movq %r12, %rdi
callq 0x28f9
movl %eax, %r12d
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0x2b2a
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x21d0
testb %r12b, %r12b
movq %r15, %r14
movq %rbx, %r15
leaq -0x168(%rbp), %rbx
je 0x2eb4
leaq -0x158(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x3d2c
movq %rbx, %rdi
leaq 0x24e1(%rip), %rsi      # 0x504f
callq 0x2330
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2330
leaq -0x38(%rbp), %rsi
movq %rsi, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2d2a
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x2d30
cmpb $0x2e, 0x13(%r12)
jne 0x2bd1
cmpb $0x0, 0x14(%r12)
je 0x2eb4
cmpb $0x2e, 0x14(%r12)
jne 0x2bd1
cmpb $0x0, 0x15(%r12)
je 0x2eb4
movl $0x13, %edx
movq %r15, %rdi
leaq 0x2497(%rip), %rsi      # 0x5077
callq 0x21f0
movq -0x50(%rbp), %rbx
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x21f0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
leaq -0x158(%rbp), %rax
movq %rax, -0x168(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq -0x168(%rbp), %rbx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x3d2c
movq %rbx, %rdi
leaq 0x23fc(%rip), %rsi      # 0x504f
callq 0x2330
addq $0x13, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2330
leaq -0x60(%rbp), %r12
movq %r12, -0x70(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2c8b
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x2c93
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x68(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x70(%rbp), %rdi
callq 0x2a6a
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x2cc8
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x2cea
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x21d0
movl $0x12, %edx
movq %r15, %rdi
leaq 0x2392(%rip), %rsi      # 0x508b
callq 0x21f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
jmp 0x2eb4
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x2d69
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x21d0
movl $0x13, %edx
movq %r15, %rdi
leaq 0x22d9(%rip), %rsi      # 0x5051
callq 0x21f0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x21f0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq -0x48(%rbp), %rdi
movq %rbx, %rsi
callq 0x2170
movl %eax, %r13d
movq -0x138(%rbp), %r12
leaq -0x80(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
callq 0x3d2c
testl %r13d, %r13d
movl $0x0, %eax
cmovsl %eax, %r12d
leaq -0xd8(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x3ad2
leaq 0x53b6(%rip), %rdi      # 0x81d0
movq %r13, %rsi
callq 0x3ea8
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x2e44
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x2e60
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21d0
movl $0x11, %edx
movq %r15, %rdi
leaq 0x21f6(%rip), %rsi      # 0x5065
callq 0x21f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2eb4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x2280
movq %rax, %r12
testq %rax, %rax
jne 0x2ab1
movq %r14, %rdi
callq 0x22c0
xorl %eax, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2f17
jmp 0x2f8a
jmp 0x2f51
jmp 0x2f51
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x2f17
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x21d0
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x2f8d
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21d0
jmp 0x2f8d
movq %rax, %rbx
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x2f54
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x21d0
jmp 0x2f54
jmp 0x2f51
movq %rax, %rbx
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x2fa6
movq -0x158(%rbp), %rsi
jmp 0x2f9e
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0x2fa6
movq -0xa0(%rbp), %rsi
jmp 0x2f9e
jmp 0x2f8a
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2fa6
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x22f0