// File: /workspace/github_cpp_makefile_star2_O1/roberto-bayardo[P]google-extremal-sets/main-lexicographic.cc
// Function: main
int main(int argc, char** argv) {
  time_t start_time;
  time(&start_time);

  // Verify input arguments.
  if (argc != 2) {
    std::cerr << "ERROR: Usage is: ./ams-lexicographic <dataset_path>\n";
    return 1;
  }

  {
    std::auto_ptr<DataSourceIterator> data(DataSourceIterator::Get(argv[1]));
    if (!data.get())
      return 2;

    google_extremal_sets::AllMaximalSetsLexicographic ap;
    ap.SetMaxItemsInRam(1000000000);
    ap.SetOutputMode(google_extremal_sets::COUNT_ONLY);
    //ap.SetOutputMode(google_extremal_sets::ID_AND_ITEMS);

    bool result = ap.FindAllMaximalSets(data.get(), 8000000/*max_item_id*/);

    if (!result) {
      std::cerr << "IO ERROR: " << data->GetErrorMessage() << "\n";
      return 3;
    }

    std::cerr << "; Found " << ap.MaximalSetsCount() << " maximal itemsets.\n"
              << "; Number of itemsets in the input: " << ap.InputSetsCount()
              << "\n"
              << "; Number of candidate seeks performed: "
              << ap.CandidateSeekCount() << "\n";
  }

  time_t end_time;
  time(&end_time);
  std::cerr << "; Total running time: " << (end_time - start_time)
            << " seconds" << std::endl;

  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x28(%rsp), %rdi
callq 0x2150
cmpl $0x2, %ebp
jne 0x35fc
movq 0x8(%rbx), %rdi
callq 0x388c
movq %rax, (%rsp)
testq %rax, %rax
je 0x361e
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movq $0x3b9aca00, 0x54(%rdi) # imm = 0x3B9ACA00
movq %rax, %rsi
movl $0x7a1200, %edx         # imm = 0x7A1200
callq 0x248c
movl %eax, %ebx
testb %al, %al
je 0x362a
movq 0x4aa1(%rip), %rdi      # 0x7ff0
leaq 0x221c(%rip), %rsi      # 0x5772
movl $0x8, %edx
callq 0x21e0
movq 0x30(%rsp), %rsi
movq 0x4a84(%rip), %rdi      # 0x7ff0
callq 0x2170
movq %rax, %r14
leaq 0x1af0(%rip), %rsi      # 0x506b
movl $0x13, %edx
movq %rax, %rdi
callq 0x21e0
leaq 0x21ec(%rip), %rsi      # 0x577b
movl $0x23, %edx
movq %r14, %rdi
callq 0x21e0
movq 0x38(%rsp), %rsi
movq %r14, %rdi
callq 0x2090
movq %rax, %r14
leaq 0x1aca(%rip), %rsi      # 0x507d
movl $0x1, %edx
movq %rax, %rdi
callq 0x21e0
leaq 0x21d8(%rip), %rsi      # 0x579f
movl $0x27, %edx
movq %r14, %rdi
callq 0x21e0
movq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x2090
xorl %ebp, %ebp
leaq 0x1a93(%rip), %rsi      # 0x507d
movl $0x1, %edx
movq %rax, %rdi
callq 0x21e0
jmp 0x36aa
movq 0x49ed(%rip), %rdi      # 0x7ff0
leaq 0x2128(%rip), %rsi      # 0x5732
movl $0x34, %edx
callq 0x21e0
movl $0x1, %ebp
jmp 0x375c
movl $0x2, %ebp
xorl %ebx, %ebx
jmp 0x36d8
movq 0x49bf(%rip), %rdi      # 0x7ff0
leaq 0x212f(%rip), %rsi      # 0x5767
movl $0xa, %edx
callq 0x21e0
movq (%rsp), %rax
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x37fa
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x497b(%rip), %rdi      # 0x7ff0
callq 0x21e0
leaq 0x19fc(%rip), %rsi      # 0x507d
movl $0x1, %edx
movq %rax, %rdi
callq 0x21e0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x36a5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movl $0x3, %ebp
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x36c1
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x36d8
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x21c0
movq %rsp, %rdi
callq 0x37d8
testb %bl, %bl
je 0x375c
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x2150
movq 0x48f8(%rip), %r14      # 0x7ff0
leaq 0x20c8(%rip), %rsi      # 0x57c7
movl $0x16, %edx
movq %r14, %rdi
callq 0x21e0
movq (%rbx), %rsi
subq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x2170
movq %rax, %rbx
leaq 0x20b8(%rip), %rsi      # 0x57de
movl $0x8, %edx
movq %rax, %rdi
callq 0x21e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x3788
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x378b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x378b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x37a6
movq %rsp, %rdi
callq 0x37d8
movq %rbx, %rdi
callq 0x2270
nop