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

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

    google_extremal_sets::AllMaximalSetsSateLite 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
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x21e0
cmpl $0x2, -0x8(%rbp)
je 0x4ac7
movq 0x6541(%rip), %rdi      # 0xaff0
leaq 0x2685(%rip), %rsi      # 0x713b
callq 0x2200
movl $0x1, -0x4(%rbp)
jmp 0x4dcd
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5150
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x4df0
leaq -0x20(%rbp), %rdi
callq 0x4e10
cmpq $0x0, %rax
jne 0x4b02
movl $0x2, -0x4(%rbp)
movl $0x1, -0x24(%rbp)
jmp 0x4d4c
leaq -0x70(%rbp), %rdi
callq 0x4e30
jmp 0x4b0d
leaq -0x20(%rbp), %rdi
callq 0x4e10
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
movl $0x7a1200, %edx         # imm = 0x7A1200
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %r8d, %r8d
callq 0x2600
movb %al, -0xa9(%rbp)
jmp 0x4b37
movb -0xa9(%rbp), %al
andb $0x1, %al
movb %al, -0x7d(%rbp)
testb $0x1, -0x7d(%rbp)
jne 0x4c11
movq 0x649d(%rip), %rdi      # 0xaff0
leaq 0x2611(%rip), %rsi      # 0x716b
callq 0x2200
movq %rax, -0xb8(%rbp)
jmp 0x4b68
leaq -0x20(%rbp), %rdi
callq 0x4e60
movq %rax, %rsi
leaq -0xa0(%rbp), %rdi
callq 0x4e80
jmp 0x4b82
movq -0xb8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x21d0
movq %rax, -0xc0(%rbp)
jmp 0x4b9e
movq -0xc0(%rbp), %rdi
leaq 0x25e5(%rip), %rsi      # 0x7191
callq 0x2200
jmp 0x4bb3
leaq -0xa0(%rbp), %rdi
callq 0x2130
movl $0x3, -0x4(%rbp)
movl $0x1, -0x24(%rbp)
jmp 0x4d43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x4dc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x4db9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x2130
jmp 0x4db9
movq 0x63d8(%rip), %rdi      # 0xaff0
leaq 0x2557(%rip), %rsi      # 0x7176
callq 0x2200
movq %rax, -0xc8(%rbp)
jmp 0x4c2d
leaq -0x70(%rbp), %rdi
callq 0x4eb0
movq %rax, -0xd0(%rbp)
jmp 0x4c3f
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdi
callq 0x23a0
movq %rax, -0xd8(%rbp)
jmp 0x4c5b
movq -0xd8(%rbp), %rdi
leaq 0x2516(%rip), %rsi      # 0x717f
callq 0x2200
movq %rax, -0xe0(%rbp)
jmp 0x4c77
movq -0xe0(%rbp), %rdi
leaq 0x250e(%rip), %rsi      # 0x7193
callq 0x2200
movq %rax, -0xe8(%rbp)
jmp 0x4c93
leaq -0x70(%rbp), %rdi
callq 0x4ed0
movq %rax, -0xf0(%rbp)
jmp 0x4ca5
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdi
callq 0x20f0
movq %rax, -0xf8(%rbp)
jmp 0x4cc1
movq -0xf8(%rbp), %rdi
leaq 0x24c2(%rip), %rsi      # 0x7191
callq 0x2200
movq %rax, -0x100(%rbp)
jmp 0x4cdd
movq -0x100(%rbp), %rdi
leaq 0x24cc(%rip), %rsi      # 0x71b7
callq 0x2200
movq %rax, -0x108(%rbp)
jmp 0x4cf9
leaq -0x70(%rbp), %rdi
callq 0x4ef0
movq %rax, -0x110(%rbp)
jmp 0x4d0b
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdi
callq 0x20f0
movq %rax, -0x118(%rbp)
jmp 0x4d27
movq -0x118(%rbp), %rdi
leaq 0x245c(%rip), %rsi      # 0x7191
callq 0x2200
jmp 0x4d3c
movl $0x0, -0x24(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4f10
leaq -0x20(%rbp), %rdi
callq 0x4f40
movl -0x24(%rbp), %eax
testl %eax, %eax
je 0x4d60
jmp 0x4d5e
jmp 0x4dcd
leaq -0xa8(%rbp), %rdi
callq 0x21e0
movq 0x627d(%rip), %rdi      # 0xaff0
leaq 0x2468(%rip), %rsi      # 0x71e2
callq 0x2200
movq %rax, %rdi
movq -0xa8(%rbp), %rsi
subq -0x18(%rbp), %rsi
callq 0x23a0
movq %rax, %rdi
leaq 0x245d(%rip), %rsi      # 0x71f9
callq 0x2200
movq %rax, %rdi
movq 0x6215(%rip), %rsi      # 0xafc0
callq 0x2240
movl $0x0, -0x4(%rbp)
jmp 0x4dcd
leaq -0x70(%rbp), %rdi
callq 0x4f10
leaq -0x20(%rbp), %rdi
callq 0x4f40
jmp 0x4dd9
movl -0x4(%rbp), %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x2370
nopw %cs:(%rax,%rax)
nopl (%rax)