// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xe0, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4b5e0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x4bfba
movq -0x18(%rbp), %rdi
callq 0x4b5e0
movq %rax, -0x38(%rbp)
movsbl -0x1(%rbp), %eax
movl %eax, -0x6c(%rbp)
subl $0x2a, %eax
je 0x4be93
jmp 0x4bd42
movl -0x6c(%rbp), %eax
subl $0x2b, %eax
je 0x4bd79
jmp 0x4bd4c
movl -0x6c(%rbp), %eax
subl $0x2d, %eax
je 0x4be06
jmp 0x4bd5a
movl -0x6c(%rbp), %eax
subl $0x2f, %eax
je 0x4beea
jmp 0x4bd68
movl -0x6c(%rbp), %eax
subl $0x5e, %eax
je 0x4bf25
jmp 0x4bfb5
movq -0x30(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x4bda2
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x5ac40
jmp 0x4be01
movl $0x10, %edi
leaq 0x9a47c(%rip), %rsi     # 0xe622a
movl $0xe, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x58550
movq %rax, %rcx
movq -0x78(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x4bfb5
movq -0x30(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x4be2f
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x5adf0
jmp 0x4be8e
movl $0x10, %edi
leaq 0x9a3ef(%rip), %rsi     # 0xe622a
movl $0x16, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x58550
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rcx, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq -0x58(%rbp), %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x4bfb5
cmpq $0x0, -0x38(%rbp)
je 0x4bec1
movq -0x38(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x4bec1
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x5afa0
jmp 0x4bee5
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4100
movq -0x88(%rbp), %rdi
callq 0x5a9d0
jmp 0x4bfb5
cmpq $0x0, -0x38(%rbp)
je 0x4befc
movq -0x38(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x4befc
jmp 0x4bf20
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4100
movq -0x90(%rbp), %rdi
callq 0x5aa40
jmp 0x4bfb5
movq -0x30(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x4bf4e
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x5b940
jmp 0x4bfb3
movl $0x10, %edi
leaq 0x9a2d0(%rip), %rsi     # 0xe622a
movl $0x1c, %edx
callq 0x52d70
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x38(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x58550
movq %rax, %rcx
movq -0x98(%rbp), %rax
movq %rcx, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movq -0x68(%rbp), %rcx
movq %rcx, (%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x4bfb5
jmp 0x4c10d
movq -0x30(%rbp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movq %rsp, %rax
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x4bc50
movsd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4100
movsd %xmm0, -0x28(%rbp)
movsbl -0x1(%rbp), %eax
addl $-0x24, %eax
movl %eax, %ecx
movq %rcx, -0xa0(%rbp)
subl $0x3a, %eax
ja 0x4c0ff
movq -0xa0(%rbp), %rax
leaq 0x998f2(%rip), %rcx     # 0xe5908
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsd -0x28(%rbp), %xmm0
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x4c0ff
movsd -0x28(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x4c0ff
movsd -0x28(%rbp), %xmm0
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x4c0ff
movsd -0x28(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x4c0ff
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x4290
movsd %xmm0, -0x20(%rbp)
jmp 0x4c0ff
movsd -0x20(%rbp), %xmm0
callq 0x4120
movsd %xmm0, -0xa8(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x4120
movaps %xmm0, %xmm1
movsd -0xa8(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x4c0ff
movsd -0x20(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
movsd -0x20(%rbp), %xmm2
divsd -0x28(%rbp), %xmm2
cvttsd2si %xmm2, %eax
cvtsi2sd %eax, %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x30(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
callq 0x4bca0
movl $0x1, %eax
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax,%rax)