// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/poly.c
// Function: plus_minus_token_list
char** plus_minus_token_list(char* st, int* tokencount)
{
	/*!Last Changed 19.01.2005*/
 int i = 0, j, k, len = strlen(st), parcount = 0, pos = 0, add, minus = 0, linelength;
 char line[READLINELENGTH], **tokenlist = NULL;
	*tokencount = 0;
 while (i < len)
	 {
		 add = 0;
		 if (st[i] == '(')
			 {
				 parcount++;
					add = 1;
			 }
			else
				 if (st[i] == ')')
					 {
						 parcount--;
							add = 1;
					 }
					else
						 if (st[i] == '+' || st[i] == '-')
								 if (parcount == 0)
									 {
											tokenlist = alloc(tokenlist, ((*tokencount) + 1) * sizeof(char *), (*tokencount) + 1);
											linelength = strlen(line);
  									tokenlist[*tokencount] = safemalloc(sizeof(char) * (linelength + minus + 1), "plus_minus_token_list", 24);
           for (j = 0; j < minus; j++)
											  tokenlist[*tokencount][j] = '-';
											for (j = minus, k = 0; j < linelength + minus; j++, k++)
												 tokenlist[*tokencount][j] = line[k];
           tokenlist[*tokencount][j] = '\0';
										 (*tokencount)++;
											if (st[i] == '-')
												 minus = 1;
											else
												 minus = 0;
											pos = 0;
									 }
									else
									  add = 1;
							else
							  add = 1;
			if (add)
			 {
					line[pos] = st[i];
					pos++;
					line[pos] = '\0';
			 }
		 i++;
	 }
	if (pos != 0)
	 {
			tokenlist = alloc(tokenlist, ((*tokencount) + 1) * sizeof(char *), (*tokencount) + 1);
			linelength = strlen(line);
  	tokenlist[*tokencount] = safemalloc(sizeof(char) * (linelength + minus + 1), "plus_minus_token_list", 53);
   for (j = 0; j < minus; j++)
					tokenlist[*tokencount][j] = '-';
			for (j = minus, k = 0; j < linelength + minus; j++, k++)
					tokenlist[*tokencount][j] = line[k];
   tokenlist[*tokencount][j] = '\0';
			(*tokencount)++;
	 }
	return tokenlist;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a138, %rsp          # imm = 0x7A138
movq %rsi, %rbx
movq %rdi, %r15
callq 0x4190
movl $0x0, (%rbx)
testl %eax, %eax
jle 0x59a4e
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %r12d, %r12d
leaq 0x4e388(%rip), %r8      # 0xa7cac
xorl %r14d, %r14d
xorl %r13d, %r13d
xorl %edi, %edi
xorl %ecx, %ecx
movq %rax, 0x8(%rsp)
movzbl (%r15,%r12), %esi
xorl %edx, %edx
addl $-0x28, %esi
cmpl $0x5, %esi
ja 0x599f2
movslq (%r8,%rsi,4), %rsi
addq %r8, %rsi
jmpq *%rsi
testl %ecx, %ecx
jne 0x599f0
movslq (%rbx), %rdx
leaq 0x8(,%rdx,8), %rsi
incq %rdx
movq %r14, %rdi
callq 0x390c8
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4190
movq %rax, %rbp
addl %r13d, %eax
incl %eax
movslq %eax, %rdi
leaq 0x4e390(%rip), %rsi     # 0xa7d1c
movl $0x18, %edx
callq 0x390f5
movslq (%rbx), %rcx
movq %rax, (%r14,%rcx,8)
testl %r13d, %r13d
jle 0x599b2
movslq (%rbx), %rax
movq (%r14,%rax,8), %rax
movb $0x2d, (%rax)
cmpl $0x1, %r13d
jne 0x599a2
testl %ebp, %ebp
jle 0x59a17
addl %r13d, %ebp
movl %r13d, %r13d
movslq %ebp, %rdi
leaq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
leaq 0x4e2dc(%rip), %r8      # 0xa7cac
movb (%rcx), %dl
movslq (%rbx), %rsi
movq (%r14,%rsi,8), %rsi
movb %dl, (%rsi,%r13)
incq %r13
incq %rcx
cmpq %rdi, %r13
jl 0x599d0
jmp 0x59a23
decl %ecx
jmp 0x599f0
incl %ecx
xorl %edx, %edx
testb %dl, %dl
jne 0x59a09
movb (%r15,%r12), %dl
movslq %edi, %rdi
movb %dl, 0x10(%rsp,%rdi)
movb $0x0, 0x11(%rsp,%rdi)
incq %rdi
incq %r12
cmpq %rax, %r12
jne 0x59933
jmp 0x59a47
movq 0x8(%rsp), %rax
leaq 0x4e289(%rip), %r8      # 0xa7cac
movslq (%rbx), %rcx
movq (%r14,%rcx,8), %rdx
movslq %r13d, %rcx
movb $0x0, (%rdx,%rcx)
incl (%rbx)
xorl %r13d, %r13d
cmpb $0x2d, (%r15,%r12)
sete %r13b
movb $0x1, %dl
xorl %ecx, %ecx
xorl %edi, %edi
jmp 0x599f2
testl %edi, %edi
sete %al
jmp 0x59a56
xorl %r13d, %r13d
movb $0x1, %al
xorl %r14d, %r14d
testb %al, %al
jne 0x59af3
movslq (%rbx), %rdx
leaq 0x8(,%rdx,8), %rsi
incq %rdx
movq %r14, %rdi
callq 0x390c8
movq %rax, %r14
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x4190
movq %rax, %r12
addl %r13d, %eax
incl %eax
movslq %eax, %rdi
leaq 0x4e286(%rip), %rsi     # 0xa7d1c
movl $0x35, %edx
callq 0x390f5
movslq (%rbx), %rcx
movq %rax, (%r14,%rcx,8)
testl %r13d, %r13d
jle 0x59abc
movslq (%rbx), %rax
movq (%r14,%rax,8), %rax
movb $0x2d, (%rax)
cmpl $0x1, %r13d
jne 0x59aac
testl %r12d, %r12d
jle 0x59ae3
addl %r13d, %r12d
movl %r13d, %r13d
movslq %r12d, %rax
movb (%r15), %cl
movslq (%rbx), %rdx
movq (%r14,%rdx,8), %rdx
movb %cl, (%rdx,%r13)
incq %r13
incq %r15
cmpq %rax, %r13
jl 0x59aca
movslq (%rbx), %rax
movq (%r14,%rax,8), %rax
movslq %r13d, %rcx
movb $0x0, (%rax,%rcx)
incl (%rbx)
movq %r14, %rax
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq