// File: /workspace/github_c_makefile_star2_O0/perdisci[P]LSH/lsh.cpp
// Function: rp::LSH::minhash_corpus(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, bool)
void LSH::minhash_corpus(const std::string dir_name, bool keep_ngrams, bool progress) {
        
        boost::filesystem::path dir_path(dir_name);
        std::cerr << "Dir = " << dir_path.string() << std::endl;
        
        if(is_directory(dir_path)) {
            for(auto& file_name : boost::make_iterator_range(boost::filesystem::directory_iterator(dir_path), {})) {
                if(progress) std::cerr << "Processing file : " << file_name.path().filename().string() << std::endl;
                boost::timer t; // for profiling
                NGramSet ngrams = load_ngrams_from_file(file_name.path().string(), ngram_len);
                VUint32 sig = mh.minhash_universal(ngrams);
                // VUint32 sig = mh.minhash_xor(ngrams);
                if(progress) std::cerr << "Ngrams size: " << ngrams.size() << std::endl;
                if(progress) std::cerr << "Time: " << t.elapsed() << std::endl;
                /*
                std::cout << "MH sig for: " << file_name.path().filename().string() << std::endl;
                for(auto s : sig)
                    std::cout << s << " ";
                std::cout << std::endl;
                */
                mh_map.insert(std::move(std::make_pair(file_name.path().filename().string(), sig)));
                if(keep_ngrams)
                    ng_map.insert(std::move(std::make_pair(file_name.path().filename().string(),std::move(ngrams))));
            }
        }
    }

// Assembly:
subq $0x2c8, %rsp            # imm = 0x2C8
movb %cl, %al
movb %dl, %cl
movq %rdi, 0x2c0(%rsp)
movq %rsi, 0x2b8(%rsp)
andb $0x1, %cl
movb %cl, 0x2b7(%rsp)
andb $0x1, %al
movb %al, 0x2b6(%rsp)
movq 0x2c0(%rsp), %rax
movq %rax, 0xb8(%rsp)
leaq 0x290(%rsp), %rdi
callq 0x24a60
movq 0x2302e(%rip), %rdi     # 0x44ff0
leaq 0x1071c(%rip), %rsi     # 0x326e5
callq 0x8480
movq %rax, 0xc0(%rsp)
jmp 0x21fd8
leaq 0x290(%rsp), %rdi
callq 0x24a90
movq %rax, 0xb0(%rsp)
jmp 0x21fef
movq 0xb0(%rsp), %rsi
movq 0xc0(%rsp), %rdi
callq 0x8430
movq %rax, 0xa8(%rsp)
jmp 0x2200e
movq 0xa8(%rsp), %rdi
movq 0x22f4b(%rip), %rsi     # 0x44f68
callq 0x84c0
jmp 0x22024
leaq 0x290(%rsp), %rdi
callq 0x24aa0
movb %al, 0xa7(%rsp)
jmp 0x2203a
movb 0xa7(%rsp), %al
testb $0x1, %al
jne 0x2204a
jmp 0x226e7
leaq 0x260(%rsp), %rdi
leaq 0x290(%rsp), %rsi
xorl %edx, %edx
callq 0x24b80
jmp 0x22063
leaq 0x258(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x24bf0
movq 0x98(%rsp), %rdx
leaq 0x268(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x24ad0
jmp 0x22097
leaq 0x258(%rsp), %rdi
callq 0x24c00
leaq 0x260(%rsp), %rdi
callq 0x24c00
leaq 0x268(%rsp), %rax
movq %rax, 0x278(%rsp)
movq 0x278(%rsp), %rsi
leaq 0x250(%rsp), %rdi
callq 0x24c10
jmp 0x220d8
movq 0x278(%rsp), %rsi
leaq 0x248(%rsp), %rdi
callq 0x24c40
jmp 0x220ef
jmp 0x220f1
leaq 0x250(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x24c70
movb %al, 0x97(%rsp)
jmp 0x2210f
movb 0x97(%rsp), %al
testb $0x1, %al
jne 0x221e3
jmp 0x22120
leaq 0x248(%rsp), %rdi
callq 0x24c00
leaq 0x250(%rsp), %rdi
callq 0x24c00
leaq 0x268(%rsp), %rdi
callq 0x24f30
jmp 0x226e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
jmp 0x226fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
leaq 0x258(%rsp), %rdi
callq 0x24c00
leaq 0x260(%rsp), %rdi
callq 0x24c00
jmp 0x226fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
jmp 0x226d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
jmp 0x226c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
jmp 0x226bc
leaq 0x250(%rsp), %rdi
callq 0x24cc0
movq %rax, 0x88(%rsp)
jmp 0x221fa
movq 0x88(%rsp), %rax
movq %rax, 0x240(%rsp)
testb $0x1, 0x2b6(%rsp)
je 0x222c9
movq 0x22dd1(%rip), %rdi     # 0x44ff0
leaq 0x104c6(%rip), %rsi     # 0x326ec
callq 0x8480
movq %rax, 0x80(%rsp)
jmp 0x22235
movq 0x240(%rsp), %rdi
callq 0x24ce0
movq %rax, %rsi
leaq 0x220(%rsp), %rdi
callq 0x8400
jmp 0x22254
leaq 0x220(%rsp), %rdi
callq 0x24a90
movq %rax, 0x78(%rsp)
jmp 0x22268
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdi
callq 0x8430
movq %rax, 0x70(%rsp)
jmp 0x22281
movq 0x70(%rsp), %rdi
movq 0x22cdb(%rip), %rsi     # 0x44f68
callq 0x84c0
jmp 0x22294
leaq 0x220(%rsp), %rdi
callq 0x24cf0
jmp 0x222c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
leaq 0x220(%rsp), %rdi
callq 0x24cf0
jmp 0x226bc
leaq 0x218(%rsp), %rdi
callq 0x24d00
jmp 0x222d8
movq 0x240(%rsp), %rdi
callq 0x24ce0
movq %rax, %rdi
callq 0x24a90
movq %rax, 0x68(%rsp)
jmp 0x222f4
movq 0x68(%rsp), %rsi
leaq 0x1c8(%rsp), %rdi
callq 0x81a0
jmp 0x22308
movq 0xb8(%rsp), %rax
movl 0x8(%rax), %edx
leaq 0x1e8(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x22720
jmp 0x2232a
leaq 0x1c8(%rsp), %rdi
callq 0x8928
movq 0xb8(%rsp), %rsi
addq $0x10, %rsi
leaq 0x1b0(%rsp), %rdi
leaq 0x1e8(%rsp), %rdx
callq 0x18da0
jmp 0x2235a
testb $0x1, 0x2b6(%rsp)
je 0x22410
movq 0x22c81(%rip), %rdi     # 0x44ff0
leaq 0x10389(%rip), %rsi     # 0x326ff
callq 0x8480
movq %rax, 0x60(%rsp)
jmp 0x22382
leaq 0x1e8(%rsp), %rdi
callq 0x24d30
movq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0x80d0
movq %rax, 0x58(%rsp)
jmp 0x223a3
movq 0x58(%rsp), %rdi
movq 0x22bb9(%rip), %rsi     # 0x44f68
callq 0x84c0
jmp 0x223b6
jmp 0x22410
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0x8928
jmp 0x226bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
jmp 0x226af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
jmp 0x226a2
testb $0x1, 0x2b6(%rsp)
je 0x22475
movq 0x22bcf(%rip), %rdi     # 0x44ff0
leaq 0x102e5(%rip), %rsi     # 0x3270d
callq 0x8480
movq %rax, 0x50(%rsp)
jmp 0x22434
leaq 0x218(%rsp), %rdi
callq 0x24d40
movsd %xmm0, 0x48(%rsp)
jmp 0x22449
movsd 0x48(%rsp), %xmm0
movq 0x50(%rsp), %rdi
callq 0x88a0
movq %rax, 0x40(%rsp)
jmp 0x22460
movq 0x40(%rsp), %rdi
movq 0x22afc(%rip), %rsi     # 0x44f68
callq 0x84c0
jmp 0x22473
jmp 0x22475
movq 0xb8(%rsp), %rax
addq $0x68, %rax
movq %rax, 0x38(%rsp)
movq 0x240(%rsp), %rdi
callq 0x24ce0
movq %rax, %rsi
leaq 0x158(%rsp), %rdi
callq 0x8400
jmp 0x224a5
leaq 0x158(%rsp), %rdi
callq 0x24a90
movq %rax, 0x30(%rsp)
jmp 0x224b9
movq 0x30(%rsp), %rsi
leaq 0x178(%rsp), %rdi
leaq 0x1b0(%rsp), %rdx
callq 0x24dd0
jmp 0x224d5
movq 0x38(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x24d80
movb %dl, 0x27(%rsp)
movq %rax, 0x28(%rsp)
jmp 0x224f2
movb 0x27(%rsp), %al
movq 0x28(%rsp), %rcx
movq %rcx, 0x148(%rsp)
movb %al, 0x150(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x24e10
leaq 0x158(%rsp), %rdi
callq 0x24cf0
testb $0x1, 0x2b7(%rsp)
je 0x22674
movq 0xb8(%rsp), %rax
addq $0xc8, %rax
movq %rax, 0x18(%rsp)
movq 0x240(%rsp), %rdi
callq 0x24ce0
movq %rax, %rsi
leaq 0xd8(%rsp), %rdi
callq 0x8400
jmp 0x22564
leaq 0xd8(%rsp), %rdi
callq 0x24a90
movq %rax, 0x10(%rsp)
jmp 0x22578
movq 0x10(%rsp), %rsi
leaq 0xf8(%rsp), %rdi
leaq 0x1e8(%rsp), %rdx
callq 0x24e90
jmp 0x22594
movq 0x18(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x24e40
movb %dl, 0x7(%rsp)
movq %rax, 0x8(%rsp)
jmp 0x225b1
movb 0x7(%rsp), %al
movq 0x8(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
movb %al, 0xd0(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x24ed0
leaq 0xd8(%rsp), %rdi
callq 0x24cf0
jmp 0x22674
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
jmp 0x2261f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x24e10
leaq 0x158(%rsp), %rdi
callq 0x24cf0
jmp 0x226a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
jmp 0x22665
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x288(%rsp)
movl %eax, 0x284(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x24ed0
leaq 0xd8(%rsp), %rdi
callq 0x24cf0
jmp 0x226a2
leaq 0x1b0(%rsp), %rdi
callq 0xbe70
leaq 0x1e8(%rsp), %rdi
callq 0xc240
leaq 0x250(%rsp), %rdi
callq 0x24f00
jmp 0x2269d
jmp 0x220f1
leaq 0x1b0(%rsp), %rdi
callq 0xbe70
leaq 0x1e8(%rsp), %rdi
callq 0xc240
leaq 0x248(%rsp), %rdi
callq 0x24c00
leaq 0x250(%rsp), %rdi
callq 0x24c00
leaq 0x268(%rsp), %rdi
callq 0x24f30
jmp 0x226fc
jmp 0x226e7
leaq 0x290(%rsp), %rdi
callq 0x24cf0
addq $0x2c8, %rsp            # imm = 0x2C8
retq
leaq 0x290(%rsp), %rdi
callq 0x24cf0
movq 0x288(%rsp), %rdi
callq 0x8820
nopw %cs:(%rax,%rax)