// File: /workspace/github_c_makefile_star2_O3/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
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
testl %r15d, %r15d
jle 0x5ae6a
xorl %r13d, %r13d
movabsq $0x680000000000, %rbp   # imm = 0x680000000000
xorl %eax, %eax
xorl %r8d, %r8d
xorl %r12d, %r12d
movslq %r12d, %rcx
movb (%r14,%rcx), %dl
leal -0x30(%rdx), %ecx
cmpb $0xa, %cl
jb 0x5acbf
movzbl %dl, %ecx
cmpl $0x2e, %ecx
ja 0x5acda
movl %ecx, %esi
btq %rsi, %rbp
jae 0x5acda
cltq
movb %dl, 0x10(%rsp,%rax)
movb $0x0, 0x11(%rsp,%rax)
incq %rax
incl %r12d
cmpl %r15d, %r12d
jl 0x5aca0
jmp 0x5ae3a
cmpl $0x1, %r13d
jne 0x5ace5
cmpb $0x29, %dl
jne 0x5acbf
cmpl $0x62, %ecx
jle 0x5ad27
cmpl $0x63, %ecx
je 0x5ad55
cmpl $0x73, %ecx
je 0x5ad7d
cmpl $0x78, %ecx
jne 0x5accd
testl %eax, %eax
je 0x5ad1c
leaq 0x10(%rsp), %rsi
movl %r8d, 0x8(%rsp)
callq 0x3b494
movq %rax, %rdi
movslq 0x8(%rsp), %rax
movq %rdi, (%rbx,%rax,8)
movl $0x1, %r8d
jmp 0x5addf
cmpl $0x28, %ecx
je 0x5ada5
cmpl $0x29, %ecx
jne 0x5accd
leaq 0x10(%rsp), %rsi
movl %r8d, %r13d
callq 0x3b494
movl %r13d, %r8d
movq %rax, %rdi
movslq %r13d, %rax
movq %rdi, (%rbx,%rax,8)
xorl %eax, %eax
xorl %r13d, %r13d
jmp 0x5accd
testl %eax, %eax
je 0x5ade6
leaq 0x10(%rsp), %rsi
movl %r8d, 0x8(%rsp)
callq 0x3b494
movq %rax, %rdi
movslq 0x8(%rsp), %rax
movq %rdi, (%rbx,%rax,8)
jmp 0x5adff
testl %eax, %eax
je 0x5ae10
leaq 0x10(%rsp), %rsi
movl %r8d, 0x8(%rsp)
callq 0x3b494
movq %rax, %rdi
movslq 0x8(%rsp), %rax
movq %rdi, (%rbx,%rax,8)
jmp 0x5ae29
testl %eax, %eax
movslq %r8d, %rax
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rsi
leaq 0x55c3e(%rip), %rax     # 0xb09f9
cmoveq %rax, %rsi
movl %r8d, %r13d
callq 0x3b494
movl %r13d, %r8d
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq %rdi, (%rbx,%rax,8)
incl %r8d
movl $0x1, %r13d
xorl %eax, %eax
jmp 0x5accd
cmpl $0x1, %r8d
jne 0x5adff
leaq 0x55c06(%rip), %rsi     # 0xb09f9
callq 0x3b494
movq %rax, %rdi
movq %rax, 0x8(%rbx)
addl $0x2, %r12d
xorl %eax, %eax
movl $0x4, %r8d
jmp 0x5accd
cmpl $0x1, %r8d
jne 0x5ae29
leaq 0x55bdc(%rip), %rsi     # 0xb09f9
callq 0x3b494
movq %rax, %rdi
movq %rax, 0x8(%rbx)
addl $0x2, %r12d
xorl %eax, %eax
movl $0x2, %r8d
jmp 0x5accd
testl %eax, %eax
je 0x5ae54
leaq 0x10(%rsp), %rsi
movl %r8d, %ebp
callq 0x3b494
movslq %ebp, %rcx
movq %rax, (%rbx,%rcx,8)
jmp 0x5ae6a
cmpl $0x1, %r8d
jne 0x5ae6a
leaq 0x55b98(%rip), %rsi     # 0xb09f9
callq 0x3b494
movq %rax, 0x8(%rbx)
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq