// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/savecode.c
// Function: code_1d_array_constant
void code_1d_array_constant(FILE* testcodefile, PROGRAMMING_LANGUAGE_TYPE language, char* arrayname, int size, void* values, int elementtype)
{
 /*!Last Changed 19.10.2007 updated Java*/
 /*!Last Changed 25.06.2006 added elementtype to include integer arrays*/
 /*!Last Changed 05.06.2006*/
 char separator;
	double* dvalues;
	int* ivalues;
 int i;
 switch (language){
   case C_LANGUAGE      :
   case CPP_LANGUAGE    :switch (elementtype){
                           case REAL_TYPE   :fprintf(testcodefile, "const double %s[%d] = {", arrayname, size);
                                             break;
                           case INTEGER_TYPE:fprintf(testcodefile, "const int %s[%d] = {", arrayname, size);
                                             break;
                         };
                         separator = ',';
                         break;
   case JAVA_LANGUAGE   :switch (elementtype){
                           case REAL_TYPE   :fprintf(testcodefile, "final double[] %s = {", arrayname);
                                             break;
                           case INTEGER_TYPE:fprintf(testcodefile, "final int[] %s = {", arrayname);
                                             break;
                         };
                         separator = ',';
                         break;
   case PASCAL_LANGUAGE :switch (elementtype){
			                        case REAL_TYPE   :fprintf(testcodefile, "%s: array[1..%d] of real = (", arrayname, size);
																												                 break;
																											case INTEGER_TYPE:fprintf(testcodefile, "%s: array[1..%d] of integer = (", arrayname, size);
																												                 break;
				                     };
                         separator = ',';
                         break;
   case MATLAB_LANGUAGE :fprintf(testcodefile, "%s = [", arrayname);
                         separator = ' ';
                         break;
   case FORTRAN_LANGUAGE:switch (elementtype){
			                        case REAL_TYPE   :fprintf(testcodefile, "real %s(%d) = (/", arrayname, size);
																												                 break;
																											case INTEGER_TYPE:fprintf(testcodefile, "integer %s(%d) = (/", arrayname, size);
																												                 break;
																									};
				                     separator = ',';   
                         break;
 };  
	switch (elementtype){
	  case REAL_TYPE   :dvalues = (double*) values;
				                 fprintf(testcodefile, "%.6f ", dvalues[0]);
                     for (i = 1; i < size; i++)
                       fprintf(testcodefile, "%c%.6f ", separator, dvalues[i]);
																					break;
			case INTEGER_TYPE:ivalues = (int*) values;
				                 fprintf(testcodefile, "%d ", ivalues[0]);
                     for (i = 1; i < size; i++)
                       fprintf(testcodefile, "%c%d ", separator, ivalues[i]);
																					break;
	};
 switch (language){
   case C_LANGUAGE      :
   case CPP_LANGUAGE    :
   case JAVA_LANGUAGE   :fprintf(testcodefile, "};\n");
                         break;
   case PASCAL_LANGUAGE :fprintf(testcodefile, ");\n");
                         break;
   case MATLAB_LANGUAGE :fprintf(testcodefile, "];\n");
                         break;
   case FORTRAN_LANGUAGE:fprintf(testcodefile, "/);\n");
                         break;
 };  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x50(%rbp)
subq $0x5, %rax
ja 0xb176d
movq -0x50(%rbp), %rax
leaq 0x3b0ea(%rip), %rcx     # 0xec6f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x2c(%rbp), %eax
movl %eax, -0x54(%rbp)
testl %eax, %eax
je 0xb1644
jmp 0xb161f
movl -0x54(%rbp), %eax
subl $0x1, %eax
jne 0xb165d
jmp 0xb1629
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq 0x3b6f5(%rip), %rsi     # 0xecd30
movb $0x0, %al
callq 0x4280
jmp 0xb165d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq 0x3b6f2(%rip), %rsi     # 0xecd48
movb $0x0, %al
callq 0x4280
movb $0x2c, -0x2d(%rbp)
jmp 0xb176d
movl -0x2c(%rbp), %eax
movl %eax, -0x58(%rbp)
testl %eax, %eax
je 0xb1694
jmp 0xb1672
movl -0x58(%rbp), %eax
subl $0x1, %eax
jne 0xb16aa
jmp 0xb167c
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x3b6d2(%rip), %rsi     # 0xecd5d
movb $0x0, %al
callq 0x4280
jmp 0xb16aa
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x3b6d0(%rip), %rsi     # 0xecd73
movb $0x0, %al
callq 0x4280
movb $0x2c, -0x2d(%rbp)
jmp 0xb176d
movl -0x2c(%rbp), %eax
movl %eax, -0x5c(%rbp)
testl %eax, %eax
je 0xb16e4
jmp 0xb16bf
movl -0x5c(%rbp), %eax
subl $0x1, %eax
jne 0xb16fd
jmp 0xb16c9
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq 0x3b6ab(%rip), %rsi     # 0xecd86
movb $0x0, %al
callq 0x4280
jmp 0xb16fd
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq 0x3b6ad(%rip), %rsi     # 0xecda3
movb $0x0, %al
callq 0x4280
movb $0x2c, -0x2d(%rbp)
jmp 0xb176d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x3b6b1(%rip), %rsi     # 0xecdc3
movb $0x0, %al
callq 0x4280
movb $0x20, -0x2d(%rbp)
jmp 0xb176d
movl -0x2c(%rbp), %eax
movl %eax, -0x60(%rbp)
testl %eax, %eax
je 0xb1750
jmp 0xb172b
movl -0x60(%rbp), %eax
subl $0x1, %eax
jne 0xb1769
jmp 0xb1735
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq 0x3b683(%rip), %rsi     # 0xecdca
movb $0x0, %al
callq 0x4280
jmp 0xb1769
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
leaq 0x3b679(%rip), %rsi     # 0xecddb
movb $0x0, %al
callq 0x4280
movb $0x2c, -0x2d(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x64(%rbp)
testl %eax, %eax
je 0xb17e8
jmp 0xb1779
movl -0x64(%rbp), %eax
subl $0x1, %eax
jne 0xb1845
jmp 0xb1787
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movsd (%rax), %xmm0
leaq 0x3b64f(%rip), %rsi     # 0xecdf1
movb $0x1, %al
callq 0x4280
movl $0x1, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xb17e6
movq -0x8(%rbp), %rdi
movsbl -0x2d(%rbp), %edx
movq -0x38(%rbp), %rax
movslq -0x44(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x3b61b(%rip), %rsi     # 0xecdef
movb $0x1, %al
callq 0x4280
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xb17b0
jmp 0xb1845
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rax
movl (%rax), %edx
leaq 0x3ac94(%rip), %rsi     # 0xec495
movb $0x0, %al
callq 0x4280
movl $0x1, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xb1843
movq -0x8(%rbp), %rdi
movsbl -0x2d(%rbp), %edx
movq -0x40(%rbp), %rax
movslq -0x44(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
leaq 0x3b5c6(%rip), %rsi     # 0xecdf7
movb $0x0, %al
callq 0x4280
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xb180f
jmp 0xb1845
movl -0xc(%rbp), %eax
movq %rax, -0x70(%rbp)
subq $0x5, %rax
ja 0xb18b4
movq -0x70(%rbp), %rax
leaq 0x3aeaf(%rip), %rcx     # 0xec70c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
leaq 0x3b58c(%rip), %rsi     # 0xecdfd
movb $0x0, %al
callq 0x4280
jmp 0xb18b4
movq -0x8(%rbp), %rdi
leaq 0x3b581(%rip), %rsi     # 0xece06
movb $0x0, %al
callq 0x4280
jmp 0xb18b4
movq -0x8(%rbp), %rdi
leaq 0x3b568(%rip), %rsi     # 0xece01
movb $0x0, %al
callq 0x4280
jmp 0xb18b4
movq -0x8(%rbp), %rdi
leaq 0x3b558(%rip), %rsi     # 0xece05
movb $0x0, %al
callq 0x4280
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)