// File: /workspace/github_c_makefile_star2_O3/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 0x33ebd
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 0x3395d
movl %eax, %ecx
movl $0x0, %eax
cmpl $-0x1, %ecx
jne 0x33eac
movq (%r14), %rdi
movslq (%rbx), %rdx
incq %rdx
movq %rdx, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rsi
callq 0x3a0b4
movq %rax, (%r14)
movq (%r12,%rbp,8), %rdi
callq 0x3506e
movq %rax, %r13
movq (%r14), %rax
movslq (%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
testq %r13, %r13
je 0x33e55
movl $0x3, (%rax,%rcx)
movslq (%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq 0x18(%rax,%rcx), %rdi
movq %r13, %rsi
callq 0x3b494
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 0x3543a
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 0x35aea
movq %r12, %rdi
movq 0x8(%rsp), %r12
callq 0x3a180
movq %r13, %rdi
callq 0x3a180
jmp 0x33ea2
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 0x3b494
movq (%r14), %rcx
movslq (%rbx), %rdx
shlq $0x4, %rdx
leaq (%rdx,%rdx,2), %rdi
movq %rax, 0x18(%rcx,%rdi)
addq (%r14), %rdi
callq 0x3594f
incl (%rbx)
movl %r15d, %eax
movq 0x10(%rsp), %r13
incq %rbp
movl %eax, %r15d
cmpq %rbp, %r13
jne 0x33d82
jmp 0x33ec2
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq