// File: /workspace/github_c_makefile_star2_O3/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 0x3609d
testq %rax, %rax
je 0x358fd
movq %rax, %r13
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x18(%r13), %r14
cmpl $-0x1, 0x8(%r13)
je 0x3576b
movslq %r12d, %rax
incl %r12d
movq %r13, 0x18(%rsp,%rax,8)
jmp 0x358ec
movq (%r13), %rax
movsbl (%rax), %edi
leaq 0x9f654(%rip), %rsi     # 0xd4dcd
movl $0x7, %edx
callq 0x3b438
cmpl $-0x1, %eax
movq %r14, 0x8(%rsp)
je 0x357cc
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 0x35f3b
movq %rax, %rbp
movq %r14, %rdi
movq 0x8(%rsp), %r14
callq 0x35d71
movq %r15, %rdi
callq 0x35d71
movq %rbp, 0x8(%rsp,%rbx,8)
jmp 0x358e4
movq (%r13), %rdx
leaq 0x1f50(%rsp), %rbx
movq %rbx, %rdi
leaq 0x73f0c(%rip), %rsi     # 0xa96ee
xorl %eax, %eax
callq 0x41b0
movq %rbx, %rdi
callq 0x34def
testq %rax, %rax
je 0x3594a
movq %rax, %r15
cmpl $0x3, (%rax)
jne 0x3594a
xorl %eax, %eax
callq 0x1bc40
movq %rax, %rbp
cmpl $0x3, (%r15)
jne 0x35858
movslq %r12d, %rax
leaq (%rsp,%rax,8), %rbx
addq $0x10, %rbx
movq (%rbx), %r14
cmpl $0x0, 0x8(%r14)
je 0x35833
cvttsd2si 0x10(%r14), %esi
jmp 0x35837
movl 0x10(%r14), %esi
movq %rbp, %rdi
callq 0x1bc63
movq 0x28(%r15), %r15
movq %r14, %rdi
callq 0x35d71
addq $-0x8, %rbx
decl %r12d
cmpl $0x3, (%r15)
je 0x35821
leaq 0x1f50(%rsp), %rdi
callq 0x34def
movq %rax, %r15
cmpl $0x3, (%rax)
jne 0x35898
movq 0x8(%rsp), %r14
movq %rbp, %rdi
callq 0x1bc81
movq 0x28(%r15), %rcx
cltq
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
leaq (%rcx,%rax), %r15
addq $-0x30, %r15
cmpl $0x3, (%r15)
je 0x35872
jmp 0x3589d
movq 0x8(%rsp), %r14
movq %rbp, %rdi
callq 0x1bc9f
movl $0x20, %edi
leaq 0x73e42(%rip), %rsi     # 0xa96f3
movl $0x21, %edx
callq 0x3a0e1
movl (%r15), %ecx
movl %ecx, 0x8(%rax)
testl %ecx, %ecx
je 0x358d2
movsd 0x28(%r15), %xmm0
movsd %xmm0, 0x10(%rax)
jmp 0x358d9
movl 0x28(%r15), %ecx
movl %ecx, 0x10(%rax)
movslq %r12d, %rcx
incl %r12d
movq %rax, 0x18(%rsp,%rcx,8)
movq %r13, %rdi
callq 0x35d71
movq %r14, %r13
testq %r14, %r14
jne 0x35750
movslq %r12d, %rbx
jmp 0x35904
movq $-0x1, %rbx
leaq 0x73de8(%rip), %rsi     # 0xa96f3
movl $0x30, %edi
movl $0x45, %edx
callq 0x3a0e1
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 0x35d71
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 0x35935