// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: extract_additive_terms
char** extract_additive_terms(char* st, int* count)
{
	/*!Last Changed 10.04.2005*/
	int i, len = strlen(st), parcount = 0;
	char tempst[READLINELENGTH];
	char** result = NULL;
	*count = 0;
	strcpy(tempst, "");
	for (i = 0; i < len; i++)
		 switch (st[i])
	   {
		   case '+':
					case '-':if (parcount == 0 && i != 0)
														 { 
						          (*count)++;
		              result = alloc(result, *count * sizeof(char*), *count);
										     	result[*count - 1] = strcopy(result[*count - 1], tempst);
																sprintf(tempst, "%c", st[i]);
														 }
			           else
									       sprintf(tempst, "%s%c", tempst, st[i]);
			           break;
					case '(':parcount++;
						        sprintf(tempst, "%s%c", tempst, st[i]);
			           break;
					case ')':parcount--;
						        sprintf(tempst, "%s%c", tempst, st[i]);
		            break;
					default :sprintf(tempst, "%s%c", tempst, st[i]);
		 				       break;
	   }
	(*count)++;
	result = alloc(result, *count * sizeof(char*), *count);
	result[*count - 1] = strcopy(result[*count - 1], tempst);
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a148, %rsp          # imm = 0x7A148
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4190
movq %rax, %r15
movl $0x0, (%rbx)
movb $0x0, 0x20(%rsp)
testl %r15d, %r15d
jle 0x4af20
movq %rbx, 0x10(%rsp)
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
leaq 0x5b803(%rip), %r13     # 0xa6610
leaq 0x20(%rsp), %rbp
xorl %ebx, %ebx
movq $0x0, 0x8(%rsp)
xorl %r12d, %r12d
movq %r14, 0x18(%rsp)
movzbl (%r14,%rbx), %ecx
leal -0x28(%rcx), %eax
cmpl $0x5, %eax
ja 0x4aef1
leaq 0x5f80b(%rip), %rdx     # 0xaa648
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
testq %rbx, %rbx
je 0x4aee6
testl %r12d, %r12d
jne 0x4aee6
movq 0x10(%rsp), %r12
movslq (%r12), %rax
leaq 0x1(%rax), %rdx
movl %edx, (%r12)
leaq 0x8(,%rax,8), %rsi
movq 0x8(%rsp), %rdi
callq 0x3a0b4
movq %r15, %r14
movq %r13, %r15
movq %rax, %r13
movslq (%r12), %rax
movq -0x8(%r13,%rax,8), %rdi
movq %rbp, %rsi
callq 0x3b494
movslq (%r12), %rcx
movq %r13, 0x8(%rsp)
movq %rax, -0x8(%r13,%rcx,8)
movq %r15, %r13
movq %r14, %r15
movq 0x18(%rsp), %r14
movb (%r14,%rbx), %al
movb %al, 0x20(%rsp)
movb $0x0, 0x21(%rsp)
xorl %r12d, %r12d
jmp 0x4af04
decl %r12d
movq %rbp, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x29, %ecx
jmp 0x4aefd
incl %r12d
movq %rbp, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x28, %ecx
jmp 0x4aefd
movq %rbp, %rdi
movq %r13, %rsi
movq %rbp, %rdx
jmp 0x4aefd
movsbl %cl, %ecx
movq %rbp, %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x41b0
incq %rbx
cmpq %rbx, %r15
jne 0x4ae25
movq 0x10(%rsp), %rbx
movl (%rbx), %eax
incl %eax
movq 0x8(%rsp), %rdi
jmp 0x4af27
movl $0x1, %eax
xorl %edi, %edi
movl %eax, (%rbx)
movslq %eax, %rdx
leaq (,%rdx,8), %rsi
callq 0x3a0b4
movq %rax, %r14
movslq (%rbx), %rax
movq -0x8(%r14,%rax,8), %rdi
leaq 0x20(%rsp), %rsi
callq 0x3b494
movslq (%rbx), %rcx
movq %rax, -0x8(%r14,%rcx,8)
movq %r14, %rax
addq $0x7a148, %rsp          # imm = 0x7A148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq