// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/command.c
// Function: initialize_orders
void initialize_orders()
{
	/*!Last Changed 07.01.2006*/
	FILE* infile;
	int length, i, j;
	char myline[READLINELENGTH], *p, tmpline[READLINELENGTH];
	length = file_length("command.txt");
	if (length == 0)
	 {
		 printf(m1318);
		 exit(0);
	 }
	if (length % NUMBER_OF_INFORMATION_LINES != 0)
	 {
		 printf(m1319);
			exit(0);
	 }
	ordercount = length / NUMBER_OF_INFORMATION_LINES;
	orders = safemalloc(ordercount * sizeof(Order), "initialize_orders", 16);
	infile = fopen("command.txt", "r");
	for (i = 0; i < ordercount; i++)
		 for (j = 0; j < NUMBER_OF_INFORMATION_LINES; j++)
			 {				 
     fgets(myline, READLINELENGTH, infile);
					p = strtok(myline, "\n");
				 switch (j)
			   {
					  case 1:orders[i].command = strcopy(orders[i].command, p);
								      break;
							case 2:if (p)
  								      orders[i].command_group = strcopy(orders[i].command_group, p);
								      else
															 orders[i].command_group = NULL;
								      break;
							case 3:if (p)
															 orders[i].command_subgroup = strcopy(orders[i].command_subgroup, p);
								      else
															 orders[i].command_subgroup = NULL;
								      break;
							case 4:if (p)
  								      orders[i].function_return = strcopy(orders[i].function_return, p);
							       else
															 orders[i].function_return = NULL; 
								      break;
       case 5:break;
							case 6:orders[i].grammar = strcopy(orders[i].grammar, p);
								      break;
							case 7:if (p)
															 orders[i].usage = strcopy(orders[i].usage, p);
													 else
															 orders[i].usage = NULL;
								      break;
							case 8:if (p)
  								      orders[i].help_messages = strcopy(orders[i].help_messages, p);
								      else
															 orders[i].help_messages = NULL;
								      break;
       case 9:if (p)
               {
                strcpy(tmpline, p);
                stringlist(tmpline, ";\n", orders[i].examples, &orders[i].examplecount);
               }
              else
                orders[i].examplecount = 0;
              break;
		    }
			 }
 fclose(infile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf4258, %rsp          # imm = 0xF4258
leaq 0x94c90(%rip), %rdi     # 0xa311b
callq 0x37e22
testl %eax, %eax
je 0xe737
imull $0xcccccccd, %eax, %ecx # imm = 0xCCCCCCCD
addl $0x19999998, %ecx       # imm = 0x19999998
rorl %ecx
cmpl $0x19999999, %ecx       # imm = 0x19999999
jae 0xe740
cltq
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x22, %rax
addl %ecx, %eax
movl %eax, 0xc3fe2(%rip)     # 0xd24b0
cltq
imulq $0x68, %rax, %rdi
leaq 0x94c4c(%rip), %rsi     # 0xa3127
movl $0x10, %edx
callq 0x390f5
movq %rax, 0xc3fbc(%rip)     # 0xd24a8
leaq 0x94c28(%rip), %rdi     # 0xa311b
leaq 0x9a395(%rip), %rsi     # 0xa888f
callq 0x40f0
movq %rax, %rbx
cmpl $0x0, 0xc3fa7(%rip)     # 0xd24b0
jle 0xe71d
xorl %ecx, %ecx
leaq 0x7a130(%rsp), %r14
leaq 0x97c4b(%rip), %r15     # 0xa616b
leaq 0x94b65(%rip), %r13     # 0xa308c
movq %rcx, 0x8(%rsp)
imulq $0x68, %rcx, %r12
xorl %ebp, %ebp
movq %r14, %rdi
movl $0x7a120, %esi          # imm = 0x7A120
movq %rbx, %rdx
callq 0x4120
movq %r14, %rdi
movq %r15, %rsi
callq 0x4280
leal -0x1(%rbp), %ecx
cmpl $0x8, %ecx
ja 0xe6fa
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
movq 0xc3f3e(%rip), %rcx     # 0xd24a8
movq (%rcx,%r12), %rdi
movq %rax, %rsi
callq 0x3a404
movq 0xc3f2b(%rip), %rcx     # 0xd24a8
movq %rax, (%rcx,%r12)
jmp 0xe6fa
movq 0xc3f1b(%rip), %rcx     # 0xd24a8
addq %r12, %rcx
addq $0x28, %rcx
testq %rax, %rax
je 0xe6bf
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3a404
movq 0xc3ef9(%rip), %rcx     # 0xd24a8
movq %rax, 0x28(%rcx,%r12)
jmp 0xe6fa
movq 0xc3ee8(%rip), %rcx     # 0xd24a8
addq %r12, %rcx
addq $0x8, %rcx
testq %rax, %rax
je 0xe6bf
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3a404
movq 0xc3ec6(%rip), %rcx     # 0xd24a8
movq %rax, 0x8(%rcx,%r12)
jmp 0xe6fa
movq 0xc3eb5(%rip), %rcx     # 0xd24a8
addq %r12, %rcx
addq $0x30, %rcx
testq %rax, %rax
je 0xe6bf
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3a404
movq 0xc3e93(%rip), %rcx     # 0xd24a8
movq %rax, 0x30(%rcx,%r12)
jmp 0xe6fa
testq %rax, %rax
je 0xe6ea
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x4270
movq 0xc3e69(%rip), %rax     # 0xd24a8
leaq (%rax,%r12), %rdx
addq $0x38, %rdx
leaq 0x60(%rax,%r12), %rcx
movq %r15, %rdi
leaq 0x97b15(%rip), %r15     # 0xa616b
leaq 0x9825c(%rip), %rsi     # 0xa68b9
callq 0x3a431
jmp 0xe6fa
movq 0xc3e3a(%rip), %rcx     # 0xd24a8
addq %r12, %rcx
addq $0x10, %rcx
testq %rax, %rax
je 0xe6bf
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3a404
movq 0xc3e1c(%rip), %rcx     # 0xd24a8
movq %rax, 0x10(%rcx,%r12)
jmp 0xe6fa
movq 0xc3e0e(%rip), %rcx     # 0xd24a8
addq %r12, %rcx
addq $0x18, %rcx
testq %rax, %rax
je 0xe6bf
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3a404
movq 0xc3df0(%rip), %rcx     # 0xd24a8
movq %rax, 0x18(%rcx,%r12)
jmp 0xe6fa
movq $0x0, (%rcx)
jmp 0xe6fa
movq 0xc3dd9(%rip), %rcx     # 0xd24a8
movq 0x20(%rcx,%r12), %rdi
movq %rax, %rsi
callq 0x3a404
movq 0xc3dc5(%rip), %rcx     # 0xd24a8
movq %rax, 0x20(%rcx,%r12)
jmp 0xe6fa
movq 0xc3db7(%rip), %rax     # 0xd24a8
movl $0x0, 0x60(%rax,%r12)
incl %ebp
cmpl $0xa, %ebp
jne 0xe532
movq 0x8(%rsp), %rcx
incq %rcx
movslq 0xc3d9c(%rip), %rax     # 0xd24b0
cmpq %rax, %rcx
jl 0xe527
movq %rbx, %rdi
callq 0x42a0
addq $0xf4258, %rsp          # imm = 0xF4258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x94a6d(%rip), %rdi     # 0xa31ab
jmp 0xe747
leaq 0x94a27(%rip), %rdi     # 0xa316e
callq 0x4090
xorl %edi, %edi
callq 0x40c0