// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/lang.c
// Function: change_according_to_variables
void change_according_to_variables(char* st)
{
 /*!Last Changed 03.01.2006*/
	/*!Last Changed 19.01.2005 added _ for space*/
	/*!Last Changed 27.01.2004*/
	/*!Last Changed 05.11.2003 Added File variable with type 4*/
 /*!Last Changed 02.05.2002*/
 int i, len, start, percindex, removed, added, j, found = 0;
	char st3[READLINELENGTH], temp[READLINELENGTH], temp2[READLINELENGTH];
	variableptr myvar;
 Expnodeptr list;
	len = strlen(st);
 for (i = 0; i < len; i++)
			if (st[i] == '%')
				 found = 1;
	if (!found)
		 return;
	i = 0;
	start = 0;
 while (st[i])
	 {
		 if (st[i] == '%')
				 if (!start)
					 {
						 start = 1;
							percindex = i;
							strcpy(st3, "");
					 }
					else
					 {
						 start = 0;
       list = create_expression_list(st3);
       myvar = evaluate_expression_list(list);
       if (myvar)
							 {
         switch (myvar->type)
										{
           case INTEGER_TYPE:sprintf(temp, "%d", myvar->value.intvalue);
                             break;
           case REAL_TYPE   :set_precision(temp2, NULL, NULL);
												                 sprintf(temp, temp2, myvar->value.floatvalue);
                             break;
           case STRING_TYPE :
											case FILE_TYPE   :if (myvar->value.stringvalue)
                               sprintf(temp,"%s", myvar->value.stringvalue);
                             else
                               sprintf(temp,"NULL");
                             break;
           default          :break;
										}
         safe_free(myvar);
         removed = i - percindex + 1;
									added = strlen(temp);
									len = strlen(st);
									if (added > removed)
										 for (j = len; j > i; j--)
												 st[added - removed + j] = st[j];
									else
									  if (added < removed)
												 for (j = i + 1; j <= len; j++)
														 st[j + added - removed] = st[j];
									for (j = 0; j < added; j++)
										 if (temp[j] != ' ')
  										 st[percindex + j] = temp[j];
											else
												 st[percindex + j] = '_';
									i = i + added - removed;
						  }
					 }
			else
			  if (start)
						 sprintf(st3, "%s%c", st3, st[i]);
			i++;
	 }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x16e3b0, %rsp         # imm = 0x16E3B0
movq %rdi, -0x8(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4150
movl %eax, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x4dd26
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x25, %eax
jne 0x4dd19
movl $0x1, -0x28(%rbp)
jmp 0x4dd1b
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4dcf9
cmpl $0x0, -0x28(%rbp)
jne 0x4dd31
jmp 0x4e000
movl $0x0, -0xc(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x4e000
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x25, %eax
jne 0x4dfc2
cmpl $0x0, -0x14(%rbp)
jne 0x4dd91
movl $0x1, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x18(%rbp)
leaq -0x7a150(%rbp), %rdi
leaq 0xa0253(%rip), %rsi     # 0xedfda
callq 0x4220
jmp 0x4dfc0
movl $0x0, -0x14(%rbp)
leaq -0x7a150(%rbp), %rdi
callq 0x4c410
movq %rax, -0x16e3a0(%rbp)
movq -0x16e3a0(%rbp), %rdi
callq 0x4c5e0
movq %rax, -0x16e398(%rbp)
cmpq $0x0, -0x16e398(%rbp)
je 0x4dfbe
movq -0x16e398(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x16e3a8(%rbp)
subq $0x4, %rax
ja 0x4de9b
movq -0x16e3a8(%rbp), %rax
leaq 0x97c98(%rip), %rcx     # 0xe5a8c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0xf4270(%rbp), %rdi
movq -0x16e398(%rbp), %rax
movl 0x28(%rax), %edx
leaq 0x9f450(%rip), %rsi     # 0xed265
movb $0x0, %al
callq 0x4170
jmp 0x4de9d
leaq -0x16e390(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x53310
leaq -0xf4270(%rbp), %rdi
leaq -0x16e390(%rbp), %rsi
movq -0x16e398(%rbp), %rax
movsd 0x28(%rax), %xmm0
movb $0x1, %al
callq 0x4170
jmp 0x4de9d
movq -0x16e398(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x4de84
leaq -0xf4270(%rbp), %rdi
movq -0x16e398(%rbp), %rax
movq 0x28(%rax), %rdx
leaq 0x96c1d(%rip), %rsi     # 0xe4a98
movb $0x0, %al
callq 0x4170
jmp 0x4de99
leaq -0xf4270(%rbp), %rdi
leaq 0x9845e(%rip), %rsi     # 0xe62f0
movb $0x0, %al
callq 0x4170
jmp 0x4de9d
jmp 0x4de9d
movq -0x16e398(%rbp), %rdi
callq 0x52e80
movl -0xc(%rbp), %eax
subl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
leaq -0xf4270(%rbp), %rdi
callq 0x4150
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4150
movl %eax, -0x10(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x4df11
movl -0x10(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jle 0x4df0f
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
subl -0x1c(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4dede
jmp 0x4df57
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x4df55
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0x4df53
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
addl -0x20(%rbp), %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4df22
jmp 0x4df55
jmp 0x4df57
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x4dfb2
movslq -0x24(%rbp), %rax
movsbl -0xf4270(%rbp,%rax), %eax
cmpl $0x20, %eax
je 0x4df94
movslq -0x24(%rbp), %rax
movb -0xf4270(%rbp,%rax), %dl
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x4dfa5
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movb $0x5f, (%rax,%rcx)
jmp 0x4dfa7
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4df5e
movl -0xc(%rbp), %eax
addl -0x20(%rbp), %eax
subl -0x1c(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x4dfc0
jmp 0x4dff2
cmpl $0x0, -0x14(%rbp)
je 0x4dff0
leaq -0x7a150(%rbp), %rdi
leaq -0x7a150(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
leaq 0x95207(%rip), %rsi     # 0xe31f0
movb $0x0, %al
callq 0x4170
jmp 0x4dff2
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4dd3f
addq $0x16e3b0, %rsp         # imm = 0x16E3B0
popq %rbp
retq
nopl (%rax)