// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x7a150, %rsp          # imm = 0x7A150
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4150
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq $0x0, -0x7a148(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
leaq -0x7a140(%rbp), %rdi
leaq 0x82e41(%rip), %rsi     # 0xedfda
callq 0x4220
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x6b357
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
addl $-0x28, %eax
movl %eax, %ecx
movq %rcx, -0x7a150(%rbp)
subl $0x5, %eax
ja 0x6b31f
movq -0x7a150(%rbp), %rax
leaq 0x7bf8c(%rip), %rcx     # 0xe716c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, -0x1c(%rbp)
jne 0x6b28c
cmpl $0x0, -0x14(%rbp)
je 0x6b28c
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x7a148(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq (%rax), %rsi
shlq $0x3, %rsi
movq -0x10(%rbp), %rax
movl (%rax), %edx
callq 0x52d10
movq %rax, -0x7a148(%rbp)
movq -0x7a148(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq -0x7a140(%rbp), %rsi
callq 0x54ba0
movq %rax, %rdx
movq -0x7a148(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
leaq -0x7a140(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %edx
leaq 0x7b695(%rip), %rsi     # 0xe6918
movb $0x0, %al
callq 0x4170
jmp 0x6b2b4
leaq -0x7a140(%rbp), %rdi
leaq -0x7a140(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
leaq 0x77f43(%rip), %rsi     # 0xe31f0
movb $0x0, %al
callq 0x4170
jmp 0x6b347
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
leaq -0x7a140(%rbp), %rdi
leaq -0x7a140(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
leaq 0x77f0d(%rip), %rsi     # 0xe31f0
movb $0x0, %al
callq 0x4170
jmp 0x6b347
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
leaq -0x7a140(%rbp), %rdi
leaq -0x7a140(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
leaq 0x77eda(%rip), %rsi     # 0xe31f0
movb $0x0, %al
callq 0x4170
jmp 0x6b347
leaq -0x7a140(%rbp), %rdi
leaq -0x7a140(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
leaq 0x77eb0(%rip), %rsi     # 0xe31f0
movb $0x0, %al
callq 0x4170
jmp 0x6b349
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6b1a5
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x7a148(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq (%rax), %rsi
shlq $0x3, %rsi
movq -0x10(%rbp), %rax
movl (%rax), %edx
callq 0x52d10
movq %rax, -0x7a148(%rbp)
movq -0x7a148(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq -0x7a140(%rbp), %rsi
callq 0x54ba0
movq %rax, %rdx
movq -0x7a148(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x7a148(%rbp), %rax
addq $0x7a150, %rsp          # imm = 0x7A150
popq %rbp
retq
nopw %cs:(%rax,%rax)