// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/lang.c
// Function: add_variable
int add_variable(VARIABLE_TYPE type, char** names, int count, variableptr* vars, int* varcount)
{
 /*!Last Changed 04.01.2006 added create_multidimensional_array*/
	/*!Last Changed 29.11.2004 added arraysize*/
	/*!Last Changed 02.02.2004 added safemalloc*/
 /*!Last Changed 02.05.2002*/
 int i, j, result = 1, *dimensions, dimcount;
 char* st;
 for (j = 0; j < count; j++)
  {
   i = return_variable_index(names[j], *vars, *varcount);
   if (i != -1)
			 {
				 result = 0;
     continue;
			 }
   *vars = (variableptr)alloc(*vars, sizeof(Variable) * (*varcount + 1), *varcount + 1);
   st = array_variable(names[j]);
   if (st)
    {
     (*vars)[*varcount].type = ARRAY_TYPE;
     (*vars)[*varcount].name = strcopy((*vars)[*varcount].name, st);
     dimensions = array_sizes(names[j], &dimcount);
     create_multidimensional_array(&((*vars)[*varcount]), dimensions, 0, dimcount, type);
     safe_free(dimensions);
     safe_free(st);
    }
   else
    {
				 (*vars)[*varcount].arraysize = 0;
     (*vars)[*varcount].type = type;
     (*vars)[*varcount].name = strcopy((*vars)[*varcount].name, names[j]);
     set_default_value(&((*vars)[*varcount]));
    }
   (*varcount)++;
  }
 return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x1, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x49eb4
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x28(%rbp), %rax
movl (%rax), %edx
callq 0x495a0
movl %eax, -0x2c(%rbp)
cmpl $-0x1, -0x2c(%rbp)
je 0x49d07
movl $0x0, -0x34(%rbp)
jmp 0x49ea6
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl (%rax), %eax
addl $0x1, %eax
cltq
imulq $0x30, %rax, %rsi
movq -0x28(%rbp), %rax
movl (%rax), %edx
addl $0x1, %edx
callq 0x52d10
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4ba60
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x49e05
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl $0x3, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
movq -0x50(%rbp), %rsi
callq 0x54ba0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq -0x44(%rbp), %rsi
callq 0x4c120
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movslq (%rax), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movq -0x40(%rbp), %rsi
movl -0x44(%rbp), %ecx
movl -0x4(%rbp), %r8d
xorl %edx, %edx
callq 0x4cd10
movq -0x40(%rbp), %rdi
callq 0x52e80
movq -0x50(%rbp), %rdi
callq 0x52e80
jmp 0x49e9b
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x20(%rax)
movl -0x4(%rbp), %ecx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x54ba0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movslq (%rax), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x4c9b0
movq -0x28(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x49cc8
movl -0x34(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)