// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x0, -0xc(%rbp)
movslq -0xc(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4150
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x8d76
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsbl (%rax,%rcx), %eax
addl $-0x27, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x51, %eax
ja 0x8d66
movq -0x40(%rbp), %rax
leaq 0xd9ba1(%rip), %rcx     # 0xe2814
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq $0x0, -0x18(%rbp)
jne 0x8c8c
callq 0x8aa0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x8b60
movl $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
jmp 0x8d66
cmpl $0x0, -0x20(%rbp)
jle 0x8ce8
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl $0x1, (%rax,%rcx,4)
jmp 0x8d66
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
movslq -0x20(%rbp), %rsi
shlq $0x2, %rsi
movl -0x20(%rbp), %edx
callq 0x52d10
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movslq -0x20(%rbp), %rsi
shlq $0x2, %rsi
movl -0x20(%rbp), %edx
callq 0x52d10
movq %rax, -0x28(%rbp)
jmp 0x8d66
cmpl $0x0, -0x20(%rbp)
jle 0x8d64
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %edx
movq -0x30(%rbp), %rax
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl $0x0, (%rax,%rcx,4)
jmp 0x8d66
jmp 0x8d68
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8c29
cmpq $0x0, -0x18(%rbp)
jne 0x8d86
callq 0x8aa0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x8b60
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)