// File: /workspace/github_cpp_makefile_star2_O2/srajangarg[P]raytracer/src/core/mathexpr.cpp
// Function: ROperation::BuildCode()
void ROperation::BuildCode()
{
  //  if(mmb1!=NULL)mmb1->BuildCode();if(mmb2!=NULL)mmb2->BuildCode();
  if(pinstr!=NULL){delete[]pinstr;pinstr=NULL;}
  if(pvals!=NULL){delete[]pvals;pvals=NULL;}//does not delete pvals[0] in case it was to be deleted... (no way to know)
  if(ppile!=NULL){delete[]ppile;ppile=NULL;}
  if(pfuncpile!=NULL){delete[]pfuncpile;pfuncpile=NULL;}
  switch(op){
  case ErrOp:pinstr=new pfoncld[2];pinstr[0]=&NextVal;pinstr[1]=NULL;
    pvals=new double*[2];pvals[0]=new double(ErrVal);pvals[1]=NULL;
    ppile=new double[2];ppile[0]=0;ppile[1]=ErrVal;
    pfuncpile=new RFunction*[1];pfuncpile[0]=NULL;
    break;
  case Num:pinstr=new pfoncld[2];pinstr[0]=&NextVal;pinstr[1]=NULL;
    pvals=new double*[2];pvals[0]=new double(ValC);pvals[1]=NULL;
    ppile=new double[2];ppile[0]=0;ppile[1]=ErrVal;
    pfuncpile=new RFunction*[1];pfuncpile[0]=NULL;break;
  case Var:pinstr=new pfoncld[2];pinstr[0]=&NextVal;pinstr[1]=NULL;
    pvals=new double*[2];pvals[0]=pvarval;pvals[1]=NULL;
    ppile=new double[2];ppile[0]=0;ppile[1]=ErrVal;
    pfuncpile=new RFunction*[1];pfuncpile[0]=NULL;break;
  case Juxt:BCDouble(pinstr,mmb1->pinstr,mmb2->pinstr,
		     pvals,mmb1->pvals,mmb2->pvals,ppile,mmb1->ppile,mmb2->ppile,pfuncpile,mmb1->pfuncpile,mmb2->pfuncpile,&JuxtF);
  break;case Add:BCDouble(pinstr,mmb1->pinstr,mmb2->pinstr,
		    pvals,mmb1->pvals,mmb2->pvals,ppile,mmb1->ppile,mmb2->ppile,pfuncpile,mmb1->pfuncpile,mmb2->pfuncpile,&Addition);
  break;case Sub:BCDouble(pinstr,mmb1->pinstr,mmb2->pinstr,
			  pvals,mmb1->pvals,mmb2->pvals,ppile,mmb1->ppile,mmb2->ppile,pfuncpile,mmb1->pfuncpile,mmb2->pfuncpile,&Soustraction);
  break;case Mult:BCDouble(pinstr,mmb1->pinstr,mmb2->pinstr,
			   pvals,mmb1->pvals,mmb2->pvals,ppile,mmb1->ppile,mmb2->ppile,pfuncpile,mmb1->pfuncpile,mmb2->pfuncpile,&Multiplication);
  break;case Div:BCDouble(pinstr,mmb1->pinstr,mmb2->pinstr,
			  pvals,mmb1->pvals,mmb2->pvals,ppile,mmb1->ppile,mmb2->ppile,pfuncpile,mmb1->pfuncpile,mmb2->pfuncpile,&Division);
  break;case Pow:BCDouble(pinstr,mmb1->pinstr,mmb2->pinstr,
			  pvals,mmb1->pvals,mmb2->pvals,ppile,mmb1->ppile,mmb2->ppile,pfuncpile,mmb1->pfuncpile,mmb2->pfuncpile,&Puissance);
  break;case NthRoot:BCDouble(pinstr,mmb1->pinstr,mmb2->pinstr,
			      pvals,mmb1->pvals,mmb2->pvals,ppile,mmb1->ppile,mmb2->ppile,pfuncpile,mmb1->pfuncpile,mmb2->pfuncpile,&RacineN);
  break;case E10:BCDouble(pinstr,mmb1->pinstr,mmb2->pinstr,
			  pvals,mmb1->pvals,mmb2->pvals,ppile,mmb1->ppile,mmb2->ppile,pfuncpile,mmb1->pfuncpile,mmb2->pfuncpile,&Puiss10);
  break;case Opp:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			  ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,&Oppose);
  break;case Sin:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			  ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,&Sinus);
  break;case Sqrt:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			   ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,&Racine);
  break;case Ln:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			 ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,&Logarithme);
  break;case Exp:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			  ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,&Exponentielle);
  break;case Cos:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			  ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,&Cosinus);
  break;case Tg:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			 ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,&Tangente);
  break;case Atan:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			   ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,(mmb2->NMembers()>1?&ArcTangente2:&ArcTangente));
  break;case Asin:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			   ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,&ArcSinus);
  break;case Acos:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			   ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,&ArcCosinus);
  break;case Abs:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			  ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,&Absolu);
  break;case Fun:BCFun(pinstr,mmb2->pinstr,pvals,mmb2->pvals,ppile,
		       mmb2->ppile,pfuncpile,mmb2->pfuncpile,pfunc);
  break;default:BCSimple(pinstr,mmb2->pinstr,pvals,mmb2->pvals,
			 ppile,mmb2->ppile,pfuncpile,mmb2->pfuncpile,&FonctionError);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xc3f4
callq 0x43e0
andq $0x0, (%r14)
leaq 0x8(%r14), %r15
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0xc40a
callq 0x43e0
andq $0x0, (%r15)
leaq 0x10(%r14), %rbx
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0xc420
callq 0x43e0
andq $0x0, (%rbx)
leaq 0x18(%r14), %rbp
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0xc437
callq 0x43e0
andq $0x0, (%rbp)
movl 0x24(%r14), %eax
cmpq $0x16, %rax
ja 0xc874
leaq 0x154d4(%rip), %rcx     # 0x21920
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x10
popq %rbx
movq %rbx, %rdi
callq 0x4040
movq %rax, (%r14)
leaq 0x52c9(%rip), %rcx      # 0x11733
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movq %rbx, %rdi
callq 0x4040
movq %rax, %r15
movq %rax, 0x8(%r14)
pushq $0x8
popq %r12
movq %r12, %rdi
callq 0x4320
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
movq %rcx, (%rax)
jmp 0xc5b0
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
leaq 0x5392(%rip), %r10      # 0x1184b
jmp 0xc88e
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
leaq 0x5467(%rip), %r10      # 0x1193f
jmp 0xc88e
movq 0x28(%r14), %rax
movq 0x30(%r14), %r10
movq (%rax), %rsi
movq 0x8(%rax), %r8
movq (%r10), %rdx
movq 0x8(%r10), %r9
subq $0x8, %rsp
leaq 0x4fe7(%rip), %r11      # 0x114e5
jmp 0xc80a
movq 0x28(%r14), %rax
movq 0x30(%r14), %r10
movq (%rax), %rsi
movq 0x8(%rax), %r8
movq (%r10), %rdx
movq 0x8(%r10), %r9
subq $0x8, %rsp
leaq 0x4ce0(%rip), %r11      # 0x11204
jmp 0xc80a
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
leaq 0x51f3(%rip), %r10      # 0x11736
jmp 0xc88e
movq 0x28(%r14), %rax
movq 0x30(%r14), %r10
movq (%rax), %rsi
movq 0x8(%rax), %r8
movq (%r10), %rdx
movq 0x8(%r10), %r9
subq $0x8, %rsp
leaq 0x4e8f(%rip), %r11      # 0x113f8
jmp 0xc80a
pushq $0x10
popq %rbx
movq %rbx, %rdi
callq 0x4040
movq %rax, (%r14)
leaq 0x51b0(%rip), %rcx      # 0x11733
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movq %rbx, %rdi
callq 0x4040
movq %rax, %r15
movq %rax, 0x8(%r14)
pushq $0x8
popq %r12
movq %r12, %rdi
callq 0x4320
movsd 0x38(%r14), %xmm0
movsd %xmm0, (%rax)
movq %rax, (%r15)
andq $0x0, 0x8(%r15)
movq %rbx, %rdi
callq 0x4040
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movhps 0x15302(%rip), %xmm0    # xmm0 = xmm0[0,1],mem[0,1]
movups %xmm0, (%rax)
movq %r12, %rdi
jmp 0xc646
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
leaq 0x530c(%rip), %r10      # 0x118fc
jmp 0xc88e
pushq $0x10
popq %rbx
movq %rbx, %rdi
callq 0x4040
movq %rax, (%r14)
leaq 0x5129(%rip), %rcx      # 0x11733
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movq %rbx, %rdi
callq 0x4040
movq %rax, 0x8(%r14)
movq 0x48(%r14), %rcx
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movq %rbx, %rdi
callq 0x4040
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movhps 0x15290(%rip), %xmm0    # xmm0 = xmm0[0,1],mem[0,1]
movups %xmm0, (%rax)
pushq $0x8
popq %rdi
callq 0x4040
movq %rax, 0x18(%r14)
andq $0x0, (%rax)
addq $0x18, %rsp
jmp 0xc8a6
movq 0x28(%r14), %rax
movq 0x30(%r14), %r10
movq (%rax), %rsi
movq 0x8(%rax), %r8
movq (%r10), %rdx
movq 0x8(%r10), %r9
subq $0x8, %rsp
leaq 0x4c5d(%rip), %r11      # 0x112da
jmp 0xc80a
movq 0x28(%r14), %rax
movq 0x30(%r14), %r10
movq (%rax), %rsi
movq 0x8(%rax), %r8
movq (%r10), %rdx
movq 0x8(%r10), %r9
subq $0x8, %rsp
leaq 0x5092(%rip), %r11      # 0x11735
jmp 0xc80a
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
leaq 0x51c0(%rip), %r10      # 0x11882
jmp 0xc88e
movq 0x30(%r14), %rdi
movq (%rdi), %r12
movq 0x8(%rdi), %r13
movq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rdi), %rax
movq %rax, 0x10(%rsp)
callq 0xf126
cmpl $0x2, %eax
leaq 0x4fac(%rip), %rax      # 0x1169f
leaq 0x5124(%rip), %r10      # 0x1181e
cmovgeq %rax, %r10
subq $0x8, %rsp
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %rbx, %r8
movq 0x10(%rsp), %r9
pushq %r10
pushq 0x20(%rsp)
jmp 0xc89c
movq 0x28(%r14), %rax
movq 0x30(%r14), %r10
movq (%rax), %rsi
movq 0x8(%rax), %r8
movq (%r10), %rdx
movq 0x8(%r10), %r9
subq $0x8, %rsp
leaq 0x4b2d(%rip), %r11      # 0x1126f
jmp 0xc80a
movq 0x28(%r14), %rax
movq 0x30(%r14), %r10
movq (%rax), %rsi
movq 0x8(%rax), %r8
movq (%r10), %rdx
movq 0x8(%r10), %r9
subq $0x8, %rsp
leaq 0x4e8c(%rip), %r11      # 0x115f4
jmp 0xc80a
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
leaq 0x5132(%rip), %r10      # 0x118b9
jmp 0xc88e
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
leaq 0x4fc1(%rip), %r10      # 0x11767
jmp 0xc88e
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
leaq 0x5016(%rip), %r10      # 0x117db
jmp 0xc88e
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
leaq 0x519e(%rip), %r10      # 0x11982
jmp 0xc88e
movq 0x28(%r14), %rax
movq 0x30(%r14), %r10
movq (%rax), %rsi
movq 0x8(%rax), %r8
movq (%r10), %rdx
movq 0x8(%r10), %r9
subq $0x8, %rsp
leaq 0x4b63(%rip), %r11      # 0x1136d
movq %r14, %rdi
movq %r15, %rcx
pushq %r11
pushq 0x18(%r10)
pushq 0x18(%rax)
pushq %rbp
pushq 0x10(%r10)
pushq 0x10(%rax)
pushq %rbx
callq 0x119e8
addq $0x58, %rsp
jmp 0xc8a6
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %r8
pushq 0x50(%r14)
pushq 0x18(%rax)
pushq %rbp
callq 0x11de9
jmp 0xc8a2
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
leaq 0x4f26(%rip), %r10      # 0x11798
jmp 0xc88e
movq 0x30(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r9
subq $0x8, %rsp
leaq 0x5149(%rip), %r10      # 0x119d7
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %r8
pushq %r10
pushq 0x18(%rax)
pushq %rbp
callq 0x11c56
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop