// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/savecode.c
// Function: code_add_array_variable
void code_add_array_variable(FILE* testcodefile, PROGRAMMING_LANGUAGE_TYPE language, int count, ...)
{
 /*!Last Changed 13.06.2006*/
 int i, arraytype, arraysize;
 char *arrayname, ch1, ch2;
 va_list ap;
 if (in_list(language, 1, MATLAB_LANGUAGE))
   return;
 va_start(ap, count);
 for (i = 0; i < count; i++)
  { 
   arraytype = va_arg(ap, int);
   arrayname = va_arg(ap, char *);
   arraysize = va_arg(ap, int);
   switch (language){
     case C_LANGUAGE      :
     case CPP_LANGUAGE    :
     case JAVA_LANGUAGE   :switch (arraytype){
                             case INTEGER_VARIABLE:fprintf(testcodefile, "int");
                                                   break;
                             case REAL_VARIABLE   :fprintf(testcodefile, "double");
                                                   break;
                           }
                           ch1 = '[';
                           ch2 = ']';
                           break;
     case FORTRAN_LANGUAGE:switch (arraytype){
                             case INTEGER_VARIABLE:fprintf(testcodefile, "integer");
                                                   break;
                             case REAL_VARIABLE   :fprintf(testcodefile, "real");
                                                   break;
                           }
                           ch1 = '(';
                           ch2 = ')';
                           break;
     default              :break;
   }   
   fprintf(testcodefile, " %s", arrayname);
   switch (language){
     case C_LANGUAGE      :
     case CPP_LANGUAGE    :
     case JAVA_LANGUAGE   :
     case FORTRAN_LANGUAGE:fprintf(testcodefile, "%c%d%c;\n", ch1, arraysize, ch2);
                           break;
     case PASCAL_LANGUAGE :fprintf(testcodefile, ": array[1..%d] of ", arraysize);
                           switch (arraytype){
                             case INTEGER_VARIABLE:fprintf(testcodefile, "integer;\n");
                                                   break;
                             case REAL_VARIABLE   :fprintf(testcodefile, "real;\n");
                                                   break;
                           }
                           break;
     default              :break;
   }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movq %rcx, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x58(%rsp)
testb %al, %al
je 0x72bdb
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
xorl %r15d, %r15d
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
movl %ebp, %edi
xorl %eax, %eax
callq 0x35812
testl %eax, %eax
je 0x72c03
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x120(%rsp), %rax
movq %rax, 0x18(%rsp)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, 0x10(%rsp)
testl %ebx, %ebx
cmovlel %r15d, %ebx
subl $0x1, %ebx
jb 0x72bf1
movl 0x10(%rsp), %eax
cmpq $0x29, %rax
jae 0x72c7b
movq 0x20(%rsp), %rcx
leal 0x8(%rax), %edx
movl %edx, 0x10(%rsp)
movl (%rcx,%rax), %r15d
cmpl $0x21, %eax
jae 0x72c8c
movq 0x20(%rsp), %rdx
movq %rax, %rcx
addq $0x10, %rcx
movl %ecx, 0x10(%rsp)
movq 0x8(%rdx,%rax), %r12
cmpl $0x18, %eax
ja 0x72c9d
addq 0x20(%rsp), %rcx
addl $0x18, %eax
movl %eax, 0x10(%rsp)
jmp 0x72cab
movq 0x18(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x18(%rsp)
movl (%rax), %r15d
movq 0x18(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x18(%rsp)
movq (%rax), %r12
movq 0x18(%rsp), %rcx
leaq 0x8(%rcx), %rax
movq %rax, 0x18(%rsp)
movl (%rcx), %r13d
cmpl $0x2, %ebp
jb 0x72cc1
cmpl $0x5, %ebp
je 0x72d5a
cmpl $0x3, %ebp
jne 0x72cf6
movb $0x5d, 0xe(%rsp)
movb $0x5b, 0xf(%rsp)
cmpl $0x1, %r15d
je 0x72ce1
testl %r15d, %r15d
jne 0x72cf6
leaq 0x26ea1(%rip), %rdi     # 0x99b7e
pushq $0x3
jmp 0x72cea
leaq 0x23843(%rip), %rdi     # 0x9652b
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x42c0
movq %r14, %rdi
leaq 0x251cf(%rip), %rsi     # 0x97ecf
movq %r12, %rdx
xorl %eax, %eax
callq 0x42e0
cmpl $0x5, %ebp
ja 0x72c2f
pushq $0x2b
popq %rax
btl %ebp, %eax
jb 0x72da3
cmpl $0x2, %ebp
jne 0x72c2f
movq %r14, %rdi
leaq 0x2d50a(%rip), %rsi     # 0xa023c
movl %r13d, %edx
xorl %eax, %eax
callq 0x42e0
cmpl $0x1, %r15d
je 0x72dc7
testl %r15d, %r15d
jne 0x72c2f
leaq 0x2d4fb(%rip), %rdi     # 0xa0251
pushq $0x9
jmp 0x72dd0
cmpl $0x1, %r15d
je 0x72d70
testl %r15d, %r15d
jne 0x72d85
leaq 0x2d4ba(%rip), %rdi     # 0xa0226
pushq $0x7
jmp 0x72d79
leaq 0x2d4b7(%rip), %rdi     # 0xa022e
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x42c0
movq %r14, %rdi
leaq 0x25140(%rip), %rsi     # 0x97ecf
movq %r12, %rdx
xorl %eax, %eax
callq 0x42e0
movb $0x28, 0xf(%rsp)
movb $0x29, 0xe(%rsp)
movsbl 0xf(%rsp), %edx
movsbl 0xe(%rsp), %r8d
movq %r14, %rdi
leaq 0x2d47b(%rip), %rsi     # 0xa0233
movl %r13d, %ecx
xorl %eax, %eax
callq 0x42e0
jmp 0x72c2f
leaq 0x2d48f(%rip), %rdi     # 0xa025d
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x42c0
jmp 0x72c2f