// File: tomfunkhouser[P]gaps/pkgs/RNMath/RNAlgebraic.cpp
// Function: gaps::RNAlgebraic::Construct(int, gaps::RNAlgebraic*, gaps::RNAlgebraic*, int)
void RNAlgebraic::
Construct(int op, RNAlgebraic *operand1, RNAlgebraic *operand2, RNBoolean force)
{
  // NOTE: THIS TAKES OVER MANAGEMENT OF MEMORY FOR OPERANDS
  // SPECIFICALLY, OPERANDS WILL BE DELETED WHEN ALGEBRAIC IS DECONSTRUCTED
  assert(operand1 && operand2);
  assert(operand1->IsValid());
  assert(operand2->IsValid());

  // 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->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 {
    switch(op) {
    case RN_ZERO_OPERATION:
      delete operand1;
      delete operand2;
      break;

    case RN_ADD_OPERATION:
    case RN_SUBTRACT_OPERATION:
      if (operand1->IsZero()) {
        if (operand2->IsZero()) {
          // Both operands are zero -- delete both 
          delete operand1;
          delete operand2;
        }
        else {
          // Operand1 is zero - copy stuff from operand2
          operation = operand2->operation;
          polynomial = operand2->polynomial;
          operands[0] = operand2->operands[0];
          operands[1] = operand2->operands[1];
          if (op == RN_SUBTRACT_OPERATION) Negate();
        
          // Delete operands
          operand2->operation = RN_ZERO_OPERATION;
          operand2->operands[0] = NULL;
          operand2->operands[1] = NULL;
          operand2->polynomial = NULL;
          delete operand1;
          delete operand2;
        }
      }
      else if (operand2->IsZero()) {
        // Operand2 is zero - copy stuff from operand1
        operation = operand1->operation;
        polynomial = operand1->polynomial;
        operands[0] = operand1->operands[0];
        operands[1] = operand1->operands[1];
      
        // Delete operands
        operand1->operation = RN_ZERO_OPERATION;
        operand1->operands[0] = NULL;
        operand1->operands[1] = NULL;
        operand1->polynomial = NULL;
        delete operand1;
        delete operand2;
      }
      else {
        // Initialize binary operation
        operation = op;
        operands[0] = operand1;
        operands[1] = operand2;
      }
      break;

    case RN_MULTIPLY_OPERATION:
      if ((operand1->IsZero()) || (operand2->IsZero())) {
        delete operand1;
        delete operand2;
      }
      else if ((operand1->IsOne()) && (operand2->IsOne())) {
        operation = RN_POLYNOMIAL_OPERATION;
        polynomial = new RNPolynomial(1.0, 0);
        delete operand1;
        delete operand2;
      }
      else if (operand1->IsOne()) {
        // Operand1 is one - copy stuff from operand2
        operation = operand2->operation;
        polynomial = operand2->polynomial;
        operands[0] = operand2->operands[0];
        operands[1] = operand2->operands[1];
        
        // Delete operands
        operand2->operation = RN_ZERO_OPERATION;
        operand2->operands[0] = NULL;
        operand2->operands[1] = NULL;
        operand2->polynomial = NULL;
        delete operand1;
        delete operand2;
      }
      else if (operand2->IsOne()) {
        // Operand2 is one - copy stuff from operand1
        operation = operand1->operation;
        polynomial = operand1->polynomial;
        operands[0] = operand1->operands[0];
        operands[1] = operand1->operands[1];
        
        // Delete operands
        operand1->operation = RN_ZERO_OPERATION;
        operand1->operands[0] = NULL;
        operand1->operands[1] = NULL;
        operand1->polynomial = NULL;
        delete operand1;
        delete operand2;
      }
      else {
        // Initialize binary operation
        operation = op;
        operands[0] = operand1;
        operands[1] = operand2;
      }
      break;

    case RN_DIVIDE_OPERATION:
      if (operand1->IsZero()) {
        // Numerator is zero
        delete operand1;
        delete operand2;
      }
      else if (operand2->IsZero()) {
        // Denominator is zero
        operation = RN_POLYNOMIAL_OPERATION;
        polynomial = new RNPolynomial(RN_INFINITY, 0);
        delete operand1;
        delete operand2;
      }
      else if (operand2->IsOne()) {
        // Operand2 is one - copy stuff from operand1
        operation = operand1->operation;
        polynomial = operand1->polynomial;
        operands[0] = operand1->operands[0];
        operands[1] = operand1->operands[1];
        
        // Delete operands
        operand1->operation = RN_ZERO_OPERATION;
        operand1->operands[0] = NULL;
        operand1->operands[1] = NULL;
        operand1->polynomial = NULL;
        delete operand1;
        delete operand2;
      }
      else {
        // Initialize binary operation
        operation = op;
        operands[0] = operand1;
        operands[1] = operand2;
      }
      break;

    case RN_POW_OPERATION:
      if (operand1->IsZero()) {
        // Base is zero
        delete operand1;
        delete operand2;
      }
      else if ((operand1->IsOne()) || (operand2->IsZero())) {
        operation = RN_POLYNOMIAL_OPERATION;
        polynomial = new RNPolynomial(1.0, 0);
        delete operand1;
        delete operand2;
      }
      else if (operand2->IsOne()) {
        // Operand2 is one - copy stuff from operand1
        operation = operand1->operation;
        polynomial = operand1->polynomial;
        operands[0] = operand1->operands[0];
        operands[1] = operand1->operands[1];
        
        // Delete operands
        operand1->operation = RN_ZERO_OPERATION;
        operand1->operands[0] = NULL;
        operand1->operands[1] = NULL;
        operand1->polynomial = NULL;
        delete operand1;
        delete operand2;
      }
      else {
        // Initialize binary operation
        operation = op;
        operands[0] = operand1;
        operands[1] = operand2;
      }
      break;

    default:
      RNAbort("Invalid operation %d\n", op);
      break;
    }
  }
  
  // Just checking
  assert(IsValid());
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x150(%rsp)
movl %esi, 0x14c(%rsp)
movq %rdx, 0x140(%rsp)
movq %rcx, 0x138(%rsp)
movl %r8d, 0x134(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x118(%rsp)
cmpl $0x0, 0x134(%rsp)
jne 0x42c21
movq 0x140(%rsp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x42c21
movq 0x118(%rsp), %rdi
movl 0x14c(%rsp), %esi
movq 0x140(%rsp), %rax
movq 0x20(%rax), %rdx
movq 0x138(%rsp), %rcx
xorl %r8d, %r8d
callq 0x42510
movq 0x140(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x140(%rsp), %rax
movq %rax, 0x110(%rsp)
cmpq $0x0, %rax
je 0x42c1c
movq 0x110(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x437b6
cmpl $0x0, 0x134(%rsp)
jne 0x42cd4
movq 0x138(%rsp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x42cd4
movq 0x118(%rsp), %rdi
movl 0x14c(%rsp), %esi
movq 0x140(%rsp), %rdx
movq 0x138(%rsp), %rax
movq 0x20(%rax), %rcx
xorl %r8d, %r8d
callq 0x428f0
movq 0x138(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x138(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x138(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x138(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0x108(%rsp)
cmpq $0x0, %rax
je 0x42ccf
movq 0x108(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x437b4
movl 0x14c(%rsp), %eax
movq %rax, 0x100(%rsp)
subq $0x6, %rax
ja 0x4379d
movq 0x100(%rsp), %rax
leaq 0x69bb8(%rip), %rcx     # 0xac8b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x140(%rsp), %rax
movq %rax, 0xf8(%rsp)
cmpq $0x0, %rax
je 0x42d29
movq 0xf8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0xf0(%rsp)
cmpq $0x0, %rax
je 0x42d4d
movq 0xf0(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x437b2
movq 0x140(%rsp), %rdi
callq 0x3fa70
cmpl $0x0, %eax
je 0x42eb2
movq 0x138(%rsp), %rdi
callq 0x3fa70
cmpl $0x0, %eax
je 0x42dc7
movq 0x140(%rsp), %rax
movq %rax, 0xe8(%rsp)
cmpq $0x0, %rax
je 0x42d9e
movq 0xe8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0xe0(%rsp)
cmpq $0x0, %rax
je 0x42dc2
movq 0xe0(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x42ead
movq 0x118(%rsp), %rax
movq 0x138(%rsp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq 0x138(%rsp), %rcx
movq 0x20(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq 0x138(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq 0x138(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
cmpl $0x3, 0x14c(%rsp)
jne 0x42e24
movq 0x118(%rsp), %rdi
callq 0x438c0
movq 0x138(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x138(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x138(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x138(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x140(%rsp), %rax
movq %rax, 0xd8(%rsp)
cmpq $0x0, %rax
je 0x42e87
movq 0xd8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0xd0(%rsp)
cmpq $0x0, %rax
je 0x42eab
movq 0xd0(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x42ead
jmp 0x42fc3
movq 0x138(%rsp), %rdi
callq 0x3fa70
cmpl $0x0, %eax
je 0x42f97
movq 0x118(%rsp), %rax
movq 0x140(%rsp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq 0x140(%rsp), %rcx
movq 0x20(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq 0x140(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq 0x140(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq 0x140(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x140(%rsp), %rax
movq %rax, 0xc8(%rsp)
cmpq $0x0, %rax
je 0x42f71
movq 0xc8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0xc0(%rsp)
cmpq $0x0, %rax
je 0x42f95
movq 0xc0(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x42fc1
movq 0x118(%rsp), %rax
movl 0x14c(%rsp), %ecx
movl %ecx, 0x8(%rax)
movq 0x140(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x138(%rsp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x42fc3
jmp 0x437b2
movq 0x140(%rsp), %rdi
callq 0x3fa70
cmpl $0x0, %eax
jne 0x42fec
movq 0x138(%rsp), %rdi
callq 0x3fa70
cmpl $0x0, %eax
je 0x43039
movq 0x140(%rsp), %rax
movq %rax, 0xb8(%rsp)
cmpq $0x0, %rax
je 0x43010
movq 0xb8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0xb0(%rsp)
cmpq $0x0, %rax
je 0x43034
movq 0xb0(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x4332a
movq 0x140(%rsp), %rdi
callq 0x43990
cmpl $0x0, %eax
je 0x43133
movq 0x138(%rsp), %rdi
callq 0x43990
cmpl $0x0, %eax
je 0x43133
movq 0x118(%rsp), %rax
movl $0x1, 0x8(%rax)
movl $0x10, %edi
callq 0x4280
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0xa8(%rsp)
xorl %r8d, %r8d
movl %r8d, %ecx
movsd 0x67f86(%rip), %xmm0    # 0xab020
movl %r8d, %esi
movq %rcx, %rdx
callq 0x3c6e0
jmp 0x430a7
movq 0x118(%rsp), %rax
movq 0xa8(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x140(%rsp), %rax
movq %rax, 0xa0(%rsp)
cmpq $0x0, %rax
je 0x430df
movq 0xa0(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0x98(%rsp)
cmpq $0x0, %rax
je 0x43103
movq 0x98(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x43328
movq 0xa8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
movl $0x10, %esi
callq 0x4290
jmp 0x437be
movq 0x140(%rsp), %rdi
callq 0x43990
cmpl $0x0, %eax
je 0x4321b
movq 0x118(%rsp), %rax
movq 0x138(%rsp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq 0x138(%rsp), %rcx
movq 0x20(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq 0x138(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq 0x138(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq 0x138(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x138(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x138(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x138(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x140(%rsp), %rax
movq %rax, 0x90(%rsp)
cmpq $0x0, %rax
je 0x431f2
movq 0x90(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0x88(%rsp)
cmpq $0x0, %rax
je 0x43216
movq 0x88(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x43326
movq 0x138(%rsp), %rdi
callq 0x43990
cmpl $0x0, %eax
je 0x432fa
movq 0x118(%rsp), %rax
movq 0x140(%rsp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq 0x140(%rsp), %rcx
movq 0x20(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq 0x140(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq 0x140(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq 0x140(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x140(%rsp), %rax
movq %rax, 0x80(%rsp)
cmpq $0x0, %rax
je 0x432da
movq 0x80(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0x78(%rsp)
cmpq $0x0, %rax
je 0x432f8
movq 0x78(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x43324
movq 0x118(%rsp), %rax
movl 0x14c(%rsp), %ecx
movl %ecx, 0x8(%rax)
movq 0x140(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x138(%rsp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x43326
jmp 0x43328
jmp 0x4332a
jmp 0x437b2
movq 0x140(%rsp), %rdi
callq 0x3fa70
cmpl $0x0, %eax
je 0x43382
movq 0x140(%rsp), %rax
movq %rax, 0x70(%rsp)
cmpq $0x0, %rax
je 0x4335f
movq 0x70(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpq $0x0, %rax
je 0x4337d
movq 0x68(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x4355b
movq 0x138(%rsp), %rdi
callq 0x3fa70
cmpl $0x0, %eax
je 0x43454
movq 0x118(%rsp), %rax
movl $0x1, 0x8(%rax)
movl $0x10, %edi
callq 0x4280
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x60(%rsp)
leaq 0x86f25(%rip), %rax     # 0xca2e8
movsd (%rax), %xmm0
xorl %r8d, %r8d
movl %r8d, %ecx
movl %r8d, %esi
movq %rcx, %rdx
callq 0x3c6e0
jmp 0x433da
movq 0x118(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x140(%rsp), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, %rax
je 0x43409
movq 0x58(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, %rax
je 0x43427
movq 0x50(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x43559
movq 0x60(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
movl $0x10, %esi
callq 0x4290
jmp 0x437be
movq 0x138(%rsp), %rdi
callq 0x43990
cmpl $0x0, %eax
je 0x4352d
movq 0x118(%rsp), %rax
movq 0x140(%rsp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq 0x140(%rsp), %rcx
movq 0x20(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq 0x140(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq 0x140(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq 0x140(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x140(%rsp), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
je 0x4350d
movq 0x48(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, %rax
je 0x4352b
movq 0x40(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x43557
movq 0x118(%rsp), %rax
movl 0x14c(%rsp), %ecx
movl %ecx, 0x8(%rax)
movq 0x140(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x138(%rsp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x43559
jmp 0x4355b
jmp 0x437b2
movq 0x140(%rsp), %rdi
callq 0x3fa70
cmpl $0x0, %eax
je 0x435b3
movq 0x140(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
je 0x43590
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0x435ae
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x4379b
movq 0x140(%rsp), %rdi
callq 0x43990
cmpl $0x0, %eax
jne 0x435db
movq 0x138(%rsp), %rdi
callq 0x3fa70
cmpl $0x0, %eax
je 0x43694
movq 0x118(%rsp), %rax
movl $0x1, 0x8(%rax)
movl $0x10, %edi
callq 0x4280
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x28(%rsp)
xorl %r8d, %r8d
movl %r8d, %ecx
movsd 0x67a13(%rip), %xmm0    # 0xab020
movl %r8d, %esi
movq %rcx, %rdx
callq 0x3c6e0
jmp 0x4361a
movq 0x118(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x140(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, %rax
je 0x43649
movq 0x20(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x43667
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x43799
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
movl $0x10, %esi
callq 0x4290
jmp 0x437be
movq 0x138(%rsp), %rdi
callq 0x43990
cmpl $0x0, %eax
je 0x4376d
movq 0x118(%rsp), %rax
movq 0x140(%rsp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq 0x140(%rsp), %rcx
movq 0x20(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq 0x140(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq 0x140(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq 0x140(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x140(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x140(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x4374d
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x138(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x4376b
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x43797
movq 0x118(%rsp), %rax
movl 0x14c(%rsp), %ecx
movl %ecx, 0x8(%rax)
movq 0x140(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x138(%rsp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x43799
jmp 0x4379b
jmp 0x437b2
movl 0x14c(%rsp), %esi
leaq 0x69252(%rip), %rdi     # 0xac9fd
movb $0x0, %al
callq 0x4c6e0
jmp 0x437b4
jmp 0x437b6
addq $0x158, %rsp            # imm = 0x158
retq
movq 0x128(%rsp), %rdi
callq 0x44b0
nopl (%rax,%rax)