LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/imrosan[P]sql-format/./sql_format/sf_formatter.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> SqlFormat::Formatter::format<DefaultEscapeHandler>(DefaultEscapeHandler&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string format(EscapeHandler& escapeHandler, const std::string& sql)
    {
        static const std::string placeholder = "?";

        std::string result = sql;
        size_t pos = 0;

        for (size_t i = 0; i < dataList_.size(); ++i)
        {
            Detail::DataBase* d = dataList_[i]; 

            size_t p = result.find(placeholder, pos);
            if (p == std::string::npos)
                throw PlaceholderException();

            std::string formatted = d->format(escapeHandler);
            result.replace(p, placeholder.size(), formatted); 

            pos = p + formatted.size();
        }

        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r12
movq %rdx, -0x38(%rbp)
movq %rsi, %r15
movq %rdi, %rbx
movb 0x4496(%rip), %al       # 0x71c8
testb %al, %al
je 0x2e25
leaq 0x10(%rbx), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rbx)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x2ed0
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x2de9
xorl %r14d, %r14d
xorl %r13d, %r13d
movq (%rax,%r14,8), %r12
movq 0x4431(%rip), %rsi      # 0x71a8
movq 0x4432(%rip), %rcx      # 0x71b0
movq %rbx, %rdi
movq %r13, %rdx
callq 0x2240
cmpq $-0x1, %rax
je 0x2dfb
movq %rax, %r13
movq (%r12), %rax
leaq -0x58(%rbp), %rdi
movq %r12, %rsi
movq -0x38(%rbp), %rdx
callq *(%rax)
movq 0x4406(%rip), %rdx      # 0x71b0
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %r8
movq %rbx, %rdi
movq %r13, %rsi
callq 0x21a0
addq -0x50(%rbp), %r13
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x2dd3
callq 0x2160
incq %r14
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r14
jb 0x2d6c
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x20b0
leaq 0x3f7c(%rip), %rcx      # 0x6d88
movq %rcx, (%rax)
leaq 0x3f4a(%rip), %rsi      # 0x6d60
movq 0x41c3(%rip), %rdx      # 0x6fe0
movq %rax, %rdi
callq 0x2220
leaq 0x439c(%rip), %rdi      # 0x71c8
callq 0x2270
testl %eax, %eax
je 0x2d3a
leaq 0x4378(%rip), %rax      # 0x71b8
movq %rax, 0x4361(%rip)      # 0x71a8
leaq 0x435a(%rip), %rdi      # 0x71a8
leaq 0x121c(%rip), %rsi      # 0x4071
leaq 0x1216(%rip), %rdx      # 0x4072
callq 0x300c
movq 0x4150(%rip), %rdi      # 0x6fb8
leaq 0x4339(%rip), %rsi      # 0x71a8
leaq 0x42da(%rip), %rdx      # 0x7150
callq 0x2150
leaq 0x4346(%rip), %rdi      # 0x71c8
callq 0x20f0
jmp 0x2d3a
movq %rax, %r14
leaq 0x4332(%rip), %rdi      # 0x71c8
callq 0x20e0
jmp 0x2ec7
jmp 0x2eb6
movq %rax, %r14
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x2eb9
callq 0x2160
jmp 0x2eb9
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x2ec7
callq 0x2160
movq %r14, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O1/imrosan[P]sql-format/./sql_format/sf_formatter.h
// Function: void SqlFormat::Formatter::append<long, char const*, int, int>(long const&, char const* const&, int const&, int const&)
void append(const A0& a0, const A1& a1, const A2& a2, const A3& a3)
    {
        dataList_.push_back(NewData(a0));
        dataList_.push_back(NewData(a1));
        dataList_.push_back(NewData(a2));
        dataList_.push_back(NewData(a3));
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x38(%rbp)
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movl $0x10, %edi
callq 0x2190
leaq 0x3a26(%rip), %r14      # 0x6b38
movq %r14, (%rax)
movq (%r13), %rcx
movq %rcx, 0x8(%rax)
leaq 0x398c(%rip), %rcx      # 0x6ab0
movq %rcx, (%rax)
movq %rax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x313f
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x314b
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
callq 0x3218
movl $0x10, %edi
callq 0x2190
movq (%r12), %rcx
movq %rcx, 0x8(%rax)
leaq 0x39ec(%rip), %rcx      # 0x6b50
movq %rcx, (%rax)
movq %rax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x317f
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x318b
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
callq 0x3218
movl $0x10, %edi
callq 0x2190
movq %r14, (%rax)
movl (%r15), %ecx
movl %ecx, 0x8(%rax)
leaq 0x3a13(%rip), %r15      # 0x6bb8
movq %r15, (%rax)
movq %rax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x31c0
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x31cc
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
callq 0x3218
movl $0x10, %edi
callq 0x2190
movq %r14, (%rax)
movq -0x38(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x8(%rax)
movq %r15, (%rax)
movq %rax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x31fd
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x3209
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
callq 0x3218
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/imrosan[P]sql-format/./sql_format/detail/sf_detail_data.h
// Function: SqlFormat::Detail::Data<char const*, false>::format[abi:cxx11](DefaultEscapeHandler&)
virtual std::string format(EscapeHandler& escapeHandler)
    {
        std::string result = "'";
        result += HandleEscape(escapeHandler, GetData());
        result += "'";

        return result; 
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0xd0a(%rip), %rsi       # 0x4119
leaq 0xd04(%rip), %rdx       # 0x411a
callq 0x300c
movq 0x8(%r14), %rsi
leaq -0x68(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x2090
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x2ed0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x2060
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x3467
callq 0x2160
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3479
callq 0x2160
leaq 0xc99(%rip), %rsi       # 0x4119
movq %rbx, %rdi
callq 0x2280
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x34c4
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x34b0
callq 0x2160
jmp 0x34b0
movq %rax, %r14
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34c7
callq 0x2160
jmp 0x34c7
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x34d4
callq 0x2160
movq %r14, %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O1/imrosan[P]sql-format/./sql_format/detail/sf_detail_data.h
// Function: SqlFormat::Detail::Data<SqlFormat::Detail::LikeData, false>::format[abi:cxx11](DefaultEscapeHandler&)
virtual std::string format(EscapeHandler& escapeHandler)
    {
        const LikeData& likeData = GetData();
        int likeMode = likeData.likeMode;

        std::string result = "'";

        if ((likeMode & LikeData::LIKE_MODE_LEFT) != 0)
        {
            result += '%';
        }

        result += HandleEscape(escapeHandler, likeData.s);

        if ((likeMode & LikeData::LIKE_MODE_RIGHT) != 0)
        {
            result += '%';
        }

        result += "'";

        return result; 
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x28(%rsi), %r12d
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0xa98(%rip), %rsi       # 0x4119
leaq 0xa92(%rip), %rdx       # 0x411a
callq 0x300c
testb $0x1, %r12b
je 0x36a0
movq %rbx, %rdi
movl $0x25, %esi
callq 0x2140
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x2ed0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x2060
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x36da
callq 0x2160
testb $0x2, %r12b
je 0x36ed
movq %rbx, %rdi
movl $0x25, %esi
callq 0x2140
leaq 0xa25(%rip), %rsi       # 0x4119
movq %rbx, %rdi
callq 0x2280
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3726
callq 0x2160
jmp 0x3726
jmp 0x3723
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x3733
callq 0x2160
movq %r14, %rdi
callq 0x2250
nop
// File: /workspace/github_cpp_makefile_star2_O1/imrosan[P]sql-format/./sql_format/detail/sf_detail_data.h
// Function: SqlFormat::Detail::Data<SqlFormat::Detail::InData<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>::format(DefaultEscapeHandler&)
virtual std::string format(EscapeHandler& escapeHandler)
    {
        const InData<T>& inData = this->GetData();
        const std::vector<T>& dataList = inData.dataList;

        std::string result = "(";

        for (size_t i = 0; i < dataList.size(); ++i)
        {
            if (i > 0)
            {
                result += ',';
            }

            DataBase* d = NewData(dataList[i]);
            result += d->format(escapeHandler);
            delete d;
        }

        result += ")";

        return result; 
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, -0x40(%rbp)
movq %rsi, %r15
leaq 0x10(%rdi), %rax
movq %rax, -0x38(%rbp)
movq %rax, (%rdi)
leaq 0x5ca(%rip), %rsi       # 0x414c
leaq 0x5c4(%rip), %rdx       # 0x414d
movq %rdi, -0x30(%rbp)
callq 0x300c
movq 0x10(%r15), %rax
cmpq 0x8(%r15), %rax
je 0x3c21
xorl %r14d, %r14d
leaq -0x60(%rbp), %rbx
xorl %r12d, %r12d
testq %r12, %r12
je 0x3bbd
movq -0x30(%rbp), %rdi
movl $0x2c, %esi
callq 0x2140
movq 0x8(%r15), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x3c80
movq %rbx, %rdi
movq %rax, %r13
movq (%rax), %rax
movq %r13, %rsi
movq -0x40(%rbp), %rdx
callq *(%rax)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x30(%rbp), %rdi
callq 0x2060
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x3c01
callq 0x2160
movq %r13, %rdi
callq 0x2160
movq 0x10(%r15), %rax
subq 0x8(%r15), %rax
incq %r12
sarq $0x5, %rax
addq $0x20, %r14
cmpq %rax, %r12
jb 0x3baa
leaq 0x522(%rip), %rsi       # 0x414a
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x2280
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c4c
jmp 0x3c4c
jmp 0x3c4c
movq %rax, %r14
movq -0x30(%rbp), %rax
movq (%rax), %rdi
cmpq -0x38(%rbp), %rdi
je 0x3c61
callq 0x2160
movq %r14, %rdi
callq 0x2250
movq %rax, %r14
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x3c4f
callq 0x2160
jmp 0x3c4f
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/pfm2pfm/../../pkgs/R2Shapes/R2Grid.h
// Function: Delta(gaps::R2Grid*, int, int)
inline RNScalar R2Grid::
GridValue(int i, int j) const
{
  // Return value at grid point
  assert((0 <= i) && (i < XResolution()));
  assert((0 <= j) && (j < YResolution()));
  return grid_values[j * grid_row_size + i];
}

// Assembly:
movq 0xb8(%rdi), %rax
movslq 0xc8(%rdi), %rcx
movl %ecx, %r8d
imull %edx, %r8d
addl %esi, %r8d
movslq %r8d, %r8
movsd (%rax,%r8,8), %xmm1
movsd 0x54123(%rip), %xmm0    # 0x59008
ucomisd %xmm0, %xmm1
jne 0x4eee
jp 0x4eee
retq
pushq %rbp
pushq %r14
pushq %rbx
movslq %esi, %rsi
movslq %edx, %rdx
leaq -0x1(%rdx), %r8
imulq %rcx, %r8
leaq (,%rsi,8), %r9
leaq (%r9,%r8,8), %r8
addq %r8, %rax
shlq $0x3, %rcx
xorpd %xmm2, %xmm2
xorl %r8d, %r8d
movq $-0x1, %r9
movsd 0x540df(%rip), %xmm0    # 0x59008
leaq (%r9,%rdx), %r10
movq $-0x1, %r11
movl %r11d, %ebx
orl %r9d, %ebx
je 0x4f7e
movq %rsi, %rbx
addq %r11, %rbx
js 0x4f7e
testq %r10, %r10
sets %bpl
movslq 0xc0(%rdi), %r14
cmpq %r14, %rbx
setge %bl
orb %bpl, %bl
jne 0x4f7e
movslq 0xc4(%rdi), %rbx
cmpq %rbx, %r10
jge 0x4f7e
movsd (%rax,%r11,8), %xmm3
ucomisd %xmm0, %xmm3
jne 0x4f77
jnp 0x4f7e
addsd %xmm3, %xmm2
incl %r8d
incq %r11
cmpq $0x2, %r11
jne 0x4f34
incq %r9
addq %rcx, %rax
cmpq $0x2, %r9
jne 0x4f29
testl %r8d, %r8d
popq %rbx
popq %r14
popq %rbp
je 0x4eed
xorps %xmm0, %xmm0
cvtsi2sd %r8d, %xmm0
divsd %xmm0, %xmm2
subsd %xmm2, %xmm1
movapd %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/pfm2pfm/pfm2pfm.cpp
// Function: SUN3DBitshift(gaps::R2Grid*)
void SUN3DBitshift(R2Grid *grid)
{
  for (int i = 0; i < grid->NEntries(); i++) {
    unsigned int d = (unsigned int) (grid->GridValue(i) + 0.5);
    d = ((d >> 3) & 0x1FFF) | ((d & 0x7) << 13);
    grid->SetGridValue(i, d);
  }
}

// Assembly:
movslq 0xcc(%rdi), %rax
testq %rax, %rax
jle 0x59e6
movq 0xb8(%rdi), %rcx
xorl %edx, %edx
movsd 0x53687(%rip), %xmm0    # 0x59038
movsd (%rcx,%rdx,8), %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rsi
movl %esi, %edi
shrl $0x3, %edi
andl $0x1fff, %edi           # imm = 0x1FFF
shll $0xd, %esi
movzwl %si, %esi
orl %edi, %esi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
movsd %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x59b1
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/pfm2pfm/pfm2pfm.cpp
// Function: Hash(gaps::R2Grid*, int)
void Hash(R2Grid *grid, int nvalues)
{
  // Get some stats
  RNInterval range = grid->Range();
  if (range.Diameter() == 0) return;
  RNScalar scale = 1.0 / range.Diameter();
  
  // Replace values with hash to value in [0:nvalues-1]
  for (int iy = 0; iy < grid->YResolution(); iy++) {
    for (int ix = 0; ix < grid->XResolution(); ix++) {
      RNScalar value = grid->GridValue(ix, iy);
      if (value == R2_GRID_UNKNOWN_VALUE) continue;
      int hash = (int) (nvalues * scale * (value - range.Min()));
      if (hash > nvalues-1) hash = nvalues-1;
      grid->SetGridValue(ix, iy, hash);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8d48
movsd 0x8(%r15), %xmm0
subsd (%r15), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5a1e
jnp 0x5ab8
movl 0xc4(%r14), %eax
testl %eax, %eax
jle 0x5ab8
movsd 0x535db(%rip), %xmm1    # 0x59010
divsd %xmm0, %xmm1
movl 0xc0(%r14), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
mulsd %xmm1, %xmm0
leal -0x1(%rbx), %edx
xorl %esi, %esi
movsd 0x535b0(%rip), %xmm1    # 0x59008
testl %ecx, %ecx
jle 0x5ab2
movslq 0xc8(%r14), %r8
movslq %esi, %rdi
imulq %r8, %rdi
shlq $0x3, %rdi
addq 0xb8(%r14), %rdi
xorl %r8d, %r8d
movsd (%rdi,%r8,8), %xmm2
ucomisd %xmm1, %xmm2
jne 0x5a86
jnp 0x5aaa
subsd (%rsp), %xmm2
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %r9d
cmpl %ebx, %r9d
jl 0x5a9c
movl %edx, %r9d
xorps %xmm2, %xmm2
cvtsi2sd %r9d, %xmm2
movsd %xmm2, (%rdi,%r8,8)
incq %r8
cmpq %r8, %rcx
jne 0x5a78
incl %esi
cmpl %eax, %esi
jne 0x5a58
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/pfm2pfm/pfm2pfm.cpp
// Function: DU(gaps::R2Grid*)
void DU(R2Grid *grid)
{
  R2Grid f(*grid);
  grid->Clear(R2_GRID_UNKNOWN_VALUE);
  for (int iy = 0; iy < grid->YResolution(); iy++) {
    for (int ix = 0; ix < grid->XResolution()-1; ix++) {
      RNScalar d0 = f.GridValue(ix, iy);
      if (RNIsZero(d0) || (d0 == R2_GRID_UNKNOWN_VALUE)) continue;
      RNScalar d1 = f.GridValue(ix+1, iy);
      if (RNIsZero(d1) || (d1 == R2_GRID_UNKNOWN_VALUE)) continue;
      grid->SetGridValue(ix, iy, d1 - d0);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8b48
movsd 0x53525(%rip), %xmm0    # 0x59008
movq %rbx, %rdi
callq 0xa2b2
movslq 0xc4(%rbx), %rax
testq %rax, %rax
movsd 0x5350b(%rip), %xmm6    # 0x59008
jle 0x5be6
movl 0xc0(%rbx), %ecx
leal -0x1(%rcx), %edx
movq 0xb8(%rsp), %rsi
movslq 0xc8(%rsp), %rdi
addq $0x8, %rsi
shlq $0x3, %rdi
xorl %r8d, %r8d
leaq 0x7686a(%rip), %r9      # 0x7c398
movapd 0x5352a(%rip), %xmm0    # 0x59060
xorl %r10d, %r10d
cmpl $0x2, %ecx
jl 0x5bd3
xorl %r11d, %r11d
movsd -0x8(%rsi,%r11,8), %xmm1
ucomisd %xmm6, %xmm1
jne 0x5b54
jnp 0x5bc7
movsd (%r9), %xmm4
movapd %xmm4, %xmm2
xorpd %xmm0, %xmm2
movapd %xmm1, %xmm3
cmplepd %xmm4, %xmm3
movapd %xmm2, %xmm5
cmplepd %xmm1, %xmm5
andpd %xmm3, %xmm5
movd %xmm5, %ebp
testb $0x1, %bpl
jne 0x5bc7
movsd (%rsi,%r11,8), %xmm3
ucomisd %xmm6, %xmm3
jne 0x5b8f
jnp 0x5bc7
movapd %xmm3, %xmm5
cmplepd %xmm4, %xmm5
cmplepd %xmm3, %xmm2
andpd %xmm5, %xmm2
movd %xmm2, %ebp
testb $0x1, %bpl
jne 0x5bc7
subsd %xmm1, %xmm3
movslq 0xc8(%rbx), %r14
imulq %r8, %r14
addq 0xb8(%rbx), %r14
movsd %xmm3, (%r14,%r11,8)
incq %r11
cmpq %r11, %rdx
jne 0x5b45
incq %r10
addq %rdi, %rsi
addq $0x8, %r8
cmpq %rax, %r10
jne 0x5b39
movq %rsp, %rdi
callq 0x8d20
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8d20
movq %rbx, %rdi
callq 0x44b0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/pfm2pfm/pfm2pfm.cpp
// Function: DV(gaps::R2Grid*)
void DV(R2Grid *grid)
{
  R2Grid f(*grid);
  grid->Clear(R2_GRID_UNKNOWN_VALUE);
  for (int iy = 0; iy < grid->YResolution()-1; iy++) {
    for (int ix = 0; ix < grid->XResolution(); ix++) {
      RNScalar d0 = f.GridValue(ix, iy);
      if (RNIsZero(d0) || (d0 == R2_GRID_UNKNOWN_VALUE)) continue;
      RNScalar d1 = f.GridValue(ix, iy+1);
      if (RNIsZero(d1) || (d1 == R2_GRID_UNKNOWN_VALUE)) continue;
      grid->SetGridValue(ix, iy, d1 - d0);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x8b48
movsd 0x533da(%rip), %xmm0    # 0x59008
movq %rbx, %rdi
callq 0xa2b2
movl 0xc4(%rbx), %eax
cmpl $0x2, %eax
movsd 0x533c1(%rip), %xmm6    # 0x59008
jl 0x5d30
decl %eax
movl 0xc0(%rbx), %ecx
movq 0xb8(%rsp), %rdx
movslq 0xc8(%rsp), %rsi
leaq (%rdx,%rsi,8), %rdi
shlq $0x3, %rsi
xorl %r8d, %r8d
leaq 0x76721(%rip), %r9      # 0x7c398
movapd 0x533e1(%rip), %xmm0    # 0x59060
xorl %r10d, %r10d
testl %ecx, %ecx
jle 0x5d1a
xorl %r11d, %r11d
movsd (%rdx,%r11,8), %xmm1
ucomisd %xmm6, %xmm1
jne 0x5c9b
jnp 0x5d0e
movsd (%r9), %xmm4
movapd %xmm4, %xmm2
xorpd %xmm0, %xmm2
movapd %xmm1, %xmm3
cmplepd %xmm4, %xmm3
movapd %xmm2, %xmm5
cmplepd %xmm1, %xmm5
andpd %xmm3, %xmm5
movd %xmm5, %ebp
testb $0x1, %bpl
jne 0x5d0e
movsd (%rdi,%r11,8), %xmm3
ucomisd %xmm6, %xmm3
jne 0x5cd6
jnp 0x5d0e
movapd %xmm3, %xmm5
cmplepd %xmm4, %xmm5
cmplepd %xmm3, %xmm2
andpd %xmm5, %xmm2
movd %xmm2, %ebp
testb $0x1, %bpl
jne 0x5d0e
subsd %xmm1, %xmm3
movslq 0xc8(%rbx), %r14
imulq %r8, %r14
addq 0xb8(%rbx), %r14
movsd %xmm3, (%r14,%r11,8)
incq %r11
cmpq %r11, %rcx
jne 0x5c8d
incq %r10
addq $0x8, %r8
addq %rsi, %rdi
addq %rsi, %rdx
cmpq %rax, %r10
jne 0x5c82
movq %rsp, %rdi
callq 0x8d20
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x8d20
movq %rbx, %rdi
callq 0x44b0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/pfm2pfm/pfm2pfm.cpp
// Function: ReadGrid(char const*)
static R2Grid *
ReadGrid(const char *filename)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();

  // Allocate a grid
  R2Grid *grid = new R2Grid();
  if (!grid) {
    RNFail("Unable to allocate grid");
    return NULL;
  }

  // Read grid
  int status = grid->Read(filename);
  if (!status) {
    RNFail("Unable to read grid file %s", filename);
    return NULL;
  }

  // Print statistics
  if (print_verbose) {
    printf("Read grid from %s\n", filename);
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  Resolution = %d %d\n", grid->XResolution(), grid->YResolution());
    printf("  Spacing = %g\n", grid->GridToWorldScaleFactor());
    printf("  Cardinality = %d\n", grid->Cardinality());
    RNInterval grid_range = grid->Range();
    printf("  Minimum = %g\n", grid_range.Min());
    printf("  Maximum = %g\n", grid_range.Max());
    printf("  L1Norm = %g\n", grid->L1Norm());
    printf("  L2Norm = %g\n", grid->L2Norm());
    fflush(stdout);
  }

  // Return success
  return grid;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x27280
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4480
movl $0xd0, %edi
callq 0x4270
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8100
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10602
testl %eax, %eax
je 0x7c5d
cmpb $0x1, 0x75eef(%rip)     # 0x7da20
jne 0x7c70
leaq 0x51ab1(%rip), %rdi     # 0x595ef
movq %r14, %rsi
xorl %eax, %eax
callq 0x4050
leaq 0x8(%rsp), %rdi
callq 0x272e2
leaq 0x51aa9(%rip), %rdi     # 0x59602
movb $0x1, %al
callq 0x4050
movl 0xc0(%rbx), %esi
movl 0xc4(%rbx), %edx
leaq 0x51aa6(%rip), %rdi     # 0x59619
xorl %eax, %eax
callq 0x4050
movsd 0xb0(%rbx), %xmm1
leaq 0x7480f(%rip), %rax     # 0x7c398
movsd (%rax), %xmm2
movapd 0x514cb(%rip), %xmm0    # 0x59060
xorpd %xmm2, %xmm0
movsd 0x5146f(%rip), %xmm3    # 0x59010
divsd %xmm1, %xmm3
cmpnlesd %xmm1, %xmm0
movapd %xmm0, %xmm4
andpd %xmm3, %xmm4
cmpnlesd %xmm2, %xmm1
andpd %xmm3, %xmm1
andnpd %xmm1, %xmm0
orpd %xmm4, %xmm0
leaq 0x51a65(%rip), %rdi     # 0x5962f
movb $0x1, %al
callq 0x4050
movq %rbx, %rdi
callq 0x8f52
leaq 0x51a5f(%rip), %rdi     # 0x5963f
movl %eax, %esi
xorl %eax, %eax
callq 0x4050
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8d48
movsd (%r14), %xmm0
leaq 0x51a4e(%rip), %rdi     # 0x59653
movb $0x1, %al
callq 0x4050
movsd 0x8(%r14), %xmm0
leaq 0x51a4a(%rip), %rdi     # 0x59663
movb $0x1, %al
callq 0x4050
movq %rbx, %rdi
callq 0x8e9c
leaq 0x51a44(%rip), %rdi     # 0x59673
movb $0x1, %al
callq 0x4050
movq %rbx, %rdi
callq 0x8eec
leaq 0x51a3d(%rip), %rdi     # 0x59682
movb $0x1, %al
callq 0x4050
movq 0x7434d(%rip), %rax     # 0x7bfa0
movq (%rax), %rdi
callq 0x42d0
jmp 0x7c70
leaq 0x5196f(%rip), %rdi     # 0x595d3
xorl %ebx, %ebx
movq %r14, %rsi
xorl %eax, %eax
callq 0x2988a
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movl $0xd0, %esi
movq %rbx, %rdi
callq 0x4280
movq %r14, %rdi
callq 0x44b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::RNPolynomial(gaps::RNPolynomial const&)
RNPolynomial::
RNPolynomial(const RNPolynomial& polynomial)
  :terms()
{
  // Copy polynomial terms
  terms.Resize(polynomial.NTerms());
  for (int i = 0; i < polynomial.NTerms(); i++) {
    RNPolynomialTerm *polynomial_term = polynomial.Term(i);
    RNPolynomialTerm *term = new RNPolynomialTerm(*polynomial_term);
    terms.Insert(term); 
    term->polynomial = this; 
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2751c
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0x27610
cmpl $0x0, 0xc(%r14)
jle 0x20d34
xorl %r13d, %r13d
movq (%r14), %rax
movq (%rax,%r13,8), %r12
movl $0x28, %edi
callq 0x4270
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x2258e
movl 0xc(%rbx), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x275b2
movq %rbx, (%r15)
incq %r13
movslq 0xc(%r14), %rax
cmpq %rax, %r13
jl 0x20cf8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x20d52
movq %rax, %r14
movl $0x28, %esi
movq %r15, %rdi
callq 0x4280
jmp 0x20d55
movq %rax, %r14
movq %rbx, %rdi
callq 0x27586
movq %r14, %rdi
callq 0x44b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::Empty()
void RNPolynomial::
Empty(void)
{
  // Delete all terms
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    delete term;
  }

  // Empty array of terms
  terms.Empty();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0xc(%rdi)
jle 0x2106c
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x21060
movq %r14, %rdi
callq 0x22638
movl $0x28, %esi
movq %r14, %rdi
callq 0x4280
incq %r15
movslq 0xc(%rbx), %rax
cmpq %rax, %r15
jl 0x2103f
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x2775c
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::Degree() const
RNScalar RNPolynomial::
Degree(void) const
{
  // Return highest degree of any term
  RNScalar max_degree = 0;
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    RNScalar degree = term->Degree();
    if (degree > max_degree) max_degree = degree;
  }
  return max_degree;
}

// Assembly:
movslq 0xc(%rdi), %rax
testq %rax, %rax
jle 0x210c5
movq (%rdi), %rcx
xorpd %xmm1, %xmm1
xorl %edx, %edx
movq (%rcx,%rdx,8), %rdi
movslq 0x8(%rdi), %rsi
xorpd %xmm0, %xmm0
testq %rsi, %rsi
jle 0x210b4
movq 0x20(%rdi), %rdi
xorl %r8d, %r8d
addsd (%rdi,%r8,8), %xmm0
incq %r8
cmpq %r8, %rsi
jne 0x210a6
maxsd %xmm1, %xmm0
incq %rdx
movapd %xmm0, %xmm1
cmpq %rax, %rdx
jne 0x2108e
retq
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomialTerm::Degree() const
RNScalar RNPolynomialTerm::
Degree(void) const
{
  // Return degree
  RNScalar degree = 0;
  for (int i = 0; i < NVariables(); i++) degree += e[i];
  return degree;
}

// Assembly:
movslq 0x8(%rdi), %rax
testq %rax, %rax
jle 0x210eb
movq 0x20(%rdi), %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
addsd (%rcx,%rdx,8), %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0x210dd
retq
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::NVariables() const
static int
RNComparePolynomialTerms(const RNPolynomialTerm *term1, const RNPolynomialTerm *term1)
{
  // Check number of variables
  if (term1->NVariables() < term2->NVariables()) return -1;
  else if (term1->NVariables() > term2->NVariables()) return 1;

  // Compare variables and exponents 
  for (int i = 0; i < term1->NVariables(); i++) {
    // This assumes variables are sorted
    if (term1->Variable(i) < term2->Variable(i)) return -1;
    else if (term1->Variable(i) > term2->Variable(i)) return 1;
    if (term1->Exponent(i) < term2->Exponent(i)) return -1;
    else if (term1->Exponent(i) > term2->Exponent(i)) return 1;
  }

  // Terms have the same variables and exponents
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl 0xc(%rdi), %r13d
testq %r13, %r13
je 0x211d8
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
movl $0x7fffffff, (%rsi)     # imm = 0x7FFFFFFF
leaq 0xc(%rsp), %rbx
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movq %rbx, %rdx
callq 0x211ea
movl (%rbx), %eax
xorl %ebx, %ebx
testl %eax, %eax
js 0x211da
movl 0x8(%rsp), %ecx
cmpl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
sete %dl
cmpl %ecx, %eax
setl %sil
orb %dl, %sil
jne 0x211da
movl $0x1, %ebx
cmpl %ecx, %eax
je 0x211da
incl %ecx
movl $0x2, %ebx
cmpl %ecx, %eax
je 0x211da
leaq 0x4(,%rax,4), %r12
movq %r12, %rdi
callq 0x4030
movq %rax, %r14
xorl %ebx, %ebx
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x4160
testl %r13d, %r13d
jle 0x211ce
movq (%r15), %rax
xorl %ebx, %ebx
xorl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
cmpl $0x0, 0x8(%rdx)
jle 0x211c6
movq 0x18(%rdx), %rsi
xorl %edi, %edi
movslq (%rsi,%rdi,4), %r8
cmpl $0x1, (%r14,%r8,4)
je 0x211ba
movl $0x1, (%r14,%r8,4)
incl %ebx
incq %rdi
movslq 0x8(%rdx), %r8
cmpq %r8, %rdi
jl 0x211a5
incq %rcx
cmpq %r13, %rcx
jne 0x21195
movq %r14, %rdi
callq 0x4350
jmp 0x211da
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::UpdateVariableRange(int&, int&) const
void RNPolynomial::
UpdateVariableRange(int& min_v, int& max_v) const
{
  // Update variable index for each term
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    term->UpdateVariableRange(min_v, max_v);
  }
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
jle 0x21237
movq (%rdi), %rax
xorl %ecx, %ecx
movq (%rax,%rcx,8), %r8
cmpl $0x0, 0x8(%r8)
jle 0x2122b
movq 0x18(%r8), %r9
xorl %r10d, %r10d
movl (%r9,%r10,4), %r11d
cmpl (%rdx), %r11d
jle 0x21213
movl %r11d, (%rdx)
movl (%r9,%r10,4), %r11d
cmpl (%rsi), %r11d
jge 0x2121f
movl %r11d, (%rsi)
incq %r10
movslq 0x8(%r8), %r11
cmpq %r11, %r10
jl 0x21207
incq %rcx
movslq 0xc(%rdi), %r8
cmpq %r8, %rcx
jl 0x211f5
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::UpdateVariableIndex(int, int&, int*, int, int*, int*, int) const
void RNPolynomial::
UpdateVariableIndex(int max_variables, int& variable_count, 
  int *variable_marks, int current_mark, 
  int *index_to_variable, int *variable_to_index,
  RNBoolean remap_variables) const
{
  // Just checking
  assert(variable_to_index || !remap_variables);

  // Update variable index for each term
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    term->UpdateVariableIndex(max_variables, variable_count, 
      variable_marks, current_mark,
      index_to_variable, variable_to_index,
      remap_variables);
  }
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
jle 0x2129c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
xorl %r13d, %r13d
movq (%r12), %rax
movq (%rax,%r13,8), %rdi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
movq %rbx, %r9
movl 0x48(%rsp), %eax
pushq %rax
pushq 0x48(%rsp)
callq 0x2231e
addq $0x10, %rsp
incq %r13
movslq 0xc(%r12), %rax
cmpq %rax, %r13
jl 0x2125b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::IsLinear() const
RNBoolean RNPolynomial::
IsLinear(void) const
{
  // Check each term
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    if (!term->IsLinear()) return FALSE;
  }

  // Passed all tests
  return TRUE;
}

// Assembly:
movslq 0xc(%rdi), %rcx
testq %rcx, %rcx
setle %al
jle 0x21385
movq (%rdi), %rdx
movq %rcx, %rsi
negq %rsi
movl $0x1, %edi
movsd 0x37cc6(%rip), %xmm0    # 0x59010
movq -0x8(%rdx,%rdi,8), %r8
movl 0x8(%r8), %r9d
testl %r9d, %r9d
je 0x2136f
cmpl $0x1, %r9d
jne 0x21385
movq 0x20(%r8), %r8
movsd (%r8), %xmm1
ucomisd %xmm0, %xmm1
jne 0x21385
jp 0x21385
cmpq %rcx, %rdi
setae %al
leaq (%rsi,%rdi), %r8
incq %r8
incq %rdi
cmpq $0x1, %r8
jne 0x2134a
movzbl %al, %eax
andl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::IsQuadratic() const
RNBoolean RNPolynomial::
IsQuadratic(void) const
{
  // Check each term
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    if (!term->IsQuadratic()) return FALSE;
  }

  // Passed all tests
  return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq 0xc(%rdi), %rbx
testq %rbx, %rbx
setle %bpl
jle 0x213fe
movq (%rdi), %r14
movq (%r14), %rdi
callq 0x2140e
testl %eax, %eax
je 0x213fe
movl $0x1, %ecx
movq %rcx, %r15
cmpq %rcx, %rbx
je 0x213f7
movq (%r14,%r15,8), %rdi
callq 0x2140e
leaq 0x1(%r15), %rcx
testl %eax, %eax
jne 0x213de
cmpq %rbx, %r15
setae %bpl
movzbl %bpl, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::HasVariable(int) const
RNBoolean RNPolynomial::
HasVariable(int variable) const
{
  // Check terms
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    if (term->HasVariable(variable)) return TRUE;
  }

  // Not found
  return FALSE;
}

// Assembly:
movslq 0xc(%rdi), %rcx
testq %rcx, %rcx
setg %al
jle 0x214de
movq (%rdi), %rdx
xorl %edi, %edi
movq (%rdx,%rdi,8), %r9
movslq 0x8(%r9), %r8
testq %r8, %r8
setg %r10b
jle 0x214ce
movq 0x18(%r9), %r9
cmpl %esi, (%r9)
je 0x214de
movl $0x1, %r11d
movq %r11, %r10
cmpq %r11, %r8
je 0x214c7
leaq 0x1(%r10), %r11
cmpl %esi, (%r9,%r10,4)
jne 0x214b5
cmpq %r8, %r10
setb %r10b
testb %r10b, %r10b
jne 0x214de
incq %rdi
cmpq %rcx, %rdi
setb %al
jne 0x21495
movzbl %al, %eax
andl $0x1, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomialTerm::HasVariable(int) const
RNBoolean RNPolynomialTerm::
HasVariable(int variable) const
{
  // Search for variable
  for (int i = 0; i < n; i++) {
    if (v[i] == variable) return TRUE;
  }

  // Not found
  return FALSE;
}

// Assembly:
movslq 0x8(%rdi), %rax
testq %rax, %rax
setg %dl
jle 0x21516
movq 0x18(%rdi), %rcx
cmpl %esi, (%rcx)
je 0x21516
movl $0x1, %edi
movq %rdi, %rdx
cmpq %rdi, %rax
je 0x21510
leaq 0x1(%rdx), %rdi
cmpl %esi, (%rcx,%rdx,4)
jne 0x214ff
cmpq %rax, %rdx
setb %dl
movzbl %dl, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::Negate()
void RNPolynomial::
Negate(void)
{
  // Negate all terms
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    term->Negate();
  }
}

// Assembly:
movslq 0xc(%rdi), %rax
testq %rax, %rax
jle 0x21547
movq (%rdi), %rcx
xorl %edx, %edx
movaps 0x37b31(%rip), %xmm0    # 0x59060
movq (%rcx,%rdx,8), %rsi
movsd 0x10(%rsi), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, 0x10(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x2152f
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::Multiply(double)
void RNPolynomial::
Multiply(RNScalar factor)
{
  // Check if factor is zero
  if (factor == 0.0) {
    // Delete all terms
    Empty();
  }
  else {
    // Multiply all terms by factor
    for (int i = 0; i < NTerms(); i++) {
      RNPolynomialTerm *term = Term(i);
      term->Multiply(factor);
    }
  }
}

// Assembly:
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x21559
jp 0x21559
jmp 0x2102e
movslq 0xc(%rdi), %rax
testq %rax, %rax
jle 0x21581
movq (%rdi), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movsd 0x10(%rsi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x21567
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::Add(gaps::RNPolynomial const&)
void RNPolynomial::
Add(const RNPolynomial& polynomial)
{
  // Add polynomial
  for (int i = 0; i < polynomial.NTerms(); i++) {
    RNPolynomialTerm *term = polynomial.Term(i);
    AddTerm(term->Coefficient(), term->NVariables(), term->Variables(), term->Exponents(), TRUE, TRUE);
  }
}

// Assembly:
cmpl $0x0, 0xc(%rsi)
jle 0x2160c
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rax
movsd 0x10(%rax), %xmm0
movl 0x8(%rax), %esi
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rcx
movq %r14, %rdi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x20e38
incq %r15
movslq 0xc(%rbx), %rax
cmpq %rax, %r15
jl 0x215d0
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::Subtract(gaps::RNPolynomial const&)
void RNPolynomial::
Subtract(const RNPolynomial& polynomial)
{
  // Subtract polynomial
  for (int i = 0; i < polynomial.NTerms(); i++) {
    RNPolynomialTerm *term = polynomial.Term(i);
    AddTerm(-(term->Coefficient()), term->NVariables(), term->Variables(), term->Exponents(), TRUE, TRUE);
  }
}

// Assembly:
cmpl $0x0, 0xc(%rsi)
jle 0x21665
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rax
movsd 0x10(%rax), %xmm0
xorps 0x37a2b(%rip), %xmm0    # 0x59060
movl 0x8(%rax), %esi
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rcx
movq %r14, %rdi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x20e38
incq %r15
movslq 0xc(%rbx), %rax
cmpq %rax, %r15
jl 0x21622
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::operator=(gaps::RNPolynomial const&)
RNPolynomial& RNPolynomial::
operator=(const RNPolynomial& polynomial)
{
  // Empty this polynomial
  Empty();

  // Copy polynomial terms
  terms.Resize(polynomial.NTerms());
  for (int i = 0; i < polynomial.NTerms(); i++) {
    RNPolynomialTerm *polynomial_term = polynomial.Term(i);
    RNPolynomialTerm *term = new RNPolynomialTerm(*polynomial_term);
    terms.Insert(term); 
    term->polynomial = this; 
  }

  // Return this
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2102e
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0x27610
cmpl $0x0, 0xc(%r14)
jle 0x21926
xorl %r13d, %r13d
movq (%r14), %rax
movq (%rax,%r13,8), %r12
movl $0x28, %edi
callq 0x4270
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x2258e
movl 0xc(%rbx), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x275b2
movq %rbx, (%r15)
incq %r13
movslq 0xc(%r14), %rax
cmpq %rax, %r13
jl 0x218ea
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
callq 0x4280
movq %rbx, %rdi
callq 0x44b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::Evaluate(double const*) const
RNScalar RNPolynomial::
Evaluate(const RNScalar *x) const
{
  // Return sum of terms
  RNScalar sum = 0;
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    sum += term->Evaluate(x);
  }
  return sum;
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
jle 0x21a35
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorpd %xmm0, %xmm0
xorl %r15d, %r15d
movsd %xmm0, 0x8(%rsp)
movq (%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x21a3a
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
incq %r15
movslq 0xc(%r14), %rax
cmpq %rax, %r15
jl 0x219f4
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomialTerm::Evaluate(double const*) const
RNScalar RNPolynomialTerm::
Evaluate(const RNScalar *x) const
{
  // Evaluate the term
  RNScalar result = c;
  for (int i = 0; i < NVariables(); i++) {
    int k = Variable(i);
    if (e[i] == 1.0) result *= x[k];
    else if (e[i] == 2.0) result *= x[k] *x[k];
    else if ((e[i] < 0) && RNIsZero(x[k])) result *= RN_INFINITY;
    else result *= pow(x[k], e[i]);
  }
  return result;
}

// Assembly:
movsd 0x10(%rdi), %xmm4
cmpl $0x0, 0x8(%rdi)
jle 0x21b2d
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movsd 0x375a9(%rip), %xmm5    # 0x59010
movsd 0x38c49(%rip), %xmm6    # 0x5a6b8
leaq 0x5a922(%rip), %r12     # 0x7c398
leaq 0x5a92b(%rip), %r13     # 0x7c3a8
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
movslq (%rax,%r15,4), %rax
movsd (%rcx,%r15,8), %xmm1
ucomisd %xmm5, %xmm1
jne 0x21a9e
jp 0x21a9e
movsd (%rbx,%rax,8), %xmm0
jmp 0x21b0c
ucomisd %xmm6, %xmm1
jne 0x21ab1
jp 0x21ab1
movsd (%rbx,%rax,8), %xmm0
mulsd %xmm0, %xmm0
jmp 0x21b0c
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x21ae6
movsd (%rbx,%rax,8), %xmm0
movsd (%r12), %xmm2
movapd %xmm2, %xmm3
xorpd 0x3758e(%rip), %xmm3    # 0x59060
ucomisd %xmm3, %xmm0
jb 0x21ae6
ucomisd %xmm0, %xmm2
jb 0x21ae6
movsd (%r13), %xmm0
jmp 0x21b0c
movsd (%rbx,%rax,8), %xmm0
movsd %xmm4, 0x8(%rsp)
callq 0x44a0
movsd 0x38bba(%rip), %xmm6    # 0x5a6b8
movsd 0x3750a(%rip), %xmm5    # 0x59010
movsd 0x8(%rsp), %xmm4
mulsd %xmm0, %xmm4
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x21a7d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
movapd %xmm4, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::Evaluate(double const* const*) const
RNScalar RNPolynomial::
Evaluate(double const* const* x) const
{
  // Evaluate polynomial (in format suitable for CERES)
  RNScalar sum = 0;
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    sum += term->Evaluate(x);
  }
  return sum;
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
jle 0x21b8f
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorpd %xmm0, %xmm0
xorl %r15d, %r15d
movsd %xmm0, 0x8(%rsp)
movq (%r14), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x21b94
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
incq %r15
movslq 0xc(%r14), %rax
cmpq %rax, %r15
jl 0x21b4e
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomialTerm::Evaluate(double const* const*) const
RNScalar RNPolynomialTerm::
Evaluate(double const* const* x) const
{
  // Evaluate the term (in format suitable for CERES)
  RNScalar result = c;
  for (int i = 0; i < NVariables(); i++) {
    int k = Variable(i);
    if (e[i] == 1.0) result *= x[k][0];
    else if (e[i] == 2.0) result *= x[k][0] * x[k][0];
    else if ((e[i] < 0) && RNIsZero(x[k][0])) result *= RN_INFINITY;
    else result *= pow(x[k][0], e[i]);
  }
  return result;
}

// Assembly:
movsd 0x10(%rdi), %xmm4
cmpl $0x0, 0x8(%rdi)
jle 0x21c93
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movsd 0x3744f(%rip), %xmm5    # 0x59010
movsd 0x38aef(%rip), %xmm6    # 0x5a6b8
leaq 0x5a7c8(%rip), %r12     # 0x7c398
leaq 0x5a7d1(%rip), %r13     # 0x7c3a8
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
movslq (%rax,%r15,4), %rax
movsd (%rcx,%r15,8), %xmm1
ucomisd %xmm5, %xmm1
jne 0x21bfb
jp 0x21bfb
movq (%rbx,%rax,8), %rax
movsd (%rax), %xmm0
jmp 0x21c72
ucomisd %xmm6, %xmm1
jne 0x21c11
jp 0x21c11
movq (%rbx,%rax,8), %rax
movsd (%rax), %xmm0
mulsd %xmm0, %xmm0
jmp 0x21c72
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x21c49
movq (%rbx,%rax,8), %rcx
movsd (%rcx), %xmm0
movsd (%r12), %xmm2
movapd %xmm2, %xmm3
xorpd 0x3742b(%rip), %xmm3    # 0x59060
ucomisd %xmm3, %xmm0
jb 0x21c49
ucomisd %xmm0, %xmm2
jb 0x21c49
movsd (%r13), %xmm0
jmp 0x21c72
movq (%rbx,%rax,8), %rax
movsd (%rax), %xmm0
movsd %xmm4, 0x8(%rsp)
callq 0x44a0
movsd 0x38a54(%rip), %xmm6    # 0x5a6b8
movsd 0x373a4(%rip), %xmm5    # 0x59010
movsd 0x8(%rsp), %xmm4
mulsd %xmm0, %xmm4
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x21bd7
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
movapd %xmm4, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::PartialDerivative(double const*, int) const
RNScalar RNPolynomial::
PartialDerivative(const RNScalar *x, int variable) const
{
  // Return sum of term partial derivatives for variable
  RNScalar sum = 0;
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    sum += term->PartialDerivative(x, variable);
  }
  return sum;
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
jle 0x21cf6
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorpd %xmm0, %xmm0
xorl %r12d, %r12d
movsd %xmm0, (%rsp)
movq (%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x21cfa
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %r12
movslq 0xc(%r15), %rax
cmpq %rax, %r12
jl 0x21cb5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::PartialDerivative(double const* const*, int) const
RNScalar RNPolynomial::
PartialDerivative(double const* const* x, int variable) const
{
  // Return sum of term partial derivatives for variable
  RNScalar sum = 0;
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    sum += term->PartialDerivative(x, variable);
  }
  return sum;
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
jle 0x21f38
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorpd %xmm0, %xmm0
xorl %r12d, %r12d
movsd %xmm0, (%rsp)
movq (%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x21f3c
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %r12
movslq 0xc(%r15), %rax
cmpq %rax, %r12
jl 0x21ef7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::Print(_IO_FILE*) const
void RNPolynomial::
Print(FILE *fp) const
{
  // Print polynomial
  printf("{ ");
  for (int i = 0; i < NTerms(); i++) {
    RNPolynomialTerm *term = Term(i);
    fprintf(fp, "  ");
    term->Print(fp);
  }
  printf(" }\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38578(%rip), %rdi     # 0x5a6c0
xorl %eax, %eax
callq 0x4050
cmpl $0x0, 0xc(%r14)
jle 0x22193
xorl %r13d, %r13d
leaq 0x38815(%rip), %r15     # 0x5a975
movq (%r14), %rax
movq (%rax,%r13,8), %r12
movl $0x2, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x4550
movq %r12, %rdi
movq %rbx, %rsi
callq 0x221a8
incq %r13
movslq 0xc(%r14), %rax
cmpq %rax, %r13
jl 0x22160
leaq 0x38532(%rip), %rdi     # 0x5a6cc
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4420
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomialTerm::Print(_IO_FILE*) const
void RNPolynomialTerm::
Print(FILE *fp) const
{
  // Print term
  fprintf(fp, "%g ", Coefficient());
  for (int j = 0; j < NVariables(); j++) {
    fprintf(fp, "(%d^%g) ", Variable(j), Exponent(j));
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movsd 0x10(%rdi), %xmm0
leaq 0x37c2a(%rip), %rsi     # 0x59dec
movq %rbx, %rdi
movb $0x1, %al
callq 0x43d0
cmpl $0x0, 0x8(%r14)
jle 0x22208
xorl %r12d, %r12d
leaq 0x384e6(%rip), %r15     # 0x5a6c3
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
movl (%rax,%r12,4), %edx
movsd (%rcx,%r12,8), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x43d0
incq %r12
movslq 0x8(%r14), %rax
cmpq %rax, %r12
jl 0x221dd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomialTerm::HasVariables(int, int const*, double const*) const
RNBoolean RNPolynomialTerm::
HasVariables(int query_n, const int *query_v, const RNScalar *query_e) const
{
  // Check if query has same number of variables
  if (n != query_n) return FALSE;

  // Compare variables and exponents 
  for (int i = 0; i < n; i++) {
    // This assumes variables are sorted
    if (v[i] != query_v[i]) return FALSE;
    if (e[i] != query_e[i]) return FALSE;
  }

  // Passed all tests
  return TRUE;
}

// Assembly:
movl 0x8(%rdi), %r8d
xorl %eax, %eax
cmpl %esi, %r8d
jne 0x2226e
testl %r8d, %r8d
setle %al
jle 0x22268
movq 0x18(%rdi), %rsi
movl (%rsi), %r9d
cmpl (%rdx), %r9d
jne 0x22268
movq 0x20(%rdi), %rdi
movl $0x1, %r9d
movsd -0x8(%rdi,%r9,8), %xmm0
ucomisd -0x8(%rcx,%r9,8), %xmm0
jne 0x22268
jp 0x22268
cmpq %r8, %r9
setae %al
je 0x22268
movl (%rsi,%r9,4), %r10d
leaq 0x1(%r9), %r11
cmpl (%rdx,%r9,4), %r10d
movq %r11, %r9
je 0x2223d
movzbl %al, %eax
andl $0x1, %eax
retq
nop