// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/lang.c
// Function: check_if_statement
int check_if_statement(char** params)
{
 /*!Last Changed 03.01.2006*/
	/*!Last Changed 05.11.2003 Added File variable with type 4*/
 /*!Last Changed 03.05.2002*/
 int operand;
 double value1, value2, compresult;
 char* st = NULL;
 variableptr myvar;
 operand = listindex(params[0], operandtype, 8);
 if (operand == -1)
   return 0;
 myvar = get_variable(params[1]);
 switch (myvar->type)
  {
   case INTEGER_TYPE:value1 = myvar->value.intvalue;
                     value2 = atoi(params[2]);
                     compresult = value1 - value2;
                     break;
   case REAL_TYPE   :value1 = myvar->value.floatvalue;
                     value2 = atof(params[2]);
                     compresult = value1 - value2;
                     break;
   case STRING_TYPE :
			case FILE_TYPE   :st = strcopy(st, myvar->value.stringvalue);
                     compresult = strcmp(st, params[2]);
                     safe_free(st);
                     break;
   default          :break;
  }
 switch (operand)
  {
   case 0:if (compresult < 0)
            return 1;
          else
            return 0;
   case 1:if (compresult <= 0)
            return 1;
          else
            return 0;
   case 2:if (compresult > 0)
            return 1;
          else
            return 0;
   case 3:if (compresult >= 0)
            return 1;
          else
            return 0;
   case 4:
   case 5:if (compresult == 0)
            return 1;
          else
            return 0;
   case 6:
   case 7:if (compresult != 0)
            return 1;
          else
            return 0;
  }
 return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xb7dae(%rip), %rsi     # 0x104cb0
movl $0x8, %edx
callq 0x54910
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0x4cf21
movl $0x0, -0x4(%rbp)
jmp 0x4d0f2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4b5e0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x48(%rbp)
subq $0x4, %rax
ja 0x4cffa
movq -0x48(%rbp), %rax
leaq 0x98ad3(%rip), %rcx     # 0xe5a24
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x40(%rbp), %rax
cvtsi2sdl 0x28(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x41c0
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x20(%rbp), %xmm0
subsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x4cffc
movq -0x40(%rbp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4100
movsd %xmm0, -0x28(%rbp)
movsd -0x20(%rbp), %xmm0
subsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x4cffc
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x54ba0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x4210
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x38(%rbp), %rdi
callq 0x52e80
jmp 0x4cffc
jmp 0x4cffc
movl -0x14(%rbp), %eax
movq %rax, -0x50(%rbp)
subq $0x7, %rax
ja 0x4d0eb
movq -0x50(%rbp), %rax
leaq 0x98a20(%rip), %rcx     # 0xe5a38
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorps %xmm0, %xmm0
ucomisd -0x30(%rbp), %xmm0
jbe 0x4d037
movl $0x1, -0x4(%rbp)
jmp 0x4d0f2
movl $0x0, -0x4(%rbp)
jmp 0x4d0f2
xorps %xmm0, %xmm0
ucomisd -0x30(%rbp), %xmm0
jb 0x4d059
movl $0x1, -0x4(%rbp)
jmp 0x4d0f2
movl $0x0, -0x4(%rbp)
jmp 0x4d0f2
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x4d07c
movl $0x1, -0x4(%rbp)
jmp 0x4d0f2
movl $0x0, -0x4(%rbp)
jmp 0x4d0f2
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4d09c
movl $0x1, -0x4(%rbp)
jmp 0x4d0f2
movl $0x0, -0x4(%rbp)
jmp 0x4d0f2
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d0be
jp 0x4d0be
movl $0x1, -0x4(%rbp)
jmp 0x4d0f2
movl $0x0, -0x4(%rbp)
jmp 0x4d0f2
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d0d9
jp 0x4d0d9
jmp 0x4d0e2
movl $0x1, -0x4(%rbp)
jmp 0x4d0f2
movl $0x0, -0x4(%rbp)
jmp 0x4d0f2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)