// File: /workspace/github_cpp_makefile_star2_O3/NFAcz[P]compareQC/main.cpp
// Function: load(char const*, int)
std::vector<float> load(const char *filename, const int jump){

  std::ifstream file(filename, std::ios_base::in | std::ios_base::binary);
  boost::iostreams::filtering_streambuf<boost::iostreams::input> inbuf;
  inbuf.push(boost::iostreams::gzip_decompressor());
  inbuf.push(file);

  std::istream instream(&inbuf);

  float Y;
  std::string line;
  std::vector<float> tmp;

  int counter = 0;

  while(std::getline(instream, line)) {

    if(is_match(line,"lavfi.signalstats.YAVG")){
      if(counter%jump==0){
        std::vector<string> ttmp = split(line,'\"');
        Y = float(strtof(ttmp[3].c_str(),NULL));
        tmp.push_back(Y);
      }
      counter++;
    }

    if(is_match(line,"stream index=\"0")){
      std::vector<string> ttmp = split(line,'\"');
      std::vector<string> fracc = split(ttmp[41],'/'); // some older versions the index is 39!
      float frac = float(strtof(fracc[0].c_str(),NULL)) / float(strtof(fracc[1].c_str(),NULL)) ;
      if(FPS!=-1 && FPS!=frac){
        std::cout << "warning source FPS differs!" << std::endl;
      }
      FPS = frac;

    }
  }
  file.close();

  return tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movl %edx, -0x5c(%rbp)
movq %rdi, %r15
leaq -0x418(%rbp), %rbx
movq %rbx, %rdi
movl $0xc, %edx
callq 0x5490
leaq -0xf8(%rbp), %rdi
callq 0x81ec
leaq 0xe64b(%rip), %rax      # 0x14170
movq %rax, -0xf8(%rbp)
leaq 0xe6bd(%rip), %rax      # 0x141f0
movq %rax, -0xb8(%rbp)
leaq -0x210(%rbp), %rdi
movl $0x1000, %edx           # imm = 0x1000
movl $0xf, %esi
callq 0x79f4
movq -0xb0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movq $-0x1, %rdx
movq $-0x1, %rcx
callq 0xa268
leaq -0x180(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5b90
movq -0x180(%rbp), %rsi
incq %rsi
callq 0x5280
leaq -0x1d0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5baf
movq -0x1d0(%rbp), %rsi
incq %rsi
callq 0x5280
leaq -0x1f0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5bce
movq -0x1f0(%rbp), %rsi
incq %rsi
callq 0x5280
leaq -0x208(%rbp), %r14
movq %r14, %rdi
callq 0x7bfa
movq %rbx, -0x8(%r14)
movq -0xb0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movq $-0x1, %rdx
movq $-0x1, %rcx
callq 0xcaae
leaq -0x210(%rbp), %r14
leaq -0xf8(%rbp), %rsi
movq %r14, %rdi
callq 0x54b0
leaq -0x70(%rbp), %rax
movq %rax, -0x10(%rax)
xorl %r12d, %r12d
movq %r12, -0x8(%rax)
movb $0x0, (%rax)
movq %r12, 0x10(%r15)
xorps %xmm0, %xmm0
movq %r15, -0x30(%rbp)
movups %xmm0, (%r15)
leaq -0x48(%rbp), %r15
leaq -0x80(%rbp), %r13
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5250
movsbl %al, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x54a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5e64
movq %r15, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
leaq 0x83d0(%rip), %rsi      # 0xe058
leaq 0x83df(%rip), %rdx      # 0xe06e
callq 0x7c44
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x5440
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x5cbe
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x5280
cmpq $-0x1, %rbx
je 0x5d25
movl %r12d, %eax
cltd
idivl -0x5c(%rbp)
testl %edx, %edx
jne 0x5d22
leaq -0x58(%rbp), %rdi
movq %r13, %rsi
movl $0x22, %edx
callq 0x5841
movq -0x58(%rbp), %rax
movq 0x60(%rax), %rdi
xorl %esi, %esi
callq 0x5320
movss %xmm0, -0x60(%rbp)
movq -0x30(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x5d10
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x5d19
leaq -0x60(%rbp), %rdx
callq 0x80a8
leaq -0x58(%rbp), %rdi
callq 0x7986
incl %r12d
movq %r15, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
leaq 0x833b(%rip), %rsi      # 0xe06f
leaq 0x8343(%rip), %rdx      # 0xe07e
callq 0x7c44
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x5440
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x5d6a
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x5280
cmpq $-0x1, %rbx
je 0x5c41
leaq -0x58(%rbp), %rdi
movq %r13, %rsi
movl $0x22, %edx
callq 0x5841
movq -0x58(%rbp), %rsi
movl $0x520, %eax            # imm = 0x520
addq %rax, %rsi
leaq -0x98(%rbp), %rdi
movl $0x2f, %edx
callq 0x5841
movq -0x98(%rbp), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x5320
movss %xmm0, -0x34(%rbp)
movq -0x98(%rbp), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x5320
movss -0x34(%rbp), %xmm1
divss %xmm0, %xmm1
movss %xmm1, -0x34(%rbp)
movss 0xf498(%rip), %xmm0     # 0x15278
ucomiss 0x821d(%rip), %xmm0     # 0xe004
jne 0x5deb
jnp 0x5e3d
ucomiss -0x34(%rbp), %xmm0
jne 0x5df3
jnp 0x5e3d
movl $0x1b, %edx
movq 0xf1a9(%rip), %rdi      # 0x14fa8
leaq 0x8279(%rip), %rsi      # 0xe07f
callq 0x52d0
movq 0xf196(%rip), %rcx      # 0x14fa8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x5250
movsbl %al, %esi
movq 0xf178(%rip), %rdi      # 0x14fa8
callq 0x5030
movq %rax, %rdi
callq 0x5190
movss -0x34(%rbp), %xmm0
movss %xmm0, 0xf42e(%rip)     # 0x15278
leaq -0x98(%rbp), %rdi
callq 0x7986
leaq -0x58(%rbp), %rdi
callq 0x7986
jmp 0x5c41
leaq -0x418(%rbp), %rdi
callq 0x5060
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
movq -0x30(%rbp), %rbx
je 0x5e8d
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x5280
movq 0xf12c(%rip), %rax      # 0x14fc0
movq (%rax), %rcx
movq 0x8(%rax), %rax
leaq -0x200(%rbp), %rdi
movq %rcx, -0x10(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x210(%rbp,%rcx)
movq $0x0, -0x8(%rdi)
callq 0x50c0
leaq -0xf8(%rbp), %rdi
callq 0x7b3a
leaq -0x418(%rbp), %rdi
callq 0x5080
movq %rbx, %rax
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5f3f
jmp 0x5f06
jmp 0x5f06
movq %rax, %rbx
leaq -0x210(%rbp), %rdi
callq 0x7ad0
jmp 0x5fa5
movq %rax, %rbx
jmp 0x5fa5
movq %rax, %rbx
jmp 0x5fb1
jmp 0x5f1c
jmp 0x5f3f
jmp 0x5f3f
movq %rax, %rbx
jmp 0x5f34
jmp 0x5f3f
jmp 0x5f3f
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x7986
leaq -0x58(%rbp), %rdi
callq 0x7986
jmp 0x5f42
movq %rax, %rbx
movq -0x30(%rbp), %rax
leaq -0x70(%rbp), %r14
movq (%rax), %rdi
testq %rdi, %rdi
je 0x5f5e
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x5280
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x5f73
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x5280
movq 0xf046(%rip), %rax      # 0x14fc0
movq (%rax), %rcx
movq 0x8(%rax), %rax
leaq -0x200(%rbp), %rdi
movq %rcx, -0x10(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x210(%rbp,%rcx)
movq $0x0, -0x8(%rdi)
callq 0x50c0
leaq -0xf8(%rbp), %rdi
callq 0x7b3a
leaq -0x418(%rbp), %rdi
callq 0x5080
movq %rbx, %rdi
callq 0x5450