// File: fukunagatsu[P]LogicomeProfiler/logicome_profiler.cpp
// Function: LogicomeProfiler::CalcPVForFDR()
void LogicomeProfiler::CalcPVForFDR(){
  int N = _number_of_samples;
  long long int count = 0;
  long long int ne = _number_of_elements;
  long long int max_size_count = 4*ne*(ne-1)*(ne-2);
  long long int ignored_count[3] = {0};
  double threshold = _alpha;
  _fdr_result_vector.reserve(3);
  
  for(int i = 0; i < 3; i++){
    vector<Node> temp_vector; temp_vector.reserve(10000);
    _fdr_result_vector.push_back(temp_vector);
  }
  for(int c = 0; c < _number_of_elements; c++){
    for(int a = 0; a < _number_of_elements; a++){
      if(a!=c){
	for(int b = 0; b < _number_of_elements; b++){
	  if(b!=a && b!=c){
	    for(int l = 1; l <=6; l++){
	      if(l>=5 || a < b){
		count++;
		int x = _logic_occurrence_tensor[a][b][l];
		int y = _count_vector[c];
		int z = CountLogicOccurrence(a,b,c,l);
		double prob[3] = {0.0}; 
		prob[0] = CalcProb(x,y,z,N,threshold);
		CalcProbSecondCondition(a,b,c,l,threshold,prob[1],prob[2]);

		for(int i = 0; i < 3; i++){
		  double temp = (double)max_size_count*log(max_size_count)/(max_size_count - ignored_count[i]);		 
		  if(prob[i]*temp < threshold){
		    Node new_node(a,b,c,l,prob[i]);
		    _fdr_result_vector[i].push_back(new_node);
		    
		  }else{
		    ignored_count[i]++;
		  }
		}

		if(count%1000000 == 0){
		  cout << count<< "/" << max_size_count << " " << _fdr_result_vector[0].size() << " " << _fdr_result_vector[1].size()
		       << " " << _fdr_result_vector[2].size()<< endl;
		}
	      }
	    }
	  }
	}
      }
    }
  }
  
  for(int i = 0 ; i < 3; i++){
    sort(_fdr_result_vector[i].begin(), _fdr_result_vector[i].end(), compare_node);
    
    long long int denominator = _fdr_result_vector[i].size();
    double prev_qv = 100;
    for(vector<Node>::iterator it = _fdr_result_vector[i].begin(); it != _fdr_result_vector[i].end(); ++it){
      it->pv = min(prev_qv, it->pv*((double)max_size_count*log(max_size_count)/denominator));
      prev_qv = it->pv;
      denominator--;
    }

    bool break_flag = false;
    for(vector<Node>::iterator it = _fdr_result_vector[i].begin(); it != _fdr_result_vector[i].end(); ++it){
      if(it->pv < threshold){
	_fdr_result_vector[i].erase(_fdr_result_vector[i].begin(),it);
	_fdr_result_vector[i].shrink_to_fit();
	break_flag = true;
	break;
      }
    }
    if(!break_flag){
      _fdr_result_vector[i].clear();
      _fdr_result_vector[i].shrink_to_fit();
    }
    cout << _fdr_result_vector[i].size() << endl;
  }
  _fdr_result_map.resize(2);
  for(int i = 1; i < 3; i++){
    for(vector<Node>::iterator it = _fdr_result_vector[i].begin(); it != _fdr_result_vector[i].end(); ++it){
      string temp_string = to_string(it->a)+" "+to_string(it->b)+" "+to_string(it->c)+" "+to_string(it->l);
      _fdr_result_map[i-1].insert(make_pair(temp_string,it->pv));
    }
    _fdr_result_vector[i].clear();
    _fdr_result_vector[i].shrink_to_fit();
  }
  

  ofstream ofs(_output_file_name.c_str());
  ofs << "significance_level " << threshold << endl;
  ofs << "Logic_formula Qv_of_condition_a Qv_of_condition_b Qv_of_condition_c Logic_type"<< endl;
  for(vector<Node>::iterator it = _fdr_result_vector[0].begin(); it != _fdr_result_vector[0].end(); ++it){
    string temp_string = to_string(it->a)+" "+to_string(it->b)+" "+to_string(it->c)+" "+to_string(it->l);
    if(_fdr_result_map[0].find(temp_string) != _fdr_result_map[0].end()
       && _fdr_result_map[1].find(temp_string) != _fdr_result_map[1].end()){
      
      ofs << _name_vector[it->c] << "=" << _name_vector[it->a] << "," << _name_vector[it->b] << " " << it->pv << " "<< _fdr_result_map[0][temp_string] << " "<< _fdr_result_map[1][temp_string] << " " << it->l << endl;
    }
  }
  ofs.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x790, %rsp            # imm = 0x790
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x658(%rbp)
movl 0x100(%rax), %ecx
movl %ecx, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
movslq 0x104(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
shlq $0x2, %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
imulq %rcx, %rax
movq -0x20(%rbp), %rcx
subq $0x2, %rcx
imulq %rcx, %rax
movq %rax, -0x28(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2150
movq -0x658(%rbp), %rdi
movsd 0x108(%rdi), %xmm0
movsd %xmm0, -0x48(%rbp)
addq $0x60, %rdi
movl $0x3, %esi
callq 0x8410
movl $0x0, -0x4c(%rbp)
cmpl $0x3, -0x4c(%rbp)
jge 0x5ad0
leaq -0x68(%rbp), %rdi
movq %rdi, -0x660(%rbp)
callq 0x2900
movq -0x660(%rbp), %rdi
movl $0x2710, %esi           # imm = 0x2710
callq 0x8510
jmp 0x5a8c
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
leaq -0x68(%rbp), %rsi
callq 0x8610
jmp 0x5aa2
leaq -0x68(%rbp), %rdi
callq 0x2b20
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x5a63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x2b20
jmp 0x6e82
movl $0x0, -0x78(%rbp)
movq -0x658(%rbp), %rcx
movl -0x78(%rbp), %eax
cmpl 0x104(%rcx), %eax
jge 0x5ed1
movl $0x0, -0x7c(%rbp)
movq -0x658(%rbp), %rcx
movl -0x7c(%rbp), %eax
cmpl 0x104(%rcx), %eax
jge 0x5ec1
movl -0x7c(%rbp), %eax
cmpl -0x78(%rbp), %eax
je 0x5eb1
movl $0x0, -0x80(%rbp)
movq -0x658(%rbp), %rcx
movl -0x80(%rbp), %eax
cmpl 0x104(%rcx), %eax
jge 0x5eaf
movl -0x80(%rbp), %eax
cmpl -0x7c(%rbp), %eax
je 0x5e9f
movl -0x80(%rbp), %eax
cmpl -0x78(%rbp), %eax
je 0x5e9f
movl $0x1, -0x84(%rbp)
cmpl $0x6, -0x84(%rbp)
jg 0x5e9d
cmpl $0x5, -0x84(%rbp)
jge 0x5b77
movl -0x7c(%rbp), %eax
cmpl -0x80(%rbp), %eax
jge 0x5e87
movq -0x658(%rbp), %rdi
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movslq -0x7c(%rbp), %rsi
callq 0x8680
movq %rax, %rdi
movslq -0x80(%rbp), %rsi
callq 0x86a0
movq %rax, %rdi
movslq -0x84(%rbp), %rsi
callq 0x86c0
movq -0x658(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x88(%rbp)
addq $0x30, %rdi
movslq -0x78(%rbp), %rsi
callq 0x86c0
movq -0x658(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
movl -0x7c(%rbp), %esi
movl -0x80(%rbp), %edx
movl -0x78(%rbp), %ecx
movl -0x84(%rbp), %r8d
callq 0x6e90
movl %eax, -0x90(%rbp)
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x2150
movq -0x658(%rbp), %rdi
movl -0x88(%rbp), %esi
movl -0x8c(%rbp), %edx
movl -0x90(%rbp), %ecx
movl -0xc(%rbp), %r8d
movsd -0x48(%rbp), %xmm0
callq 0x74d0
movq -0x658(%rbp), %rdi
movsd %xmm0, -0xb0(%rbp)
movl -0x7c(%rbp), %esi
movl -0x80(%rbp), %edx
movl -0x78(%rbp), %ecx
cvtsi2sdl -0x84(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
leaq -0xb0(%rbp), %r8
addq $0x8, %r8
leaq -0xb0(%rbp), %r9
addq $0x10, %r9
callq 0x7610
movl $0x0, -0xb4(%rbp)
cmpl $0x3, -0xb4(%rbp)
jge 0x5d6e
cvtsi2sdq -0x28(%rbp), %xmm0
movsd %xmm0, -0x668(%rbp)
movq -0x28(%rbp), %rdi
callq 0x86e0
movaps %xmm0, %xmm1
movsd -0x668(%rbp), %xmm0
mulsd %xmm1, %xmm0
movq -0x28(%rbp), %rax
movslq -0xb4(%rbp), %rcx
subq -0x40(%rbp,%rcx,8), %rax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0xc0(%rbp)
movslq -0xb4(%rbp), %rax
movsd -0xb0(%rbp,%rax,8), %xmm1
mulsd -0xc0(%rbp), %xmm1
movsd -0x48(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x5d43
movl -0x7c(%rbp), %esi
movl -0x80(%rbp), %edx
movl -0x78(%rbp), %ecx
movl -0x84(%rbp), %r8d
movslq -0xb4(%rbp), %rax
movsd -0xb0(%rbp,%rax,8), %xmm0
leaq -0xd8(%rbp), %rdi
callq 0x8700
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0xb4(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
leaq -0xd8(%rbp), %rsi
callq 0x8770
jmp 0x5d58
movslq -0xb4(%rbp), %rax
movq -0x40(%rbp,%rax,8), %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp,%rax,8)
jmp 0x5d5a
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x5c78
movq -0x18(%rbp), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x5e85
movq -0x18(%rbp), %rsi
movq 0x1b247(%rip), %rdi     # 0x20fd8
callq 0x2140
movq %rax, %rdi
leaq 0x102f9(%rip), %rsi     # 0x16099
callq 0x2230
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0x2140
movq %rax, %rdi
leaq 0x102f2(%rip), %rsi     # 0x160ad
callq 0x2230
movq -0x658(%rbp), %rdi
movq %rax, -0x680(%rbp)
addq $0x60, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8750
movq %rax, %rdi
callq 0x87e0
movq -0x680(%rbp), %rdi
movq %rax, %rsi
callq 0x2080
movq %rax, %rdi
leaq 0x102b1(%rip), %rsi     # 0x160ad
callq 0x2230
movq -0x658(%rbp), %rdi
movq %rax, -0x678(%rbp)
addq $0x60, %rdi
movl $0x1, %esi
callq 0x8750
movq %rax, %rdi
callq 0x87e0
movq -0x678(%rbp), %rdi
movq %rax, %rsi
callq 0x2080
movq %rax, %rdi
leaq 0x1026f(%rip), %rsi     # 0x160ad
callq 0x2230
movq -0x658(%rbp), %rdi
movq %rax, -0x670(%rbp)
addq $0x60, %rdi
movl $0x2, %esi
callq 0x8750
movq %rax, %rdi
callq 0x87e0
movq -0x670(%rbp), %rdi
movq %rax, %rsi
callq 0x2080
movq %rax, %rdi
movq 0x1b148(%rip), %rsi     # 0x20fc8
callq 0x2260
jmp 0x5e87
jmp 0x5e89
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x5b55
jmp 0x5e9f
jmp 0x5ea1
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x5b1d
jmp 0x5eb1
jmp 0x5eb3
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x5af4
jmp 0x5ec3
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x5ad7
movl $0x0, -0xdc(%rbp)
cmpl $0x3, -0xdc(%rbp)
jge 0x62ad
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8860
movq -0x658(%rbp), %rdi
movq %rax, -0xe8(%rbp)
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8890
movq %rax, -0xf0(%rbp)
movq -0xe8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
leaq -0x1519(%rip), %rdx     # 0x4a30
callq 0x8810
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x87e0
movq -0x658(%rbp), %rdi
movq %rax, -0xf8(%rbp)
movsd 0x100a5(%rip), %xmm0    # 0x16028
movsd %xmm0, -0x100(%rbp)
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8860
movq %rax, -0x108(%rbp)
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8890
movq %rax, -0x110(%rbp)
leaq -0x108(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x88c0
testb $0x1, %al
jne 0x5fec
jmp 0x60c0
leaq -0x108(%rbp), %rdi
callq 0x8940
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x690(%rbp)
cvtsi2sdq -0x28(%rbp), %xmm0
movsd %xmm0, -0x698(%rbp)
movq -0x28(%rbp), %rdi
callq 0x86e0
movsd -0x698(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x690(%rbp), %xmm0
mulsd %xmm2, %xmm1
cvtsi2sdq -0xf8(%rbp), %xmm2
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x118(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x8900
movsd (%rax), %xmm0
movsd %xmm0, -0x688(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x8940
movsd -0x688(%rbp), %xmm0
movsd %xmm0, 0x10(%rax)
leaq -0x108(%rbp), %rdi
callq 0x8940
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x100(%rbp)
movq -0xf8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0xf8(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x8960
jmp 0x5faa
movq -0x658(%rbp), %rdi
movb $0x0, -0x119(%rbp)
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8860
movq %rax, -0x128(%rbp)
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8890
movq %rax, -0x130(%rbp)
leaq -0x128(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x88c0
testb $0x1, %al
jne 0x612f
jmp 0x6215
leaq -0x128(%rbp), %rdi
callq 0x8940
movsd 0x10(%rax), %xmm1
movsd -0x48(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x6202
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq -0x658(%rbp), %rdi
movq %rax, -0x6a0(%rbp)
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8860
movq %rax, -0x140(%rbp)
leaq -0x138(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x8a10
leaq -0x148(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x8a10
movq -0x6a0(%rbp), %rdi
movq -0x138(%rbp), %rsi
movq -0x148(%rbp), %rdx
callq 0x8980
movq -0x658(%rbp), %rdi
movq %rax, -0x150(%rbp)
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8a50
movb $0x1, -0x119(%rbp)
jmp 0x6215
jmp 0x6204
leaq -0x128(%rbp), %rdi
callq 0x8960
jmp 0x60ed
testb $0x1, -0x119(%rbp)
jne 0x625c
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8a70
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8a50
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0xdc(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x87e0
movq %rax, %rsi
movq 0x1ad53(%rip), %rdi     # 0x20fd8
callq 0x2080
movq %rax, %rdi
movq 0x1ad34(%rip), %rsi     # 0x20fc8
callq 0x2260
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0x5edb
movq -0x658(%rbp), %rdi
addq $0x78, %rdi
movl $0x2, %esi
callq 0x8a90
movl $0x1, -0x154(%rbp)
cmpl $0x3, -0x154(%rbp)
jge 0x66fe
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0x154(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8860
movq %rax, -0x160(%rbp)
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0x154(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8890
movq %rax, -0x168(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x88c0
testb $0x1, %al
jne 0x6341
jmp 0x66ac
leaq -0x160(%rbp), %rdi
callq 0x8940
movl (%rax), %esi
leaq -0x248(%rbp), %rdi
movq %rdi, -0x6a8(%rbp)
callq 0x8c40
movq -0x6a8(%rbp), %rsi
leaq 0xfd3d(%rip), %rdx      # 0x160ad
leaq -0x228(%rbp), %rdi
callq 0x8bf0
jmp 0x637e
leaq -0x160(%rbp), %rdi
callq 0x8940
movl 0x4(%rax), %esi
leaq -0x268(%rbp), %rdi
callq 0x8c40
jmp 0x639b
leaq -0x208(%rbp), %rdi
leaq -0x228(%rbp), %rsi
leaq -0x268(%rbp), %rdx
callq 0x8b20
jmp 0x63b7
leaq 0xfcef(%rip), %rdx      # 0x160ad
leaq -0x1e8(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x8bf0
jmp 0x63d3
leaq -0x160(%rbp), %rdi
callq 0x8940
movl 0x8(%rax), %esi
leaq -0x288(%rbp), %rdi
callq 0x8c40
jmp 0x63f0
leaq -0x1c8(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
leaq -0x288(%rbp), %rdx
callq 0x8b20
jmp 0x640c
leaq 0xfc9a(%rip), %rdx      # 0x160ad
leaq -0x1a8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x8bf0
jmp 0x6428
leaq -0x160(%rbp), %rdi
callq 0x8940
movl 0xc(%rax), %esi
leaq -0x2a8(%rbp), %rdi
callq 0x8c40
jmp 0x6445
leaq -0x188(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
leaq -0x2a8(%rbp), %rdx
callq 0x8b20
jmp 0x6461
leaq -0x2a8(%rbp), %rdi
callq 0x2180
leaq -0x1a8(%rbp), %rdi
callq 0x2180
leaq -0x1c8(%rbp), %rdi
callq 0x2180
leaq -0x288(%rbp), %rdi
callq 0x2180
leaq -0x1e8(%rbp), %rdi
callq 0x2180
leaq -0x208(%rbp), %rdi
callq 0x2180
leaq -0x268(%rbp), %rdi
callq 0x2180
leaq -0x228(%rbp), %rdi
callq 0x2180
leaq -0x248(%rbp), %rdi
callq 0x2180
movq -0x658(%rbp), %rdi
addq $0x78, %rdi
movl -0x154(%rbp), %eax
decl %eax
movslq %eax, %rsi
callq 0x8d60
movq %rax, -0x6b0(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x8940
movq %rax, %rdx
addq $0x10, %rdx
leaq -0x2d0(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x8dc0
jmp 0x6517
movq -0x6b0(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x8d80
movb %dl, -0x6b9(%rbp)
movq %rax, -0x6b8(%rbp)
jmp 0x6539
movb -0x6b9(%rbp), %al
movq -0x6b8(%rbp), %rcx
movq %rcx, -0x2e0(%rbp)
movb %al, -0x2d8(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x8e00
leaq -0x188(%rbp), %rdi
callq 0x2180
leaq -0x160(%rbp), %rdi
callq 0x8960
jmp 0x62ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6664
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6658
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x664c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6640
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6634
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6628
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x661c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6610
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x2180
leaq -0x1a8(%rbp), %rdi
callq 0x2180
leaq -0x1c8(%rbp), %rdi
callq 0x2180
leaq -0x288(%rbp), %rdi
callq 0x2180
leaq -0x1e8(%rbp), %rdi
callq 0x2180
leaq -0x208(%rbp), %rdi
callq 0x2180
leaq -0x268(%rbp), %rdi
callq 0x2180
leaq -0x228(%rbp), %rdi
callq 0x2180
leaq -0x248(%rbp), %rdi
callq 0x2180
jmp 0x6e82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x669b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x8e00
leaq -0x188(%rbp), %rdi
callq 0x2180
jmp 0x6e82
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0x154(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8a70
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
movslq -0x154(%rbp), %rsi
callq 0x8750
movq %rax, %rdi
callq 0x8a50
movl -0x154(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x154(%rbp)
jmp 0x62cc
movq -0x658(%rbp), %rdi
addq $0xe0, %rdi
callq 0x20f0
movq %rax, %rsi
leaq -0x4e0(%rbp), %rdi
movq %rdi, -0x6d0(%rbp)
movl $0x10, %edx
callq 0x2280
movq -0x6d0(%rbp), %rdi
leaq 0xf961(%rip), %rsi      # 0x1609b
callq 0x2230
movq %rax, -0x6c8(%rbp)
jmp 0x6748
movq -0x6c8(%rbp), %rdi
movsd -0x48(%rbp), %xmm0
callq 0x23e0
movq %rax, -0x6d8(%rbp)
jmp 0x6762
movq -0x6d8(%rbp), %rdi
movq 0x1a858(%rip), %rsi     # 0x20fc8
callq 0x2260
jmp 0x6777
leaq 0xf931(%rip), %rsi      # 0x160af
leaq -0x4e0(%rbp), %rdi
callq 0x2230
movq %rax, -0x6e0(%rbp)
jmp 0x6793
movq -0x6e0(%rbp), %rdi
movq 0x1a827(%rip), %rsi     # 0x20fc8
callq 0x2260
jmp 0x67a8
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8750
movq %rax, %rdi
callq 0x8860
movq %rax, -0x4e8(%rbp)
movq -0x658(%rbp), %rdi
addq $0x60, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8750
movq %rax, %rdi
callq 0x8890
movq %rax, -0x4f0(%rbp)
leaq -0x4e8(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
callq 0x88c0
testb $0x1, %al
jne 0x680a
jmp 0x6e53
leaq -0x4e8(%rbp), %rdi
callq 0x8940
movl (%rax), %esi
leaq -0x5d0(%rbp), %rdi
callq 0x8c40
jmp 0x6826
leaq 0xf880(%rip), %rdx      # 0x160ad
leaq -0x5b0(%rbp), %rdi
leaq -0x5d0(%rbp), %rsi
callq 0x8bf0
jmp 0x6842
leaq -0x4e8(%rbp), %rdi
callq 0x8940
movl 0x4(%rax), %esi
leaq -0x5f0(%rbp), %rdi
callq 0x8c40
jmp 0x685f
leaq -0x590(%rbp), %rdi
leaq -0x5b0(%rbp), %rsi
leaq -0x5f0(%rbp), %rdx
callq 0x8b20
jmp 0x687b
leaq 0xf82b(%rip), %rdx      # 0x160ad
leaq -0x570(%rbp), %rdi
leaq -0x590(%rbp), %rsi
callq 0x8bf0
jmp 0x6897
leaq -0x4e8(%rbp), %rdi
callq 0x8940
movl 0x8(%rax), %esi
leaq -0x610(%rbp), %rdi
callq 0x8c40
jmp 0x68b4
leaq -0x550(%rbp), %rdi
leaq -0x570(%rbp), %rsi
leaq -0x610(%rbp), %rdx
callq 0x8b20
jmp 0x68d0
leaq 0xf7d6(%rip), %rdx      # 0x160ad
leaq -0x530(%rbp), %rdi
leaq -0x550(%rbp), %rsi
callq 0x8bf0
jmp 0x68ec
leaq -0x4e8(%rbp), %rdi
callq 0x8940
movl 0xc(%rax), %esi
leaq -0x630(%rbp), %rdi
callq 0x8c40
jmp 0x6909
leaq -0x510(%rbp), %rdi
leaq -0x530(%rbp), %rsi
leaq -0x630(%rbp), %rdx
callq 0x8b20
jmp 0x6925
leaq -0x630(%rbp), %rdi
callq 0x2180
leaq -0x530(%rbp), %rdi
callq 0x2180
leaq -0x550(%rbp), %rdi
callq 0x2180
leaq -0x610(%rbp), %rdi
callq 0x2180
leaq -0x570(%rbp), %rdi
callq 0x2180
leaq -0x590(%rbp), %rdi
callq 0x2180
leaq -0x5f0(%rbp), %rdi
callq 0x2180
leaq -0x5b0(%rbp), %rdi
callq 0x2180
leaq -0x5d0(%rbp), %rdi
callq 0x2180
movq -0x658(%rbp), %rdi
addq $0x78, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8d60
movq %rax, %rdi
leaq -0x510(%rbp), %rsi
callq 0x8e50
movq %rax, -0x6e8(%rbp)
jmp 0x69bd
movq -0x658(%rbp), %rdi
movq -0x6e8(%rbp), %rax
movq %rax, -0x638(%rbp)
addq $0x78, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8d60
movq %rax, %rdi
callq 0x8e80
movq %rax, -0x640(%rbp)
leaq -0x638(%rbp), %rdi
leaq -0x640(%rbp), %rsi
callq 0x8e20
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x6e9(%rbp)
jne 0x6a12
jmp 0x6a8a
movq -0x658(%rbp), %rdi
addq $0x78, %rdi
movl $0x1, %esi
callq 0x8d60
movq %rax, %rdi
leaq -0x510(%rbp), %rsi
callq 0x8e50
movq %rax, -0x6f8(%rbp)
jmp 0x6a3f
movq -0x658(%rbp), %rdi
movq -0x6f8(%rbp), %rax
movq %rax, -0x648(%rbp)
addq $0x78, %rdi
movl $0x1, %esi
callq 0x8d60
movq %rax, %rdi
callq 0x8e80
movq %rax, -0x650(%rbp)
leaq -0x648(%rbp), %rdi
leaq -0x650(%rbp), %rsi
callq 0x8e20
movb %al, -0x6e9(%rbp)
movb -0x6e9(%rbp), %al
testb $0x1, %al
jne 0x6a99
jmp 0x6e36
movq -0x658(%rbp), %rax
addq $0xa8, %rax
movq %rax, -0x708(%rbp)
leaq -0x4e8(%rbp), %rdi
callq 0x8940
movq -0x708(%rbp), %rdi
movslq 0x8(%rax), %rsi
callq 0x8eb0
movq %rax, %rsi
leaq -0x4e0(%rbp), %rdi
callq 0x2210
movq %rax, -0x700(%rbp)
jmp 0x6ae1
movq -0x700(%rbp), %rdi
leaq 0xf60f(%rip), %rsi      # 0x160fe
callq 0x2230
movq %rax, -0x710(%rbp)
jmp 0x6afd
movq -0x658(%rbp), %rax
addq $0xa8, %rax
movq %rax, -0x720(%rbp)
leaq -0x4e8(%rbp), %rdi
callq 0x8940
movq -0x720(%rbp), %rdi
movslq (%rax), %rsi
callq 0x8eb0
movq -0x710(%rbp), %rdi
movq %rax, %rsi
callq 0x2210
movq %rax, -0x718(%rbp)
jmp 0x6b44
movq -0x718(%rbp), %rdi
leaq 0xf5ae(%rip), %rsi      # 0x16100
callq 0x2230
movq %rax, -0x728(%rbp)
jmp 0x6b60
movq -0x658(%rbp), %rax
addq $0xa8, %rax
movq %rax, -0x738(%rbp)
leaq -0x4e8(%rbp), %rdi
callq 0x8940
movq -0x738(%rbp), %rdi
movslq 0x4(%rax), %rsi
callq 0x8eb0
movq -0x728(%rbp), %rdi
movq %rax, %rsi
callq 0x2210
movq %rax, -0x730(%rbp)
jmp 0x6ba8
movq -0x730(%rbp), %rdi
leaq 0xf4f7(%rip), %rsi      # 0x160ad
callq 0x2230
movq %rax, -0x740(%rbp)
jmp 0x6bc4
leaq -0x4e8(%rbp), %rdi
callq 0x8940
movq -0x740(%rbp), %rdi
movsd 0x10(%rax), %xmm0
callq 0x23e0
movq %rax, -0x748(%rbp)
jmp 0x6bea
movq -0x748(%rbp), %rdi
leaq 0xf4b5(%rip), %rsi      # 0x160ad
callq 0x2230
movq %rax, -0x750(%rbp)
jmp 0x6c06
movq -0x658(%rbp), %rdi
addq $0x78, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8d60
movq %rax, %rdi
leaq -0x510(%rbp), %rsi
callq 0x8ed0
movq %rax, -0x758(%rbp)
jmp 0x6c32
movq -0x750(%rbp), %rdi
movq -0x758(%rbp), %rax
movsd (%rax), %xmm0
callq 0x23e0
movq %rax, -0x760(%rbp)
jmp 0x6c52
movq -0x760(%rbp), %rdi
leaq 0xf44d(%rip), %rsi      # 0x160ad
callq 0x2230
movq %rax, -0x768(%rbp)
jmp 0x6c6e
movq -0x658(%rbp), %rdi
addq $0x78, %rdi
movl $0x1, %esi
callq 0x8d60
movq %rax, %rdi
leaq -0x510(%rbp), %rsi
callq 0x8ed0
movq %rax, -0x770(%rbp)
jmp 0x6c9b
movq -0x768(%rbp), %rdi
movq -0x770(%rbp), %rax
movsd (%rax), %xmm0
callq 0x23e0
movq %rax, -0x778(%rbp)
jmp 0x6cbb
movq -0x778(%rbp), %rdi
leaq 0xf3e4(%rip), %rsi      # 0x160ad
callq 0x2230
movq %rax, -0x780(%rbp)
jmp 0x6cd7
leaq -0x4e8(%rbp), %rdi
callq 0x8940
movq -0x780(%rbp), %rdi
movl 0xc(%rax), %esi
callq 0x23a0
movq %rax, -0x788(%rbp)
jmp 0x6cfb
movq -0x788(%rbp), %rdi
movq 0x1a2bf(%rip), %rsi     # 0x20fc8
callq 0x2260
jmp 0x6d10
jmp 0x6e36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6e76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6e0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6e02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6df6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6dea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6dde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6dd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6dc6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x6dba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x630(%rbp), %rdi
callq 0x2180
leaq -0x530(%rbp), %rdi
callq 0x2180
leaq -0x550(%rbp), %rdi
callq 0x2180
leaq -0x610(%rbp), %rdi
callq 0x2180
leaq -0x570(%rbp), %rdi
callq 0x2180
leaq -0x590(%rbp), %rdi
callq 0x2180
leaq -0x5f0(%rbp), %rdi
callq 0x2180
leaq -0x5b0(%rbp), %rdi
callq 0x2180
leaq -0x5d0(%rbp), %rdi
callq 0x2180
jmp 0x6e76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x510(%rbp), %rdi
callq 0x2180
jmp 0x6e76
leaq -0x510(%rbp), %rdi
callq 0x2180
leaq -0x4e8(%rbp), %rdi
callq 0x8960
jmp 0x67cb
leaq -0x4e0(%rbp), %rdi
callq 0x22f0
jmp 0x6e61
leaq -0x4e0(%rbp), %rdi
callq 0x2310
addq $0x790, %rsp            # imm = 0x790
popq %rbp
retq
leaq -0x4e0(%rbp), %rdi
callq 0x2310
movq -0x70(%rbp), %rdi
callq 0x23b0
nopl (%rax,%rax)