// File: /workspace/github_c_makefile_star2_O1/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 0x6ea43(%rip), %rdx     # 0xa2cdc
movl $0x4, %esi
callq 0x341e0
testq %rax, %rax
je 0x343dd
movq %rax, %rbx
movq %r14, %rdi
callq 0x3440c
cmpl $0x0, 0x20(%rax)
je 0x343dd
cmpq $0x0, 0x10(%rbx)
je 0x343dd
movq %rax, %r14
movq 0x28(%rax), %rax
movl (%rax), %eax
testl %eax, %eax
je 0x3439e
cmpl $0x1, %eax
je 0x34355
cmpl $0x2, %eax
jne 0x343ef
testl %ebp, %ebp
jle 0x343dd
movl %ebp, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r13
leaq 0x70bf4(%rip), %r15     # 0xa4ef8
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 0x3432d
callq 0x39194
movq 0x28(%r14), %rax
movq 0x28(%rax,%rbp), %rdi
movq %r12, %rsi
callq 0x3a404
movq 0x28(%r14), %rcx
movq %rax, 0x28(%rcx,%rbp)
addq $0x30, %rbp
cmpq %rbp, %r13
jne 0x34309
jmp 0x343dd
testl %ebp, %ebp
jle 0x343dd
movl %ebp, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r13
leaq 0x728a2(%rip), %r15     # 0xa6c10
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 0x34373
jmp 0x343dd
testl %ebp, %ebp
jle 0x343dd
movl %ebp, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r13
leaq 0x797aa(%rip), %r15     # 0xadb5d
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 0x343b8
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x722e8(%rip), %rdi     # 0xa66de
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4090