// File: /workspace/github_cpp_makefile_star2_O2/roberto-bayardo[P]google-extremal-sets/all-maximal-sets-satelite.cc
// Function: google_extremal_sets::AllMaximalSetsSateLite::FindAllMaximalSets(google_extremal_sets::DataSourceIterator*, unsigned int, unsigned int, google_extremal_sets::OutputModeEnum)
bool AllMaximalSetsSateLite::FindAllMaximalSets(
    DataSourceIterator* data,
    uint32_t max_item_id,
    uint32_t max_items_in_ram,
    OutputModeEnum output_mode) {
  Init();

  // Vars set by the data source iterator.
  int result;
  uint32_t set_id;
  std::vector<uint32_t> current_set;

  if (!PrepareForDataScan(data, max_item_id, 0))
    return false;  // IO error
  uint32_t items_in_ram = 0;
  CleanerUpper cleanup(&all_sets_);

  // This loop scans the input data from beginning to end and indexes
  // each candidate on the occurrs_ lists.
  while ((result = data->Next(&set_id, &current_set)) > 0) {
    SetProperties* index_me = SetProperties::Create(set_id, current_set);
    items_in_ram += current_set.size();
    all_sets_.push_back(index_me);
    if (items_in_ram >= max_items_in_ram) {
      std::cerr << "; ERROR: max_items_in_ram exceeded." << std::endl;
      return false;
    }
    ++input_sets_count_;
    for (unsigned int i = 0; i < index_me->size; ++i) {
      occurs_[index_me->item[i]].push_back(index_me);
    }
  }
  if (result != 0)
    return false;  // IO error

  std::cerr << "; Starting subsumption checking scan." << std::endl;
  for (unsigned int i = 0; i < all_sets_.size(); ++i) {
    if (!IsSubsumed(*all_sets_[i]))
      FoundMaximalSet(*(all_sets_[i]), output_mode);
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %ebx
movl %ecx, 0x8(%rsp)
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movq %rsi, 0x40(%rsp)
xorl %ecx, %ecx
callq 0x2668
testb %al, %al
je 0x2582
movl %ebx, 0x4(%rsp)
leaq 0x18(%r14), %r12
movq %r12, 0x18(%rsp)
xorl %ebp, %ebp
leaq 0x20(%rsp), %rbx
leaq 0x10(%rsp), %r13
movq 0x40(%rsp), %rdi
leaq 0xc(%rsp), %rsi
movq %rbx, %rdx
callq 0x316e
testl %eax, %eax
jle 0x2589
movl 0xc(%rsp), %edi
movq %rbx, %rsi
callq 0x39fc
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %r15
subq 0x20(%rsp), %r15
movq %r12, %rdi
movq %r13, %rsi
callq 0x28a0
sarq $0x2, %r15
addq %r15, %rbp
cmpl 0x8(%rsp), %ebp
jae 0x25e8
incq 0x8(%r14)
xorl %r15d, %r15d
movq 0x10(%rsp), %rax
movl 0x4(%rax), %ecx
cmpq %rcx, %r15
jae 0x2507
movl 0x8(%rax,%r15,4), %eax
imulq $0x18, %rax, %rdi
addq 0x30(%r14), %rdi
movq %r13, %rsi
callq 0x28a0
incq %r15
jmp 0x255b
xorl %ebx, %ebx
jmp 0x260f
jne 0x2603
movq 0x4a5e(%rip), %rdi      # 0x6ff0
leaq 0x1a8f(%rip), %rsi      # 0x4028
callq 0x21a0
movq %rax, %rdi
callq 0x20d0
xorl %ebx, %ebx
movl 0x4(%rsp), %ebp
movl %ebx, %ebx
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbx, %rcx
jbe 0x262a
movq (%rax,%rbx,8), %rsi
movq %r14, %rdi
callq 0x26cc
testb %al, %al
jne 0x25e4
movq 0x18(%r14), %rax
movq (%rax,%rbx,8), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x278a
incl %ebx
jmp 0x25ac
movq 0x4a01(%rip), %rdi      # 0x6ff0
leaq 0x1a0e(%rip), %rsi      # 0x4004
callq 0x21a0
movq %rax, %rdi
callq 0x20d0
xorl %ebx, %ebx
leaq 0x18(%rsp), %rdi
callq 0x2852
leaq 0x20(%rsp), %rdi
callq 0x2940
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bl
jmp 0x2605
jmp 0x263d
jmp 0x263d
movq %rax, %rbx
jmp 0x264a
jmp 0x263d
jmp 0x263d
jmp 0x263d
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2852
leaq 0x20(%rsp), %rdi
callq 0x2940
movq %rbx, %rdi
callq 0x22a0