// File: /workspace/github_c_makefile_star2_O2/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 0x885b9(%rip), %rdi     # 0x96123
callq 0x33f62
testl %eax, %eax
je 0xddf3
pushq $0xa
popq %rcx
cltd
idivl %ecx
testl %edx, %edx
jne 0xddfc
movl %eax, 0xbf925(%rip)     # 0xcd4b0
cltq
imulq $0x68, %rax, %rdi
leaq 0x88597(%rip), %rsi     # 0x9612f
pushq $0x10
popq %rdx
callq 0x34f59
movq %rax, 0xbf901(%rip)     # 0xcd4a8
leaq 0x88575(%rip), %rdi     # 0x96123
leaq 0x8dcca(%rip), %rsi     # 0x9b87f
callq 0x40f0
movq %rax, %rbx
xorl %ecx, %ecx
leaq 0x7a130(%rsp), %r14
leaq 0x8b53d(%rip), %r15     # 0x9910b
leaq 0x884bf(%rip), %r13     # 0x96094
movslq 0xbf8d4(%rip), %rax     # 0xcd4b0
cmpq %rax, %rcx
jge 0xddd9
xorl %r12d, %r12d
movq %rcx, 0x8(%rsp)
imulq $0x68, %rcx, %rbp
cmpl $0xa, %r12d
je 0xddcc
movq %r14, %rdi
movl $0x7a120, %esi          # imm = 0x7A120
movq %rbx, %rdx
callq 0x4120
movq %r14, %rdi
movq %r15, %rsi
callq 0x4280
leal -0x1(%r12), %ecx
cmpl $0x8, %ecx
ja 0xddc4
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
movq 0xbf873(%rip), %rcx     # 0xcd4a8
movq (%rcx,%rbp), %rdi
movq %rax, %rsi
callq 0x3604c
movq 0xbf860(%rip), %rcx     # 0xcd4a8
movq %rax, (%rcx,%rbp)
jmp 0xddc4
movq 0xbf850(%rip), %rcx     # 0xcd4a8
addq %rbp, %rcx
addq $0x28, %rcx
testq %rax, %rax
je 0xdd90
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3604c
movq 0xbf82e(%rip), %rcx     # 0xcd4a8
movq %rax, 0x28(%rcx,%rbp)
jmp 0xddc4
movq 0xbf81d(%rip), %rcx     # 0xcd4a8
addq %rbp, %rcx
addq $0x8, %rcx
testq %rax, %rax
je 0xdd90
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3604c
movq 0xbf7fb(%rip), %rcx     # 0xcd4a8
movq %rax, 0x8(%rcx,%rbp)
jmp 0xddc4
movq 0xbf7ea(%rip), %rcx     # 0xcd4a8
addq %rbp, %rcx
addq $0x30, %rcx
testq %rax, %rax
je 0xdd90
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3604c
movq 0xbf7c8(%rip), %rcx     # 0xcd4a8
movq %rax, 0x30(%rcx,%rbp)
jmp 0xddc4
testq %rax, %rax
je 0xddb8
movq %r15, %r13
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x4270
movq 0xbf79b(%rip), %rax     # 0xcd4a8
leaq (%rax,%rbp), %rdx
addq $0x38, %rdx
leaq 0x60(%rax,%rbp), %rcx
movq %r15, %rdi
movq %r13, %r15
leaq 0x8836d(%rip), %r13     # 0x96094
leaq 0x8bb29(%rip), %rsi     # 0x99857
callq 0x36077
jmp 0xddc4
movq 0xbf769(%rip), %rcx     # 0xcd4a8
addq %rbp, %rcx
addq $0x10, %rcx
testq %rax, %rax
je 0xdd90
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3604c
movq 0xbf74b(%rip), %rcx     # 0xcd4a8
movq %rax, 0x10(%rcx,%rbp)
jmp 0xddc4
movq 0xbf73d(%rip), %rcx     # 0xcd4a8
addq %rbp, %rcx
addq $0x18, %rcx
testq %rax, %rax
je 0xdd90
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3604c
movq 0xbf71f(%rip), %rcx     # 0xcd4a8
movq %rax, 0x18(%rcx,%rbp)
jmp 0xddc4
andq $0x0, (%rcx)
jmp 0xddc4
movq 0xbf70b(%rip), %rcx     # 0xcd4a8
movq 0x20(%rcx,%rbp), %rdi
movq %rax, %rsi
callq 0x3604c
movq 0xbf6f7(%rip), %rcx     # 0xcd4a8
movq %rax, 0x20(%rcx,%rbp)
jmp 0xddc4
movq 0xbf6e9(%rip), %rax     # 0xcd4a8
andl $0x0, 0x60(%rax,%rbp)
incl %r12d
jmp 0xdbf1
movq 0x8(%rsp), %rcx
incq %rcx
jmp 0xdbd5
movq %rbx, %rdi
callq 0x42a0
addq $0xf4258, %rsp          # imm = 0xF4258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x883b9(%rip), %rdi     # 0x961b3
jmp 0xde03
leaq 0x88373(%rip), %rdi     # 0x96176
callq 0x4090
xorl %edi, %edi
callq 0x40c0