// File: /workspace/github_cpp_makefile_star2_O2/roberto-bayardo[P]google-extremal-sets/main-cardinality.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-cardinality <dataset_path>\n";
    return 1;
  }

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

    google_extremal_sets::AllMaximalSetsCardinality ap;
    bool result = ap.FindAllMaximalSets(
        data.get(),
        8000000/*max_item_id*/,
        1000000000/*max_items_in_ram*/,
        google_extremal_sets::COUNT_ONLY/*output_mode*/);
    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 subsumption checks performed: "
              << ap.SubsumptionChecksCount() << "\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 $0x60, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %rdi
callq 0x2180
cmpl $0x2, %ebp
jne 0x3148
movq 0x8(%rbx), %rdi
callq 0x32bc
movq %rax, (%rsp)
testq %rax, %rax
je 0x3164
leaq 0x48(%rsp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
movl $0x7a1200, %edx         # imm = 0x7A1200
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %r8d, %r8d
callq 0x24bc
movl %eax, %ebp
testb %al, %al
je 0x316c
movq 0x3f2b(%rip), %rdi      # 0x6ff0
leaq 0x111f(%rip), %rsi      # 0x41eb
callq 0x21b0
movq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x21a0
leaq 0x110f(%rip), %rsi      # 0x41f4
movq %rax, %rdi
callq 0x21b0
leaq 0x1114(%rip), %rsi      # 0x4208
movq %rax, %rdi
callq 0x21b0
movq 0x38(%rsp), %rsi
movq %rax, %rdi
callq 0x2090
leaq 0x10f6(%rip), %rsi      # 0x4206
movq %rax, %rdi
callq 0x21b0
leaq 0x110d(%rip), %rsi      # 0x422c
movq %rax, %rdi
callq 0x21b0
movq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x2090
xorl %r14d, %r14d
leaq 0x10c8(%rip), %rsi      # 0x4206
movq %rax, %rdi
callq 0x21b0
jmp 0x31be
movq 0x3ea1(%rip), %rdi      # 0x6ff0
leaq 0x1057(%rip), %rsi      # 0x41ad
callq 0x21b0
pushq $0x1
popq %r14
jmp 0x321d
pushq $0x2
popq %r14
xorl %ebp, %ebp
jmp 0x31c6
movq 0x3e7d(%rip), %rdi      # 0x6ff0
leaq 0x1066(%rip), %rsi      # 0x41e0
callq 0x21b0
movq %rax, %r14
movq (%rsp), %rsi
addq $0x10, %rsi
leaq 0x10(%rsp), %rdi
callq 0x2240
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x2170
leaq 0x105e(%rip), %rsi      # 0x4206
movq %rax, %rdi
callq 0x21b0
leaq 0x10(%rsp), %rdi
callq 0x20c0
pushq $0x3
popq %r14
movq %rbx, %rdi
callq 0x3274
movq %rsp, %rdi
callq 0x3256
testb %bpl, %bpl
je 0x321d
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x2180
movq 0x3e09(%rip), %rdi      # 0x6ff0
leaq 0x1069(%rip), %rsi      # 0x4257
callq 0x21b0
movq (%rbx), %rsi
subq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x21a0
leaq 0x1064(%rip), %rsi      # 0x426e
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20d0
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x323a
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x20c0
jmp 0x323d
movq %rax, %r14
movq %rbx, %rdi
callq 0x3274
movq %rsp, %rdi
callq 0x3256
movq %r14, %rdi
callq 0x22b0
nop