// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/lang.c
// Function: make_operation
BOOLEAN make_operation(char op, char* name, char* value)
{
	/*!Last Changed 23.12.2006 added matrix operations*/
 /*!Last Changed 03.01.2006*/
 /*!Last Changed 02.05.2002*/
 double value1, value2;
	variableptr myvar, myvar2;
	myvar = get_variable(name);
	if (myvar->type == MATRIX_TYPE)
	 {
		 myvar2 = get_variable(value);
			switch (op)
			 {
			  case '+':if (myvar->value.matrixvalue)
                matrix_add(myvar->value.matrixvalue, *(myvar2->value.matrixvalue));
              else
               {
                myvar->value.matrixvalue = safemalloc(sizeof(matrix), "make_operation", 14);
                *(myvar->value.matrixvalue) = matrix_copy(*(myvar2->value.matrixvalue));
               }
						        break;
					case '-':if (myvar->value.matrixvalue)
                matrix_subtract(myvar->value.matrixvalue, *(myvar2->value.matrixvalue));
              else
               {
                myvar->value.matrixvalue = safemalloc(sizeof(matrix), "make_operation", 22);
                *(myvar->value.matrixvalue) = matrix_copy(*(myvar2->value.matrixvalue));
               }
						        break;
					case '*':if (myvar2 && myvar2->type == MATRIX_TYPE)
  						        matrix_product(myvar->value.matrixvalue, *(myvar2->value.matrixvalue));
						        else
															 matrix_multiply_constant(myvar->value.matrixvalue, atof(value));
						        break;
					case '/':if (myvar2 && myvar2->type == MATRIX_TYPE)
															 ;
						        else
															 matrix_divide_constant(myvar->value.matrixvalue, atof(value));
														break;
					case '^':if (myvar->value.matrixvalue)
                matrix_columnwise_merge(myvar->value.matrixvalue, *(myvar2->value.matrixvalue));
              else
               {
                myvar->value.matrixvalue = safemalloc(sizeof(matrix), "make_operation", 28);
                *(myvar->value.matrixvalue) = matrix_copy(*(myvar2->value.matrixvalue));
               }
						        break;
			 }
	 }
	else
	 {
   value1 = get_value(*myvar);
   value2 = atof(value);
   switch (op)
			 {
     case '+':value1 += value2;
              break;
     case '-':value1 -= value2;
              break;
     case '*':value1 *= value2;
              break;
     case '/':value1 /= value2;
              break;
     case '^':value1 = pow(value1, value2);
              break;
     case '$':value1 = log(value1)/log(value2);
              break;
     case '@':value1 = value1 - value2 * ((int)(value1 / value2));
              break;
			 }
	  set_value(myvar, value1);
	 }
 return BOOLEAN_TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movl %edi, %ebp
movq %rsi, %rdi
callq 0x34def
movq %rax, %rbx
movl (%rax), %eax
cmpl $0x5, %eax
jne 0x35220
movq %r15, %rdi
callq 0x34def
movq %rax, %r14
movsbl %bpl, %ecx
leal -0x2a(%rcx), %eax
cmpl $0x5, %eax
ja 0x352d5
leaq 0x73c45(%rip), %rcx     # 0xa8e30
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testq %r14, %r14
je 0x35384
cmpl $0x5, (%r14)
jne 0x35384
movq 0x28(%rbx), %rdi
movq 0x28(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x3fb95
jmp 0x3542a
movq 0x28(%rbx), %xmm0
cmpl $0x1, %eax
je 0x35240
pxor %xmm1, %xmm1
testl %eax, %eax
jne 0x35244
movq %xmm0, %rax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
jmp 0x35244
movdqa %xmm0, %xmm1
movq %xmm1, 0x8(%rsp)
movq %r15, %rdi
callq 0x4130
movdqa %xmm0, %xmm2
movsbl %bpl, %eax
leal -0x24(%rax), %ecx
cmpl $0xb, %ecx
ja 0x352a7
leaq 0x73b97(%rip), %rax     # 0xa8e00
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
movsd 0x8(%rsp), %xmm1
jmpq *%rcx
movapd %xmm1, %xmm0
movsd %xmm2, 0x10(%rsp)
callq 0x4160
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x4160
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
jmp 0x353b5
cmpl $0x40, %eax
movsd 0x8(%rsp), %xmm1
je 0x3539d
cmpl $0x5e, %eax
jne 0x353b5
movapd %xmm1, %xmm0
movapd %xmm2, %xmm1
callq 0x42f0
movapd %xmm0, %xmm1
jmp 0x353b5
cmpl $0x5e, %ecx
jne 0x3542a
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x353f6
movq 0x28(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x4017d
jmp 0x3542a
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x353d0
movq 0x28(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x3fa94
jmp 0x3542a
testq %r14, %r14
je 0x35331
cmpl $0x5, (%r14)
je 0x3542a
movq 0x28(%rbx), %rbx
movq %r15, %rdi
callq 0x4130
movq %rbx, %rdi
callq 0x3f7ff
jmp 0x3542a
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x353e3
movq 0x28(%r14), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x3f993
jmp 0x3542a
mulsd %xmm2, %xmm1
jmp 0x353b5
addsd %xmm2, %xmm1
jmp 0x353b5
subsd %xmm2, %xmm1
jmp 0x353b5
divsd %xmm2, %xmm1
jmp 0x353b5
movq 0x28(%rbx), %rbx
movq %r15, %rdi
callq 0x4130
movq %rbx, %rdi
callq 0x3f7c2
jmp 0x3542a
movapd %xmm1, %xmm0
divsd %xmm2, %xmm0
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
mulsd %xmm2, %xmm0
subsd %xmm0, %xmm1
movl (%rbx), %eax
cmpl $0x1, %eax
je 0x353c9
testl %eax, %eax
jne 0x3542a
cvttsd2si %xmm1, %eax
movl %eax, 0x28(%rbx)
jmp 0x3542a
movsd %xmm1, 0x28(%rbx)
jmp 0x3542a
leaq 0x7426f(%rip), %rsi     # 0xa9646
movl $0x10, %edi
movl $0x16, %edx
jmp 0x35407
leaq 0x7425c(%rip), %rsi     # 0xa9646
movl $0x10, %edi
movl $0xe, %edx
jmp 0x35407
leaq 0x74249(%rip), %rsi     # 0xa9646
movl $0x10, %edi
movl $0x1c, %edx
callq 0x3a0e1
movq %rax, %r15
movq %rax, 0x28(%rbx)
movq 0x28(%r14), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x3dae3
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq