// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x30(%rsp), %rdi
callq 0x2150
cmpl $0x2, %ebp
jne 0x3135
movq 0x8(%rbx), %rdi
callq 0x33d4
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x3158
leaq 0x50(%rsp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x38(%rsp), %rdi
movq %rax, %rsi
movl $0x7a1200, %edx         # imm = 0x7A1200
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %r8d, %r8d
callq 0x249c
movl %eax, %ebp
testb %al, %al
je 0x316d
movq 0x4f69(%rip), %rdi      # 0x7ff0
leaq 0x215d(%rip), %rsi      # 0x51eb
movl $0x8, %edx
callq 0x21e0
movq 0x38(%rsp), %rsi
movq 0x4f4c(%rip), %rdi      # 0x7ff0
callq 0x2170
movq %rax, %r14
leaq 0x2141(%rip), %rsi      # 0x51f4
movl $0x13, %edx
movq %rax, %rdi
callq 0x21e0
leaq 0x2141(%rip), %rsi      # 0x5208
movl $0x23, %edx
movq %r14, %rdi
callq 0x21e0
movq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x2090
movq %rax, %r14
leaq 0x211b(%rip), %rsi      # 0x5206
movl $0x1, %edx
movq %rax, %rdi
callq 0x21e0
leaq 0x212d(%rip), %rsi      # 0x522c
movl $0x2a, %edx
movq %r14, %rdi
callq 0x21e0
movq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x2090
xorl %r14d, %r14d
leaq 0x20e3(%rip), %rsi      # 0x5206
movl $0x1, %edx
movq %rax, %rdi
callq 0x21e0
jmp 0x31ef
movq 0x4eb4(%rip), %rdi      # 0x7ff0
leaq 0x206a(%rip), %rsi      # 0x51ad
movl $0x32, %edx
callq 0x21e0
movl $0x1, %r14d
jmp 0x327f
leaq 0x8(%rsp), %rdi
callq 0x32c8
movl $0x2, %r14d
jmp 0x327f
movq 0x4e7c(%rip), %rdi      # 0x7ff0
leaq 0x2065(%rip), %rsi      # 0x51e0
movl $0xa, %edx
callq 0x21e0
movq 0x8(%rsp), %rax
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x32e8
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x4e37(%rip), %rdi      # 0x7ff0
callq 0x21e0
leaq 0x2041(%rip), %rsi      # 0x5206
movl $0x1, %edx
movq %rax, %rdi
callq 0x21e0
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x31e9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
movl $0x3, %r14d
movq %rbx, %rdi
callq 0x337e
leaq 0x8(%rsp), %rdi
callq 0x32c8
testb %bpl, %bpl
je 0x327f
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x2150
movq 0x4dd6(%rip), %r14      # 0x7ff0
leaq 0x2036(%rip), %rsi      # 0x5257
movl $0x16, %edx
movq %r14, %rdi
callq 0x21e0
movq (%rbx), %rsi
subq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x2170
movq %rax, %rbx
leaq 0x2026(%rip), %rsi      # 0x526e
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 %r14d, %r14d
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x32ab
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x32ae
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x32ae
movq %rax, %r14
movq %rbx, %rdi
callq 0x337e
leaq 0x8(%rsp), %rdi
callq 0x32c8
movq %r14, %rdi
callq 0x2270