// File: /workspace/github_c_makefile_star2_O3/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 0x97bf6(%rip), %rdi     # 0xa611b
callq 0x38a4a
testl %eax, %eax
je 0xe7c4
imull $0xcccccccd, %eax, %ecx # imm = 0xCCCCCCCD
addl $0x19999998, %ecx       # imm = 0x19999998
rorl %ecx
cmpl $0x19999999, %ecx       # imm = 0x19999999
jae 0xe7cd
cltq
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x22, %rax
addl %ecx, %eax
movl %eax, 0xc6f48(%rip)     # 0xd54b0
cltq
imulq $0x68, %rax, %rdi
leaq 0x97bb2(%rip), %rsi     # 0xa6127
movl $0x10, %edx
callq 0x3a0e1
movq %rax, 0xc6f22(%rip)     # 0xd54a8
leaq 0x97b8e(%rip), %rdi     # 0xa611b
leaq 0x9d3c7(%rip), %rsi     # 0xab95b
callq 0x40f0
movq %rax, %rbx
cmpl $0x0, 0xc6f0d(%rip)     # 0xd54b0
jle 0xe7aa
xorl %ecx, %ecx
leaq 0x7a130(%rsp), %r14
leaq 0x9abe1(%rip), %r15     # 0xa919b
leaq 0x97acb(%rip), %r13     # 0xa608c
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 0xe736
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
movq 0xc6ea4(%rip), %rcx     # 0xd54a8
movq (%rcx,%r12), %rdi
movq %rax, %rsi
callq 0x3b494
movq 0xc6e91(%rip), %rcx     # 0xd54a8
movq %rax, (%rcx,%r12)
jmp 0xe736
movq 0xc6e81(%rip), %rcx     # 0xd54a8
addq %r12, %rcx
addq $0x28, %rcx
testq %rax, %rax
je 0xe70d
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3b494
movq 0xc6e5f(%rip), %rcx     # 0xd54a8
movq %rax, 0x28(%rcx,%r12)
jmp 0xe736
movq 0xc6e4e(%rip), %rcx     # 0xd54a8
addq %r12, %rcx
addq $0x8, %rcx
testq %rax, %rax
je 0xe70d
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3b494
movq 0xc6e2c(%rip), %rcx     # 0xd54a8
movq %rax, 0x8(%rcx,%r12)
jmp 0xe736
movq 0xc6e1b(%rip), %rcx     # 0xd54a8
addq %r12, %rcx
addq $0x30, %rcx
testq %rax, %rax
je 0xe70d
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3b494
movq 0xc6dfd(%rip), %rcx     # 0xd54a8
movq %rax, 0x30(%rcx,%r12)
jmp 0xe736
movq 0xc6dec(%rip), %rcx     # 0xd54a8
addq %r12, %rcx
addq $0x10, %rcx
testq %rax, %rax
je 0xe70d
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3b494
movq 0xc6dce(%rip), %rcx     # 0xd54a8
movq %rax, 0x10(%rcx,%r12)
jmp 0xe736
movq 0xc6dc0(%rip), %rcx     # 0xd54a8
addq %r12, %rcx
addq $0x18, %rcx
testq %rax, %rax
je 0xe70d
movq (%rcx), %rdi
movq %rax, %rsi
callq 0x3b494
movq 0xc6da2(%rip), %rcx     # 0xd54a8
movq %rax, 0x18(%rcx,%r12)
jmp 0xe736
movq $0x0, (%rcx)
jmp 0xe736
movq 0xc6d8b(%rip), %rcx     # 0xd54a8
movq 0x20(%rcx,%r12), %rdi
movq %rax, %rsi
callq 0x3b494
movq 0xc6d77(%rip), %rcx     # 0xd54a8
movq %rax, 0x20(%rcx,%r12)
incl %ebp
cmpl $0xa, %ebp
jne 0xe5cc
movq 0x8(%rsp), %rcx
incq %rcx
movslq 0xc6d60(%rip), %rax     # 0xd54b0
cmpq %rax, %rcx
jl 0xe5c1
jmp 0xe7aa
testq %rax, %rax
je 0xe798
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %rax, %rsi
callq 0x4270
movq 0xc6d31(%rip), %rax     # 0xd54a8
leaq (%rax,%r12), %rdx
addq $0x38, %rdx
leaq (%rax,%r12), %rcx
addq $0x60, %rcx
movq %rbp, %rdi
leaq 0x9b156(%rip), %rsi     # 0xa98e7
callq 0x3b4c1
jmp 0xe741
movq 0xc6d09(%rip), %rax     # 0xd54a8
movl $0x0, 0x60(%rax,%r12)
jmp 0xe741
movq %rbx, %rdi
callq 0x42a0
addq $0xf4258, %rsp          # imm = 0xF4258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x979e0(%rip), %rdi     # 0xa61ab
jmp 0xe7d4
leaq 0x9799a(%rip), %rdi     # 0xa616e
callq 0x4090
xorl %edi, %edi
callq 0x40c0