// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, (%rsp)
testl %edx, %edx
jle 0x334fc
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r12
movl %edx, %r13d
movl $0x1, %r15d
xorl %ebp, %ebp
movq %rsi, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq (%r12,%rbp,8), %rdi
movq (%r14), %rsi
movl (%rbx), %edx
callq 0x32f77
movl %eax, %ecx
movl $0x0, %eax
cmpl $-0x1, %ecx
jne 0x334eb
movq (%r14), %rdi
movslq (%rbx), %rdx
incq %rdx
movq %rdx, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rsi
callq 0x390c8
movq %rax, (%r14)
movq (%r12,%rbp,8), %rdi
callq 0x3468b
movq %rax, %r13
movq (%r14), %rax
movslq (%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
testq %r13, %r13
je 0x33494
movl $0x3, (%rax,%rcx)
movslq (%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq 0x18(%rax,%rcx), %rdi
movq %r13, %rsi
callq 0x3a404
movq (%r14), %rcx
movslq (%rbx), %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
movq %rax, 0x18(%rcx,%rdx)
movq (%r12,%rbp,8), %rdi
leaq 0x4(%rsp), %rsi
callq 0x34a57
movq %rax, %r12
movslq (%rbx), %rax
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
addq (%r14), %rdi
movl 0x4(%rsp), %ecx
movq %r12, %rsi
xorl %edx, %edx
movl (%rsp), %r8d
callq 0x350f9
movq %r12, %rdi
movq 0x8(%rsp), %r12
callq 0x39194
movq %r13, %rdi
callq 0x39194
jmp 0x334e1
movl $0x0, 0x20(%rax,%rcx)
movslq (%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movl (%rsp), %edx
movl %edx, (%rax,%rcx)
movslq (%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq 0x18(%rax,%rcx), %rdi
movq (%r12,%rbp,8), %rsi
callq 0x3a404
movq (%r14), %rcx
movslq (%rbx), %rdx
shlq $0x4, %rdx
leaq (%rdx,%rdx,2), %rdi
movq %rax, 0x18(%rcx,%rdi)
addq (%r14), %rdi
callq 0x34f62
incl (%rbx)
movl %r15d, %eax
movq 0x10(%rsp), %r13
incq %rbp
movl %eax, %r15d
cmpq %rbp, %r13
jne 0x333c1
jmp 0x33501
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq