// File: /workspace/github_c_makefile_star2_O1/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 0x598a7
xorl %r8d, %r8d
movabsq $0x680000000000, %rbp   # imm = 0x680000000000
xorl %eax, %eax
xorl %r12d, %r12d
xorl %r13d, %r13d
movslq %r13d, %rcx
movb (%r14,%rcx), %dl
leal -0x30(%rdx), %ecx
cmpb $0xa, %cl
jb 0x5971c
movzbl %dl, %ecx
cmpl $0x2e, %ecx
ja 0x59737
movl %ecx, %esi
btq %rsi, %rbp
jae 0x59737
cltq
movb %dl, 0x10(%rsp,%rax)
movb $0x0, 0x11(%rsp,%rax)
incq %rax
incl %r13d
cmpl %r15d, %r13d
jl 0x596fd
jmp 0x598a0
cmpl $0x1, %r8d
jne 0x59742
cmpb $0x29, %dl
jne 0x5971c
cmpl $0x62, %ecx
jle 0x59787
cmpl $0x63, %ecx
je 0x597af
cmpl $0x73, %ecx
je 0x597da
cmpl $0x78, %ecx
jne 0x5972a
testl %eax, %eax
je 0x5977c
leaq 0x10(%rsp), %rsi
movl %r8d, 0x8(%rsp)
callq 0x3a404
movl 0x8(%rsp), %r8d
movq %rax, %rdi
movslq %r12d, %rax
movq %rdi, (%rbx,%rax,8)
movl $0x1, %r12d
jmp 0x59839
cmpl $0x28, %ecx
je 0x59805
cmpl $0x29, %ecx
jne 0x5972a
leaq 0x10(%rsp), %rsi
callq 0x3a404
movq %rax, %rdi
movslq %r12d, %rax
movq %rdi, (%rbx,%rax,8)
xorl %eax, %eax
xorl %r8d, %r8d
jmp 0x5972a
testl %eax, %eax
je 0x59840
leaq 0x10(%rsp), %rsi
movl %r8d, 0x8(%rsp)
callq 0x3a404
movl 0x8(%rsp), %r8d
movq %rax, %rdi
movslq %r12d, %rax
movq %rdi, (%rbx,%rax,8)
jmp 0x5985f
testl %eax, %eax
je 0x59870
leaq 0x10(%rsp), %rsi
movl %r8d, 0x8(%rsp)
callq 0x3a404
movl 0x8(%rsp), %r8d
movq %rax, %rdi
movslq %r12d, %rax
movq %rdi, (%rbx,%rax,8)
jmp 0x5988f
testl %eax, %eax
movslq %r12d, %rax
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rsi
leaq 0x54146(%rip), %rax     # 0xad961
cmoveq %rax, %rsi
callq 0x3a404
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq %rdi, (%rbx,%rax,8)
incl %r12d
movl $0x1, %r8d
xorl %eax, %eax
jmp 0x5972a
cmpl $0x1, %r12d
jne 0x5985f
leaq 0x54114(%rip), %rsi     # 0xad961
movl %r8d, %r12d
callq 0x3a404
movl %r12d, %r8d
movq %rax, %rdi
movq %rax, 0x8(%rbx)
addl $0x2, %r13d
xorl %eax, %eax
movl $0x4, %r12d
jmp 0x5972a
cmpl $0x1, %r12d
jne 0x5988f
leaq 0x540e4(%rip), %rsi     # 0xad961
movl %r8d, %r12d
callq 0x3a404
movl %r12d, %r8d
movq %rax, %rdi
movq %rax, 0x8(%rbx)
addl $0x2, %r13d
xorl %eax, %eax
movl $0x2, %r12d
jmp 0x5972a
testl %eax, %eax
sete %al
jmp 0x598ac
movb $0x1, %al
xorl %r12d, %r12d
testb %al, %al
je 0x598c8
cmpl $0x1, %r12d
jne 0x598d9
leaq 0x540a4(%rip), %rsi     # 0xad961
callq 0x3a404
movq %rax, 0x8(%rbx)
jmp 0x598d9
leaq 0x10(%rsp), %rsi
callq 0x3a404
movslq %r12d, %rcx
movq %rax, (%rbx,%rcx,8)
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq