// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/lang.c
// Function: evaluate_expression_list
variableptr evaluate_expression_list(Expnodeptr list)
{
 /*!Last Changed 12.08.2010*/
 /*!Last Changed 03.01.2006*/
 variableptr result, tmparray;
 char st[MAXLENGTH];
 Expnodeptr s[STACKSIZE];
 Stackptr indexstack;
 Expnodeptr tmp, operand1, operand2, tmpresult, next;
 int top = -1, optype, index;
 tmp = infix_to_postfix_conversion(list);
 while (tmp)
  {
   next = tmp->next;
   if (tmp->type != NO_TYPE)
    {
     top++;
     s[top] = tmp;
    }
   else
    {
     optype = listindexc(tmp->name[0], operators, 7);
     if (optype == -1)
      {
       sprintf(st, "%s[]", tmp->name);
       tmparray = get_variable(st);
       if (tmparray && tmparray->type == ARRAY_TYPE)
        {
         indexstack = stack();
         while (tmparray->type == ARRAY_TYPE)
          {
           operand1 = s[top];
           if (operand1->type == INTEGER_TYPE)
             index = operand1->value.intvalue;
           else 
             index = (int) operand1->value.floatvalue;
           push(indexstack, index);
           tmparray = &(tmparray->value.array[0]);
           top--;
           free_expnode(operand1);
          }
         tmparray = get_variable(st);
         while (tmparray->type == ARRAY_TYPE)
          {
           index = pop(indexstack);
           tmparray = &(tmparray->value.array[index - 1]);
          }
         free_stack(indexstack);
         tmpresult = safemalloc(sizeof(Expnode), "evaluate_expression_list", 33);
         tmpresult->type = tmparray->type;
         if (tmparray->type == INTEGER_TYPE)
           tmpresult->value.intvalue = tmparray->value.intvalue;
         else
           tmpresult->value.floatvalue = tmparray->value.floatvalue;
         top++;
         s[top] = tmpresult;
        }
       else
         return NULL;
      }
     else 
      {
       operand2 = s[top];
       top--;
       operand1 = s[top];
       top--;
       tmpresult = evaluate_operation(operand1, operand2, optype);
       free_expnode(operand1);
       free_expnode(operand2);
       top++;
       s[top] = tmpresult;
      }
     free_expnode(tmp);
    }
   tmp = next;
  }
 result = safemalloc(sizeof(struct variable), "evaluate_expression_list", 69);
 result->value = s[top]->value;
 result->type = s[top]->type;
 free_expnode(s[top]);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7c078, %rsp          # imm = 0x7C078
callq 0x356c8
testq %rax, %rax
je 0x34f10
movq %rax, %r13
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x18(%r13), %r14
cmpl $-0x1, 0x8(%r13)
je 0x34d7e
movslq %r12d, %rax
incl %r12d
movq %r13, 0x18(%rsp,%rax,8)
jmp 0x34eff
movq (%r13), %rax
movsbl (%rax), %edi
leaq 0x9d041(%rip), %rsi     # 0xd1dcd
movl $0x7, %edx
callq 0x3a3a8
cmpl $-0x1, %eax
movq %r14, 0x8(%rsp)
je 0x34ddf
movslq %r12d, %rbx
movq 0x8(%rsp,%rbx,8), %r14
movq 0x10(%rsp,%rbx,8), %r15
decl %r12d
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x3556c
movq %rax, %rbp
movq %r14, %rdi
movq 0x8(%rsp), %r14
callq 0x35380
movq %r15, %rdi
callq 0x35380
movq %rbp, 0x8(%rsp,%rbx,8)
jmp 0x34ef7
movq (%r13), %rdx
leaq 0x1f50(%rsp), %rbx
movq %rbx, %rdi
leaq 0x718cb(%rip), %rsi     # 0xa66c0
xorl %eax, %eax
callq 0x41b0
movq %rbx, %rdi
callq 0x3440c
testq %rax, %rax
je 0x34f5d
movq %rax, %r15
cmpl $0x3, (%rax)
jne 0x34f5d
xorl %eax, %eax
callq 0x1b5c4
movq %rax, %rbp
cmpl $0x3, (%r15)
jne 0x34e6b
movslq %r12d, %rax
leaq (%rsp,%rax,8), %rbx
addq $0x10, %rbx
movq (%rbx), %r14
cmpl $0x0, 0x8(%r14)
je 0x34e46
cvttsd2si 0x10(%r14), %esi
jmp 0x34e4a
movl 0x10(%r14), %esi
movq %rbp, %rdi
callq 0x1b5e7
movq 0x28(%r15), %r15
movq %r14, %rdi
callq 0x35380
addq $-0x8, %rbx
decl %r12d
cmpl $0x3, (%r15)
je 0x34e34
leaq 0x1f50(%rsp), %rdi
callq 0x3440c
movq %rax, %r15
cmpl $0x3, (%rax)
jne 0x34eab
movq 0x8(%rsp), %r14
movq %rbp, %rdi
callq 0x1b605
movq 0x28(%r15), %rcx
cltq
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
leaq (%rcx,%rax), %r15
addq $-0x30, %r15
cmpl $0x3, (%r15)
je 0x34e85
jmp 0x34eb0
movq 0x8(%rsp), %r14
movq %rbp, %rdi
callq 0x1b623
movl $0x20, %edi
leaq 0x71801(%rip), %rsi     # 0xa66c5
movl $0x21, %edx
callq 0x390f5
movl (%r15), %ecx
movl %ecx, 0x8(%rax)
testl %ecx, %ecx
je 0x34ee5
movsd 0x28(%r15), %xmm0
movsd %xmm0, 0x10(%rax)
jmp 0x34eec
movl 0x28(%r15), %ecx
movl %ecx, 0x10(%rax)
movslq %r12d, %rcx
incl %r12d
movq %rax, 0x18(%rsp,%rcx,8)
movq %r13, %rdi
callq 0x35380
movq %r14, %r13
testq %r14, %r14
jne 0x34d63
movslq %r12d, %rbx
jmp 0x34f17
movq $-0x1, %rbx
leaq 0x717a7(%rip), %rsi     # 0xa66c5
movl $0x30, %edi
movl $0x45, %edx
callq 0x390f5
movq %rax, %r14
movq 0x10(%rsp,%rbx,8), %rdi
movq 0x10(%rdi), %rax
movq %rax, 0x28(%r14)
movl 0x8(%rdi), %eax
movl %eax, (%r14)
callq 0x35380
movq %r14, %rax
addq $0x7c078, %rsp          # imm = 0x7C078
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x34f48