// File: /workspace/github_cpp_makefile_star2_O1/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 $0x38, %rsp
movl %r8d, %ebx
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movq %rax, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
xorl %ecx, %ecx
callq 0x2742
testb %al, %al
je 0x261b
movl %ebx, 0x8(%rsp)
leaq 0x18(%r14), %rax
movq %rax, 0x30(%rsp)
movq %rax, 0x28(%rsp)
xorl %r13d, %r13d
movq %rsp, %r12
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x343c
testl %eax, %eax
jle 0x261f
movl 0xc(%rsp), %edi
leaq 0x10(%rsp), %rsi
callq 0x3ef4
movq 0x18(%rsp), %rbx
subq 0x10(%rsp), %rbx
movq %rax, (%rsp)
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x255c
movq %rax, (%rsi)
addq $0x8, 0x20(%r14)
jmp 0x2569
movq 0x30(%rsp), %rdi
movq %r12, %rdx
callq 0x2a7a
sarq $0x2, %rbx
addq %rbx, %r13
cmpl %ebp, %r13d
jae 0x25c6
incq 0x8(%r14)
movq (%rsp), %rax
cmpl $0x0, 0x4(%rax)
je 0x2610
xorl %ebx, %ebx
movl 0x8(%rax,%rbx,4), %ecx
movq 0x30(%r14), %rdx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x25ad
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x25b5
movq %r12, %rdx
callq 0x2a7a
incq %rbx
movq (%rsp), %rax
movl 0x4(%rax), %ecx
cmpq %rcx, %rbx
jb 0x2589
jmp 0x2610
movl $0x23, %edx
movq 0x4a1e(%rip), %rdi      # 0x6ff0
leaq 0x1a2b(%rip), %rsi      # 0x4004
callq 0x2200
movq 0x4a0b(%rip), %rcx      # 0x6ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x49ed(%rip), %rdi      # 0x6ff0
callq 0x2030
movq %rax, %rdi
callq 0x2120
cmpl %ebp, %r13d
jb 0x2512
jmp 0x2621
xorl %ebx, %ebx
jmp 0x262d
je 0x2655
xorl %ebx, %ebx
leaq 0x28(%rsp), %rdi
callq 0x29d8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2644
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4994(%rip), %rbx      # 0x6ff0
leaq 0x19c5(%rip), %rsi      # 0x4028
movl $0x25, %edx
movq %rbx, %rdi
callq 0x2200
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4962(%rip), %rdi      # 0x6ff0
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq 0x18(%r14), %rax
movb $0x1, %bl
cmpq %rax, 0x20(%r14)
movl 0x8(%rsp), %r12d
je 0x2623
movl $0x1, %ebp
xorl %r15d, %r15d
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x27d4
testb %al, %al
jne 0x26db
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
movl %r12d, %edx
callq 0x28d8
movl %ebp, %r15d
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
incl %ebp
cmpq %r15, %rcx
ja 0x26b8
jmp 0x2623
jmp 0x2706
jmp 0x2706
movq %rax, %rbx
jmp 0x2713
jmp 0x2706
jmp 0x2706
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x29d8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x272a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x2290