LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::IsZero() const
RNBoolean RNAlgebraic::
IsZero(void) const
{
  // Return if algebraic is definitely zero for all variable settings
  switch(operation) {
  case RN_ZERO_OPERATION:
    return TRUE;

  case RN_POLYNOMIAL_OPERATION:
    return polynomial->IsZero();

  case RN_ADD_OPERATION:
  case RN_SUBTRACT_OPERATION:
    return (operands[0]->IsZero() && operands[1]->IsZero());

  case RN_MULTIPLY_OPERATION:
    return (operands[0]->IsZero() || operands[1]->IsZero());

  case RN_DIVIDE_OPERATION:
    return (operands[0]->IsZero() && !operands[1]->IsZero());

  case RN_POW_OPERATION:
    return (operands[0]->IsZero());
  }

  // Should never get here
  RNAbort("Unrecognized operation %d in algebraic");
  return FALSE;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rbx), %eax
cmpl $0x6, %eax
jne 0x2268a
movq 0x10(%rbx), %rbx
jmp 0x2267c
jae 0x22710
movl %eax, %eax
leaq 0x38047(%rip), %rcx     # 0x5a6e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rbx), %rdi
callq 0x22676
testl %eax, %eax
jne 0x226e7
jmp 0x226d1
movq 0x10(%rbx), %rdi
callq 0x22676
testl %eax, %eax
je 0x226d1
movq 0x18(%rbx), %rdi
callq 0x22676
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
jmp 0x22720
xorl %ebp, %ebp
jmp 0x22720
movq 0x10(%rbx), %rdi
callq 0x22676
movl $0x1, %ebp
testl %eax, %eax
jne 0x22720
movq 0x18(%rbx), %rdi
callq 0x22676
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
jmp 0x22720
movl $0x1, %ebp
jmp 0x22720
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x211b4
leaq 0x381b0(%rip), %rdi     # 0x5a8c7
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x29356
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::RNAlgebraic(double, int, double)
RNAlgebraic::
RNAlgebraic(RNScalar c, int v, RNScalar e)
  : operation(RN_ZERO_OPERATION),
    polynomial(NULL)
{
  // Initialize operands
  operands[0] = NULL;
  operands[1] = NULL;

  // Initialize polynomial
  if (c != 0) {
    polynomial = new RNPolynomial(c, v, e);
    operation = RN_POLYNOMIAL_OPERATION;
  }

  // Just checking
  assert(IsValid());
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x590c7(%rip), %rax     # 0x7b800
movq %rax, (%rdi)
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
movl $0x0, 0x8(%rdi)
xorpd %xmm2, %xmm2
movupd %xmm2, 0x10(%rdi)
movq $0x0, 0x20(%rdi)
jne 0x22760
jnp 0x2279d
movl %esi, %ebp
movq %rdi, %rbx
movl $0x10, %edi
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
callq 0x4280
movq %rax, %r14
movq %rax, %rdi
movsd (%rsp), %xmm0
movl %ebp, %esi
movsd 0x8(%rsp), %xmm1
callq 0x20c76
movq %r14, 0x20(%rbx)
movl $0x1, 0x8(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movl $0x10, %esi
movq %r14, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::RNAlgebraic(double, int, int const*, double const*, int)
RNAlgebraic::
RNAlgebraic(RNScalar c, int nv, const int *v, const RNScalar *e, RNBoolean already_sorted)
  : operation(RN_ZERO_OPERATION),
    polynomial(NULL)
{
  // Initialize operands
  operands[0] = NULL;
  operands[1] = NULL;

  // Initialize polynomial
  if (c != 0) {
    polynomial = new RNPolynomial(c, nv, v, e, already_sorted);
    operation = RN_POLYNOMIAL_OPERATION;
  }

  // Just checking
  assert(IsValid());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x59030(%rip), %rax     # 0x7b800
movq %rax, (%rdi)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movl $0x0, 0x8(%rdi)
xorpd %xmm1, %xmm1
movupd %xmm1, 0x10(%rdi)
movq $0x0, 0x20(%rdi)
jne 0x227f7
jnp 0x2283c
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %rbx
movl $0x10, %edi
movsd %xmm0, (%rsp)
callq 0x4280
movq %rax, %r13
movq %rax, %rdi
movsd (%rsp), %xmm0
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0x20ce4
movq %r13, 0x20(%rbx)
movl $0x1, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x10, %esi
movq %r13, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::RNAlgebraic(gaps::RNPolynomial const&, int)
RNAlgebraic::
RNAlgebraic(const RNPolynomial& p, int dummy)
  : operation(RN_ZERO_OPERATION),
    polynomial(NULL)
{
  // Initialize operands
  operands[0] = NULL;
  operands[1] = NULL;

  // Check polynomial
  if (p.IsZero()) return;

  // Initialize polynomial
  this->operation = RN_POLYNOMIAL_OPERATION;
  this->polynomial = new RNPolynomial(p);

  // Just checking
  assert(IsValid());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x58f8a(%rip), %rax     # 0x7b800
movq %rax, (%rdi)
movl $0x0, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq $0x0, 0x20(%rdi)
movq %rsi, %rdi
callq 0x211b4
testl %eax, %eax
jne 0x228be
movl $0x1, 0x8(%rbx)
movl $0x10, %edi
callq 0x4280
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x20bde
movq %r15, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x10, %esi
movq %r15, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::RNAlgebraic(gaps::RNAlgebraic const&)
RNAlgebraic::
RNAlgebraic(const RNAlgebraic& algebraic)
  : operation(RN_ZERO_OPERATION),
    polynomial(NULL)
{
  // Initialize operands
  operands[0] = NULL;
  operands[1] = NULL;

  // Check algebraic
  if (algebraic.IsZero()) return;

  // Copy operands
  switch(algebraic.operation) {
  case RN_ZERO_OPERATION:
    break;

  case RN_POLYNOMIAL_OPERATION:
    assert(algebraic.polynomial);
    operation = algebraic.operation;
    polynomial = new RNPolynomial(*(algebraic.polynomial));
    break;

  default:
    assert(algebraic.operands[0]);
    assert(algebraic.operands[1]);
    operation = algebraic.operation;
    operands[0] = new RNAlgebraic(*(algebraic.operands[0]));
    operands[1] = new RNAlgebraic(*(algebraic.operands[1]));
    break;
  }

  // Just checking
  assert(IsValid());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x58f12(%rip), %rax     # 0x7b800
movq %rax, (%rdi)
movl $0x0, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq $0x0, 0x20(%rdi)
movq %rsi, %rdi
callq 0x22676
testl %eax, %eax
je 0x22919
popq %rbx
popq %r14
popq %r15
retq
movl 0x8(%r14), %eax
testl %eax, %eax
je 0x22913
cmpl $0x1, %eax
jne 0x2294c
movl $0x1, 0x8(%rbx)
movl $0x10, %edi
callq 0x4280
movq %rax, %r15
movq 0x20(%r14), %rsi
movq %rax, %rdi
callq 0x20bde
movq %r15, 0x20(%rbx)
jmp 0x22913
movl %eax, 0x8(%rbx)
movl $0x28, %edi
callq 0x4280
movq %rax, %r15
movq 0x10(%r14), %rsi
movq %rax, %rdi
callq 0x228dc
leaq 0x10(%rbx), %rax
movq %r15, (%rax)
movl $0x28, %edi
callq 0x4280
movq %rax, %r15
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x228dc
movq %r15, 0x18(%rbx)
jmp 0x22913
jmp 0x22990
movq %rax, %rbx
movl $0x28, %esi
jmp 0x229a2
movq %rax, %rbx
movl $0x10, %esi
movq %r15, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Construct(int, double, gaps::RNAlgebraic*, int)
void RNAlgebraic::
Construct(int op, RNScalar operand1, RNAlgebraic *operand2, RNBoolean force)
{
  // NOTE: THIS TAKES OVER MANAGEMENT OF MEMORY FOR OPERAND2
  // SPECIFICALLY, OPERANDS WILL BE DELETED WHEN ALGEBRAIC IS DECONSTRUCTED
  assert(operand2);
  assert(operand2->IsValid());

  // Check type of operand2
  if (!force && (operand2->operation == RN_POLYNOMIAL_OPERATION)) {
    // Construct with polynomial
    Construct(op, operand1, operand2->polynomial);
    operand2->operation = RN_ZERO_OPERATION;
    operand2->operands[0] = NULL;
    operand2->operands[1] = NULL;
    operand2->polynomial = NULL;
    delete operand2;
  }
  else {
    // Construct with algebraic
    Construct(op, new RNAlgebraic(operand1, 0), operand2, TRUE);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
testl %ecx, %ecx
jne 0x230be
cmpl $0x1, 0x8(%rbx)
jne 0x230be
movq 0x20(%rbx), %rdx
movq %r14, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0x22c40
movl $0x0, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
movl $0x28, %edi
movsd %xmm0, (%rsp)
callq 0x4280
movq %rax, %r15
movq %rax, %rdi
movsd (%rsp), %xmm0
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x227be
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %rbx, %rcx
movl $0x1, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x23c2c
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Construct(int, gaps::RNPolynomial*, gaps::RNAlgebraic*, int)
void RNAlgebraic::
Construct(int op, RNPolynomial *operand1, RNAlgebraic *operand2, RNBoolean force)
{
  // NOTE: THIS TAKES OVER MANAGEMENT OF MEMORY FOR OPERANDS
  // SPECIFICALLY, OPERANDS WILL BE DELETED WHEN ALGEBRAIC IS DECONSTRUCTED

  // Check types of operands
  if (!force && (operand2->operation == RN_POLYNOMIAL_OPERATION)) {
    Construct(op, operand1, operand2->polynomial);
    operand2->operation = RN_ZERO_OPERATION;
    operand2->operands[0] = NULL;
    operand2->operands[1] = NULL;
    operand2->polynomial = NULL;
    delete operand2;
  }
  else if (!force && (operand1->NTerms() == 1) && (operand1->Term(0)->Degree() == 0)) {
    Construct(op, operand1->Term(0)->Coefficient(), operand2);
    delete operand1;
  }
  else {
    Construct(op, new RNAlgebraic(operand1), operand2, TRUE);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
testl %r8d, %r8d
je 0x23948
movl $0x28, %edi
callq 0x4280
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x22582
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
movq %rbx, %rcx
movl $0x1, %r8d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x23c2c
cmpl $0x1, 0x8(%rbx)
jne 0x23989
movq 0x20(%rbx), %rcx
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x234d4
movl $0x0, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
cmpl $0x1, 0xc(%r14)
jne 0x23912
movq (%r14), %rax
movq (%rax), %rdi
callq 0x20fda
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x23912
jp 0x23912
movq (%r14), %rax
movq (%rax), %rax
movsd 0x10(%rax), %xmm0
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x2306c
movq %r14, %rdi
callq 0x20f24
movl $0x10, %esi
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4290
movq %rax, %rbx
movl $0x28, %esi
movq %r12, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Construct(int, gaps::RNAlgebraic*, double, int)
void RNAlgebraic::
Construct(int op, RNAlgebraic *operand1, RNScalar operand2, RNBoolean force)
{
  // Check type of operand1
  if (!force && (operand1->operation == RN_POLYNOMIAL_OPERATION)) {
    Construct(op, operand1->polynomial, operand2);
    operand1->operation = RN_ZERO_OPERATION;
    operand1->operands[0] = NULL;
    operand1->operands[1] = NULL;
    operand1->polynomial = NULL;
    delete operand1;
  }
  else {
    Construct(op, operand1, new RNAlgebraic(operand2, 0), TRUE);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
testl %ecx, %ecx
jne 0x23a78
cmpl $0x1, 0x8(%rbx)
jne 0x23a78
movq 0x20(%rbx), %rdx
movq %r14, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0x23146
movl $0x0, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
movl $0x28, %edi
movsd %xmm0, (%rsp)
callq 0x4280
movq %rax, %r15
movq %rax, %rdi
movsd (%rsp), %xmm0
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x227be
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movq %r15, %rcx
movl $0x1, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x23c2c
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Construct(int, gaps::RNAlgebraic*, gaps::RNPolynomial*, int)
void RNAlgebraic::
Construct(int op, RNAlgebraic *operand1, RNPolynomial *operand2, RNBoolean force)
{
  // NOTE: THIS TAKES OVER MANAGEMENT OF MEMORY FOR OPERANDS
  // SPECIFICALLY, OPERANDS WILL BE DELETED WHEN ALGEBRAIC IS DECONSTRUCTED

  // Check types of operands
  if (!force && (operand1->operation == RN_POLYNOMIAL_OPERATION)) {
    Construct(op, operand1->polynomial, operand2);
    operand1->operation = RN_ZERO_OPERATION;
    operand1->operands[0] = NULL;
    operand1->operands[1] = NULL;
    operand1->polynomial = NULL;
    delete operand1;
  }
  else if (!force && (operand2->NTerms() == 1) && (operand2->Term(0)->Degree() == 0)) {
    Construct(op, operand1, operand2->Term(0)->Coefficient());
    delete operand2;
  }
  else {
    Construct(op, operand1, new RNAlgebraic(operand2), TRUE);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
testl %r8d, %r8d
je 0x23b4e
movl $0x28, %edi
callq 0x4280
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x22582
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movq %r12, %rcx
movl $0x1, %r8d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x23c2c
cmpl $0x1, 0x8(%rbx)
jne 0x23b8f
movq 0x20(%rbx), %rdx
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x234d4
movl $0x0, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
cmpl $0x1, 0xc(%r14)
jne 0x23b18
movq (%r14), %rax
movq (%rax), %rdi
callq 0x20fda
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x23b18
jp 0x23b18
movq (%r14), %rax
movq (%rax), %rax
movsd 0x10(%rax), %xmm0
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x23a26
movq %r14, %rdi
callq 0x20f24
movl $0x10, %esi
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4290
movq %rax, %rbx
movl $0x28, %esi
movq %r12, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Negate()
void RNAlgebraic::
Negate(void)
{
  // Just checking
  assert(IsValid());

  // Flip sign
  switch(operation) {
  case RN_ZERO_OPERATION:
    return;

  case RN_POLYNOMIAL_OPERATION:
    polynomial->Negate();
    return;

  case RN_ADD_OPERATION:
    operands[0]->Negate();
    operands[1]->Negate();
    return;

  case RN_SUBTRACT_OPERATION: {
    RNAlgebraic *swap = operands[0];
    operands[0] = operands[1];
    operands[1] = swap;
    return; }

  case RN_MULTIPLY_OPERATION:
  case RN_DIVIDE_OPERATION:
    operands[0]->Negate();
    return;

  case RN_POW_OPERATION: 
    Multiply(-1.0);
    return;
  }

  // Should never get here
  RNAbort("Unrecognized operation %d in algebraic");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x36748(%rip), %r14     # 0x5a784
movl 0x8(%rbx), %ecx
cmpq $0x6, %rcx
ja 0x2407e
movl $0x10, %eax
movslq (%r14,%rcx,4), %rcx
addq %r14, %rcx
jmpq *%rcx
movq 0x10(%rbx), %rdi
callq 0x2402e
movl $0x18, %eax
movq (%rbx,%rax), %rbx
jmp 0x2403c
movdqu 0x10(%rbx), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x36842(%rip), %rdi     # 0x5a8c7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x29356
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21414
movsd 0x3575d(%rip), %xmm0    # 0x59808
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2476c
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::IsOne() const
RNBoolean RNAlgebraic::
IsOne(void) const
{
  // Return if algebraic algebraic is constant
  switch(operation) {
  case RN_ZERO_OPERATION:
    return FALSE;

  case RN_POLYNOMIAL_OPERATION:
    return polynomial->IsOne();

  case RN_ADD_OPERATION:
    return ((operands[0]->IsOne() && operands[1]->IsZero()) ||
            (operands[1]->IsOne() && operands[0]->IsZero()));

  case RN_SUBTRACT_OPERATION:
    return (operands[0]->IsOne() && operands[1]->IsZero());

  case RN_MULTIPLY_OPERATION:
  case RN_DIVIDE_OPERATION:
    return (operands[0]->IsOne() && operands[1]->IsOne());

  case RN_POW_OPERATION:
    if (operands[0]->IsOne()) return TRUE;
    if (operands[1]->IsZero()) return TRUE;
    return FALSE;
  }

  // Should never get here
  RNAbort("Unrecognized operation %d in algebraic");
  return FALSE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rdi), %r14d
cmpq $0x6, %r14
ja 0x24129
movq %rdi, %rbx
leaq 0x366ce(%rip), %rax     # 0x5a7a0
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x10(%rbx), %rdi
callq 0x240ba
testl %eax, %eax
je 0x24149
movq 0x18(%rbx), %rdi
callq 0x240ba
jmp 0x2417a
movq 0x10(%rbx), %rdi
callq 0x240ba
testl %eax, %eax
je 0x24116
movq 0x18(%rbx), %rdi
callq 0x22676
movl $0x1, %r14d
testl %eax, %eax
jne 0x24183
movq 0x18(%rbx), %rdi
callq 0x240ba
testl %eax, %eax
je 0x24149
movq 0x10(%rbx), %rdi
jmp 0x24175
leaq 0x36797(%rip), %rdi     # 0x5a8c7
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x29356
jmp 0x24183
movq 0x10(%rbx), %rdi
callq 0x240ba
testl %eax, %eax
jne 0x24171
xorl %r14d, %r14d
jmp 0x24183
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x211be
movq 0x10(%rbx), %rdi
callq 0x240ba
movl $0x1, %r14d
testl %eax, %eax
jne 0x24183
movq 0x18(%rbx), %rdi
callq 0x22676
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::IsConstant() const
RNBoolean RNAlgebraic::
IsConstant(void) const
{
  // Return if algebraic algebraic is constant
  switch(operation) {
  case RN_ZERO_OPERATION:
    return TRUE;

  case RN_POLYNOMIAL_OPERATION:
    return polynomial->IsConstant();

  case RN_ADD_OPERATION:
  case RN_SUBTRACT_OPERATION:
  case RN_MULTIPLY_OPERATION:
  case RN_DIVIDE_OPERATION:
    return (operands[0]->IsConstant() && operands[1]->IsConstant());

  case RN_POW_OPERATION:
    if (operands[0]->IsConstant() && operands[1]->IsConstant()) return TRUE;
    if (operands[1]->IsZero()) return TRUE;
    return FALSE;
  }

  // Should never get here
  RNAbort("Unrecognized operation %d in algebraic");
  return FALSE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
cmpq $0x6, %rax
ja 0x241d6
movq %rdi, %r14
movl $0x1, %ebx
leaq 0x36612(%rip), %rcx     # 0x5a7bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rdi
callq 0x2418e
testl %eax, %eax
je 0x241d2
movq 0x18(%r14), %rdi
callq 0x2418e
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
jmp 0x24212
xorl %ebx, %ebx
jmp 0x24212
leaq 0x366ea(%rip), %rdi     # 0x5a8c7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x29356
jmp 0x24212
movq 0x20(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21210
movq 0x10(%r14), %rdi
callq 0x2418e
testl %eax, %eax
je 0x2421c
movq 0x18(%r14), %rdi
callq 0x2418e
testl %eax, %eax
je 0x2421c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x18(%r14), %rdi
callq 0x22676
jmp 0x241c9
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::IsLinear() const
RNBoolean RNAlgebraic::
IsLinear(void) const
{
  // Return if algebraic is linear
  switch(operation) {
  case RN_ZERO_OPERATION:
    return TRUE;

  case RN_POLYNOMIAL_OPERATION:
    return polynomial->IsLinear();

  case RN_ADD_OPERATION:
  case RN_SUBTRACT_OPERATION:
    return (operands[0]->IsLinear() && operands[1]->IsLinear());

  case RN_MULTIPLY_OPERATION:
    if (operands[0]->IsLinear() && operands[1]->IsConstant()) return TRUE;
    if (operands[0]->IsConstant() && operands[1]->IsLinear()) return TRUE;
    return FALSE;

  case RN_DIVIDE_OPERATION:
    return (operands[0]->IsLinear() && operands[1]->IsConstant());

  case RN_POW_OPERATION:
    return (operands[1]->IsZero());
  }

  // Should never get here
  RNAbort("Unrecognized operation %d in algebraic");
  return FALSE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
cmpq $0x6, %rax
ja 0x24269
movq %rdi, %r14
movl $0x1, %ebx
leaq 0x36594(%rip), %rcx     # 0x5a7d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rdi
callq 0x24228
testl %eax, %eax
je 0x242ee
movq 0x18(%r14), %rdi
callq 0x24228
jmp 0x242a1
leaq 0x36657(%rip), %rdi     # 0x5a8c7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x29356
jmp 0x242f0
movq 0x20(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2123e
movq 0x10(%r14), %rdi
callq 0x24228
testl %eax, %eax
je 0x242ee
movq 0x18(%r14), %rdi
callq 0x2418e
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
jmp 0x242f0
movq 0x18(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22676
movq 0x10(%r14), %rdi
callq 0x24228
testl %eax, %eax
je 0x242d4
movq 0x18(%r14), %rdi
callq 0x2418e
testl %eax, %eax
jne 0x242f0
movq 0x10(%r14), %rdi
callq 0x2418e
testl %eax, %eax
je 0x242ee
movq 0x18(%r14), %rdi
callq 0x24228
testl %eax, %eax
jne 0x242f0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::IsQuadratic() const
RNBoolean RNAlgebraic::
IsQuadratic(void) const
{
  // Return if algebraic is quadratic
  switch(operation) {
  case RN_ZERO_OPERATION:
    return TRUE;

  case RN_POLYNOMIAL_OPERATION:
    return polynomial->IsQuadratic();

  case RN_ADD_OPERATION:
  case RN_SUBTRACT_OPERATION:
    return (operands[0]->IsQuadratic() && operands[1]->IsQuadratic());

  case RN_MULTIPLY_OPERATION:
    if (operands[0]->IsQuadratic() && operands[1]->IsConstant()) return TRUE;
    if (operands[0]->IsConstant() && operands[1]->IsQuadratic()) return TRUE;
    if (operands[0]->IsLinear() && operands[1]->IsLinear()) return TRUE;
    return FALSE;

  case RN_DIVIDE_OPERATION:
    return (operands[0]->IsQuadratic() && operands[1]->IsConstant());

  case RN_POW_OPERATION:
    return (operands[1]->IsZero());
  }

  // Should never get here
  RNAbort("Unrecognized operation %d in algebraic");
  return FALSE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
cmpq $0x6, %rax
ja 0x2433b
movq %rdi, %r14
movl $0x1, %ebx
leaq 0x364de(%rip), %rcx     # 0x5a7f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rdi
callq 0x242fa
testl %eax, %eax
je 0x243dd
movq 0x18(%r14), %rdi
callq 0x242fa
jmp 0x24376
leaq 0x36585(%rip), %rdi     # 0x5a8c7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x29356
jmp 0x243df
movq 0x20(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x212d4
movq 0x10(%r14), %rdi
callq 0x242fa
testl %eax, %eax
je 0x243dd
movq 0x18(%r14), %rdi
callq 0x2418e
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
jmp 0x243df
movq 0x18(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22676
movq 0x10(%r14), %rdi
callq 0x242fa
testl %eax, %eax
je 0x243a9
movq 0x18(%r14), %rdi
callq 0x2418e
testl %eax, %eax
jne 0x243df
movq 0x10(%r14), %rdi
callq 0x2418e
testl %eax, %eax
je 0x243c3
movq 0x18(%r14), %rdi
callq 0x242fa
testl %eax, %eax
jne 0x243df
movq 0x10(%r14), %rdi
callq 0x24228
testl %eax, %eax
je 0x243dd
movq 0x18(%r14), %rdi
callq 0x24228
testl %eax, %eax
jne 0x243df
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::IsPolynomial() const
RNBoolean RNAlgebraic::
IsPolynomial(void) const
{
  // Return if algebraic is polynomial
  switch(operation) {
  case RN_ZERO_OPERATION:
    return TRUE;

  case RN_POLYNOMIAL_OPERATION:
    return TRUE;

  case RN_ADD_OPERATION:
  case RN_SUBTRACT_OPERATION:
  case RN_MULTIPLY_OPERATION:
    return (operands[0]->IsPolynomial() && operands[1]->IsPolynomial());

  case RN_DIVIDE_OPERATION:
    return (operands[0]->IsPolynomial() && operands[1]->IsConstant());

  case RN_POW_OPERATION:
    return (operands[1]->IsConstant());
  }

  // Should never get here
  RNAbort("Unrecognized operation %d in algebraic");
  return FALSE;
}

// Assembly:
pushq %rbx
movl 0x8(%rdi), %eax
cmpq $0x6, %rax
ja 0x24426
movq %rdi, %rbx
leaq 0x36412(%rip), %rcx     # 0x5a810
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rbx), %rdi
callq 0x243ea
testl %eax, %eax
je 0x24457
movq 0x18(%rbx), %rdi
callq 0x243ea
jmp 0x2444e
movl $0x1, %ebx
jmp 0x24459
leaq 0x3649a(%rip), %rdi     # 0x5a8c7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x29356
jmp 0x24459
movq 0x10(%rbx), %rdi
callq 0x243ea
testl %eax, %eax
je 0x24457
movq 0x18(%rbx), %rdi
callq 0x2418e
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
jmp 0x24459
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
movq 0x18(%rbx), %rdi
popq %rbx
jmp 0x2418e
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::HasVariable(int) const
RNBoolean RNAlgebraic::
HasVariable(int variable) const
{
  // Return whether algebraic has a variable
  switch(operation) {
  case RN_ZERO_OPERATION:
    return FALSE;

  case RN_POLYNOMIAL_OPERATION:
    return polynomial->HasVariable(variable);
   
  default:
    if (operands[0]->HasVariable(variable)) return TRUE;
    if (operands[1]->HasVariable(variable)) return TRUE;
    return FALSE;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x8(%rdi), %eax
testl %eax, %eax
je 0x244b9
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x1, %eax
jne 0x2448f
movq 0x20(%r14), %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21384
movq 0x10(%r14), %rdi
movl %ebx, %esi
callq 0x24468
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x244b9
movq 0x18(%r14), %rdi
movl %ebx, %esi
callq 0x24468
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::NVariables() const
int RNAlgebraic::
NVariables(void) const
{
  // Return whether algebraic has a variable
  switch(operation) {
  case RN_ZERO_OPERATION:
    return 0;

  case RN_POLYNOMIAL_OPERATION:
    return polynomial->NVariables();

  default: {
    // 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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x8(%rdi), %eax
testl %eax, %eax
je 0x245b2
movq %rdi, %rbx
cmpl $0x1, %eax
jne 0x244fa
movq 0x20(%rbx), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21000
leaq 0xc(%rsp), %rsi
movl $0x7fffffff, (%rsi)     # imm = 0x7FFFFFFF
leaq 0x14(%rsp), %r14
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
movq %rbx, %rdi
movq %r14, %rdx
callq 0x245c2
movl (%r14), %r14d
xorl %eax, %eax
testl %r14d, %r14d
js 0x245b2
movl 0xc(%rsp), %ecx
cmpl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
sete %dl
cmpl %ecx, %r14d
setl %sil
orb %dl, %sil
jne 0x245b2
movl $0x1, %eax
cmpl %ecx, %r14d
je 0x245b2
incl %ecx
movl $0x2, %eax
cmpl %ecx, %r14d
je 0x245b2
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
movl %ebp, (%r15)
leaq 0x4(,%r14,4), %r12
incq %r14
movq %r12, %rdi
callq 0x4030
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x4160
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
movq %r13, %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
pushq %rbp
pushq $0x0
callq 0x2460c
addq $0x10, %rsp
movq %r13, %rdi
callq 0x4360
movl (%r15), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::UpdateVariableRange(int&, int&) const
void RNAlgebraic::
UpdateVariableRange(int& min_v, int& max_v) const
{
  // Update variable indices
  switch(operation) {
  case RN_ZERO_OPERATION: 
    return;
    
  case RN_POLYNOMIAL_OPERATION: 
    polynomial->UpdateVariableRange(min_v, max_v);
    return;

  default:
    operands[0]->UpdateVariableRange(min_v, max_v);
    operands[1]->UpdateVariableRange(min_v, max_v);
    return;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x8(%r15), %eax
testl %eax, %eax
je 0x24606
cmpl $0x1, %eax
je 0x245f2
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x245c2
movq 0x18(%r15), %r15
jmp 0x245d0
movq 0x20(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x210fa
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::UpdateVariableIndex(int, int&, int*, int, int*, int*, int) const
void RNAlgebraic::
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 indices
  switch(operation) {
  case RN_ZERO_OPERATION: 
    return;
    
  case RN_POLYNOMIAL_OPERATION: 
    polynomial->UpdateVariableIndex(max_variables, variable_count, 
      variable_marks, current_mark, index_to_variable, variable_to_index, remap_variables);
    return;

  default:
    operands[0]->UpdateVariableIndex(max_variables, variable_count, 
      variable_marks, current_mark, index_to_variable, variable_to_index, remap_variables);
    operands[1]->UpdateVariableIndex(max_variables, variable_count, 
      variable_marks, current_mark, index_to_variable, variable_to_index, remap_variables);
    return;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movl %r8d, 0xc(%rsp)
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r13
movl 0x58(%rsp), %ebx
movq 0x50(%rsp), %rbp
movl 0x8(%r13), %eax
testl %eax, %eax
je 0x24698
cmpl $0x1, %eax
je 0x2466e
movq 0x10(%r13), %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
movl 0xc(%rsp), %r8d
movq 0x10(%rsp), %r9
pushq %rbx
pushq %rbp
callq 0x2460c
addq $0x10, %rsp
movq 0x18(%r13), %r13
jmp 0x24639
movq 0x20(%r13), %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
movl 0xc(%rsp), %r8d
movq 0x10(%rsp), %r9
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2114e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Empty()
void RNAlgebraic::
Empty(void)
{
  // Just checking
  assert(IsValid());

  // Delete everything
  operation = RN_ZERO_OPERATION;
  if (operands[0]) { delete operands[0]; operands[0] = NULL; }
  if (operands[1]) { delete operands[1]; operands[1] = NULL; }
  if (polynomial) { delete polynomial; polynomial = NULL; }

  // Just checking
  assert(IsValid());
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x246cd
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x10(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x246e4
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x18(%rbx)
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x2470a
movq %r14, %rdi
callq 0x20f24
movl $0x10, %esi
movq %r14, %rdi
callq 0x4290
movq $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Reset(int, gaps::RNAlgebraic*, gaps::RNAlgebraic*)
void RNAlgebraic::
Reset(int operation, RNAlgebraic *operand1, RNAlgebraic *operand2)
{
  // Just checking
  assert(IsValid());
  assert((operation != RN_ZERO_OPERATION) && (operation != RN_POLYNOMIAL_OPERATION));
  assert(operand1 && operand2);

  // Reset everything
  Empty();

  // Set operation
  this->operation = operation;
  this->operands[0] = operand1;
  this->operands[1] = operand2;

  // Just checking
  assert(IsValid());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
callq 0x246a8
movl %ebp, 0x8(%r15)
movq %r14, 0x10(%r15)
movq %rbx, 0x18(%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Reset(gaps::RNPolynomial*)
void RNAlgebraic::
Reset(RNPolynomial *polynomial)
{
  // NOTE: THIS TAKES OVER MANAGEMENT OF MEMORY FOR POLYNOMIAL
  // SPECIFICALLY, POLYNOMIAL WILL BE DELETED WHEN ALGEBRAIC IS DECONSTRUCTED

  // Empty everything
  Empty();

  // Set polynomial
  if (polynomial) {
    operation = RN_POLYNOMIAL_OPERATION;
    this->polynomial = polynomial;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x246a8
testq %rbx, %rbx
je 0x24764
movl $0x1, 0x8(%r14)
movq %rbx, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Multiply(double)
void RNAlgebraic::
Multiply(RNScalar value)
{
  // Just checking
  assert(IsValid());

  // Check value 
  if (value == 0.0) {
    Empty();
  }
  else if (value != 1.0) {
    switch(operation) {
    case RN_ZERO_OPERATION: 
      return;
    
    case RN_POLYNOMIAL_OPERATION:
      polynomial->Multiply(value);
      return;
    
    default: {
      RNAlgebraic *e = new RNAlgebraic(operation, operands[0], operands[1]);
      operation = RN_MULTIPLY_OPERATION;
      operands[0] = new RNAlgebraic(value, 0);
      operands[1] = e;
      return; }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x24794
jp 0x24794
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x246a8
ucomisd 0x34874(%rip), %xmm0    # 0x59010
jne 0x247a4
jnp 0x24844
movl 0x8(%rbx), %ebp
testl %ebp, %ebp
je 0x24844
cmpl $0x1, %ebp
jne 0x247c7
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21442
movsd %xmm0, (%rsp)
movl $0x28, %edi
callq 0x4280
movq %rax, %r14
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
leaq 0x57018(%rip), %rax     # 0x7b800
movq %rax, (%r14)
movl $0x0, 0x8(%r14)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%r14)
movq $0x0, 0x20(%r14)
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
callq 0x23c2c
movl $0x4, 0x8(%rbx)
movl $0x28, %edi
callq 0x4280
movq %rax, %r15
movq %rax, %rdi
movsd (%rsp), %xmm0
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x227be
movq %r15, 0x10(%rbx)
movq %r14, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %r14
jmp 0x2485a
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Add(double)
void RNAlgebraic::
Add(RNScalar value)
{
  // Just checking
  assert(IsValid());

  // Check value
  if (value == 0.0) return;

  // Add scalar
  switch(operation) {
  case RN_ZERO_OPERATION: 
    operation = RN_POLYNOMIAL_OPERATION;
    polynomial = new RNPolynomial(value, 0);
    return;

  case RN_POLYNOMIAL_OPERATION:
    polynomial->Add(value);
    return;

  default: {
    RNAlgebraic *e = new RNAlgebraic(operation, operands[0], operands[1]);
    operation = RN_ADD_OPERATION;
    operands[0] = new RNAlgebraic(value, 0);
    operands[1] = e;
    return; }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2488e
jp 0x2488e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %rbx
movl 0x8(%rdi), %ebp
cmpl $0x1, %ebp
je 0x248d2
movsd %xmm0, (%rsp)
testl %ebp, %ebp
jne 0x248f4
movl $0x1, 0x8(%rbx)
movl $0x10, %edi
callq 0x4280
movq %rax, %r14
movq %rax, %rdi
movsd (%rsp), %xmm0
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x20ce4
movq %r14, 0x20(%rbx)
jmp 0x24883
movq 0x20(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x20d48
movl $0x28, %edi
callq 0x4280
movq %rax, %r14
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
leaq 0x56ef0(%rip), %rax     # 0x7b800
movq %rax, (%r14)
movl $0x0, 0x8(%r14)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%r14)
movq $0x0, 0x20(%r14)
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
callq 0x23c2c
movl $0x2, 0x8(%rbx)
movl $0x28, %edi
callq 0x4280
movq %rax, %r15
movq %rax, %rdi
movsd (%rsp), %xmm0
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x227be
movq %r15, 0x10(%rbx)
movq %r14, 0x18(%rbx)
jmp 0x24883
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
jmp 0x24993
movq %rax, %rbx
movl $0x28, %esi
jmp 0x24990
movq %rax, %rbx
movl $0x10, %esi
movq %r14, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Subtract(double)
void RNAlgebraic::
Subtract(RNScalar value)
{
  // Just checking
  assert(IsValid());

  // Check value
  if (value == 0.0) return;

  // Subtract scalar
  switch(operation) {
  case RN_ZERO_OPERATION: 
    operation = RN_POLYNOMIAL_OPERATION;
    polynomial = new RNPolynomial(-value, 0);
    return;
    
  case RN_POLYNOMIAL_OPERATION:
    polynomial->Subtract(value);
    return;
    
  default: {
    RNAlgebraic *e = new RNAlgebraic(operation, operands[0], operands[1]);
    operation = RN_SUBTRACT_OPERATION;
    operands[0] = e;
    operands[1] = new RNAlgebraic(value, 0);
    return; }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x249bd
jp 0x249bd
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rdi, %rbx
movl 0x8(%rdi), %ebp
cmpl $0x1, %ebp
je 0x24a09
movapd %xmm0, (%rsp)
testl %ebp, %ebp
jne 0x24a31
movl $0x1, 0x8(%rbx)
movl $0x10, %edi
callq 0x4280
movq %rax, %r14
movapd (%rsp), %xmm0
xorpd 0x3466e(%rip), %xmm0    # 0x59060
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x20ce4
movq %r14, 0x20(%rbx)
jmp 0x249b4
xorpd 0x3464f(%rip), %xmm0    # 0x59060
movq 0x20(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x20d48
movl $0x28, %edi
callq 0x4280
movq %rax, %r14
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
leaq 0x56db3(%rip), %rax     # 0x7b800
movq %rax, (%r14)
movl $0x0, 0x8(%r14)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%r14)
movq $0x0, 0x20(%r14)
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
callq 0x23c2c
movl $0x3, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movl $0x28, %edi
callq 0x4280
movq %rax, %r14
movq %rax, %rdi
movapd (%rsp), %xmm0
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x227be
movq %r14, 0x18(%rbx)
jmp 0x249b4
jmp 0x24ab0
movq %rax, %rbx
movl $0x28, %esi
jmp 0x24ac2
movq %rax, %rbx
movl $0x10, %esi
movq %r14, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Divide(double)
void RNAlgebraic::
Divide(RNScalar value)
{
  // Just checking
  assert(IsValid());

  // Check value
  if (value == 0.0) {
    if (IsZero()) {
      Empty();
    }
    else {
      Empty();
      operation = RN_POLYNOMIAL_OPERATION;
      polynomial = new RNPolynomial(RN_INFINITY, 0);
    }
  }
  else if (value != 1.0) {
    switch(operation) {
    case RN_ZERO_OPERATION: 
      return;
      
    case RN_POLYNOMIAL_OPERATION:
      polynomial->Divide(value);
      return;
    
    default: {
      RNAlgebraic *e = new RNAlgebraic(operation, operands[0], operands[1]);
      operation = RN_DIVIDE_OPERATION;
      operands[0] = new RNAlgebraic(value, 0);
      operands[1] = e;
      return; }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x24b3b
jp 0x24b3b
movq %rbx, %rdi
callq 0x22676
movl %eax, %ebp
movq %rbx, %rdi
callq 0x246a8
testl %ebp, %ebp
jne 0x24beb
movl $0x1, 0x8(%rbx)
movl $0x10, %edi
callq 0x4280
movq %rax, %r14
leaq 0x57893(%rip), %rax     # 0x7c3b0
movsd (%rax), %xmm0
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x20ce4
movq %r14, 0x20(%rbx)
jmp 0x24beb
ucomisd 0x344cd(%rip), %xmm0    # 0x59010
jne 0x24b4b
jnp 0x24beb
movl 0x8(%rbx), %ebp
testl %ebp, %ebp
je 0x24beb
cmpl $0x1, %ebp
jne 0x24b6e
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2147c
movsd %xmm0, (%rsp)
movl $0x28, %edi
callq 0x4280
movq %rax, %r14
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
leaq 0x56c71(%rip), %rax     # 0x7b800
movq %rax, (%r14)
movl $0x0, 0x8(%r14)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%r14)
movq $0x0, 0x20(%r14)
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
callq 0x23c2c
movl $0x5, 0x8(%rbx)
movl $0x28, %edi
callq 0x4280
movq %rax, %r15
movq %rax, %rdi
movsd (%rsp), %xmm0
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x227be
movq %r15, 0x10(%rbx)
movq %r14, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
jmp 0x24c18
movq %rax, %rbx
movl $0x28, %esi
jmp 0x24c15
movq %rax, %rbx
movl $0x10, %esi
movq %r14, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Add(gaps::RNPolynomial const&)
void RNAlgebraic::
Add(const RNPolynomial& value)
{
  // Just checking
  assert(IsValid());

  // Check value
  if (value.IsZero()) return;

  // Add scalar
  switch(operation) {
  case RN_ZERO_OPERATION: 
    operation = RN_POLYNOMIAL_OPERATION;
    polynomial = new RNPolynomial(value);
    return;

  case RN_POLYNOMIAL_OPERATION:
    polynomial->Add(value);
    return;

  default: {
    RNAlgebraic *e = new RNAlgebraic(operation, operands[0], operands[1]);
    operation = RN_ADD_OPERATION;
    operands[0] = new RNAlgebraic(value, 0);
    operands[1] = e;
    return; }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x211b4
testl %eax, %eax
je 0x24c49
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rbx), %ebp
cmpl $0x1, %ebp
je 0x24c7a
testl %ebp, %ebp
jne 0x24c8e
movl $0x1, 0x8(%rbx)
movl $0x10, %edi
callq 0x4280
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x20bde
movq %r15, 0x20(%rbx)
jmp 0x24c40
movq 0x20(%rbx), %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x214b6
movl $0x28, %edi
callq 0x4280
movq %rax, %r15
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
leaq 0x56b56(%rip), %rax     # 0x7b800
movq %rax, (%r15)
movl $0x0, 0x8(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movq $0x0, 0x20(%r15)
movq %r15, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
callq 0x23c2c
movl $0x2, 0x8(%rbx)
movl $0x28, %edi
callq 0x4280
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x22864
movq %r12, 0x10(%rbx)
movq %r15, 0x18(%rbx)
jmp 0x24c40
movq %rax, %rbx
movl $0x28, %esi
movq %r12, %rdi
jmp 0x24d20
movq %rax, %rbx
movl $0x28, %esi
jmp 0x24d1d
movq %rax, %rbx
movl $0x10, %esi
movq %r15, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Subtract(gaps::RNPolynomial const&)
void RNAlgebraic::
Subtract(const RNPolynomial& value)
{
  // Just checking
  assert(IsValid());

  // Check value
  if (value.IsZero()) return;

  // Subtract scalar
  switch(operation) {
  case RN_ZERO_OPERATION: 
    operation = RN_POLYNOMIAL_OPERATION;
    polynomial = new RNPolynomial(value);
    polynomial->Negate();
    return;
    
  case RN_POLYNOMIAL_OPERATION:
    polynomial->Subtract(value);
    return;
    
  default: {
    RNAlgebraic *e = new RNAlgebraic(operation, operands[0], operands[1]);
    operation = RN_SUBTRACT_OPERATION;
    operands[0] = e;
    operands[1] = new RNAlgebraic(value, 0);
    return; }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x211b4
testl %eax, %eax
je 0x24d52
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rbx), %ebp
cmpl $0x1, %ebp
je 0x24d93
testl %ebp, %ebp
jne 0x24da9
movl $0x1, 0x8(%rbx)
movl $0x10, %edi
callq 0x4280
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x20bde
movq %r15, 0x20(%rbx)
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21414
movq 0x20(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21508
movl $0x28, %edi
callq 0x4280
movq %rax, %r15
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
leaq 0x56a3b(%rip), %rax     # 0x7b800
movq %rax, (%r15)
movl $0x0, 0x8(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movq $0x0, 0x20(%r15)
movq %r15, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
callq 0x23c2c
movl $0x3, 0x8(%rbx)
movq %r15, 0x10(%rbx)
movl $0x28, %edi
callq 0x4280
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x22864
movq %r15, 0x18(%rbx)
jmp 0x24d47
jmp 0x24e1b
movq %rax, %rbx
movl $0x28, %esi
jmp 0x24e2d
movq %rax, %rbx
movl $0x10, %esi
movq %r15, %rdi
callq 0x4290
movq %rbx, %rdi
callq 0x44c0
nop