LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/willprice[P]parallel-cpp-workshop/include/filecounter.h
// Function: filecounter::count_lines(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int count_lines(const std::string &filename)
{
    std::ifstream file( filename );

    int nlines = 0;

    std::string str;
    while (std::getline(file, str))
    {
        nlines += 1;
    }

    return nlines;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rdi, %rsi
leaq 0x28(%rsp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x1140
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %ebx, %ebx
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x1030
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1320
incl %ebx
jmp 0x1303
leaq 0x8(%rsp), %rdi
callq 0x1080
leaq 0x28(%rsp), %rdi
callq 0x1040
movl %ebx, %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1080
leaq 0x28(%rsp), %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x1160
// File: /workspace/github_cpp_makefile_star2_O2/willprice[P]parallel-cpp-workshop/include/filecounter.h
// Function: filecounter::get_arguments[abi:cxx11](int, char**)
std::vector<std::string> get_arguments(int argc, char **argv)
{
    if (argc < 2)
    {
        return std::vector<std::string>();
    }

    auto args = std::vector<std::string>(argc-1);

    for (int i=1; i<argc; ++i)
    {
        args[i-1] = argv[i];
    }

    return args;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x1, %esi
jg 0x138c
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdx, %r14
movl %esi, %r15d
leal -0x1(%r15), %esi
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
callq 0x1626
movl %r15d, %r15d
shlq $0x5, %r15
addq $-0x20, %r15
addq $0x8, %r14
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x137d
movq (%r14), %rsi
movq (%rbx), %rdi
addq %r12, %rdi
callq 0x1170
addq $0x20, %r12
addq $0x8, %r14
jmp 0x13b5
movq %rax, %r14
movq %rbx, %rdi
callq 0x1678
movq %r14, %rdi
callq 0x1160
// File: /workspace/github_cpp_makefile_star2_O2/willprice[P]parallel-cpp-workshop/countlines.cpp
// Function: main
int main(int argc, char** argv) {
    auto file_paths = get_arguments(argc, argv);
    auto line_counts = map(count_lines, file_paths);
    auto total_line_count = reduce([](int a, int b) { return a + b; }, line_counts);
    std::cout << "Total line count: " << total_line_count << std::endl;
    for (int i = 0; i < file_paths.size(); i++) {
        std::cout << file_paths[i] << ": " << line_counts[i] << std::endl;
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rdx
movl %edi, %esi
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x1362
leaq -0x254(%rip), %rsi      # 0x12cc
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x16f4
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq %rcx, %rax
je 0x1555
movl (%rax), %ebx
subq %rax, %rcx
sarq $0x2, %rcx
pushq $0x1
popq %rdx
cmpq %rcx, %rdx
jae 0x1557
addl (%rax,%rdx,4), %ebx
incq %rdx
jmp 0x1548
xorl %ebx, %ebx
movq 0x2a7a(%rip), %rdi      # 0x3fd8
leaq 0xadb(%rip), %rsi       # 0x2040
callq 0x1100
movq %rax, %rdi
movl %ebx, %esi
callq 0x1150
movq %rax, %rdi
callq 0x1090
xorl %r15d, %r15d
movq 0x2a52(%rip), %rbx      # 0x3fd8
leaq 0xac3(%rip), %r14       # 0x2050
xorl %r12d, %r12d
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x15de
addq %r15, %rsi
movq %rbx, %rdi
callq 0x10f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x1100
movq 0x8(%rsp), %rcx
movl (%rcx,%r12,4), %esi
movq %rax, %rdi
callq 0x1150
movq %rax, %rdi
callq 0x1090
incq %r12
addq $0x20, %r15
jmp 0x1590
leaq 0x8(%rsp), %rdi
callq 0x1818
leaq 0x20(%rsp), %rdi
callq 0x1678
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x1614
jmp 0x1607
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1818
leaq 0x20(%rsp), %rdi
callq 0x1678
movq %rbx, %rdi
callq 0x1160
// File: /workspace/github_cpp_makefile_star2_O2/willprice[P]parallel-cpp-workshop/include/part1.h
// Function: auto part1::map<int (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(int (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
auto map(FUNC func, const std::vector<ARGS>&... args)
{
    typedef typename std::result_of<FUNC(ARGS...)>::type RETURN_TYPE;

    int nvals=detail::get_min_container_size(args...);

    std::vector<RETURN_TYPE> result(nvals);

    for (size_t i=0; i<nvals; ++i)
    {
        result[i] = func(args[i]...);
    }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdx), %rax
subq (%rdx), %rax
shrq $0x5, %rax
movslq %eax, %r12
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r12, %rsi
callq 0x179a
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x174f
movq (%r14), %rdi
addq %r13, %rdi
callq *%r15
movq 0x10(%rsp), %rcx
movl %eax, (%rcx,%rbp,4)
incq %rbp
addq $0x20, %r13
jmp 0x1730
leaq 0x10(%rsp), %rdi
movaps (%rdi), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rdi), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0x1818
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1818
movq %rbx, %rdi
callq 0x1160
nop
// File: /workspace/github_cpp_makefile_star2_O2/Mariotti94[P]BigFloat/./BigFloat.h
// Function: BigFloat::GetError[abi:cxx11]() const
inline std::string GetError() const
    {
        if(error)
            return error_code;
        else
            return "No Error";
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x5c(%rsi)
jne 0x3472
addq $0x60, %rsi
movq %rbx, %rdi
callq 0x21c0
jmp 0x3486
leaq 0x6d1e(%rip), %rsi      # 0xa197
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x2060
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/src/test-case/unit.cpp
// Function: testMetricMultipliers(std::ostream&)
bool testMetricMultipliers(std::ostream &log) {
  if (metricMultiplier<fraction, 1, 1>::get() != fraction(10)) {
    log << "metric multiplier <1,1> is "
        << metricMultiplier<fraction, 1, 1>::get()
        << " but should have been 10/1\n";
    return false;
  }

  if (metricMultiplier<fraction, 1, 2>::get() != fraction(100)) {
    log << "metric multiplier <1,2> is "
        << metricMultiplier<fraction, 1, 2>::get()
        << " but should have been 100/1\n";
    return false;
  }

  if (metricMultiplier<fraction, 0, 2>::get() != fraction(1)) {
    log << "metric multiplier <0,2> is "
        << metricMultiplier<fraction, 0, 2>::get()
        << " but should have been 1/1\n";
    return false;
  }

  if (metricMultiplier<fraction, 3, 2>::get() != fraction(1000000)) {
    log << "metric multiplier <3,2> is "
        << metricMultiplier<fraction, 3, 2>::get()
        << " but should have been 1000000/1\n";
    return false;
  }

  if (metricMultiplier<fraction, 3, 3>::get() != fraction(1000000000)) {
    log << "metric multiplier <3,3> is "
        << metricMultiplier<fraction, 3, 3>::get()
        << " but should have been 1000000000/1\n";
    return false;
  }

  return true;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x53f2
xorq $0x64, %rax
xorq $0x1, %rdx
orq %rax, %rdx
jne 0x4c6b
callq 0x5414
xorq $0xf4240, %rax          # imm = 0xF4240
xorq $0x1, %rdx
orq %rax, %rdx
jne 0x4c9d
callq 0x5436
movq %rax, %rcx
xorq $0x3b9aca00, %rcx       # imm = 0x3B9ACA00
xorq $0x1, %rdx
movb $0x1, %al
orq %rcx, %rdx
je 0x4cd7
leaq 0xe7bb(%rip), %rsi      # 0x133fb
movq %rbx, %rdi
callq 0x4270
movq %rax, %rbx
callq 0x5436
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %rbx, %rdi
callq 0x53ca
leaq 0xe7ae(%rip), %rsi      # 0x13417
jmp 0x4ccd
leaq 0xe713(%rip), %rsi      # 0x13385
movq %rbx, %rdi
callq 0x4270
movq %rax, %rbx
callq 0x53f2
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %rbx, %rdi
callq 0x53ca
leaq 0xe706(%rip), %rsi      # 0x133a1
jmp 0x4ccd
leaq 0xe71a(%rip), %rsi      # 0x133be
movq %rbx, %rdi
callq 0x4270
movq %rax, %rbx
callq 0x5414
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %rbx, %rdi
callq 0x53ca
leaq 0xe70d(%rip), %rsi      # 0x133da
movq %rax, %rdi
callq 0x4270
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/src/test-case/unit.cpp
// Function: testUnitEMetric(std::ostream&)
bool testUnitEMetric(std::ostream &log) {
  second<fraction, 2>::unit s2_5_7(fraction(5, 7));

  if (fraction(5, 7) != fraction(s2_5_7)) {
    log << "variable was not initialised to the expected value\n";
    return false;
  }

  second<fraction, 2>::milli ms2_5_7 = s2_5_7;

  if (fraction(5000000, 7) != ms2_5_7) {
    log << "variable was not converted to the expected value\n";
    return false;
  }

  second<fraction, -2>::unit si2_5_7(fraction(5, 7));

  if (fraction(5, 7) != fraction(si2_5_7)) {
    log << "variable was not initialised to the expected value\n";
    return false;
  }

  second<fraction, -2>::milli msi2_5_7 = si2_5_7;

  if (fraction(5, 7000000) != msi2_5_7) {
    log << "variable was not converted to the expected value\n";
    return false;
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
pushq $0x5
popq %r12
leaq 0x20(%rsp), %r14
movq %r12, (%r14)
pushq $0x7
popq %r13
movq %r13, 0x8(%r14)
movq %r14, %rdi
callq 0x11f0e
movups (%r14), %xmm0
movaps %xmm0, 0x30(%rsp)
movq %r12, (%r14)
movq %r13, 0x8(%r14)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x11f0e
movq (%r14), %rax
cmpq 0x30(%rsp), %rax
jne 0x4e15
movq 0x38(%rsp), %rax
cmpq %rax, 0x28(%rsp)
jne 0x4e15
leaq 0x20(%rsp), %r14
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x5458
movq %rsp, %r15
movq $0x4c4b40, (%r15)       # imm = 0x4C4B40
movq $0x7, 0x8(%r15)
movq %r15, %rdi
callq 0x11f0e
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x4e1e
movq 0x8(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x4e1e
leaq 0x10(%rsp), %r14
movq %r12, (%r14)
movq %r13, 0x8(%r14)
movq %r14, %rdi
callq 0x11f0e
movups (%r14), %xmm0
movaps %xmm0, (%rsp)
movq %r12, (%r14)
movq %r13, 0x8(%r14)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x11f0e
movq (%r14), %rax
cmpq (%rsp), %rax
jne 0x4e15
movq 0x8(%rsp), %rax
cmpq %rax, 0x18(%rsp)
jne 0x4e15
leaq 0x10(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x547c
leaq 0x40(%rsp), %r15
movq $0x5, (%r15)
movq $0x6acfc0, 0x8(%r15)    # imm = 0x6ACFC0
movq %r15, %rdi
callq 0x11f0e
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x4e1e
movq 0x48(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x4e1e
movb $0x1, %al
jmp 0x4e2f
leaq 0xe61f(%rip), %rsi      # 0x1343b
jmp 0x4e25
leaq 0xe64a(%rip), %rsi      # 0x1346f
movq %rbx, %rdi
callq 0x4270
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/src/test-case/unit.cpp
// Function: testUnitBinary(std::ostream&)
bool testUnitBinary(std::ostream &log) {
  byte<fraction>::kibi kib_2(fraction(2));

  if (fraction(2) != fraction(kib_2)) {
    log << "variable was not initialised to the expected value: " << kib_2
        << " instead of 2/1\n";
    return false;
  }

  byte<fraction>::unit b_2 = kib_2;

  if (fraction(2048) != b_2) {
    log << "variable was not converted to the expected value: " << b_2
        << " instead of 2048/1\n";
    return false;
  }

  byte<fraction>::mebi mib_2 = kib_2;

  if (fraction(1, 512) != mib_2) {
    log << "variable was not converted to the expected value: " << mib_2
        << " instead of 1/512\n";
    return false;
  }

  byte<fraction>::kilo kb_2 = kib_2;

  if (fraction(256, 125) != kb_2) {
    log << "variable was not converted to the expected value: " << kb_2
        << " instead of 256/125\n";
    return false;
  }

  byte<fraction>::mega mb_2 = kib_2;

  if (fraction(32, 15625) != mb_2) {
    log << "variable was not converted to the expected value: " << mb_2
        << " instead of 32/15625\n";
    return false;
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq $0x2, (%rsi)
movq $0x1, 0x8(%rsi)
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x54a0
cmpq $0x800, (%r14)          # imm = 0x800
jne 0x4f61
cmpq $0x1, 0x48(%rsp)
jne 0x4f61
leaq 0x30(%rsp), %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x54c6
leaq 0x10(%rsp), %r15
movq $0x1, (%r15)
movq $0x200, 0x8(%r15)       # imm = 0x200
movq %r15, %rdi
callq 0x11f0e
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x4f86
movq 0x18(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x4f86
leaq 0x10(%rsp), %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x54ea
movq %rsp, %r15
movq $0x100, (%r15)          # imm = 0x100
movq $0x7d, 0x8(%r15)
movq %r15, %rdi
callq 0x11f0e
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x4fbd
movq 0x8(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x4fbd
movq %rsp, %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x556c
leaq 0x50(%rsp), %r15
movq $0x20, (%r15)
movq $0x3d09, 0x8(%r15)      # imm = 0x3D09
movq %r15, %rdi
callq 0x11f0e
movq (%r15), %rax
cmpq (%r14), %rax
jne 0x4fe2
movq 0x58(%rsp), %rax
cmpq 0x8(%rsp), %rax
jne 0x4fe2
movb $0x1, %al
jmp 0x4fb3
leaq 0xe539(%rip), %rsi      # 0x134a1
movq %rbx, %rdi
callq 0x4270
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x53ca
leaq 0xe550(%rip), %rsi      # 0x134d4
jmp 0x4fa9
leaq 0xe514(%rip), %rsi      # 0x134a1
movq %rbx, %rdi
callq 0x4270
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x53ca
leaq 0xe53f(%rip), %rsi      # 0x134e8
movq %rax, %rdi
callq 0x4270
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xe4dd(%rip), %rsi      # 0x134a1
movq %rbx, %rdi
callq 0x4270
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x53ca
leaq 0xe51b(%rip), %rsi      # 0x134fb
jmp 0x4fa9
leaq 0xe4b8(%rip), %rsi      # 0x134a1
movq %rbx, %rdi
callq 0x4270
movq %rsp, %rsi
movq %rax, %rdi
callq 0x53ca
leaq 0xe50d(%rip), %rsi      # 0x13510
jmp 0x4fa9
nop
// File: /workspace/github_cpp_makefile_star2_O2/ef-gy[P]libefgy/include/ef.gy/units.h
// Function: efgy::unit::exponentialScaledUnitValue<efgy::unit::unitValue<efgy::math::numeric::fractional<long long>, (char)109, 1>, 3, efgy::unit::metricMultiplier>::convert(efgy::math::numeric::fractional<long long> const&)
static base convert(const base &value) {
    return ((exponent * unitExponent) <= 0) ? value * multiplier < base,
           exponent < 0 ? -exponent : exponent,
           unitExponent < 0 ? -unitExponent : unitExponent > ::get()
                                            : value / multiplier < base,
           exponent < 0 ? -exponent : exponent,
           unitExponent < 0 ? -unitExponent : unitExponent > ::get();
  }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x11df8
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %rbx, %rdi
callq 0x11e1a
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]HM3/include/stringimploder.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> StringImploder::operator()<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, char)
std::string operator() (const CONTAINER &container, char const delimiter){
		std::stringstream ss;

		bool first = true;

		for(const auto &s : container){
			if (first){
				first = false;
			}else{
				ss.put(delimiter);
			}

			ss << s;
		}

		return ss.str();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movl %ecx, %ebp
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x10c0
movq (%r15), %r14
movq 0x8(%r15), %r12
movb $0x1, %al
leaq 0x18(%rsp), %r15
movsbl %bpl, %ebp
cmpq %r12, %r14
je 0x1641
testb $0x1, %al
jne 0x162e
movq %r15, %rdi
movl %ebp, %esi
callq 0x1030
movq %r15, %rdi
movq %r14, %rsi
callq 0x10f0
addq $0x20, %r14
xorl %eax, %eax
jmp 0x161b
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1140
leaq 0x8(%rsp), %rdi
callq 0x10d0
movq %rbx, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x166d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x10d0
movq %rbx, %rdi
callq 0x1160
// File: /workspace/github_cpp_makefile_star2_O2/RasmusFonseca[P]PDBCluster/Matrix.cpp
// Function: Matrix::get(int, int) const
double Matrix::get(int i,int j) const{
    assert ( i>=0 );
    assert ( i<m );
    assert ( j>=0 );
    assert ( j<n );
    return data[j*m+i];
}

// Assembly:
pushq %rax
testl %esi, %esi
js 0x2582
movl 0x8(%rdi), %eax
cmpl %esi, %eax
jle 0x259b
testl %edx, %edx
js 0x25b4
cmpl %edx, 0xc(%rdi)
jle 0x25cd
movq (%rdi), %rcx
imull %edx, %eax
addl %esi, %eax
movsd (%rcx,%rax,8), %xmm0
popq %rax
retq
leaq 0x2a7b(%rip), %rdi      # 0x5004
leaq 0x2a79(%rip), %rsi      # 0x5009
leaq 0x2a7d(%rip), %rcx      # 0x5014
pushq $0x2f
jmp 0x25e4
leaq 0x2a95(%rip), %rdi      # 0x5037
leaq 0x2a60(%rip), %rsi      # 0x5009
leaq 0x2a64(%rip), %rcx      # 0x5014
pushq $0x30
jmp 0x25e4
leaq 0x2a80(%rip), %rdi      # 0x503b
leaq 0x2a47(%rip), %rsi      # 0x5009
leaq 0x2a4b(%rip), %rcx      # 0x5014
pushq $0x31
jmp 0x25e4
leaq 0x2a6c(%rip), %rdi      # 0x5040
leaq 0x2a2e(%rip), %rsi      # 0x5009
leaq 0x2a32(%rip), %rcx      # 0x5014
pushq $0x32
popq %rdx
callq 0x2150
// File: /workspace/github_cpp_makefile_star2_O2/RasmusFonseca[P]PDBCluster/Matrix.cpp
// Function: Matrix::set(int, int, double)
void Matrix::set(int i,int j, double v){
    assert ( i>=0 );
    assert ( i<m );
    assert ( j>=0 );
    assert ( j<n );
    data[j*m+i] = v;
}

// Assembly:
pushq %rax
testl %esi, %esi
js 0x260e
movl 0x8(%rdi), %eax
cmpl %esi, %eax
jle 0x2627
testl %edx, %edx
js 0x2640
cmpl %edx, 0xc(%rdi)
jle 0x2659
movq (%rdi), %rcx
imull %edx, %eax
addl %esi, %eax
movsd %xmm0, (%rcx,%rax,8)
popq %rax
retq
leaq 0x29ef(%rip), %rdi      # 0x5004
leaq 0x29ed(%rip), %rsi      # 0x5009
leaq 0x2a21(%rip), %rcx      # 0x5044
pushq $0x37
jmp 0x2670
leaq 0x2a09(%rip), %rdi      # 0x5037
leaq 0x29d4(%rip), %rsi      # 0x5009
leaq 0x2a08(%rip), %rcx      # 0x5044
pushq $0x38
jmp 0x2670
leaq 0x29f4(%rip), %rdi      # 0x503b
leaq 0x29bb(%rip), %rsi      # 0x5009
leaq 0x29ef(%rip), %rcx      # 0x5044
pushq $0x39
jmp 0x2670
leaq 0x29e0(%rip), %rdi      # 0x5040
leaq 0x29a2(%rip), %rsi      # 0x5009
leaq 0x29d6(%rip), %rcx      # 0x5044
pushq $0x3a
popq %rdx
callq 0x2150
// File: /workspace/github_cpp_makefile_star2_O2/RasmusFonseca[P]PDBCluster/Matrix.cpp
// Function: Matrix::getDifferenceSum(Matrix*)
double Matrix::getDifferenceSum(Matrix* A)
{
    assert(m==A->m);
    assert(n==A->n);
	double ret = 0;
    for(int i=0;i<m*n;i++){
        double diff = data[i]-A->data[i];
        ret+=diff*diff;
    }
    return sqrt(ret/(m*n));
}

// Assembly:
pushq %rax
movl 0x8(%rdi), %ecx
cmpl 0x8(%rsi), %ecx
jne 0x26db
movl 0xc(%rdi), %eax
cmpl 0xc(%rsi), %eax
jne 0x26f4
imull %ecx, %eax
movq (%rdi), %rcx
xorl %edx, %edx
testl %eax, %eax
movl $0x0, %edi
cmovgl %eax, %edi
xorpd %xmm0, %xmm0
cmpq %rdx, %rdi
je 0x26bd
movsd (%rcx,%rdx,8), %xmm1
movq (%rsi), %r8
subsd (%r8,%rdx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rdx
jmp 0x269d
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x26d5
sqrtsd %xmm0, %xmm0
popq %rax
retq
popq %rax
jmp 0x2180
leaq 0x2985(%rip), %rdi      # 0x5067
leaq 0x2920(%rip), %rsi      # 0x5009
leaq 0x297f(%rip), %rcx      # 0x506f
pushq $0x40
jmp 0x270b
leaq 0x299e(%rip), %rdi      # 0x5099
leaq 0x2907(%rip), %rsi      # 0x5009
leaq 0x2966(%rip), %rcx      # 0x506f
pushq $0x41
popq %rdx
callq 0x2150
// File: /workspace/github_cpp_makefile_star2_O2/RasmusFonseca[P]PDBCluster/Matrix.cpp
// Function: operator<<(std::ostream&, Matrix const&)
ostream& operator<<(ostream& os, const Matrix& m){
	for (unsigned int i=0; i<m.rows(); ++i) {
		for (unsigned int j=0; j<m.cols(); ++j){
            os << m.get(i,j);
			if(j == (m.cols()-1))
                os << endl;
			else
                os << '\t';
		}
	}
	return os;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %ebp, %ebp
pushq $0x9
popq %r15
cmpl 0x8(%r14), %ebp
jae 0x276f
xorl %r12d, %r12d
cmpl 0xc(%r14), %r12d
jae 0x276b
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x255e
movq %rbx, %rdi
callq 0x22c0
movl 0xc(%r14), %eax
decl %eax
movq %rbx, %rdi
cmpl %eax, %r12d
jne 0x275e
callq 0x2110
jmp 0x2766
movl %r15d, %esi
callq 0x2200
incl %r12d
jmp 0x272e
incl %ebp
jmp 0x2725
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/RasmusFonseca[P]PDBCluster/main.cpp
// Function: medoidCosts_distSum(std::vector<int, std::allocator<int>>&, Matrix&)
double medoidCosts_distSum(vector<int> &medoids, Matrix &dMat){
	double ret = 0;
	for(unsigned int i=0;i<dMat.cols();i++){
		double min = 1000000000.0;

		for(unsigned int j=0;j<medoids.size();j++){
			int m = medoids[j];
			double d = dMat.get(m,i);
			if( d<min ) min = d;
		}
		ret+=min;
	}
	return ret/dMat.cols();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x255a
cmpl %eax, %ebp
jae 0x2f7e
xorl %eax, %eax
movsd 0x2178(%rip), %xmm1     # 0x50a8
movl %eax, %r15d
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
jbe 0x2f6a
movl (%rax,%r15,4), %esi
movq %rbx, %rdi
movl %ebp, %edx
movsd %xmm1, 0x10(%rsp)
callq 0x255e
minsd 0x10(%rsp), %xmm0
leal 0x1(%r15), %eax
movapd %xmm0, %xmm1
jmp 0x2f30
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
incl %ebp
jmp 0x2f1a
movq %rbx, %rdi
callq 0x255a
movl %eax, %eax
cvtsi2sd %rax, %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/RasmusFonseca[P]PDBCluster/main.cpp
// Function: medoidCosts_maxDistSum(std::vector<int, std::allocator<int>>&, Matrix&)
double medoidCosts_maxDistSum(vector<int> &medoids, Matrix &dMat){
	double maxDists[medoids.size()];
	for(unsigned int i=0;i<medoids.size(); i++) maxDists[i] = 0;

	for(unsigned int i=0;i<dMat.cols();i++){
		double min = 1000000000.0;
		int minMedoid = -1;

		for(unsigned int j=0;j<medoids.size();j++){
			int m = medoids[j];
			double d = dMat.get(m,i);
			if( d<min ) {
				min = d;
				minMedoid = j;
			}
		}
		if(min>maxDists[minMedoid]) maxDists[minMedoid] = min;
	}
	double ret = 0;
	for(unsigned int j=0;j<medoids.size();j++)
		ret+=maxDists[j];
	return ret/medoids.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
subq (%rdi), %rax
movq %rsi, %r14
leaq 0xf(,%rax,2), %rcx
sarq $0x2, %rax
andq $-0x10, %rcx
movq %rsp, %r12
subq %rcx, %r12
movq %r12, %rsp
xorl %ecx, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x2feb
andq $0x0, (%r12,%rcx,8)
incl %ecx
jmp 0x2fdb
xorl %r15d, %r15d
movq %r12, -0x30(%rbp)
movq %r14, %rdi
callq 0x255a
cmpl %eax, %r15d
jae 0x3069
xorl %eax, %eax
movsd 0x209f(%rip), %xmm0     # 0x50a8
pushq $-0x1
popq %r13
movl %eax, %r12d
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
jbe 0x304f
movl (%rax,%r12,4), %esi
movq %r14, %rdi
movl %r15d, %edx
movsd %xmm0, -0x38(%rbp)
callq 0x255e
movsd -0x38(%rbp), %xmm1
ucomisd %xmm0, %xmm1
cmoval %r12d, %r13d
minsd %xmm1, %xmm0
leal 0x1(%r12), %eax
jmp 0x300d
movslq %r13d, %rax
movq -0x30(%rbp), %r12
ucomisd (%r12,%rax,8), %xmm0
jbe 0x3064
movsd %xmm0, (%r12,%rax,8)
incl %r15d
jmp 0x2ff2
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x2, %rax
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
movl %ecx, %ecx
cmpq %rcx, %rax
jbe 0x308b
addsd (%r12,%rcx,8), %xmm0
incl %ecx
jmp 0x307a
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/RasmusFonseca[P]PDBCluster/main.cpp
// Function: medoidCosts(std::vector<int, std::allocator<int>>&, Matrix&, int)
double medoidCosts(vector<int> &medoids, Matrix &dMat, int clusteringType){
	if(clusteringType==0) return medoidCosts_distSum(medoids, dMat);
	if(clusteringType==1) return medoidCosts_maxDistSum(medoids, dMat);
	if(clusteringType==2) return medoidCosts_maxDist(medoids, dMat);
	cerr<<"Unknown clustering type: "<<clusteringType<<endl;
	exit(-1);
}

// Assembly:
pushq %rbx
cmpl $0x2, %edx
je 0x31c0
movl %edx, %ebx
cmpl $0x1, %edx
je 0x31ba
testl %ebx, %ebx
jne 0x31c6
popq %rbx
jmp 0x2efe
popq %rbx
jmp 0x2fa2
popq %rbx
jmp 0x30a3
movq 0x4e23(%rip), %rdi      # 0x7ff0
leaq 0x1ef9(%rip), %rsi      # 0x50cd
callq 0x21d0
movq %rax, %rdi
movl %ebx, %esi
callq 0x2310
movq %rax, %rdi
callq 0x2110
pushq $-0x1
popq %rdi
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O2/ekg[P]tsvtools/tsvbootstrap.cpp
// Function: subsetavg(std::vector<std::vector<double, std::allocator<double>>*, std::allocator<std::vector<double, std::allocator<double>>*>>&)
vector<double> subsetavg(vector<vector<double>* >& subset) {

    vector<double> sums;
    vector<int> counts;

    vector<vector<double>* >::iterator s = subset.begin();
    for (int i = 0; i < (*s)->size(); ++i) {
        sums.push_back((*s)->at(i));
        counts.push_back(1);
    }
    ++s;

    for (; s != subset.end(); ++s) {
        const vector<double>& record = **s;
        for (int i = 0; i < record.size(); ++i) {
            sums.at(i) += record.at(i);
            ++counts.at(i);
        }
    }

    vector<double> results;
    for (int i = 0; i < counts.size(); ++i) {
        if (counts.at(i) != 0) {
            results.push_back(sums.at(i) / counts.at(i));
        } else {
            results.push_back(0);
        }
    }

    return results;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, 0x28(%rsp)
xorpd %xmm0, %xmm0
leaq 0x30(%rsp), %r15
movapd %xmm0, (%r15)
andq $0x0, 0x10(%r15)
leaq 0x10(%rsp), %r12
andq $0x0, 0x10(%r12)
movapd %xmm0, (%r12)
movq (%rsi), %rbx
xorl %r13d, %r13d
movq %rsp, %rbp
movq (%rbx), %rdi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x3, %rax
cmpq %r13, %rax
jbe 0x2833
movq %r13, %rsi
callq 0x2ff0
movq %r15, %rdi
movq %rax, %rsi
callq 0x2fce
movl $0x1, (%rsp)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x34d0
incq %r13
jmp 0x27f6
leaq 0x30(%rsp), %r15
leaq 0x10(%rsp), %r12
addq $0x8, %rbx
cmpq 0x8(%r14), %rbx
je 0x289d
movq (%rbx), %r13
xorl %ebp, %ebp
movq 0x8(%r13), %rax
subq (%r13), %rax
sarq $0x3, %rax
cmpq %rbp, %rax
jbe 0x283d
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3012
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2ff0
movsd 0x8(%rsp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x3034
incl (%rax)
incq %rbp
jmp 0x284c
xorpd %xmm0, %xmm0
movq 0x28(%rsp), %rbx
movupd %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
movq %rsp, %r12
leaq 0x30(%rsp), %r13
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x2, %rax
cmpq %r14, %rax
jbe 0x2937
movq %r15, %rdi
movq %r14, %rsi
callq 0x3034
cmpl $0x0, (%rax)
je 0x2922
movq %r13, %rdi
movq %r14, %rsi
callq 0x2ff0
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3034
cvtsi2sdl (%rax), %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3666
jmp 0x2932
andq $0x0, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3666
incq %r14
jmp 0x28bf
leaq 0x10(%rsp), %rdi
callq 0x3336
leaq 0x30(%rsp), %rdi
callq 0x3302
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2963
jmp 0x2963
jmp 0x2972
movq %rax, %r14
movq %rbx, %rdi
callq 0x3302
jmp 0x2975
jmp 0x2972
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x3336
leaq 0x30(%rsp), %rdi
callq 0x3302
movq %r14, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O2/ekg[P]tsvtools/tsvbootstrap.cpp
// Function: randomsubset(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&, unsigned int)
vector<vector<double>* > randomsubset(vector<vector<double> >& lines, unsigned int samplesize) {
    map<int, bool> hits;
    vector<vector<double>* > results;
    if (lines.size() < samplesize) {
        samplesize = lines.size();
    }
    while (results.size() < samplesize) {
        int pos = genrand_int32() % lines.size();
        map<int, bool>::iterator seen = hits.find(pos);
        if (seen == hits.end()) {
            hits[pos] = true;
            results.push_back(&lines.at(pos));
        }
    }
    return results;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ecx
leaq 0x20(%rsp), %rbp
andl $0x0, (%rbp)
andq $0x0, 0x8(%rbp)
movq %rbp, 0x10(%rbp)
movq %rbp, 0x18(%rbp)
andq $0x0, 0x20(%rbp)
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rax
subq (%rsi), %rax
pushq $0x18
popq %rsi
cqto
idivq %rsi
movq %rax, %r15
movl %ecx, %eax
cmpq %rax, %r15
cmovael %ecx, %r15d
xorl %eax, %eax
leaq 0x18(%rsp), %r12
leaq 0xc(%rsp), %r13
xorl %ecx, %ecx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jae 0x2a6e
callq 0x258d
movq %rax, %rcx
movq 0x8(%r14), %rax
subq (%r14), %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movl %edx, 0xc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x3798
cmpq %rbp, %rax
jne 0x2a65
movq %r12, %rdi
movq %r13, %rsi
callq 0x3056
movb $0x1, (%rax)
movslq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x30a4
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3a62
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
jmp 0x29f6
leaq 0x18(%rsp), %rdi
callq 0x31e2
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a8c
movq %rax, %r14
movq %rbx, %rdi
callq 0x3764
leaq 0x18(%rsp), %rdi
callq 0x31e2
movq %r14, %rdi
callq 0x2300
// File: /workspace/github_cpp_makefile_star2_O2/zhangk145[P]video_envalue/Decoder.cpp
// Function: Decoder::open(char const*)
int Decoder::open(const char *input_file) {
    int ret = avformat_open_input(&mFormatCtx, input_file, NULL, NULL);
    if (ret < 0) {
        fprintf(stderr, "Could not open source file %s\n", input_file);
        return ret;
    }

    /* retrieve stream information */
    ret = avformat_find_stream_info(mFormatCtx, NULL);
    if (ret < 0) {
        fprintf(stderr, "Could not find stream information\n");
        return ret;
    }
    ret = open_codec_context(&mStreamIndex, &mCodecCtx, mFormatCtx, AVMEDIA_TYPE_VIDEO);
    if (ret >= 0) {
        mStream = mFormatCtx->streams[mStreamIndex];

        /* allocate image where the decoded image will be put */
        mWidth = mCodecCtx->width;
        mHeight = mCodecCtx->height;
        mPixFmt = mCodecCtx->pix_fmt;
        printf("[%s:%d]==mWidth:%d mHeight:%d mPixFmt:%d\n", __FUNCTION__, __LINE__, mWidth, mHeight, mPixFmt);
        // ret = av_image_alloc(mImageData, mImageLinesize,
        //                      mWidth, mHeight, mPixFmt, 1);
        // if (ret < 0) {
        //     fprintf(stderr, "Could not allocate raw video buffer\n");
        //     return ret;
        // }
        // video_dst_bufsize = ret;
    }
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2100
testl %eax, %eax
js 0x24fc
movq (%r14), %rdi
xorl %esi, %esi
callq 0x2150
testl %eax, %eax
js 0x251b
leaq 0x18(%r14), %rsi
leaq 0x8(%r14), %rdx
movq (%r14), %rcx
xorl %ebx, %ebx
xorl %r8d, %r8d
callq 0x253c
testl %eax, %eax
js 0x24f2
movq (%r14), %rax
movq 0x8(%r14), %rdx
movq 0x30(%rax), %rax
movslq 0x18(%r14), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%r14)
movl 0x74(%rdx), %ecx
movl %ecx, 0x20(%r14)
movl 0x78(%rdx), %r8d
movl %r8d, 0x24(%r14)
movl 0x88(%rdx), %r9d
movl %r9d, 0x1c(%r14)
leaq 0x1b67(%rip), %rdi      # 0x4046
leaq 0x1b8a(%rip), %rsi      # 0x4070
pushq $0x34
popq %rdx
xorl %eax, %eax
callq 0x2050
jmp 0x24f4
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movl %eax, %ebx
movq 0x3adb(%rip), %rax      # 0x5fe0
movq (%rax), %rdi
leaq 0x1af5(%rip), %rsi      # 0x4004
movq %r15, %rdx
xorl %eax, %eax
callq 0x2080
jmp 0x24f4
movl %eax, %ebx
movq 0x3abc(%rip), %rax      # 0x5fe0
movq (%rax), %rcx
leaq 0x1af5(%rip), %rdi      # 0x4023
pushq $0x22
popq %rsi
pushq $0x1
popq %rdx
callq 0x2290
jmp 0x24f4
nop
// File: /workspace/github_cpp_makefile_star2_O2/zhangk145[P]video_envalue/Decoder.cpp
// Function: Decoder::decode(AVFrame*)
int Decoder::decode(AVFrame *frame) {
    int ret = 0;
    AVPacket pkt;
    int got_frame = 0;
    av_init_packet(&pkt);
    pkt.data = NULL;
    pkt.size = 0;
    while (!got_frame) {
        if (!mEof) {
            // printf("[%s:%d]==\n", __FUNCTION__, __LINE__);
            ret = av_read_frame(mFormatCtx, &pkt);
            // printf("[%s:%d]==ret:%d\n", __FUNCTION__, __LINE__, ret);
            if (ret < 0) {
                mEof = true;
                return ret;
            }
        }
        AVPacket orig_pkt = pkt;
        do {
            // printf("[%s:%d]==\n", __FUNCTION__, __LINE__);
            ret = decode_packet(&pkt, frame, &got_frame);
            // printf("[%s:%d]==ret:%d\n", __FUNCTION__, __LINE__, ret);
            if (ret < 0)
                break;
            pkt.data += ret;
            pkt.size -= ret;
        } while (pkt.size > 0);
        av_packet_unref(&orig_pkt);
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4(%rsp), %r15
andl $0x0, (%r15)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x2190
andq $0x0, 0x18(%r12)
andl $0x0, 0x20(%r12)
xorl %eax, %eax
leaq 0x60(%rsp), %rbp
xorl %r13d, %r13d
testl %eax, %eax
jne 0x2892
cmpb $0x0, 0x28(%rbx)
jne 0x284a
movq (%rbx), %rdi
movq %r12, %rsi
callq 0x2160
testl %eax, %eax
js 0x288b
pushq $0xb
popq %rcx
movq %rbp, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x26ce
movl %eax, %r13d
testl %eax, %eax
js 0x287d
movl %r13d, %eax
addq %rax, 0x20(%rsp)
subl %r13d, 0x28(%rsp)
jg 0x2856
movq %rbp, %rdi
callq 0x2240
movl 0x4(%rsp), %eax
jmp 0x2831
movl %eax, %r13d
movb $0x1, 0x28(%rbx)
movl %r13d, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/zhangk145[P]video_envalue/Envaluer.cpp
// Function: Envaluer::close()
void Envaluer::close() {
    end();
    free(mYuvOrg);
    free(mYuvNew);
    free(mYPsnr);
    free(mYSsim);
    mYuvOrg = NULL;
    mYuvNew = NULL;
    mYPsnr = NULL;
    mYSsim = NULL;
    mYuvSize = 0;
    mBufSize = 0;
    mPMean = 0;
    mSMean = 0;
    mCount = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x297e
movq 0x18(%rbx), %rdi
callq 0x2070
movq 0x20(%rbx), %rdi
callq 0x2070
movq 0x28(%rbx), %rdi
callq 0x2070
movq 0x30(%rbx), %rdi
callq 0x2070
andq $0x0, 0xc(%rbx)
andl $0x0, 0x50(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/zhangk145[P]video_envalue/Envaluer.cpp
// Function: Envaluer::ssim_4x4x2_core(unsigned char const*, int, unsigned char const*, int, int (*) [4])
void Envaluer::ssim_4x4x2_core(const uint8_t *pix1, int stride1,
                               const uint8_t *pix2, int stride2,
                               int sums[2][4])
{
    int x, y, z;
    for(z=0; z<2; z++)
    {
        uint32_t s1=0, s2=0, ss=0, s12=0;
        for(y=0; y<4; y++)
            for(x=0; x<4; x++)
            {
                int a = pix1[x+y*stride1];
                int b = pix2[x+y*stride2];
                s1  += a;
                s2  += b;
                ss  += a*a;
                ss  += b*b;
                s12 += a*b;
            }
        sums[z][0] = s1;
        sums[z][1] = s2;
        sums[z][2] = ss;
        sums[z][3] = s12;
        pix1 += 4;
        pix2 += 4;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, -0x18(%rsp)
movslq %r8d, %rax
movslq %edx, %rdx
xorl %r9d, %r9d
cmpq $0x2, %r9
je 0x2bb8
xorl %r8d, %r8d
movq %rcx, -0x8(%rsp)
movq %rcx, %r14
movq %rsi, -0x10(%rsp)
movq %rsi, %r15
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %edi, %edi
xorl %ebx, %ebx
cmpq $0x4, %r8
je 0x2b81
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x2b76
movzbl (%r15,%r12), %ecx
movzbl (%r14,%r12), %ebp
addl %ecx, %r10d
addl %ebp, %r11d
movl %ecx, %r13d
imull %ecx, %r13d
addl %edi, %r13d
movl %ebp, %edi
imull %ebp, %edi
addl %r13d, %edi
imull %ecx, %ebp
addl %ebp, %ebx
incq %r12
jmp 0x2b44
incq %r8
addq %rdx, %r15
addq %rax, %r14
jmp 0x2b3b
movq %r9, %rcx
shlq $0x4, %rcx
movq -0x18(%rsp), %rsi
movl %r10d, (%rsi,%rcx)
movl %r11d, 0x4(%rsi,%rcx)
movl %edi, 0x8(%rsi,%rcx)
movl %ebx, 0xc(%rsi,%rcx)
movq -0x10(%rsp), %rsi
addq $0x4, %rsi
movq -0x8(%rsp), %rcx
addq $0x4, %rcx
incq %r9
jmp 0x2b14
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/zhangk145[P]video_envalue/Envaluer.cpp
// Function: Envaluer::ssim_end4(int (*) [4], int (*) [4], int)
float Envaluer::ssim_end4( int sum0[5][4], int sum1[5][4], int width )
{
    int i;
    float ssim = 0.0;
    for( i = 0; i < width; i++ )
        ssim += ssim_end1( sum0[i][0] + sum0[i+1][0] + sum1[i][0] + sum1[i+1][0],
                           sum0[i][1] + sum0[i+1][1] + sum1[i][1] + sum1[i+1][1],
                           sum0[i][2] + sum0[i+1][2] + sum1[i][2] + sum1[i+1][2],
                           sum0[i][3] + sum0[i+1][3] + sum1[i][3] + sum1[i+1][3] );
    return ssim;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
xorl %r12d, %r12d
testl %ecx, %ecx
cmovlel %r12d, %ebx
shlq $0x4, %rbx
xorps %xmm0, %xmm0
cmpq %r12, %rbx
je 0x2cac
movl 0x10(%r15,%r12), %esi
movl 0x14(%r15,%r12), %edx
addl (%r15,%r12), %esi
addl (%r14,%r12), %esi
addl 0x10(%r14,%r12), %esi
addl 0x4(%r15,%r12), %edx
addl 0x4(%r14,%r12), %edx
addl 0x14(%r14,%r12), %edx
movl 0x18(%r15,%r12), %ecx
addl 0x8(%r15,%r12), %ecx
addl 0x8(%r14,%r12), %ecx
addl 0x18(%r14,%r12), %ecx
movl 0x1c(%r15,%r12), %r8d
addl 0xc(%r15,%r12), %r8d
addl 0xc(%r14,%r12), %r8d
addl 0x1c(%r14,%r12), %r8d
movss %xmm0, 0x4(%rsp)
callq 0x2bc4
movss 0x4(%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, 0x4(%rsp)
movss 0x4(%rsp), %xmm0
addq $0x10, %r12
jmp 0x2c32
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/zhangk145[P]video_envalue/Main.cpp
// Function: psnr_write(double, void*)
static int psnr_write(double v, void *usr) {
    Context *c = (Context *)usr;
    FILE *fp = c->psnr_file;
    char str[10] = {0};
    sprintf(str, "%.3f\n", v);
    int len = fwrite(str, sizeof(char), strlen(str), fp);
    // printf("[%s:%d]==len:%d\n", __FUNCTION__, __LINE__, len);
    fflush(fp);
    return len;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq (%rdi), %rbx
leaq 0x8(%rsp), %r14
andw $0x0, 0x8(%r14)
andq $0x0, (%r14)
leaq 0xf14(%rip), %rsi       # 0x4308
movq %r14, %rdi
movb $0x1, %al
callq 0x2260
movq %r14, %rdi
callq 0x20a0
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x2290
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f0
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/zhangk145[P]video_envalue/Main.cpp
// Function: ssim_write(double, void*)
static int ssim_write(double v, void *usr) {
    Context *c = (Context *)usr;
    FILE *fp = c->ssim_file;
    char str[10] = {0};
    sprintf(str, "%.3f\n", v);
    int len = fwrite(str, sizeof(char), strlen(str), fp);
    // printf("[%s:%d]==len:%d\n", __FUNCTION__, __LINE__, len);
    fflush(fp);
    return len;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq 0x8(%rdi), %rbx
leaq 0x8(%rsp), %r14
andw $0x0, 0x8(%r14)
andq $0x0, (%r14)
leaq 0xeba(%rip), %rsi       # 0x4308
movq %r14, %rdi
movb $0x1, %al
callq 0x2260
movq %r14, %rdi
callq 0x20a0
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x2290
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f0
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::computeMakeScore(int)
int Lawa::computeMakeScore(int lit) {
    int score = 0;
    vector<int>& occList = lit > 0 ? posOccList[lit] : negOccList[-lit];
    for (int cid : occList) {
        if (clauses[cid].satLits == 0) {
            score++;
        }
    }
    return score;
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
setle %al
movl %esi, %ecx
negl %ecx
cmovsl %esi, %ecx
movq 0x28(%rdi,%rax,8), %rax
imulq $0x18, %rcx, %rdx
movq (%rax,%rdx), %rcx
movq 0x8(%rax,%rdx), %rdx
movq 0x10(%rdi), %rsi
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x1394
movslq (%rcx), %rdi
shlq $0x5, %rdi
cmpb $0x1, 0x1(%rsi,%rdi)
adcl $0x0, %eax
addq $0x4, %rcx
jmp 0x137a
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::computeBreakScore(int)
int Lawa::computeBreakScore(int lit) {
    int score = 0;
    vector<int>& occList = lit > 0 ? negOccList[lit] : posOccList[-lit];
    for (int cid : occList) {
        if (clauses[cid].satLits == 1) {
            score++;
        }
    }
    return score;
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
setg %al
movl %esi, %ecx
negl %ecx
cmovsl %esi, %ecx
movq 0x28(%rdi,%rax,8), %rax
imulq $0x18, %rcx, %rdx
movq (%rax,%rdx), %rcx
movq 0x8(%rax,%rdx), %rdx
movq 0x10(%rdi), %rsi
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x13dd
movslq (%rcx), %rdi
shlq $0x5, %rdi
xorl %r8d, %r8d
cmpb $0x1, 0x1(%rsi,%rdi)
sete %r8b
addl %r8d, %eax
addq $0x4, %rcx
jmp 0x13bc
retq
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::flipLiteral(int)
void Lawa::flipLiteral(int lit) {
    int var = abs(lit);
    vector<int>& decOccList = lit > 0 ? negOccList[var] : posOccList[var];
    vector<int>& incOccList = lit > 0 ? posOccList[var] : negOccList[var];

    for (int cid : decOccList) {
        clauses[cid].satLits--;
        if (clauses[cid].satLits == 0) {
            unsatClauseIds.push_back(cid);
        }
    }
    for (int cid : incOccList) {
        clauses[cid].satLits++;
    }

    tvalues[var] = lit;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movl %esi, %ecx
negl %ecx
cmovsl %esi, %ecx
movq %rcx, 0x10(%rsp)
imulq $0x18, %rcx, %rax
movq 0x30(%rdi), %rbp
addq %rax, %rbp
addq 0x28(%rdi), %rax
movl %esi, (%rsp)
testl %esi, %esi
movq %rax, 0x8(%rsp)
cmovgq %rbp, %rax
movq (%rax), %r13
movq 0x8(%rax), %rbx
leaq 0x38(%rdi), %r15
leaq 0x4(%rsp), %r12
cmpq %rbx, %r13
je 0x1454
movslq (%r13), %rax
movl %eax, 0x4(%rsp)
movq 0x10(%r14), %rcx
shlq $0x5, %rax
decb 0x1(%rcx,%rax)
jne 0x144e
movq %r15, %rdi
movq %r12, %rsi
callq 0x1cd8
addq $0x4, %r13
jmp 0x1428
movl (%rsp), %edi
testl %edi, %edi
cmovgq 0x8(%rsp), %rbp
movq (%rbp), %rax
movq 0x8(%rbp), %rcx
movq 0x10(%r14), %rdx
cmpq %rcx, %rax
je 0x1481
movslq (%rax), %rsi
shlq $0x5, %rsi
incb 0x1(%rdx,%rsi)
addq $0x4, %rax
jmp 0x146b
movq 0x8(%r14), %rax
movq 0x10(%rsp), %rcx
movl %edi, (%rax,%rcx,4)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::deallocateMemory()
void Lawa::deallocateMemory() {
    if (tvalues != nullptr) {
        delete[] tvalues;
        delete[] posOccList;
        delete[] negOccList;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x153d
callq 0x1120
movq 0x28(%rbx), %r15
testq %r15, %r15
je 0x14f7
leaq -0x8(%r15), %r14
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x14e7
addq $-0x18, %r15
imulq $0x18, %r12, %r13
leaq (%r15,%r13), %rdi
callq 0x1e3a
addq $-0x18, %r13
jne 0x14d8
imulq $0x18, %r12, %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x11c0
movq 0x30(%rbx), %r14
testq %r14, %r14
je 0x153d
leaq -0x8(%r14), %rbx
movq -0x8(%r14), %r15
testq %r15, %r15
je 0x1524
addq $-0x18, %r14
imulq $0x18, %r15, %r12
leaq (%r14,%r12), %rdi
callq 0x1e3a
addq $-0x18, %r12
jne 0x1515
imulq $0x18, %r15, %rsi
addq $0x8, %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x11c0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::addLiteral(int)
void Lawa::addLiteral(int lit) {
    int var = abs(lit);
    if (var > numVariables) {
        numVariables = var;
    }
    if (lit == 0) {
        clauses.push_back(makeClause(currentAddedClause));
        currentAddedClause.clear();
    } else {
        currentAddedClause.push_back(lit);
    }
    clausesAdded = true;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
movl %esi, %eax
negl %eax
cmovsl %esi, %eax
cmpl (%rdi), %eax
jle 0x1563
movl %eax, (%rbx)
testl %esi, %esi
je 0x1577
leaq 0x50(%rbx), %rdi
leaq 0xc(%rsp), %rsi
callq 0x1cd8
jmp 0x15c5
leaq 0x50(%rbx), %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x1cf6
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x12cc
leaq 0x10(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2008
leaq 0x30(%rsp), %rdi
callq 0x1e3a
leaq 0x10(%rsp), %rdi
callq 0x1e3a
movq 0x50(%rbx), %rax
cmpq %rax, 0x58(%rbx)
je 0x15c5
movq %rax, 0x58(%rbx)
movb $0x1, 0x68(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x1e3a
jmp 0x15e3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1e3a
movq %rbx, %rdi
callq 0x11b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::printDebug()
void Lawa::printDebug() {
    for (int ci = 0; ci < clauses.size(); ci++) {
        printf("%d: ",ci);
        printClause(clauses[ci]);
    }
    printModel();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x199a(%rip), %r14      # 0x3008
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
subq 0x10(%rbx), %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x16a7
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1040
movq 0x10(%rbx), %rdi
addq %r12, %rdi
callq 0x1309
incq %r15
addq $0x20, %r12
jmp 0x1674
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x161c