// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/binary.c
// Function: read_binary_function
Binaryfunctionptr read_binary_function(char* st)
{
 /*!Last Changed 19.04.2008*/
 int i, index = 0;
 Binaryfunctionptr result = NULL;
 Binaryterm term;
 term.count = 0;
 term.complement = NULL;
 term.variables = NULL;
 for (i = 0; i < strlen(st); i++)
  {
   switch (st[i])
    {
     case  '+':if (result == NULL)
                 result = empty_binary_function();
               add_binary_term(result, term);
               term.count = 0;
               term.complement = NULL;
               term.variables = NULL;
               break;
     case '\'':if (term.count > 0)
                 term.complement[term.count - 1] = BOOLEAN_TRUE;
               break;
     case  'x':term.count++;
               term.variables = (int *) alloc(term.variables, term.count * sizeof(int), term.count);
               term.complement = (BOOLEAN *) alloc(term.complement, term.count * sizeof(BOOLEAN), term.count);
               break;
     case  '0':
     case  '1':
     case  '2':
     case  '3':
     case  '4':
     case  '5':
     case  '6':
     case  '7':
     case  '8':
     case  '9':if (term.count > 0)
                {
                 index = st[i] - '0';
                 term.variables[term.count - 1] = index;
                 term.complement[term.count - 1] = BOOLEAN_FALSE;
                }
               break;
    }
  }
 if (result == NULL)
   result = empty_binary_function();
 add_binary_term(result, term);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, (%rdi)
je 0x69ec
movq %rdi, %r13
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %ebx, %ebx
movzbl (%r13,%r14), %eax
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jae 0x690b
testl %ebx, %ebx
jle 0x68f6
movl %ebx, %eax
movl %ecx, -0x4(%rbp,%rax,4)
movl $0x0, -0x4(%r15,%rax,4)
incq %r14
movq %r13, %rdi
callq 0x4190
cmpq %r14, %rax
ja 0x68d5
jmp 0x69da
cmpl $0x27, %eax
je 0x695b
cmpl $0x78, %eax
je 0x692c
cmpl $0x2b, %eax
jne 0x68f6
testq %r12, %r12
je 0x696c
movl 0x8(%r12), %eax
movq (%r12), %rdi
incl %eax
jmp 0x699a
movslq %ebx, %rax
incl %ebx
movq %rbp, %rdi
leaq 0x4(,%rax,4), %rbp
movq %rbp, %rsi
movl %ebx, %edx
callq 0x3a0b4
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rbp
movl %ebx, %edx
callq 0x3a0b4
movq %rax, %r15
jmp 0x68f6
testl %ebx, %ebx
jle 0x68f6
movl %ebx, %eax
movl $0x1, -0x4(%r15,%rax,4)
jmp 0x68f6
movl $0x10, %edi
leaq 0x9f333(%rip), %rsi     # 0xa5cab
movl $0x2, %edx
callq 0x3a0e1
movq %rax, %r12
movl $0x0, 0x8(%rax)
movq $0x0, (%rax)
movl $0x1, %eax
xorl %edi, %edi
movl %eax, 0x8(%r12)
movslq %eax, %rdx
leaq (,%rdx,8), %rax
leaq (%rax,%rax,2), %rsi
callq 0x3a0b4
movq %rax, (%r12)
movslq 0x8(%r12), %rcx
leaq (%rcx,%rcx,2), %rcx
movq %rbp, -0x18(%rax,%rcx,8)
movq %r15, -0x10(%rax,%rcx,8)
movl %ebx, -0x8(%rax,%rcx,8)
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %ebp, %ebp
jmp 0x68f6
testq %r12, %r12
je 0x69f3
movl 0x8(%r12), %eax
movq (%r12), %rdi
incl %eax
jmp 0x6a21
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %ebx, %ebx
leaq 0x9f2b1(%rip), %rsi     # 0xa5cab
movl $0x10, %edi
movl $0x2, %edx
callq 0x3a0e1
movq %rax, %r12
movl $0x0, 0x8(%rax)
movq $0x0, (%rax)
movl $0x1, %eax
xorl %edi, %edi
movl %eax, 0x8(%r12)
movslq %eax, %rdx
leaq (,%rdx,8), %rax
leaq (%rax,%rax,2), %rsi
callq 0x3a0b4
movq %rax, (%r12)
movslq 0x8(%r12), %rcx
leaq (%rcx,%rcx,2), %rcx
movq %rbp, -0x18(%rax,%rcx,8)
movq %r15, -0x10(%rax,%rcx,8)
movl %ebx, -0x8(%rax,%rcx,8)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq