// File: /workspace/github_cpp_makefile_star2_O1/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 0x6490
leaq -0xf8(%rbp), %rdi
callq 0x92ae
leaq 0xf4eb(%rip), %rax      # 0x16020
movq %rax, -0xf8(%rbp)
leaq 0xf55d(%rip), %rax      # 0x160a0
movq %rax, -0xb8(%rbp)
leaq -0x210(%rbp), %rdi
movl $0x1000, %edx           # imm = 0x1000
movl $0xf, %esi
callq 0x8aa0
movq -0xb0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movq $-0x1, %rdx
movq $-0x1, %rcx
callq 0xb3d8
leaq -0x180(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ba0
movq -0x180(%rbp), %rsi
incq %rsi
callq 0x6280
leaq -0x1d0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6bbf
movq -0x1d0(%rbp), %rsi
incq %rsi
callq 0x6280
leaq -0x1f0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6bde
movq -0x1f0(%rbp), %rsi
incq %rsi
callq 0x6280
leaq -0x208(%rbp), %r14
movq %r14, %rdi
callq 0x8ca6
movq %rbx, -0x8(%r14)
movq -0xb0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movq $-0x1, %rdx
movq $-0x1, %rcx
callq 0xdc82
leaq -0x210(%rbp), %r14
leaq -0xf8(%rbp), %rsi
movq %r14, %rdi
callq 0x64b0
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 0x6250
movsbl %al, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x64a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6e74
movq %r15, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
leaq 0x83c0(%rip), %rsi      # 0xf058
leaq 0x83cf(%rip), %rdx      # 0xf06e
callq 0x8cf0
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x6440
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x6cce
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x6280
cmpq $-0x1, %rbx
je 0x6d35
movl %r12d, %eax
cltd
idivl -0x5c(%rbp)
testl %edx, %edx
jne 0x6d32
leaq -0x58(%rbp), %rdi
movq %r13, %rsi
movl $0x22, %edx
callq 0x6851
movq -0x58(%rbp), %rax
movq 0x60(%rax), %rdi
xorl %esi, %esi
callq 0x6320
movss %xmm0, -0x60(%rbp)
movq -0x30(%rbp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x6d20
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x6d29
leaq -0x60(%rbp), %rdx
callq 0x916a
leaq -0x58(%rbp), %rdi
callq 0x8a36
incl %r12d
movq %r15, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
leaq 0x832b(%rip), %rsi      # 0xf06f
leaq 0x8333(%rip), %rdx      # 0xf07e
callq 0x8cf0
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rcx
movq %r13, %rdi
xorl %edx, %edx
callq 0x6440
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x6d7a
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x6280
cmpq $-0x1, %rbx
je 0x6c51
leaq -0x58(%rbp), %rdi
movq %r13, %rsi
movl $0x22, %edx
callq 0x6851
movq -0x58(%rbp), %rsi
movl $0x520, %eax            # imm = 0x520
addq %rax, %rsi
leaq -0x98(%rbp), %rdi
movl $0x2f, %edx
callq 0x6851
movq -0x98(%rbp), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x6320
movss %xmm0, -0x34(%rbp)
movq -0x98(%rbp), %rax
movq 0x20(%rax), %rdi
xorl %esi, %esi
callq 0x6320
movss -0x34(%rbp), %xmm1
divss %xmm0, %xmm1
movss %xmm1, -0x34(%rbp)
movss 0x10488(%rip), %xmm0    # 0x17278
ucomiss 0x820d(%rip), %xmm0     # 0xf004
jne 0x6dfb
jnp 0x6e4d
ucomiss -0x34(%rbp), %xmm0
jne 0x6e03
jnp 0x6e4d
movl $0x1b, %edx
movq 0x10199(%rip), %rdi     # 0x16fa8
leaq 0x8269(%rip), %rsi      # 0xf07f
callq 0x62d0
movq 0x10186(%rip), %rcx     # 0x16fa8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x6250
movsbl %al, %esi
movq 0x10168(%rip), %rdi     # 0x16fa8
callq 0x6030
movq %rax, %rdi
callq 0x6190
movss -0x34(%rbp), %xmm0
movss %xmm0, 0x1041e(%rip)    # 0x17278
leaq -0x98(%rbp), %rdi
callq 0x8a36
leaq -0x58(%rbp), %rdi
callq 0x8a36
jmp 0x6c51
leaq -0x418(%rbp), %rdi
callq 0x6060
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
movq -0x30(%rbp), %rbx
je 0x6e9d
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x6280
movq 0x1011c(%rip), %rax     # 0x16fc0
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 0x60c0
leaq -0xf8(%rbp), %rdi
callq 0x8be6
leaq -0x418(%rbp), %rdi
callq 0x6080
movq %rbx, %rax
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6f4f
jmp 0x6f16
jmp 0x6f16
movq %rax, %rbx
leaq -0x210(%rbp), %rdi
callq 0x8b7c
jmp 0x6fb5
movq %rax, %rbx
jmp 0x6fb5
movq %rax, %rbx
jmp 0x6fc1
jmp 0x6f2c
jmp 0x6f4f
jmp 0x6f4f
movq %rax, %rbx
jmp 0x6f44
jmp 0x6f4f
jmp 0x6f4f
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x8a36
leaq -0x58(%rbp), %rdi
callq 0x8a36
jmp 0x6f52
movq %rax, %rbx
movq -0x30(%rbp), %rax
leaq -0x70(%rbp), %r14
movq (%rax), %rdi
testq %rdi, %rdi
je 0x6f6e
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x6280
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x6f83
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x6280
movq 0x10036(%rip), %rax     # 0x16fc0
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 0x60c0
leaq -0xf8(%rbp), %rdi
callq 0x8be6
leaq -0x418(%rbp), %rdi
callq 0x6080
movq %rbx, %rdi
callq 0x6450