// File: /workspace/github_cpp_makefile_star2_O1/fukunagatsu[P]LogicomeProfiler/logicome_profiler.cpp
// Function: LogicomeProfiler::CountLogicOccurrence(int, int, int, int)
int LogicomeProfiler::CountLogicOccurrence(int a, int b, int c, int l){
  int z  = 0;
  for(int i = 0; i < _number_of_samples;i++){
    switch(l){
    case 1:
      if(_dataset[i][a]==true && _dataset[i][b]==true && _dataset[i][c]==true){
	z += 1;
      }
      break;
    case 2:
      if(!(_dataset[i][a]==true && _dataset[i][b]==true) && _dataset[i][c]==true){
	z += 1;
      }
      break;
    case 3:
      if((_dataset[i][a]==true || _dataset[i][b]==true) && _dataset[i][c]==true){
	z += 1;
      }
      break;
    case 4:
      if((!(_dataset[i][a]==true || _dataset[i][b]==true)) && _dataset[i][c]==true){
	z += 1;
      }
      break;
    case 5:
      if(_dataset[i][a]==true && _dataset[i][b]!=true && _dataset[i][c]==true){
	z += 1;
      }
      break;
    case 6:
      if((_dataset[i][a]!=true || _dataset[i][b]==true) && _dataset[i][c]==true){
	z += 1;
      }
      break;
    }
  }
  return z;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x100(%rdi), %r12
testq %r12, %r12
jle 0x5653
movl %ecx, %eax
movslq %esi, %rcx
leaq 0x3f(%rcx), %rsi
testq %rcx, %rcx
cmovnsq %rcx, %rsi
movq 0x18(%rdi), %rdi
sarq $0x6, %rsi
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
leaq 0x3f(%r14), %r15
movq %rcx, %r9
andq %r15, %r9
xorl %r11d, %r11d
cmpq %r14, %r9
setbe %r11b
movl $0x1, %r9d
shlq %cl, %r9
movslq %edx, %rcx
leaq 0x3f(%rcx), %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
movl $0x1, %r10d
sarq $0x6, %rdx
movq %rdx, -0x18(%rsp)
movq %rcx, %rbx
andq %r15, %rbx
xorl %r13d, %r13d
cmpq %r14, %rbx
setbe %r13b
shlq %cl, %r10
movq %r10, -0x8(%rsp)
leaq -0x8(,%r11,8), %rcx
movslq %eax, %r11
leaq 0x3f(%r11), %rbx
testq %r11, %r11
cmovnsq %r11, %rbx
sarq $0x6, %rbx
andq %r11, %r15
xorl %eax, %eax
cmpq %r14, %r15
setbe %al
leaq -0x8(,%r13,8), %r10
movq %r10, -0x10(%rsp)
leaq -0x8(,%rax,8), %rax
movq %rax, -0x20(%rsp)
shlq $0x3, %r12
leaq (%r12,%r12,4), %r12
xorl %r13d, %r13d
decl %r8d
leaq 0x3afc(%rip), %rbp      # 0x9080
xorl %eax, %eax
cmpl $0x5, %r8d
ja 0x5644
movslq (%rbp,%r8,4), %r15
addq %rbp, %r15
jmpq *%r15
movq (%rdi,%r13), %r15
leaq (%r15,%rsi,8), %r10
testq %r9, (%rcx,%r10)
jne 0x5618
jmp 0x5644
movq (%rdi,%r13), %r15
leaq (%r15,%rsi,8), %r10
testq %r9, (%rcx,%r10)
jne 0x55ef
jmp 0x5644
movq (%rdi,%r13), %r15
leaq (%r15,%rsi,8), %r10
testq %r9, (%rcx,%r10)
jne 0x5631
jmp 0x5618
movq (%rdi,%r13), %r15
leaq (%r15,%rsi,8), %r10
testq %r9, (%rcx,%r10)
jne 0x5644
jmp 0x55ef
movq (%rdi,%r13), %r15
leaq (%r15,%rsi,8), %r10
testq %r9, (%rcx,%r10)
je 0x5631
movq -0x18(%rsp), %rdx
leaq (%r15,%rdx,8), %r10
movq -0x8(%rsp), %r14
movq -0x10(%rsp), %rdx
testq %r14, (%rdx,%r10)
jne 0x5644
jmp 0x5631
movq (%rdi,%r13), %r15
leaq (%r15,%rsi,8), %r10
testq %r9, (%rcx,%r10)
je 0x5631
movq -0x18(%rsp), %rdx
leaq (%r15,%rdx,8), %r10
movq -0x8(%rsp), %r14
movq -0x10(%rsp), %rdx
testq %r14, (%rdx,%r10)
je 0x5644
leaq (%r15,%rbx,8), %r15
addq -0x20(%rsp), %r15
movq (%r15), %r10
btq %r11, %r10
adcl $0x0, %eax
addq $0x28, %r13
cmpq %r13, %r12
jne 0x5586
jmp 0x5655
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq