// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/lang.c
// Function: read_array_from_userfile
void read_array_from_userfile(char* name, char* varname, int size)
{
 /*!Last Changed 03.01.2006*/
 /*!Last Changed 15.12.2004*/
 VARIABLE_TYPE variabletype;
 int tmp, i;
	double tmpf;
	char message[READLINELENGTH];
	variableptr myvar, myvar2;
 myvar = get_and_check_variable_type(name, 4, "file");
	if (!myvar)
			return;
	myvar2 = get_variable(varname);
	if (myvar2->arraysize != 0)
			variabletype = myvar2->value.array[0].type;
	else
	  return;
	if (myvar->userfile)
			switch (variabletype)
			 {
				 case INTEGER_TYPE:for (i = 0; i < size; i++)
													           {
								                 fscanf(myvar->userfile, "%d", &tmp);
														           myvar2->value.array[i].value.intvalue = tmp;
													           }
								               break;
				 case REAL_TYPE   :for (i = 0; i < size; i++)
													           {
								                 fscanf(myvar->userfile, "%lf", &tmpf);
														           myvar2->value.array[i].value.floatvalue = tmpf;
													           }
								               break;
				 case STRING_TYPE :for (i = 0; i < size; i++)
													           {
								                 fscanf(myvar->userfile, "%s", message);
														           if (myvar2->value.array[i].value.stringvalue)
																           safe_free(myvar2->value.array[i].value.stringvalue);
                         myvar2->value.array[i].value.stringvalue = strcopy(myvar2->value.array[i].value.stringvalue, message);
													           }
								               break;
     default          :printf(m1245);
                       break;
			 }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a128, %rsp          # imm = 0x7A128
movl %edx, %ebp
movq %rsi, %r14
leaq 0x71064(%rip), %rdx     # 0xa5cdc
movl $0x4, %esi
callq 0x34bbd
testq %rax, %rax
je 0x34dc0
movq %rax, %rbx
movq %r14, %rdi
callq 0x34def
cmpl $0x0, 0x20(%rax)
je 0x34dc0
cmpq $0x0, 0x10(%rbx)
je 0x34dc0
movq %rax, %r14
movq 0x28(%rax), %rax
movl (%rax), %eax
testl %eax, %eax
je 0x34d81
cmpl $0x1, %eax
je 0x34d38
cmpl $0x2, %eax
jne 0x34dd2
testl %ebp, %ebp
jle 0x34dc0
movl %ebp, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r13
leaq 0x7326d(%rip), %r15     # 0xa7f50
movq %rsp, %r12
xorl %ebp, %ebp
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4070
movq 0x28(%r14), %rax
movq 0x28(%rax,%rbp), %rdi
testq %rdi, %rdi
je 0x34d17
callq 0x3a180
movq 0x28(%r14), %rax
movq 0x28(%rax,%rbp), %rdi
jmp 0x34d19
xorl %edi, %edi
movq %r12, %rsi
callq 0x3b494
movq 0x28(%r14), %rcx
movq %rax, 0x28(%rcx,%rbp)
addq $0x30, %rbp
cmpq %rbp, %r13
jne 0x34ce8
jmp 0x34dc0
testl %ebp, %ebp
jle 0x34dc0
movl %ebp, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r13
leaq 0x74f2f(%rip), %r15     # 0xa9c80
movq %rsp, %r12
xorl %ebp, %ebp
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4070
movsd (%rsp), %xmm0
movq 0x28(%r14), %rax
movsd %xmm0, 0x28(%rax,%rbp)
addq $0x30, %rbp
cmpq %rbp, %r13
jne 0x34d56
jmp 0x34dc0
testl %ebp, %ebp
jle 0x34dc0
movl %ebp, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r13
leaq 0x7be5f(%rip), %r15     # 0xb0bf5
movq %rsp, %r12
xorl %ebp, %ebp
movq 0x10(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x4070
movl (%rsp), %eax
movq 0x28(%r14), %rcx
movl %eax, 0x28(%rcx,%rbp)
addq $0x30, %rbp
cmpq %rbp, %r13
jne 0x34d9b
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x74933(%rip), %rdi     # 0xa970c
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4090