LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
subq $0xc0, %rsp
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
movq %rax, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movb $0x0, -0x19(%rbp)
leaq -0x1a(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x2240
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq 0x2897(%rip), %rsi      # 0x70fd
callq 0x21c0
jmp 0x486d
leaq -0x1a(%rbp), %rdi
callq 0x2190
movq -0x90(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
addq $0x8, %rdi
callq 0x4a10
movq %rax, -0xa0(%rbp)
jmp 0x489a
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x2240
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x21c0
jmp 0x48d4
movq -0xa8(%rbp), %rsi
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x49e0
jmp 0x48ea
movq -0x88(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x21a0
jmp 0x48fc
leaq -0x50(%rbp), %rdi
callq 0x2298
leaq -0x70(%rbp), %rdi
callq 0x2298
leaq -0x71(%rbp), %rdi
callq 0x2190
movq -0x88(%rbp), %rdi
leaq 0x27d8(%rip), %rsi      # 0x70fd
callq 0x2150
jmp 0x492c
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x49ae
jmp 0x49a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1a(%rbp), %rdi
callq 0x2190
jmp 0x49ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x49be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x4997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x498e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x2298
leaq -0x70(%rbp), %rdi
callq 0x2298
leaq -0x71(%rbp), %rdi
callq 0x2190
jmp 0x49be
movq -0x88(%rbp), %rdi
callq 0x2298
movq -0x98(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x2298
movq -0x28(%rbp), %rdi
callq 0x2230
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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
subq $0x70, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x4f00
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x24(%rbp)
movb $0x0, -0x25(%rbp)
leaq -0x26(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x2240
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rdx
leaq 0x2343(%rip), %rsi      # 0x70fd
callq 0x21c0
jmp 0x4dc1
leaq -0x26(%rbp), %rdi
callq 0x2190
movl -0x24(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4e12
movq -0x68(%rbp), %rdi
movl $0x25, %esi
callq 0x20c0
jmp 0x4de5
jmp 0x4e12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x26(%rbp), %rdi
callq 0x2190
jmp 0x4ea9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x4ea0
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x58(%rbp), %rdi
callq 0x49e0
jmp 0x4e25
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x21a0
jmp 0x4e34
leaq -0x58(%rbp), %rdi
callq 0x2298
movl -0x24(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4e71
movq -0x68(%rbp), %rdi
movl $0x25, %esi
callq 0x20c0
jmp 0x4e58
jmp 0x4e71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x2298
jmp 0x4ea0
movq -0x68(%rbp), %rdi
leaq 0x2281(%rip), %rsi      # 0x70fd
callq 0x2150
jmp 0x4e83
movb $0x1, -0x25(%rbp)
testb $0x1, -0x25(%rbp)
jne 0x4e96
movq -0x68(%rbp), %rdi
callq 0x2298
movq -0x70(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x2298
movq -0x30(%rbp), %rdi
callq 0x2230
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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
subq $0xa0, %rsp
movq %rdi, -0x80(%rbp)
movq %rdi, %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x64b0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movb $0x0, -0x29(%rbp)
leaq -0x2a(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x2240
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0xe22(%rip), %rsi       # 0x7130
callq 0x21c0
jmp 0x6315
leaq -0x2a(%rbp), %rdi
callq 0x2190
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x28(%rbp), %rdi
callq 0x5d80
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
jae 0x642f
cmpq $0x0, -0x48(%rbp)
jbe 0x6391
movq -0x80(%rbp), %rdi
movl $0x2c, %esi
callq 0x20c0
jmp 0x6364
jmp 0x6391
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2a(%rbp), %rdi
callq 0x2190
jmp 0x646d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6464
movq -0x28(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x64e0
movq %rax, %rdi
callq 0x64c0
movq %rax, -0x98(%rbp)
jmp 0x63af
movq -0x98(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x70(%rbp), %rdi
callq *%rax
jmp 0x63d0
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x21a0
jmp 0x63df
leaq -0x70(%rbp), %rdi
callq 0x2298
movq -0x50(%rbp), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, %rax
je 0x6405
movq -0xa0(%rbp), %rdi
callq 0x2140
jmp 0x6407
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x6326
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x2298
jmp 0x6464
movq -0x80(%rbp), %rdi
leaq 0xcf4(%rip), %rsi       # 0x712e
callq 0x2150
jmp 0x6441
movb $0x1, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
jne 0x6454
movq -0x80(%rbp), %rdi
callq 0x2298
movq -0x88(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x2298
movq -0x38(%rbp), %rdi
callq 0x2230
nopw %cs:(%rax,%rax)
// File: suyash[P]chan/examples/go/sieve.cc
// Function: filter(std::weak_ptr<chan::unbuffered_chan<int>>, std::weak_ptr<chan::unbuffered_chan<int>>, int)
void filter(
	std::weak_ptr<chan::unbuffered_chan<int>> in,
	std::weak_ptr<chan::unbuffered_chan<int>> out,
	int prime
) {
	for (int i = 0 ; ; i++) {
		int x = 0;
		in.lock()->recv(x);

		if (x % prime != 0) {
			out.lock()->send(x);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x60(%rbp)
movq %rsi, -0x58(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x60(%rbp), %rsi
movl $0x0, -0x1c(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x27f0
movq -0x68(%rbp), %rdi
callq 0x2820
movq %rax, %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2890
jmp 0x2441
leaq -0x30(%rbp), %rdi
callq 0x2870
movl -0x1c(%rbp), %eax
cltd
idivl -0x14(%rbp)
cmpl $0x0, %edx
je 0x24bb
movq -0x58(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x27f0
movq -0x70(%rbp), %rdi
callq 0x2820
movq %rax, %rdi
addq $0x8, %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2840
jmp 0x2482
leaq -0x50(%rbp), %rdi
callq 0x2870
jmp 0x24bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2870
jmp 0x24cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x2870
jmp 0x24cb
jmp 0x24bd
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2412
movq -0x38(%rbp), %rdi
callq 0x2190
nopw %cs:(%rax,%rax)
// File: suyash[P]chan/examples/go/sieve.cc
// Function: main
int main() {
	auto ch = std::make_shared<chan::unbuffered_chan<int>>();
	std::thread(generate, ch).detach();

	for (int i = 0 ; i < 10 ; i++) {
		int prime = 0;
		ch->recv(prime);
		printf("%d\n", prime);

		auto ch1 = std::make_shared<chan::unbuffered_chan<int>>();
		std::thread(filter, ch, ch1, prime).detach();

		ch = ch1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x18(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x28c0
movq -0x58(%rbp), %rdx
leaq -0x197(%rip), %rsi      # 0x2370
leaq -0x20(%rbp), %rdi
callq 0x2930
jmp 0x2512
leaq -0x20(%rbp), %rdi
callq 0x2180
jmp 0x251d
leaq -0x20(%rbp), %rdi
callq 0x29f0
movl $0x0, -0x30(%rbp)
cmpl $0xa, -0x30(%rbp)
jge 0x261c
movl $0x0, -0x34(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x2820
movq %rax, %rdi
leaq -0x34(%rbp), %rsi
callq 0x2890
jmp 0x2555
movl -0x34(%rbp), %esi
leaq 0x3aa5(%rip), %rdi      # 0x6004
xorl %eax, %eax
callq 0x2030
jmp 0x2568
leaq -0x48(%rbp), %rdi
callq 0x28c0
jmp 0x2573
leaq -0x18a(%rip), %rsi      # 0x23f0
leaq -0x50(%rbp), %rdi
leaq -0x18(%rbp), %rdx
leaq -0x48(%rbp), %rcx
leaq -0x34(%rbp), %r8
callq 0x2a20
jmp 0x2591
leaq -0x50(%rbp), %rdi
callq 0x2180
jmp 0x259c
leaq -0x50(%rbp), %rdi
callq 0x29f0
leaq -0x18(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2af0
leaq -0x48(%rbp), %rdi
callq 0x2870
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x252d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x262e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x29f0
jmp 0x262e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x2611
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x29f0
leaq -0x48(%rbp), %rdi
callq 0x2870
jmp 0x262e
leaq -0x18(%rbp), %rdi
callq 0x2870
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
leaq -0x18(%rbp), %rdi
callq 0x2870
movq -0x28(%rbp), %rdi
callq 0x2190
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rdi
callq 0xaf10
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x670e
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0xafd0
movsd 0xa497d(%rip), %xmm1    # 0xab040
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %ecx
movl %ecx, %eax
shrl $0x3, %eax
andl $0x1fff, %eax           # imm = 0x1FFF
andl $0x7, %ecx
shll $0xd, %ecx
orl %ecx, %eax
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %eax
cvtsi2sd %rax, %xmm0
callq 0xb2b0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x6691
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movq 0x50(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0xd440
leaq 0x38(%rsp), %rdi
callq 0xb5e0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6756
jp 0x6756
jmp 0x688e
leaq 0x38(%rsp), %rdi
callq 0xb5e0
movaps %xmm0, %xmm1
movsd 0xa48b5(%rip), %xmm0    # 0xab020
divsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x50(%rsp), %rdi
callq 0xaef0
movl %eax, %ecx
movl 0x18(%rsp), %eax
cmpl %ecx, %eax
jge 0x688e
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x50(%rsp), %rdi
callq 0xaed0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x687c
movq 0x50(%rsp), %rdi
movl 0x28(%rsp), %esi
movl 0x2c(%rsp), %edx
callq 0xae90
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
movsd 0xa481d(%rip), %xmm1    # 0xab008
ucomisd %xmm1, %xmm0
jne 0x67f5
jp 0x67f5
jmp 0x686c
cvtsi2sdl 0x4c(%rsp), %xmm0
mulsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rsp)
leaq 0x38(%rsp), %rdi
callq 0xb600
movsd (%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x8(%rsp), %xmm0
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl 0x4c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x6854
movl 0x4c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x1c(%rsp)
movq 0x50(%rsp), %rdi
movl 0x28(%rsp), %esi
movl 0x2c(%rsp), %edx
cvtsi2sdl 0x1c(%rsp), %xmm0
callq 0xb610
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x67a5
jmp 0x687e
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x677d
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x130(%rsp)
movq 0x130(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0xd0f0
movq 0x130(%rsp), %rdi
movsd 0xa4737(%rip), %xmm0    # 0xab008
callq 0xfa70
jmp 0x68d8
movl $0x0, 0x50(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x30(%rsp)
movq 0x130(%rsp), %rdi
callq 0xaef0
movl %eax, 0x34(%rsp)
jmp 0x68fb
movl 0x30(%rsp), %eax
movl 0x34(%rsp), %ecx
cmpl %ecx, %eax
jge 0x6a74
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x28(%rsp)
movq 0x130(%rsp), %rdi
callq 0xaed0
movl %eax, 0x2c(%rsp)
jmp 0x692e
movl 0x28(%rsp), %eax
movl 0x2c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x6a62
movl 0x4c(%rsp), %esi
movl 0x50(%rsp), %edx
leaq 0x60(%rsp), %rdi
callq 0xae90
movsd %xmm0, 0x20(%rsp)
jmp 0x695b
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
leaq 0xc3964(%rip), %rax     # 0xca2d8
movsd (%rax), %xmm1
callq 0xb660
movl %eax, 0x1c(%rsp)
jmp 0x6983
movl 0x1c(%rsp), %eax
cmpl $0x0, %eax
jne 0x69a2
movsd 0x40(%rsp), %xmm0
movsd 0xa466e(%rip), %xmm1    # 0xab008
ucomisd %xmm1, %xmm0
jne 0x69c4
jp 0x69c4
jmp 0x6a52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xd3e0
jmp 0x6a86
movl 0x4c(%rsp), %esi
incl %esi
movl 0x50(%rsp), %edx
leaq 0x60(%rsp), %rdi
callq 0xae90
movsd %xmm0, 0x10(%rsp)
jmp 0x69e0
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
leaq 0xc38df(%rip), %rax     # 0xca2d8
movsd (%rax), %xmm1
callq 0xb660
movl %eax, 0xc(%rsp)
jmp 0x6a08
movl 0xc(%rsp), %eax
cmpl $0x0, %eax
jne 0x6a27
movsd 0x38(%rsp), %xmm0
movsd 0xa45e9(%rip), %xmm1    # 0xab008
ucomisd %xmm1, %xmm0
jne 0x6a29
jp 0x6a29
jmp 0x6a52
movq 0x130(%rsp), %rdi
movl 0x4c(%rsp), %esi
movl 0x50(%rsp), %edx
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
subsd %xmm1, %xmm0
callq 0xb610
jmp 0x6a50
jmp 0x6a52
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x6913
jmp 0x6a64
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
jmp 0x68e0
leaq 0x60(%rsp), %rdi
callq 0xd3e0
addq $0x138, %rsp            # imm = 0x138
retq
movq 0x58(%rsp), %rdi
callq 0x44b0
// File: 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:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x130(%rsp)
movq 0x130(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0xd0f0
movq 0x130(%rsp), %rdi
movsd 0xa4547(%rip), %xmm0    # 0xab008
callq 0xfa70
jmp 0x6ac8
movl $0x0, 0x50(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x30(%rsp)
movq 0x130(%rsp), %rdi
callq 0xaef0
movl %eax, 0x34(%rsp)
jmp 0x6aeb
movl 0x30(%rsp), %eax
movl 0x34(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x6c64
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x28(%rsp)
movq 0x130(%rsp), %rdi
callq 0xaed0
movl %eax, 0x2c(%rsp)
jmp 0x6b21
movl 0x28(%rsp), %eax
movl 0x2c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x6c52
movl 0x4c(%rsp), %esi
movl 0x50(%rsp), %edx
leaq 0x60(%rsp), %rdi
callq 0xae90
movsd %xmm0, 0x20(%rsp)
jmp 0x6b4b
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
leaq 0xc3774(%rip), %rax     # 0xca2d8
movsd (%rax), %xmm1
callq 0xb660
movl %eax, 0x1c(%rsp)
jmp 0x6b73
movl 0x1c(%rsp), %eax
cmpl $0x0, %eax
jne 0x6b92
movsd 0x40(%rsp), %xmm0
movsd 0xa447e(%rip), %xmm1    # 0xab008
ucomisd %xmm1, %xmm0
jne 0x6bb4
jp 0x6bb4
jmp 0x6c42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xd3e0
jmp 0x6c76
movl 0x4c(%rsp), %esi
movl 0x50(%rsp), %edx
incl %edx
leaq 0x60(%rsp), %rdi
callq 0xae90
movsd %xmm0, 0x10(%rsp)
jmp 0x6bd0
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
leaq 0xc36ef(%rip), %rax     # 0xca2d8
movsd (%rax), %xmm1
callq 0xb660
movl %eax, 0xc(%rsp)
jmp 0x6bf8
movl 0xc(%rsp), %eax
cmpl $0x0, %eax
jne 0x6c17
movsd 0x38(%rsp), %xmm0
movsd 0xa43f9(%rip), %xmm1    # 0xab008
ucomisd %xmm1, %xmm0
jne 0x6c19
jp 0x6c19
jmp 0x6c42
movq 0x130(%rsp), %rdi
movl 0x4c(%rsp), %esi
movl 0x50(%rsp), %edx
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
subsd %xmm1, %xmm0
callq 0xb610
jmp 0x6c40
jmp 0x6c42
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x6b06
jmp 0x6c54
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
jmp 0x6ad0
leaq 0x60(%rsp), %rdi
callq 0xd3e0
addq $0x138, %rsp            # imm = 0x138
retq
movq 0x58(%rsp), %rdi
callq 0x44b0
// File: tomfunkhouser[P]gaps/apps/pfm2pfm/pfm2pfm.cpp
// Function: WriteGrid(gaps::R2Grid*, char const*)
static int 
WriteGrid(R2Grid *grid, const char *filename)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();

  // Write grid
  int status = grid->Write(filename);

  // Print statistics
  if (print_verbose) {
    printf("Wrote grid to %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 status
  return status;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x48d30
leaq 0x28(%rsp), %rdi
callq 0xb7f0
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xb970
movl %eax, 0x24(%rsp)
cmpl $0x0, 0xc0cf4(%rip)     # 0xcb960
je 0xad79
movq 0x38(%rsp), %rsi
leaq 0xa0ceb(%rip), %rdi     # 0xab969
movb $0x0, %al
callq 0x4050
leaq 0x28(%rsp), %rdi
callq 0x48df0
leaq 0xa0b7c(%rip), %rdi     # 0xab812
movb $0x1, %al
callq 0x4050
movq 0x40(%rsp), %rdi
callq 0xaed0
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rdi
callq 0xaef0
movl 0xc(%rsp), %esi
movl %eax, %edx
leaq 0xa0b67(%rip), %rdi     # 0xab829
movb $0x0, %al
callq 0x4050
movq 0x40(%rsp), %rdi
callq 0xb840
leaq 0xa0b65(%rip), %rdi     # 0xab83f
movb $0x1, %al
callq 0x4050
movq 0x40(%rsp), %rdi
callq 0xd830
movl %eax, %esi
leaq 0xa0b5b(%rip), %rdi     # 0xab84f
movb $0x0, %al
callq 0x4050
movq 0x40(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0xd440
leaq 0x10(%rsp), %rdi
callq 0xb600
leaq 0xa0b48(%rip), %rdi     # 0xab863
movb $0x1, %al
callq 0x4050
leaq 0x10(%rsp), %rdi
callq 0xb8a0
leaq 0xa0b40(%rip), %rdi     # 0xab873
movb $0x1, %al
callq 0x4050
movq 0x40(%rsp), %rdi
callq 0xd6d0
leaq 0xa0b38(%rip), %rdi     # 0xab883
movb $0x1, %al
callq 0x4050
movq 0x40(%rsp), %rdi
callq 0xd770
leaq 0xa0b2f(%rip), %rdi     # 0xab892
movb $0x1, %al
callq 0x4050
movq 0xbf23f(%rip), %rax     # 0xc9fb0
movq (%rax), %rdi
callq 0x42e0
movl 0x24(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/pfm2pfm/../../pkgs/RNMath/RNSystemOfEquations.h
// Function: gaps::RNSystemOfEquations::Minimize(double*, int, double) const
inline int RNSystemOfEquations::
Minimize(RNScalar *x, int solver, RNScalar tolerance) const
{
  // Check solver
  if (solver == RN_SPLM_SOLVER) return MinimizeSPLM(this, x, tolerance);
  else if (solver == RN_MINPACK_SOLVER) return MinimizeMINPACK(this, x, tolerance);
  else if (solver == RN_CERES_SOLVER) return MinimizeCERES(this, x, tolerance);
  else if (solver == RN_CSPARSE_SOLVER) return MinimizeCSPARSE(this, x, tolerance);
  RNFail("System of equation solver not recognized: %d\n", solver);
  return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movsd %xmm0, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x2, 0x1c(%rsp)
jne 0xb547
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
movsd 0x10(%rsp), %xmm0
callq 0xad90
movl %eax, 0x34(%rsp)
jmp 0xb5cd
cmpl $0x1, 0x1c(%rsp)
jne 0xb569
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
movsd 0x10(%rsp), %xmm0
callq 0xadd0
movl %eax, 0x34(%rsp)
jmp 0xb5cd
cmpl $0x0, 0x1c(%rsp)
jne 0xb58b
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
movsd 0x10(%rsp), %xmm0
callq 0xae10
movl %eax, 0x34(%rsp)
jmp 0xb5cd
cmpl $0x3, 0x1c(%rsp)
jne 0xb5ad
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
movsd 0x10(%rsp), %xmm0
callq 0xae50
movl %eax, 0x34(%rsp)
jmp 0xb5cd
jmp 0xb5af
jmp 0xb5b1
jmp 0xb5b3
movl 0x1c(%rsp), %esi
leaq 0x9fbd6(%rip), %rdi     # 0xab194
movb $0x0, %al
callq 0x4c7f0
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
callq 0x3f5b0
movq 0x58(%rsp), %rdi
callq 0x3f5c0
movl %eax, 0x34(%rsp)
jmp 0x3c56d
movl 0x34(%rsp), %esi
movq 0x18(%rsp), %rdi
callq 0x494d0
jmp 0x3c57d
movl $0x0, 0x48(%rsp)
movl 0x48(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x58(%rsp), %rdi
callq 0x3f5c0
movl %eax, 0x14(%rsp)
jmp 0x3c59d
movl 0x10(%rsp), %eax
movl 0x14(%rsp), %ecx
cmpl %ecx, %eax
jge 0x3c651
movq 0x58(%rsp), %rdi
movl 0x48(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x8(%rsp)
jmp 0x3c5c2
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
movl $0x28, %edi
callq 0x4280
movq %rax, (%rsp)
jmp 0x3c5dc
movq (%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x3f350
jmp 0x3c5ec
movq 0x20(%rsp), %rdi
movq (%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rsi
callq 0x3f5f0
jmp 0x3c606
movq 0x20(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x3c585
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0x3c656
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl $0x28, %esi
callq 0x4290
jmp 0x3c656
addq $0x68, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x3f620
movq 0x50(%rsp), %rdi
callq 0x44b0
nopw (%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x18(%rsp), %rdi
movl 0x2c(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x3f5c0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x3cb82
movq 0x18(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x3cb73
movq 0x8(%rsp), %rdi
callq 0x3f480
movq 0x8(%rsp), %rdi
movl $0x28, %esi
callq 0x4290
jmp 0x3cb75
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x3cb1b
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x49780
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x3f5c0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x3cc2c
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x3cc40
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
ucomisd 0x28(%rsp), %xmm0
jbe 0x3cc1d
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
jmp 0x3cc1f
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x3cbc4
movsd 0x28(%rsp), %xmm0
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x3f6b0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x3ccac
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x3cc64
movsd 0x18(%rsp), %xmm0
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::NVariables() const
int RNPolynomial::
NVariables(void) const
{
  // Check if there are no terms
  if (NTerms() == 0) return 0;

  // Find variable index range
  int min_v = INT_MAX, max_v = -1;
  UpdateVariableRange(min_v, max_v);

  // Check variable index range
  if (max_v < 0) return 0;
  if (min_v == INT_MAX) return 0;
  if (max_v < min_v) return 0;
  if (max_v == min_v) return 1;
  if (max_v == min_v + 1) return 2;
   
  // Allocate index stuff
  int nvariables = 0;
  int *marks = new int [ max_v + 1 ];
  for (int k = 0; k < max_v + 1; k++) marks[k] = 0;
  UpdateVariableIndex(max_v + 1, nvariables, marks, 1);
  delete [] marks;

  // Return count of unique variables
  return nvariables;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x3f5c0
cmpl $0x0, %eax
jne 0x3ccea
movl $0x0, 0x54(%rsp)
jmp 0x3ce49
movq 0x20(%rsp), %rdi
movl $0x7fffffff, 0x44(%rsp) # imm = 0x7FFFFFFF
movl $0xffffffff, 0x40(%rsp) # imm = 0xFFFFFFFF
leaq 0x44(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x3ce60
cmpl $0x0, 0x40(%rsp)
jge 0x3cd22
movl $0x0, 0x54(%rsp)
jmp 0x3ce49
cmpl $0x7fffffff, 0x44(%rsp) # imm = 0x7FFFFFFF
jne 0x3cd39
movl $0x0, 0x54(%rsp)
jmp 0x3ce49
movl 0x40(%rsp), %eax
cmpl 0x44(%rsp), %eax
jge 0x3cd50
movl $0x0, 0x54(%rsp)
jmp 0x3ce49
movl 0x40(%rsp), %eax
cmpl 0x44(%rsp), %eax
jne 0x3cd67
movl $0x1, 0x54(%rsp)
jmp 0x3ce49
movl 0x40(%rsp), %eax
movl 0x44(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3cd83
movl $0x2, 0x54(%rsp)
jmp 0x3ce49
movl $0x0, 0x3c(%rsp)
movl 0x40(%rsp), %eax
addl $0x1, %eax
cltq
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x4030
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl 0x40(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x3cdef
movq 0x30(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movl $0x0, (%rax,%rcx,4)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x3cdc2
movq 0x20(%rsp), %rdi
movl 0x40(%rsp), %esi
addl $0x1, %esi
movq 0x30(%rsp), %rcx
leaq 0x3c(%rsp), %rdx
movl $0x1, %r8d
xorl %eax, %eax
movl %eax, %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x3cee0
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x3ce41
movq 0x18(%rsp), %rdi
callq 0x4360
movl 0x3c(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x3f5c0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x3ced5
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x3ed30
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x3ce85
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x68, %rsp
movl 0x78(%rsp), %eax
movq 0x70(%rsp), %rax
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movl %r8d, 0x44(%rsp)
movq %r9, 0x38(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x20(%rsp), %rdi
movl 0x34(%rsp), %eax
movl %eax, 0x1c(%rsp)
callq 0x3f5c0
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x3cf8b
movq 0x20(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl 0x5c(%rsp), %esi
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rcx
movl 0x44(%rsp), %r8d
movq 0x38(%rsp), %r9
movq 0x70(%rsp), %r10
movl 0x78(%rsp), %eax
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x3ede0
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x3cf1c
addq $0x68, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::IsConstant() const
RNBoolean RNPolynomial::
IsConstant(void) const
{
  // Check if no terms
  if (NTerms() == 0) return TRUE;

  // Check if multiple terms
  if (NTerms() > 1) return FALSE;

  // Check term
  RNPolynomialTerm *term = Term(0);
  if (term->IsConstant()) return TRUE;
  else return FALSE;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x3f5c0
cmpl $0x0, %eax
jne 0x3d097
movl $0x1, 0x24(%rsp)
jmp 0x3d0e2
movq 0x8(%rsp), %rdi
callq 0x3f5c0
cmpl $0x1, %eax
jle 0x3d0b0
movl $0x0, 0x24(%rsp)
jmp 0x3d0e2
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x3f5d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3d0f0
cmpl $0x0, %eax
je 0x3d0da
movl $0x1, 0x24(%rsp)
jmp 0x3d0e2
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x3f5c0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x3d192
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x3d1b0
cmpl $0x0, %eax
jne 0x3d183
movl $0x0, 0x34(%rsp)
jmp 0x3d19a
jmp 0x3d185
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x3d13b
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomialTerm::IsLinear() const
RNBoolean RNPolynomialTerm::
IsLinear(void) const
{
  // Return whether term is linear
  if (IsConstant()) return TRUE;
  if ((n == 1) && (e[0] == 1.0)) return TRUE;
  return FALSE;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x3d0f0
cmpl $0x0, %eax
je 0x3d1d6
movl $0x1, 0x14(%rsp)
jmp 0x3d20e
movq (%rsp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x3d206
movq (%rsp), %rax
movq 0x20(%rax), %rax
movsd (%rax), %xmm0
movsd 0x6de2c(%rip), %xmm1    # 0xab020
ucomisd %xmm1, %xmm0
jne 0x3d206
jp 0x3d206
movl $0x1, 0x14(%rsp)
jmp 0x3d20e
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x3f5c0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x3d292
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x3d2b0
cmpl $0x0, %eax
jne 0x3d283
movl $0x0, 0x34(%rsp)
jmp 0x3d29a
jmp 0x3d285
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x3d23b
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomialTerm::IsQuadratic() const
RNBoolean RNPolynomialTerm::
IsQuadratic(void) const
{
  // Return whether term is quadratic
  if (IsLinear()) return TRUE;
  if ((n == 1) && (e[0] == 2.0)) return TRUE;
  if ((n == 2) && (e[0] == 1.0) && (e[1] == 1.0)) return TRUE;
  return FALSE;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x3d1b0
cmpl $0x0, %eax
je 0x3d2d9
movl $0x1, 0x14(%rsp)
jmp 0x3d35e
movq (%rsp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x3d309
movq (%rsp), %rax
movq 0x20(%rax), %rax
movsd (%rax), %xmm0
movsd 0x6e6e1(%rip), %xmm1    # 0xab9d8
ucomisd %xmm1, %xmm0
jne 0x3d309
jp 0x3d309
movl $0x1, 0x14(%rsp)
jmp 0x3d35e
movq (%rsp), %rax
cmpl $0x2, 0x8(%rax)
jne 0x3d356
movq (%rsp), %rax
movq 0x20(%rax), %rax
movsd (%rax), %xmm0
movsd 0x6dcf9(%rip), %xmm1    # 0xab020
ucomisd %xmm1, %xmm0
jne 0x3d356
jp 0x3d356
movq (%rsp), %rax
movq 0x20(%rax), %rax
movsd 0x8(%rax), %xmm0
movsd 0x6dcdc(%rip), %xmm1    # 0xab020
ucomisd %xmm1, %xmm0
jne 0x3d356
jp 0x3d356
movl $0x1, 0x14(%rsp)
jmp 0x3d35e
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x3f5c0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x3d3ea
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x3d400
cmpl $0x0, %eax
je 0x3d3db
movl $0x1, 0x34(%rsp)
jmp 0x3d3f2
jmp 0x3d3dd
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x3d38f
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: 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:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
movl $0x0, -0x18(%rsp)
movq -0x20(%rsp), %rcx
movl -0x18(%rsp), %eax
cmpl 0x8(%rcx), %eax
jge 0x3d459
movq -0x20(%rsp), %rax
movq 0x18(%rax), %rax
movslq -0x18(%rsp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x14(%rsp), %eax
jne 0x3d44a
movl $0x1, -0x4(%rsp)
jmp 0x3d461
jmp 0x3d44c
movl -0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rsp)
jmp 0x3d41b
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x3f5c0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x3d4d1
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3f640
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x3d48b
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movsd 0x28(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x3d516
jp 0x3d516
movq 0x10(%rsp), %rdi
callq 0x3cb00
jmp 0x3d56c
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x3f5c0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x3d56a
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movsd 0x28(%rsp), %xmm0
callq 0x3f670
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x3d51e
jmp 0x3d56c
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3f5c0
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x3d699
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x3f6a0
movsd %xmm0, (%rsp)
movq 0x28(%rsp), %rdi
callq 0x3f6b0
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
callq 0x3f6c0
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x3f6d0
movq 0x20(%rsp), %rdi
movsd (%rsp), %xmm0
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
movl $0x1, %r9d
movl %r9d, %r8d
callq 0x3c760
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x3d600
addq $0x48, %rsp
retq
nop
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3f5c0
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x3d774
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x3f6a0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, (%rsp)
movq 0x28(%rsp), %rdi
callq 0x3f6b0
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
callq 0x3f6c0
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x3f6d0
movq 0x20(%rsp), %rdi
movsd (%rsp), %xmm0
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
movl $0x1, %r9d
movl %r9d, %r8d
callq 0x3c760
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x3d6c0
addq $0x48, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x3cb00
movq 0x48(%rsp), %rdi
callq 0x3f5c0
movq 0x18(%rsp), %rdi
movl %eax, %esi
callq 0x494d0
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x48(%rsp), %rdi
callq 0x3f5c0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x3dcb4
movq 0x48(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x38(%rsp)
movl $0x28, %edi
callq 0x4280
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rsi
callq 0x3f350
jmp 0x3dc5f
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rsi
callq 0x3f5f0
movq 0x18(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x3dc0b
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
movl $0x28, %esi
callq 0x4290
jmp 0x3dcbe
movq 0x18(%rsp), %rax
addq $0x58, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x44b0
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/RNMath/RNPolynomial.cpp
// Function: gaps::RNPolynomial::FindTermWithSameVariables(gaps::RNPolynomialTerm const*) const
RNPolynomialTerm *RNPolynomial::
FindTermWithSameVariables(const RNPolynomialTerm *query) const
{
  // Check if any terms
  if (NTerms() == 0) return NULL;

  // Check if query has variables
  if (query->IsConstant()) {
    // Check for constant term (must be first)
    RNPolynomialTerm *term = Term(0);
    if (term->IsConstant()) return term;
    else return NULL;
  }
  else {
    // Find term with matching variables
    for (int i = 0; i < NTerms(); i++) {
      RNPolynomialTerm *term = Term(i);
      assert((i == 0) || (!term->IsConstant()));
      if (term->HasVariables(query->NVariables(), query->Variables(), query->Exponents())) return term;
    }
  }

  // Did not find matching term
  return NULL;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x3f5c0
cmpl $0x0, %eax
jne 0x3dd00
movq $0x0, 0x50(%rsp)
jmp 0x3ddf6
movq 0x40(%rsp), %rdi
callq 0x3d0f0
cmpl $0x0, %eax
je 0x3dd4c
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x3f5d0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3d0f0
cmpl $0x0, %eax
je 0x3dd3e
movq 0x38(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x3ddf6
movq $0x0, 0x50(%rsp)
jmp 0x3ddf6
movl $0x0, 0x34(%rsp)
movq 0x20(%rsp), %rdi
movl 0x34(%rsp), %eax
movl %eax, 0x1c(%rsp)
callq 0x3f5c0
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x3ddeb
movq 0x20(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x3f5d0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rdi
callq 0x3f6b0
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rdi
callq 0x3f6c0
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rdi
callq 0x3f6d0
movq (%rsp), %rdi
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
callq 0x3eb70
cmpl $0x0, %eax
je 0x3ddd9
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x3ddf6
jmp 0x3dddb
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x3dd54
jmp 0x3dded
movq $0x0, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq