// File: /workspace/github_c_makefile_star2_O2/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
subq $0x38, %rsp
movq %rdi, %rbx
andl $0x0, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %r14d, %r14d
movq $0x0, 0x18(%rsp)
movq %rbx, %rdi
callq 0x4190
cmpq %r14, %rax
jbe 0x686e
movzbl (%rbx,%r14), %eax
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jae 0x67b5
testl %r13d, %r13d
jle 0x6866
movl %r13d, %eax
movl %ecx, -0x4(%r12,%rax,4)
andl $0x0, -0x4(%r15,%rax,4)
jmp 0x6866
cmpl $0x27, %eax
je 0x6854
cmpl $0x78, %eax
je 0x6815
cmpl $0x2b, %eax
jne 0x6866
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
jne 0x67de
callq 0x66a8
movq %rax, %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rdi, 0x18(%rsp)
callq 0x670b
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andl $0x0, 0x30(%rsp)
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r12d, %r12d
xorl %r13d, %r13d
jmp 0x6866
leal 0x1(%r13), %ebp
movl %ebp, 0x30(%rsp)
movslq %r13d, %rax
leaq 0x4(,%rax,4), %r13
movq %r12, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x34f30
movq %rax, %r12
movq %rax, 0x20(%rsp)
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x34f30
movq %rax, %r15
movq %rax, 0x28(%rsp)
jmp 0x6863
testl %ebp, %ebp
jle 0x6863
movl %ebp, %eax
movl $0x1, -0x4(%r15,%rax,4)
movl %ebp, %r13d
incq %r14
jmp 0x677b
movq 0x18(%rsp), %rbx
testq %rbx, %rbx
jne 0x6880
callq 0x66a8
movq %rax, %rbx
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x670b
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq