// File: /workspace/github_cpp_makefile_star2_O1/roberto-bayardo[P]google-extremal-sets/data-source-iterator.cc
// Function: google_extremal_sets::DataSourceIterator::NextText(unsigned int*, std::vector<unsigned int, std::allocator<unsigned int>>*)
int DataSourceIterator::NextText(uint32_t* vector_id, std::vector<uint32_t>* vec) {
  vec->clear();
  // First read the vector ID
  int scan_result = fscanf(data_, "%u", vector_id);
  if (!scan_result) {
    if (ferror(data_)) {
      error_ = "Dataset read error, ferror code=" + ToString(ferror(data_));
      return -1;
    }
    // Otherwise we're eof()
    return 0;
  }
  if (scan_result == EOF)
    return 0;

  // Now read the item ids, until we reach the "0" terminator.
  uint32_t item_id;
  while ((scan_result = fscanf(data_, "%u", &item_id)) != EOF && scan_result != 0) {
    if (item_id)
      vec->push_back(item_id);
    else {
      lines_processed_++;
      return 1;
    }
  }
  if (ferror(data_)) {
    error_ = "Dataset read error, ferror code=" + ToString(ferror(data_));
    return -1;
  }
  error_ = "Dataset format error: Final vector not properly terminated.";
  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r14
movq %rsi, %rdx
movq %rdi, %rbx
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x406a
movq %rax, 0x8(%r14)
movq (%rbx), %rdi
leaq 0x18fe(%rip), %rsi      # 0x5972
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x2290
cmpl $-0x1, %eax
je 0x4231
testl %eax, %eax
jne 0x40d2
movq (%rbx), %r14
movq %r14, %rdi
callq 0x22a0
testl %eax, %eax
je 0x4231
movq %r14, %rdi
callq 0x22a0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x3ffe
leaq 0x1861(%rip), %rcx      # 0x591c
movl $0x20, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21d0
jmp 0x4182
movq (%rbx), %rdi
leaq 0x1896(%rip), %rsi      # 0x5972
leaq 0xc(%rsp), %rdx
xorl %eax, %eax
callq 0x2290
decl %eax
cmpl $-0x3, %eax
ja 0x413f
leaq 0xc(%rsp), %r15
leaq 0x1877(%rip), %r12      # 0x5972
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x4240
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x411d
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r14)
jmp 0x4128
movq %r14, %rdi
movq %r15, %rdx
callq 0x44da
movq (%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2290
decl %eax
cmpl $-0x2, %eax
jb 0x40fb
movq (%rbx), %r14
movq %r14, %rdi
callq 0x22a0
testl %eax, %eax
je 0x420d
movq %r14, %rdi
callq 0x22a0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0x3ffe
leaq 0x17ac(%rip), %rcx      # 0x591c
movl $0x20, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21d0
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x41a9
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x41b0
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x30(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
addq $0x10, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2200
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x41f0
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21c0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x422c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x422c
movq 0x18(%rbx), %rdx
addq $0x10, %rbx
leaq 0x1759(%rip), %rcx      # 0x5975
movl $0x3b, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2240
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
incl 0x8(%rbx)
movl $0x1, %ebp
jmp 0x4231
jmp 0x424c
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x426a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2270