// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/lang.c
// Function: check_parameters
int check_parameters(char *params[MAXPARAMS], int paramcount, char* grammar[MAXPARAMS], int grammarcount, variableptr variables, int variablecount)
{
 /*!Last Changed 21.12.2006 added check_parameter_type and matrix type*/
	/*!Last Changed 07.05.2005*/
	/*!Last Changed 12.10.2004*/
	int i = 0, res, j, k, res2;
	while (i < paramcount && i < grammarcount)
	 {
		 if (char_count(params[i], '%') == 0)
			 {
	  	 res = listindex(grammar[i], possibleparametertypes, 17);
		  	switch (res)
					{
					 case -1:res2 = listindex(grammar[i], doublevalues, 3);
							       switch (res2)
														 {
														  case 0:if (strcmp(params[i], "on") != 0 && strcmp(params[i], "off") != 0)
														 									 return i;
														 								break;
														 	case 1:if (strcmp(params[i], "+") != 0 && strcmp(params[i], "-") != 0)
														 									 return i;
														 		      break;
														 	case 2:if (strcmp(params[i], "x") != 0 && strcmp(params[i], "y") != 0)
														 									 return i;
														 		      break;
														 }
							       break;
				  case  1:if (!isfloat(params[i]))
															 return i;
							       break;
			   case  2:if (!isinteger(params[i]))
															 return i;
														break;
		 	  case  4:for (j = i; j < paramcount; j++)
															 if (!isinteger(params[j]) && char_count(params[j], '%') == 0)
																	 return j;
														return -1;
							       break;
		 			case  5:for (j = i; j < paramcount; j++)
															 if (!isfloat(params[j]) && char_count(params[j], '%') == 0)
																	 return j;
														return -1;
														break;
		 			case  7:for (j = i; j < paramcount; j++)
															 if (!isinteger(params[j]) && char_count(params[j], '%') == 0)
																	 return j;
														return -1;
														break;
		 	  case  8:for (j = i; j < paramcount; j++)
															 if (!isfloat(params[j]) && char_count(params[j], '%') == 0)
																	 return j;
														return -1;
														break;
		 			case  9:if (!check_parameter_type(params[i], STRING_TYPE, variables, variablecount)) 
                return i;
														break;
		 	  case 10:if (!check_parameter_type(params[i], REAL_TYPE, variables, variablecount)) 
                return i;
              break;
		 			case 11:if (!check_parameter_type(params[i], INTEGER_TYPE, variables, variablecount)) 
                return i;
              break;
		 	  case 12:if (!check_parameter_type(params[i], FILE_TYPE, variables, variablecount)) 
                return i;
              break;
		 			case 13:if (listindex(params[i], operandtype, 8) == -1)
															 return i;
														break;
						case 14:if (!check_parameter_type(params[i], INTEGER_TYPE, variables, variablecount) && !check_parameter_type(params[i], REAL_TYPE, variables, variablecount) && !check_parameter_type(params[i], MATRIX_TYPE, variables, variablecount)) 
                return i;
              break;
						case 15:k = return_variable_index(params[i], variables, variablecount);
							       if (k == -1)
															 return i;
														break;
      case 16:if (!check_parameter_type(params[i], MATRIX_TYPE, variables, variablecount)) 
                return i;
              break;
		 	 }
			 }
			i++;
	 }
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x4(%rsp)
movq %r8, 0x8(%rsp)
movl %ecx, %r13d
movq %rdx, %rbx
movq %rdi, %r15
cmpl %ecx, %esi
movq %rsi, 0x10(%rsp)
cmovll %esi, %r13d
xorl %ebp, %ebp
testl %r13d, %r13d
cmovlel %ebp, %r13d
pushq $0x25
popq %r14
leaq 0x695c9(%rip), %r12     # 0x98cac
cmpq %rbp, %r13
je 0x2f951
movq (%r15,%rbp,8), %rdi
movl %r14d, %esi
callq 0x35e64
testl %eax, %eax
jne 0x2f816
movq (%rbx,%rbp,8), %rdi
leaq 0x9d615(%rip), %rsi     # 0xccd20
pushq $0x11
popq %rdx
callq 0x35f17
incl %eax
cmpl $0x11, %eax
ja 0x2f816
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq (%rbx,%rbp,8), %rdi
leaq 0x9d67e(%rip), %rsi     # 0xccdb0
pushq $0x3
popq %rdx
callq 0x35f17
cmpl $0x2, %eax
je 0x2f84f
cmpl $0x1, %eax
je 0x2f83c
testl %eax, %eax
jne 0x2f816
movq (%r15,%rbp,8), %rdi
cmpb $0x6f, (%rdi)
jne 0x2f76d
cmpb $0x6e, 0x1(%rdi)
jne 0x2f76d
cmpb $0x0, 0x2(%rdi)
je 0x2f816
leaq 0x6b35f(%rip), %rsi     # 0x9aad3
callq 0x4260
testl %eax, %eax
je 0x2f816
jmp 0x2f866
movq (%r15,%rbp,8), %rdi
xorl %esi, %esi
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
callq 0x2f5e0
testl %eax, %eax
jne 0x2f816
movq (%r15,%rbp,8), %rdi
pushq $0x1
popq %rsi
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
callq 0x2f5e0
testl %eax, %eax
jne 0x2f816
movq (%r15,%rbp,8), %rdi
pushq $0x5
jmp 0x2f803
movq (%r15,%rbp,8), %rdi
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %edx
callq 0x2f622
jmp 0x2f7e6
movq (%r15,%rbp,8), %rdi
leaq 0x9d502(%rip), %rsi     # 0xccce0
pushq $0x8
popq %rdx
callq 0x35f17
cmpl $-0x1, %eax
jne 0x2f816
jmp 0x2f866
movq (%r15,%rbp,8), %rdi
pushq $0x4
jmp 0x2f803
movq (%r15,%rbp,8), %rdi
pushq $0x1
jmp 0x2f803
movq (%r15,%rbp,8), %rdi
pushq $0x2
popq %rsi
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
callq 0x2f5e0
testl %eax, %eax
je 0x2f866
incq %rbp
jmp 0x2f6e3
movq (%r15,%rbp,8), %rdi
callq 0x356ca
jmp 0x2f812
movq (%r15,%rbp,8), %rdi
callq 0x3567d
jmp 0x2f812
movq (%r15,%rbp,8), %rdi
xorl %esi, %esi
jmp 0x2f804
movq (%r15,%rbp,8), %rax
movzbl (%rax), %ecx
cmpl $0x2d, %ecx
je 0x2f860
cmpl $0x2b, %ecx
je 0x2f860
jmp 0x2f866
movq (%r15,%rbp,8), %rax
movzbl (%rax), %ecx
cmpl $0x79, %ecx
je 0x2f860
cmpl $0x78, %ecx
jne 0x2f866
cmpb $0x0, 0x1(%rax)
je 0x2f816
movl %ebp, %eax
jmp 0x2f954
movq 0x10(%rsp), %r14
cmpl %ebp, %r14d
cmovlel %ebp, %r14d
pushq $0x25
popq %rbx
cmpq %rbp, %r14
je 0x2f951
movq (%r15,%rbp,8), %rdi
callq 0x356ca
testl %eax, %eax
jne 0x2f8a1
movq (%r15,%rbp,8), %rdi
movl %ebx, %esi
callq 0x35e64
testl %eax, %eax
je 0x2f866
incq %rbp
jmp 0x2f87c
movq 0x10(%rsp), %r14
cmpl %ebp, %r14d
cmovlel %ebp, %r14d
pushq $0x25
popq %rbx
cmpq %rbp, %r14
je 0x2f951
movq (%r15,%rbp,8), %rdi
callq 0x3567d
testl %eax, %eax
jne 0x2f8da
movq (%r15,%rbp,8), %rdi
movl %ebx, %esi
callq 0x35e64
testl %eax, %eax
je 0x2f866
incq %rbp
jmp 0x2f8b5
movq 0x10(%rsp), %r14
cmpl %ebp, %r14d
cmovlel %ebp, %r14d
pushq $0x25
popq %rbx
cmpq %rbp, %r14
je 0x2f951
movq (%r15,%rbp,8), %rdi
callq 0x3567d
testl %eax, %eax
jne 0x2f913
movq (%r15,%rbp,8), %rdi
movl %ebx, %esi
callq 0x35e64
testl %eax, %eax
je 0x2f866
incq %rbp
jmp 0x2f8ee
movq 0x10(%rsp), %r14
cmpl %ebp, %r14d
cmovlel %ebp, %r14d
pushq $0x25
popq %rbx
cmpq %rbp, %r14
je 0x2f951
movq (%r15,%rbp,8), %rdi
callq 0x356ca
testl %eax, %eax
jne 0x2f94c
movq (%r15,%rbp,8), %rdi
movl %ebx, %esi
callq 0x35e64
testl %eax, %eax
je 0x2f866
incq %rbp
jmp 0x2f927
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq