// File: /workspace/github_cpp_makefile_star2_O3/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, %ebp
movl %ecx, 0x18(%rsp)
movq %rsi, %r15
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %ebx, %ebx
movq %rbx, 0x10(%rdi)
movq %rbx, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
xorl %ecx, %ecx
callq 0x273a
testb %al, %al
je 0x26e3
movl %ebp, 0x14(%rsp)
leaq 0x18(%r14), %rax
movq %rax, 0x40(%rsp)
movq %rax, 0x38(%rsp)
xorl %r13d, %r13d
leaq 0x20(%rsp), %rbx
leaq 0x8(%rsp), %r12
movq %r15, %rdi
leaq 0x1c(%rsp), %rsi
movq %rbx, %rdx
callq 0x3420
testl %eax, %eax
jle 0x25d3
movl 0x1c(%rsp), %edi
movq %rbx, %rsi
callq 0x3ef0
movq 0x28(%rsp), %rbp
subq 0x20(%rsp), %rbp
movq %rax, 0x8(%rsp)
movq 0x20(%r14), %rsi
cmpq 0x28(%r14), %rsi
je 0x2562
movq %rax, (%rsi)
addq $0x8, 0x20(%r14)
jmp 0x256f
movq 0x40(%rsp), %rdi
movq %r12, %rdx
callq 0x2a58
sarq $0x2, %rbp
addq %rbp, %r13
cmpl 0x18(%rsp), %r13d
jae 0x267a
incq 0x8(%r14)
movq 0x8(%rsp), %rax
cmpl $0x0, 0x4(%rax)
je 0x251b
xorl %ebp, %ebp
movl 0x8(%rax,%rbp,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 0x25b6
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0x25be
movq %r12, %rdx
callq 0x2a58
incq %rbp
movq 0x8(%rsp), %rax
movl 0x4(%rax), %ecx
cmpq %rcx, %rbp
jb 0x2592
jmp 0x251b
jne 0x26c0
movq 0x4a10(%rip), %rbx      # 0x6ff0
leaq 0x1a41(%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 0x49de(%rip), %rdi      # 0x6ff0
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq 0x18(%r14), %rax
movb $0x1, %bl
cmpq %rax, 0x20(%r14)
movl 0x14(%rsp), %r12d
je 0x26c2
movl $0x1, %ebp
xorl %r15d, %r15d
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x27cc
testb %al, %al
jne 0x265f
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
movl %r12d, %edx
callq 0x28b6
movl %ebp, %r15d
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
incl %ebp
cmpq %r15, %rcx
ja 0x263c
jmp 0x26c2
movq 0x496f(%rip), %rbx      # 0x6ff0
leaq 0x197c(%rip), %rsi      # 0x4004
movl $0x23, %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 0x493d(%rip), %rdi      # 0x6ff0
callq 0x2030
movq %rax, %rdi
callq 0x2120
xorl %ebx, %ebx
leaq 0x38(%rsp), %rdi
callq 0x29b6
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x26e3
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x26fe
jmp 0x26fe
jmp 0x26fe
jmp 0x26fe
jmp 0x26fe
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x29b6
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2722
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x2290