// File: /workspace/github_c_makefile_star2_O2/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 $0x7a148, %rsp          # imm = 0x7A148
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
callq 0x4190
andl $0x0, (%rbx)
xorl %r9d, %r9d
testl %eax, %eax
cmovlel %r9d, %eax
leaq 0x47fc0(%rip), %r10     # 0x9ac8c
pushq $0x1
popq %r15
xorl %ebp, %ebp
xorl %ecx, %ecx
xorl %edx, %edx
xorl %r13d, %r13d
xorl %r14d, %r14d
movq %rax, 0x18(%rsp)
movslq %r9d, %rdi
movl %r13d, %r12d
cmpq %rax, %rbp
je 0x52dff
movq 0x10(%rsp), %rsi
movzbl (%rsi,%rbp), %esi
leal -0x28(%rsi), %r8d
cmpl $0x5, %r8d
ja 0x52d73
movslq (%r10,%r8,4), %r8
addq %r10, %r8
jmpq *%r8
testl %ecx, %ecx
jne 0x52d73
leal 0x1(%rdi), %edx
leaq 0x8(,%rdi,8), %rsi
movq %r14, %rdi
callq 0x34f30
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x4190
leal (%rax,%r13), %ecx
movl %ecx, 0xc(%rsp)
addl %r13d, %eax
incl %eax
movslq %eax, %rdi
leaq 0x47fb4(%rip), %rsi     # 0x9acfc
pushq $0x18
popq %rdx
callq 0x34f59
movslq (%rbx), %rcx
movq %rax, (%r14,%rcx,8)
xorl %eax, %eax
cmpl %r13d, %eax
jge 0x52d8b
movslq (%rbx), %rax
movq (%r14,%rax,8), %rax
movb $0x2d, (%rax)
movl %r15d, %eax
jmp 0x52d59
decl %ecx
jmp 0x52d73
incl %ecx
movslq %edx, %rdx
movb %sil, 0x20(%rsp,%rdx)
movb $0x0, 0x21(%rsp,%rdx)
incq %rdx
incq %rbp
jmp 0x52ce1
movslq 0xc(%rsp), %rcx
movq %r12, %r9
shlq $0x20, %r9
leaq 0x20(%rsp), %rdx
movabsq $0x100000000, %r8       # imm = 0x100000000
movq 0x18(%rsp), %rax
leaq 0x47eda(%rip), %r10     # 0x9ac8c
cmpq %rcx, %r12
jge 0x52dd0
movb (%rdx), %sil
movslq (%rbx), %rdi
movq (%r14,%rdi,8), %rdi
movb %sil, (%rdi,%r12)
incq %r12
incq %rdx
addq %r8, %r9
jmp 0x52db2
movslq (%rbx), %rcx
movq (%r14,%rcx,8), %rcx
sarq $0x20, %r9
movb $0x0, (%rcx,%r9)
movl (%rbx), %r9d
incl %r9d
movl %r9d, (%rbx)
xorl %r13d, %r13d
movq 0x10(%rsp), %rcx
cmpb $0x2d, (%rcx,%rbp)
sete %r13b
xorl %ecx, %ecx
xorl %edx, %edx
jmp 0x52d83
testl %edx, %edx
je 0x52ea7
leal 0x1(%rdi), %edx
leaq 0x8(,%rdi,8), %rsi
movq %r14, %rdi
callq 0x34f30
movq %rax, %r14
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x4190
leal (%rax,%r13), %ebp
addl %r13d, %eax
incl %eax
movslq %eax, %rdi
leaq 0x47ebf(%rip), %rsi     # 0x9acfc
pushq $0x35
popq %rdx
callq 0x34f59
movslq (%rbx), %rcx
movq %rax, (%r14,%rcx,8)
xorl %ecx, %ecx
pushq $0x1
popq %rax
cmpl %r13d, %ecx
jge 0x52e64
movslq (%rbx), %rcx
movq (%r14,%rcx,8), %rcx
movb $0x2d, (%rcx)
movl %eax, %ecx
jmp 0x52e51
movslq %ebp, %rcx
movq %r12, %rax
shlq $0x20, %rax
movabsq $0x100000000, %rdi      # imm = 0x100000000
cmpq %rcx, %r12
jge 0x52e96
movb (%r15), %dl
movslq (%rbx), %rsi
movq (%r14,%rsi,8), %rsi
movb %dl, (%rsi,%r12)
incq %r12
incq %r15
addq %rdi, %rax
jmp 0x52e78
movslq (%rbx), %rcx
movq (%r14,%rcx,8), %rcx
sarq $0x20, %rax
movb $0x0, (%rcx,%rax)
incl (%rbx)
movq %r14, %rax
addq $0x7a148, %rsp          # imm = 0x7A148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq