// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/poly.c
// Function: divide_function_into_parts
void divide_function_into_parts(char* st, char* parts[6])
{
	/*!Last Changed 19.01.2005*/
	int i, len = strlen(st), mode = 0, pos, parenthesis = 0;
	char line[READLINELENGTH], *data;
	for (i = 0; i < 6; i++)
		 parts[i] = NULL;
	i = 0;
	pos = 0;
	while (i < len)
	 {
		 if ((st[i] >= '0' && st[i] <= '9') || st[i] == '.' || st[i] == '-' || st[i] == '+' || (parenthesis == 1 && st[i] != ')'))
			 {
				 line[pos] = st[i];
					pos++;
					line[pos] = '\0';
			 }
			else
				 if (st[i] == 'x')
					 {
						 if (pos != 0)
							 {
								 data = strcopy(data, line);
									parts[mode] = data;
							 }
						 mode = 1;
							pos = 0;
					 }
					else
						 if (st[i] == 's')
							 {
  						 if (pos != 0)
									 {
							  	 data = strcopy(data, line);
							  		parts[mode] = data;
									 }
								 else
										 if (mode == 1)
											 {
												 data = strcopy(data, "1");
													parts[1] = data;
											 }
								 i += 2;
									mode = 2;
									pos = 0;
							 }
							else
								 if (st[i] == 'c')
									 {
    						 if (pos != 0)
											 {
							    	 data = strcopy(data, line);
							    		parts[mode] = data;
											 }
								   else
									  	 if (mode == 1)
													 {
										  		 data = strcopy(data, "1");
										  			parts[1] = data;
													 }
								   i += 2;
									  mode = 4;
									  pos = 0;
									 }
									else
										 if (st[i] == '(')
											 {
      						 if (pos != 0)
													 {
							      	 data = strcopy(data, line);
							    	  	parts[mode] = data;
													 }
													else
													 {
										  		 data = strcopy(data, "1");
							    	  	parts[mode] = data;
													 }
													mode++;
													pos = 0;
												 parenthesis = 1;
											 }
											else
												 if (st[i] == ')')
													 {
							      	 data = strcopy(data, line);
							    	  	parts[mode] = data;
														 parenthesis = 0;
														 pos = 0;
													 }
		 i++;
	 }
 if (pos != 0)
		{
			data = strcopy(data, line);
			parts[mode] = data;
		}
	else
		 if (mode == 1)
				{
					data = strcopy(data, "1");
					parts[1] = data;
				}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a138, %rsp          # imm = 0x7A138
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4190
movq %rax, %r15
xorl %eax, %eax
cmpq $0x6, %rax
je 0x52a6c
andq $0x0, (%rbx,%rax,8)
incq %rax
jmp 0x52a5c
movq %rbx, 0x8(%rsp)
xorl %ebp, %ebp
movabsq $0x680000000000, %r8    # imm = 0x680000000000
xorl %r13d, %r13d
xorl %eax, %eax
xorl %r9d, %r9d
movslq %r13d, %r12
cmpl %r15d, %ebp
jge 0x52c55
movslq %ebp, %rcx
movb (%r14,%rcx), %dl
leal -0x30(%rdx), %ecx
cmpb $0xa, %cl
jb 0x52ab0
movzbl %dl, %ecx
cmpl $0x2e, %ecx
ja 0x52ac5
movl %ecx, %esi
btq %rsi, %r8
jae 0x52ac5
movslq %eax, %rbx
movb %dl, 0x10(%rsp,%rbx)
movb $0x0, 0x11(%rsp,%rbx)
incq %rbx
incl %ebp
movl %ebx, %eax
jmp 0x52a85
cmpl $0x1, %r9d
jne 0x52ad0
cmpb $0x29, %dl
jne 0x52ab0
cmpl $0x28, %ecx
je 0x52bb3
cmpl $0x29, %ecx
je 0x52b28
cmpl $0x63, %ecx
je 0x52b7d
cmpl $0x73, %ecx
je 0x52b4e
cmpl $0x78, %ecx
jne 0x52bac
xorl %ebx, %ebx
testl %eax, %eax
je 0x52b21
leaq 0x10(%rsp), %rsi
movl %r9d, %r13d
callq 0x3604c
movl %r13d, %r9d
movabsq $0x680000000000, %r8    # imm = 0x680000000000
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq %rdi, (%rax,%r12,8)
pushq $0x1
jmp 0x52c4e
leaq 0x10(%rsp), %rsi
movq %r8, %rbx
callq 0x3604c
movq %rbx, %r8
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq %rdi, (%rax,%r12,8)
xorl %ebx, %ebx
xorl %r9d, %r9d
jmp 0x52abf
testl %eax, %eax
je 0x52bea
leaq 0x10(%rsp), %rsi
movq %r8, %rbx
movl %r9d, %r13d
callq 0x3604c
movl %r13d, %r9d
movq %rbx, %r8
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq %rdi, (%rax,%r12,8)
jmp 0x52c14
testl %eax, %eax
je 0x52c1d
leaq 0x10(%rsp), %rsi
movq %r8, %rbx
movl %r9d, %r13d
callq 0x3604c
movl %r13d, %r9d
movq %rbx, %r8
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq %rdi, (%rax,%r12,8)
jmp 0x52c47
movl %eax, %ebx
jmp 0x52abf
testl %eax, %eax
leaq 0x10(%rsp), %rsi
leaq 0x4dd9c(%rip), %rax     # 0xa095d
cmoveq %rax, %rsi
movq %r8, %rbx
callq 0x3604c
movq %rbx, %r8
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq %rdi, (%rax,%r12,8)
incl %r13d
xorl %ebx, %ebx
pushq $0x1
popq %r9
jmp 0x52abf
cmpl $0x1, %r13d
jne 0x52c14
leaq 0x4dd66(%rip), %rsi     # 0xa095d
movq %r8, %rbx
movl %r9d, %r12d
callq 0x3604c
movl %r12d, %r9d
movq %rbx, %r8
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq %rdi, 0x8(%rax)
addl $0x2, %ebp
xorl %ebx, %ebx
pushq $0x2
jmp 0x52c4e
cmpl $0x1, %r13d
jne 0x52c47
leaq 0x4dd33(%rip), %rsi     # 0xa095d
movq %r8, %rbx
movl %r9d, %r12d
callq 0x3604c
movl %r12d, %r9d
movq %rbx, %r8
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq %rdi, 0x8(%rax)
addl $0x2, %ebp
xorl %ebx, %ebx
pushq $0x4
popq %r13
jmp 0x52abf
testl %eax, %eax
je 0x52c6e
leaq 0x10(%rsp), %rsi
callq 0x3604c
movq 0x8(%rsp), %rcx
movq %rax, (%rcx,%r12,8)
jmp 0x52c89
cmpl $0x1, %r13d
jne 0x52c89
leaq 0x4dce2(%rip), %rsi     # 0xa095d
callq 0x3604c
movq 0x8(%rsp), %rcx
movq %rax, 0x8(%rcx)
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq