// File: /workspace/github_cpp_makefile_star2_O1/UBOdin[P]jitd-cpp/src/jitd_tester.cpp
// Function: jitd_test(JITD<Record, PureLocalPolicy<Record>>&, std::istream&, bool, int)
int jitd_test(
  JITD<Record, JITD_TEST_POLICY> &jitd, 
  istream &input, 
  bool interactive, 
  int per_op_sleep_ms
) {
  string line;
  vector<std::thread> threads;
  
  timeval global_start, global_end;
  gettimeofday(&global_start, NULL);
  
  if(interactive) { cout << "jitd> "; cout.flush(); }
  while(getline(input, line)){
    istringstream toks(line);
    string op;
    
    CASE_1("--") {
      // comment, ignore
      
    ///////////////// MUTATOR OPERATIONS /////////////////
    } CASE("init") {
      timeval start, end;
      RecordBuffer data = buffer_cmd(toks);
      gettimeofday(&start, NULL);
      jitd.init(data);
      gettimeofday(&end, NULL);
      cout << "Init JITD: " << total_time(start, end) << " us" << endl;
    } CASE("insert") {
      timeval start, end;
      RecordBuffer data = buffer_cmd(toks);
      gettimeofday(&start, NULL);
      jitd.insert(data);
      gettimeofday(&end, NULL);
      cout << "Insert into JITD: " << total_time(start, end) << " us" << endl;
    } CASE("remove") {
      timeval start, end;
      RecordBuffer data = buffer_cmd(toks);
      gettimeofday(&start, NULL);
      jitd.remove(data);
      gettimeofday(&end, NULL);
      cout << "Delete from JITD: " << total_time(start, end) << " us" << endl;

    ///////////////// POLICY OPERATIONS /////////////////    
    } CASE("policy_set") {
      
      CASE_1("cracksort"){
        int threshold;
        toks >> threshold;
        cout << "Switching to Crack/Sort Policy with Threshold of " << threshold << endl;
        jitd.getPolicy()->setScoreFunction(
          std::bind(CrackOrSortArraysBigFirst<Record>, threshold, std::placeholders::_1)
        );
        jitd.reinitPolicy();
      } else {
        cerr << "Invalid Policy " << op << endl;
        exit(-1);
      }

    } CASE("policy_act_once") {
      timeval start, end;
      jitd.getPolicy()->describeNext();
      JITD_TEST_POLICY *policy = jitd.getPolicy();
      gettimeofday(&start, NULL);
      policy->act();
      gettimeofday(&end, NULL);
      cout << "Policy Action: " << total_time(start, end) << " us" << endl;

    } CASE("policy_act_for") {
      int target_steps;
      double used_microseconds = 0;
      timeval start, end;
      JITD_TEST_POLICY *policy = jitd.getPolicy();

      toks >> target_steps;

      for(int x = 0; x < target_steps; x++){
        gettimeofday(&start, NULL);
        policy->act();
        gettimeofday(&end, NULL);
        used_microseconds += total_time(start, end);
      }

      cout << "Policy " << target_steps << " Actions: " << used_microseconds << " us" << endl;

    } CASE("policy_act_until_done") {
      bool more_work_to_do = true;
      int steps_taken;
      timeval start, end;
      JITD_TEST_POLICY *policy = jitd.getPolicy();

      gettimeofday(&start, NULL);
      while(more_work_to_do){
        steps_taken++;
        more_work_to_do = policy->act();
      }
      gettimeofday(&end, NULL);
      cout << "Policy " << steps_taken << " Actions: " << total_time(start, end) << " us" << endl;


    ///////////////// ACCESS OPERATIONS /////////////////    
    } CASE("scan") {
      Iterator<Record> iter = jitd.iterator();
      timeval start, end;
      int idx = 0;
      
      while(!toks.eof() && !iter->atEnd()){
        CASE_1("flush") { // no argument
          int startidx = idx;
          gettimeofday(&start, NULL);
          while(!iter->atEnd()){ iter->next(); idx++; }
          gettimeofday(&end, NULL);
          cout << "Records Flushed: " << (idx - startidx) << endl;
          cout << "Flush Time: " << total_time(start, end) << " us" << endl;
        } CASE("full") { // no argument
          while(!iter->atEnd()){ 
            cout << idx << " -> " << iter->get()->key << endl;
            iter->next(); 
            idx++; 
          }
        } CASE("step") { // no argument
          cout << idx << " -> " << iter->get()->key << endl;
          idx++;
          iter->next();
        } CASE("next") { // [CNT]
          int cnt;
          for(toks >> cnt; (cnt > 0) && !iter->atEnd(); cnt--){
            cout << idx << " -> " << iter->get()->key << endl;
            idx++;
            iter->next();
          }
        } CASE("quiet_next") { // [CNT]
          int cnt, startidx = idx;
          for(toks >> cnt; (cnt > 0) && !iter->atEnd(); cnt--){ 
            idx++;
            iter->next();
          }
        } CASE("seek") { // [TARGET]
          Record target;
          toks >> target.key;
          target.value = NULL;
          gettimeofday(&start, NULL);
          iter->seek(target);
          gettimeofday(&end, NULL);
          cout << "Seek Time: " << total_time(start, end) << " us" << endl;
        } CASE("quiet_seek") { // [TARGET]
          Record target;
          toks >> target.key;
          target.value = NULL;
          iter->seek(target);
        }
      }
    } CASE("random_scan") {
      int time_in_ms, max_key, key_cnt;
      long int scan_count = 0;
      timeval start, end;
      Record target;
      target.value = NULL;
      toks >> time_in_ms >> max_key >> key_cnt;
      gettimeofday(&start, NULL);
      gettimeofday(&end, NULL);
      
      cout << "Scanning for " << time_in_ms << " s in [0,"
           << max_key << ") -> " << key_cnt << " keys/read" << endl;
      while(total_time(start, end) < time_in_ms*1000){
        Iterator<Record> iter = jitd.iterator();
        target.key = rand() % max_key;
        iter->seek(target);
        for(; key_cnt > 0; key_cnt--) { iter->next(); }
        scan_count++;
        
        gettimeofday(&end, NULL);
      }
      cout << "Random Scan: " << scan_count << " scans over "
           << total_time(start, end)/(1000*1000) << " s" << endl 
           << "Rate: " 
             << ((1000*1000*scan_count) / total_time(start, end))
             << " scans/sec" << endl;
    
    } CASE("spawn") {
      string file;
      toks >> file;
      threads.emplace_back(run_test_thread, &jitd, file, 0);

    } CASE("spawn_slow") {
      int delay_ms;
      string file;
      toks >> delay_ms >> file;
      threads.emplace_back(run_test_thread, &jitd, file, delay_ms);
    
    } CASE("spawn_updates") {
      Key max_key;
      int size;
      long int low_mark;
      long int high_mark;
      int seed = 42;
      int per_op_sleep_ms;
      int runtime_ms;
      
      toks >> max_key >> size >> low_mark >> high_mark >> per_op_sleep_ms >> runtime_ms;
      
      threads.emplace_back(run_update_thread, &jitd, max_key, size, low_mark, high_mark, seed, per_op_sleep_ms, runtime_ms);

    } CASE("run") {
      string file;
      toks >> file;
      run_test_thread(&jitd, file, per_op_sleep_ms);

    } CASE("time") {
      timeval end; 
      gettimeofday(&end, NULL);
      cout << "Time now: " << total_time(global_start, end)/(1000*1000) << endl;
    
    } CASE("sleep") {
      int ms;
      toks >> ms;
      this_thread::sleep_for(chrono::milliseconds(ms));
      
    } CASE("size") {
      cout << jitd.size() << " records" << endl;
    } CASE("dump") {
      jitd.printDebug();
      
    ///////////////// OOOPS /////////////////
    } else {
      cerr << "Invalid Test Operation: " << op << endl;
      exit(-1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movl %ecx, -0xb8(%rbp)
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, -0xa0(%rbp)
leaq -0x180(%rbp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
movq %rax, -0xf0(%rbp)
xorpd %xmm0, %xmm0
movapd %xmm0, -0x100(%rbp)
leaq -0x1b8(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movl %ebx, -0xdc(%rbp)
testl %ebx, %ebx
je 0x9b14
movq 0xf4d1(%rip), %rdi      # 0x18fc8
leaq 0x7c15(%rip), %rsi      # 0x11713
movl $0x6, %edx
callq 0x42d0
movq 0xf4b9(%rip), %rdi      # 0x18fc8
callq 0x4190
leaq -0x40(%rbp), %r14
movq -0xa0(%rbp), %rax
leaq 0x10(%rax), %rcx
movq %rcx, -0xd8(%rbp)
addq $0x30, %rax
movq %rax, -0x198(%rbp)
movl -0xb8(%rbp), %ecx
movabsq $0x4189374bc6a7f0, %rdx # imm = 0x4189374BC6A7F0
movq %rcx, %rax
mulq %rdx
movq %rdx, -0x1a8(%rbp)
imulq $-0x3e8, %rdx, %rax     # imm = 0xFC18
addq %rcx, %rax
imulq $0xf4240, %rax, %rax    # imm = 0xF4240
movq %rax, -0x1a0(%rbp)
leaq -0x50(%rbp), %r12
movq 0xf453(%rip), %r13      # 0x18fc8
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %edx
movq %r15, %rdi
leaq -0x190(%rbp), %rsi
callq 0x4420
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xb6ec
leaq -0x348(%rbp), %rbx
movq %rbx, %rdi
leaq -0x190(%rbp), %rsi
movl $0x8, %edx
callq 0x43b0
leaq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movq $0x0, -0x78(%rbp)
movb $0x0, -0x70(%rbp)
movq %rbx, %rdi
leaq -0x80(%rbp), %rsi
callq 0x4300
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x749f(%rip), %rsi      # 0x11095
leaq 0x749a(%rip), %rdx      # 0x11097
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0x9c25
testq %rdx, %rdx
je 0x9c29
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0x9c2b
xorl %ebx, %ebx
jmp 0x9c2b
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x9c40
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
jne 0xa0bc
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x7ac4(%rip), %rsi      # 0x1171a
leaq 0x7ac1(%rip), %rdx      # 0x1171e
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
leaq -0x348(%rbp), %rsi
jne 0x9c93
testq %rdx, %rdx
je 0x9c97
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
leaq -0x348(%rbp), %rsi
sete %bl
jmp 0x9c99
xorl %ebx, %ebx
jmp 0x9c99
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x9cb5
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
leaq -0x348(%rbp), %rsi
testb %bl, %bl
je 0x9d01
leaq -0x90(%rbp), %rdi
callq 0xfda6
movq %r12, %rdi
xorl %esi, %esi
callq 0x4380
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, -0x150(%rbp)
movq %rax, -0x148(%rbp)
testq %rax, %rax
je 0x9d50
movq 0xf2c9(%rip), %rcx      # 0x18fc0
cmpb $0x0, (%rcx)
je 0x9d4c
incl 0x8(%rax)
jmp 0x9d50
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x7421(%rip), %rsi      # 0x11130
leaq 0x7420(%rip), %rdx      # 0x11136
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0x9d45
testq %rdx, %rdx
je 0x9dfa
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0x9dfc
xorl %ebx, %ebx
jmp 0x9dfc
lock
incl 0x8(%rax)
movq -0xa0(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0xc11e
movq -0x148(%rbp), %rdi
testq %rdi, %rdi
je 0x9d74
callq 0x6810
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movl $0xb, %edx
movq %r13, %rdi
leaq 0x7991(%rip), %rsi      # 0x1171f
callq 0x42d0
movq %r12, %rdi
leaq -0x60(%rbp), %rsi
callq 0xfd7c
movq %r13, %rdi
callq 0x4360
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x7308(%rip), %rsi      # 0x110c1
callq 0x42d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0xa0bc
jmp 0xa0b7
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x9e11
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0x9e64
leaq -0x90(%rbp), %rdi
leaq -0x348(%rbp), %rsi
callq 0xfda6
movq %r12, %rdi
xorl %esi, %esi
callq 0x4380
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, -0x140(%rbp)
movq %rax, -0x138(%rbp)
testq %rax, %rax
je 0x9eb3
movq 0xf166(%rip), %rcx      # 0x18fc0
cmpb $0x0, (%rcx)
je 0x9eaf
incl 0x8(%rax)
jmp 0x9eb3
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x78cc(%rip), %rsi      # 0x1173e
leaq 0x78cb(%rip), %rdx      # 0x11744
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0x9ea8
testq %rdx, %rdx
je 0x9f5d
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0x9f5f
xorl %ebx, %ebx
jmp 0x9f5f
lock
incl 0x8(%rax)
movq -0xa0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0xbb24
movq -0x138(%rbp), %rdi
testq %rdi, %rdi
je 0x9ed7
callq 0x6810
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movl $0x12, %edx
movq %r13, %rdi
leaq 0x783a(%rip), %rsi      # 0x1172b
callq 0x42d0
movq %r12, %rdi
leaq -0x60(%rbp), %rsi
callq 0xfd7c
movq %r13, %rdi
callq 0x4360
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x71a5(%rip), %rsi      # 0x110c1
callq 0x42d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0xa0bc
jmp 0xa0b7
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x9f74
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0x9fc7
leaq -0x90(%rbp), %rdi
leaq -0x348(%rbp), %rsi
callq 0xfda6
movq %r12, %rdi
xorl %esi, %esi
callq 0x4380
movq -0x90(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, -0x130(%rbp)
movq %rax, -0x128(%rbp)
testq %rax, %rax
je 0xa016
movq 0xf003(%rip), %rcx      # 0x18fc0
cmpb $0x0, (%rcx)
je 0xa012
incl 0x8(%rax)
jmp 0xa016
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x7783(%rip), %rsi      # 0x11758
leaq 0x7786(%rip), %rdx      # 0x11762
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xa00b
testq %rdx, %rdx
je 0xa157
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xa159
xorl %ebx, %ebx
jmp 0xa159
lock
incl 0x8(%rax)
movq -0xa0(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0xbdee
movq -0x128(%rbp), %rdi
testq %rdi, %rdi
je 0xa03a
callq 0x6810
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movl $0x12, %edx
movq %r13, %rdi
leaq 0x76f1(%rip), %rsi      # 0x11745
callq 0x42d0
movq %r12, %rdi
leaq -0x60(%rbp), %rsi
callq 0xfd7c
movq %r13, %rdi
callq 0x4360
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x7042(%rip), %rsi      # 0x110c1
callq 0x42d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0xa0bc
callq 0x6810
cmpb $0x0, -0xdc(%rbp)
je 0xa0e1
movl $0x6, %edx
movq %r13, %rdi
leaq 0x763f(%rip), %rsi      # 0x11713
callq 0x42d0
movq %r13, %rdi
callq 0x4190
cmpl $0x0, -0xb8(%rbp)
jle 0xa11a
movq -0x1a8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x1a0(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %r12, %rdi
movq %r12, %rsi
callq 0x40a0
cmpl $-0x1, %eax
jne 0xa11a
callq 0x4040
cmpl $0x4, (%rax)
je 0xa100
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0xa133
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x4280
leaq -0x348(%rbp), %rdi
movq 0xee77(%rip), %rsi      # 0x18fb8
callq 0x4310
leaq -0x2d0(%rbp), %rdi
callq 0x40b0
jmp 0x9b75
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa16e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xa1c6
leaq -0x348(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x4300
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x75d3(%rip), %rsi      # 0x11763
leaq 0x75d5(%rip), %rdx      # 0x1176c
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xa207
testq %rdx, %rdx
je 0xa30f
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xa311
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x75db(%rip), %rsi      # 0x117af
leaq 0x75e3(%rip), %rdx      # 0x117be
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xa203
testq %rdx, %rdx
je 0xa20e
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xa210
xorl %ebx, %ebx
jmp 0xa210
xorl %ebx, %ebx
jmp 0xa311
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa225
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xa2c4
movq -0xd8(%rbp), %rbx
movq %rbx, %rdi
callq 0xc382
movq %r12, %rdi
xorl %esi, %esi
callq 0x4380
movq %rbx, %rdi
callq 0xc42a
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movl $0xf, %edx
movq %r13, %rdi
leaq 0x7557(%rip), %rsi      # 0x117bf
callq 0x42d0
movq %r12, %rdi
leaq -0x60(%rbp), %rsi
callq 0xfd7c
movq %r13, %rdi
callq 0x4360
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x6e2e(%rip), %rsi      # 0x110c1
callq 0x42d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
jmp 0xa0bc
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x74fd(%rip), %rsi      # 0x117cf
leaq 0x7504(%rip), %rdx      # 0x117dd
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xa308
testq %rdx, %rdx
je 0xa418
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xa41a
xorl %ebx, %ebx
jmp 0xa41a
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa326
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xb787
leaq -0x348(%rbp), %rdi
movq %r12, %rsi
callq 0x4150
movl $0x31, %edx
movq %r13, %rdi
leaq 0x7421(%rip), %rsi      # 0x1176d
callq 0x42d0
movl -0x50(%rbp), %esi
movq %r13, %rdi
callq 0x43f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movl -0x50(%rbp), %ebx
xorpd %xmm0, %xmm0
movapd %xmm0, -0x120(%rbp)
movapd %xmm0, -0x110(%rbp)
movl $0x10, %edi
callq 0x4270
leaq 0x1ee4(%rip), %rcx      # 0xc292
movq %rcx, (%rax)
movl %ebx, 0x8(%rax)
movq %rax, -0x120(%rbp)
leaq 0x46de(%rip), %rax      # 0xeaa0
movq %rax, -0x108(%rbp)
leaq 0x46f2(%rip), %rax      # 0xeac2
movq %rax, -0x110(%rbp)
movq -0x198(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0xe248
movq -0x110(%rbp), %rax
testq %rax, %rax
je 0xa407
leaq -0x120(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0xa0(%rbp), %rdi
callq 0xc312
jmp 0xa0bc
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa42f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xa4b8
leaq -0x348(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x4150
cmpl $0x0, -0x90(%rbp)
jle 0xa503
xorl %ebx, %ebx
xorpd %xmm0, %xmm0
movsd %xmm0, -0x98(%rbp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x4380
movq -0xd8(%rbp), %rdi
callq 0xc42a
leaq -0x60(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x4380
movq %r12, %rdi
movq %r14, %rsi
callq 0xfd7c
movsd -0x98(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x98(%rbp)
incl %ebx
cmpl -0x90(%rbp), %ebx
leaq -0x40(%rbp), %r14
jl 0xa465
jmp 0xa50f
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x7323(%rip), %rsi      # 0x117e9
leaq 0x7331(%rip), %rdx      # 0x117fe
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xa4fc
testq %rdx, %rdx
je 0xa59b
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xa59d
xorl %ebx, %ebx
jmp 0xa59d
xorpd %xmm0, %xmm0
movsd %xmm0, -0x98(%rbp)
movl $0x7, %edx
movq %r13, %rdi
leaq 0x7289(%rip), %rsi      # 0x117a7
callq 0x42d0
movl -0x90(%rbp), %esi
movq %r13, %rdi
callq 0x43f0
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0x729b(%rip), %rsi      # 0x117de
callq 0x42d0
movq %rbx, %rdi
movsd -0x98(%rbp), %xmm0
callq 0x4360
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x6b57(%rip), %rsi      # 0x110c1
callq 0x42d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
jmp 0xa0bc
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa5b2
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xa684
movq %r12, %rdi
xorl %esi, %esi
callq 0x4380
movq -0xd8(%rbp), %rdi
movl -0xbc(%rbp), %ebx
callq 0xc42a
incl %ebx
testb %al, %al
movq -0xd8(%rbp), %rdi
jne 0xa5d1
movl %ebx, -0xbc(%rbp)
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movl $0x7, %edx
movq %r13, %rdi
leaq 0x71a4(%rip), %rsi      # 0x117a7
callq 0x42d0
movq %r13, %rdi
movl -0xbc(%rbp), %esi
callq 0x43f0
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0x71b6(%rip), %rsi      # 0x117de
callq 0x42d0
movq %r12, %rdi
leaq -0x60(%rbp), %rsi
callq 0xfd7c
movq %rbx, %rdi
callq 0x4360
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x6a6e(%rip), %rsi      # 0x110c1
callq 0x42d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
jmp 0xa0bc
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x6a0b(%rip), %rsi      # 0x1109d
leaq 0x6a08(%rip), %rdx      # 0x110a1
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xa6c1
testq %rdx, %rdx
je 0xa6c5
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xa6c7
xorl %ebx, %ebx
jmp 0xa6c7
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa6dc
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xadd6
leaq -0x60(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0xc77e
movq -0x348(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x328(%rbp,%rax)
jne 0xae13
movl $0x0, -0x98(%rbp)
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb %al, %al
jne 0xae13
leaq -0x348(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x4300
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x70b8(%rip), %rsi      # 0x117ff
leaq 0x70b6(%rip), %rdx      # 0x11804
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xa776
testq %rdx, %rdx
je 0xa77a
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xa77c
xorl %ebx, %ebx
jmp 0xa77c
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa791
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xa7c1
xorl %ebx, %ebx
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb %al, %al
jne 0xa809
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
incl %ebx
jmp 0xa7a5
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x7055(%rip), %rsi      # 0x11824
leaq 0x7052(%rip), %rdx      # 0x11828
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xa8eb
testq %rdx, %rdx
je 0xa8ef
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xa8f1
leaq -0xd0(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movl $0x11, %edx
movq %r13, %rdi
leaq 0x6fdf(%rip), %rsi      # 0x11805
callq 0x42d0
movq 0xe796(%rip), %rdi      # 0x18fc8
movl %ebx, %esi
callq 0x43f0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r13, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movl $0xc, %edx
movq 0xe759(%rip), %rdi      # 0x18fc8
leaq 0x6fa1(%rip), %rsi      # 0x11817
callq 0x42d0
leaq -0x90(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xfd7c
movq 0xe733(%rip), %rdi      # 0x18fc8
callq 0x4360
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
leaq 0x6815(%rip), %rsi      # 0x110c1
callq 0x42d0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %r13, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
addl %ebx, -0x98(%rbp)
movq 0xe6e2(%rip), %r13      # 0x18fc8
jmp 0xaa6b
xorl %ebx, %ebx
jmp 0xa8f1
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa906
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xa998
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb %al, %al
jne 0xaa6b
movq %r13, %rdi
movl -0x98(%rbp), %esi
callq 0x43f0
movq %rax, %rbx
movl $0x4, %edx
movq %rax, %rdi
leaq 0x6f35(%rip), %rsi      # 0x11875
callq 0x42d0
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x4230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
incl -0x98(%rbp)
jmp 0xa90e
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x6e83(%rip), %rsi      # 0x11829
leaq 0x6e80(%rip), %rdx      # 0x1182d
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xa9d5
testq %rdx, %rdx
je 0xa9d9
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xa9db
xorl %ebx, %ebx
jmp 0xa9db
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa9f0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xaa89
movq %r13, %rdi
movl -0x98(%rbp), %esi
callq 0x43f0
movq %rax, %rbx
movl $0x4, %edx
movq %rax, %rdi
leaq 0x6e5d(%rip), %rsi      # 0x11875
callq 0x42d0
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x4230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
incl -0x98(%rbp)
movq -0x348(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x328(%rbp,%rax)
je 0xa717
jmp 0xae13
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x6d9d(%rip), %rsi      # 0x11834
leaq 0x6d9a(%rip), %rdx      # 0x11838
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xaac6
testq %rdx, %rdx
je 0xaaca
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xaacc
xorl %ebx, %ebx
jmp 0xaacc
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xaae1
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xab9e
leaq -0x348(%rbp), %rdi
movq %r12, %rsi
callq 0x4150
cmpl $0x0, -0x50(%rbp)
jle 0xaa6b
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb %al, %al
jne 0xaa6b
movq %r13, %rdi
movl -0x98(%rbp), %esi
callq 0x43f0
movq %rax, %rbx
movl $0x4, %edx
movq %rax, %rdi
leaq 0x6d41(%rip), %rsi      # 0x11875
callq 0x42d0
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *(%rax)
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x4230
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
incl -0x98(%rbp)
movl -0x50(%rbp), %eax
leal -0x1(%rax), %ecx
movl %ecx, -0x50(%rbp)
cmpl $0x1, %eax
jg 0xab02
jmp 0xaa6b
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x6c82(%rip), %rsi      # 0x1182e
leaq 0x6c85(%rip), %rdx      # 0x11838
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xabdb
testq %rdx, %rdx
je 0xabdf
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xabe1
xorl %ebx, %ebx
jmp 0xabe1
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xabf6
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xac48
leaq -0x348(%rbp), %rdi
movq %r12, %rsi
callq 0x4150
cmpl $0x0, -0x50(%rbp)
jle 0xaa6b
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
testb %al, %al
jne 0xaa6b
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
incl -0x98(%rbp)
movl -0x50(%rbp), %eax
leal -0x1(%rax), %ecx
movl %ecx, -0x50(%rbp)
cmpl $0x1, %eax
jg 0xac13
jmp 0xaa6b
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x6bf5(%rip), %rsi      # 0x1184b
leaq 0x6bf2(%rip), %rdx      # 0x1184f
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xac85
testq %rdx, %rdx
je 0xac89
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xac8b
xorl %ebx, %ebx
jmp 0xac8b
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xaca0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xad44
xorpd %xmm0, %xmm0
movapd %xmm0, -0x50(%rbp)
leaq -0x348(%rbp), %rdi
movq %r12, %rsi
callq 0x4290
movq $0x0, -0x48(%rbp)
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0x10(%rax)
leaq -0xd0(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movl $0xb, %edx
movq %r13, %rdi
leaq 0x6b39(%rip), %rsi      # 0x11839
callq 0x42d0
leaq -0x90(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xfd7c
movq %r13, %rdi
callq 0x4360
movq %rax, %rbx
movl $0x3, %edx
movq %rax, %rdi
leaq 0x638f(%rip), %rsi      # 0x110c1
callq 0x42d0
movq %rbx, %rdi
callq 0x4120
jmp 0xaa6b
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x6af3(%rip), %rsi      # 0x11845
leaq 0x6af6(%rip), %rdx      # 0x1184f
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xad81
testq %rdx, %rdx
je 0xad85
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xad87
xorl %ebx, %ebx
jmp 0xad87
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xad9c
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xaa6b
xorpd %xmm0, %xmm0
movapd %xmm0, -0x50(%rbp)
leaq -0x348(%rbp), %rdi
movq %r12, %rsi
callq 0x4290
movq $0x0, -0x48(%rbp)
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
movq %r12, %rsi
callq *0x10(%rax)
jmp 0xaa6b
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x6a6c(%rip), %rsi      # 0x11850
leaq 0x6a70(%rip), %rdx      # 0x1185b
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xae25
testq %rdx, %rdx
je 0xae29
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xae2b
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xa0bc
jmp 0xa0b7
xorl %ebx, %ebx
jmp 0xae2b
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xae40
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xb001
xorpd %xmm0, %xmm0
movapd %xmm0, -0x90(%rbp)
leaq -0x348(%rbp), %rdi
leaq -0xac(%rbp), %rsi
callq 0x4150
movq %rax, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x4150
movq %rax, %rdi
leaq -0xa4(%rbp), %rsi
callq 0x4150
movq %r12, %rdi
xorl %esi, %esi
callq 0x4380
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movl $0xd, %edx
movq 0xe122(%rip), %rdi      # 0x18fc8
leaq 0x69af(%rip), %rsi      # 0x1185c
callq 0x42d0
movl -0xac(%rbp), %esi
movq 0xe109(%rip), %rdi      # 0x18fc8
callq 0x43f0
movq %rax, %rbx
movl $0x9, %edx
movq %rax, %rdi
leaq 0x6994(%rip), %rsi      # 0x1186a
callq 0x42d0
movl -0xa8(%rbp), %esi
movq %rbx, %rdi
callq 0x43f0
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0x6979(%rip), %rsi      # 0x11874
callq 0x42d0
movl -0xa4(%rbp), %esi
movq %rbx, %rdi
callq 0x43f0
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0x695a(%rip), %rsi      # 0x1187a
callq 0x42d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
xorl %r13d, %r13d
movq %r12, %rdi
leaq -0x60(%rbp), %rsi
callq 0xfd7c
imull $0x3e8, -0xac(%rbp), %eax # imm = 0x3E8
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
ucomisd %xmm0, %xmm1
jbe 0xb049
leaq -0xd0(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0xc77e
callq 0x4070
cltd
idivl -0xa8(%rbp)
movslq %edx, %rax
movq %rax, -0x90(%rbp)
movq -0xd0(%rbp), %rdi
movq (%rdi), %rax
leaq -0x90(%rbp), %rsi
callq *0x10(%rax)
cmpl $0x0, -0xa4(%rbp)
jle 0xafdd
movq -0xd0(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl -0xa4(%rbp), %eax
leal -0x1(%rax), %ecx
movl %ecx, -0xa4(%rbp)
cmpl $0x1, %eax
jg 0xafbc
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0xaff9
callq 0x6810
incq %r13
jmp 0xaf4f
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x68a3(%rip), %rsi      # 0x118b2
leaq 0x68a1(%rip), %rdx      # 0x118b7
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xb16a
testq %rdx, %rdx
je 0xb16e
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xb170
movl $0xd, %edx
movq 0xdf73(%rip), %rdi      # 0x18fc8
leaq 0x6829(%rip), %rsi      # 0x11885
callq 0x42d0
movq 0xdf60(%rip), %rdi      # 0x18fc8
movq %r13, %rsi
callq 0x4230
movq %rax, %rbx
movl $0xc, %edx
movq %rax, %rdi
leaq 0x6811(%rip), %rsi      # 0x11893
callq 0x42d0
movq %r12, %rdi
leaq -0x60(%rbp), %rsi
callq 0xfd7c
divsd 0x5f85(%rip), %xmm0     # 0x11020
movq %rbx, %rdi
callq 0x4360
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0x665b(%rip), %rsi      # 0x11710
callq 0x42d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq %rax, %rbx
movl $0x6, %edx
movq %rax, %rdi
leaq 0x67ad(%rip), %rsi      # 0x118a0
callq 0x42d0
movq %r12, %rdi
leaq -0x60(%rbp), %rsi
callq 0xfd7c
imulq $0xf4240, %r13, %rax    # imm = 0xF4240
cvtsi2sd %rax, %xmm1
divsd %xmm0, %xmm1
movq %rbx, %rdi
movapd %xmm1, %xmm0
callq 0x4360
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0x6775(%rip), %rsi      # 0x118a7
callq 0x42d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4190
movq 0xde63(%rip), %r13      # 0x18fc8
jmp 0xa0bc
xorl %ebx, %ebx
jmp 0xb170
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xb185
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xb1e3
movq %r14, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
leaq -0x348(%rbp), %rdi
movq %r12, %rsi
callq 0x4300
movq -0xa0(%rbp), %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x90(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x18c3(%rip), %rsi     # 0x9908
leaq -0x60(%rbp), %rdx
movq %r12, %rcx
leaq -0x90(%rbp), %r8
callq 0xc85a
jmp 0xb299
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x66c7(%rip), %rsi      # 0x118b8
leaq 0x66ca(%rip), %rdx      # 0x118c2
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xb220
testq %rdx, %rdx
je 0xb224
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xb226
xorl %ebx, %ebx
jmp 0xb226
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xb23b
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xb2b7
movq %r14, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
leaq -0x348(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x4150
movq %rax, %rdi
movq %r12, %rsi
callq 0x4300
movq -0xa0(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x197e(%rip), %rsi     # 0x9908
leaq -0x60(%rbp), %rdx
movq %r12, %rcx
leaq -0x90(%rbp), %r8
callq 0xc8a8
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xa0bc
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
jmp 0xa0bc
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x65fe(%rip), %rsi      # 0x118c3
leaq 0x6604(%rip), %rdx      # 0x118d0
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xb2f4
testq %rdx, %rdx
je 0xb2f8
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xb2fa
xorl %ebx, %ebx
jmp 0xb2fa
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xb30f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xb3d7
movl $0x2a, -0xa8(%rbp)
leaq -0x348(%rbp), %rdi
movq %r12, %rsi
callq 0x4290
movq %rax, %rdi
leaq -0xac(%rbp), %rsi
callq 0x4150
movq %rax, %rdi
leaq -0x60(%rbp), %rsi
callq 0x4290
movq %rax, %rdi
leaq -0x90(%rbp), %rsi
callq 0x4290
movq %rax, %rdi
leaq -0xa4(%rbp), %rsi
callq 0x4150
movq %rax, %rdi
leaq -0xe0(%rbp), %rsi
callq 0x4150
movq -0xa0(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x1f98(%rip), %rsi     # 0x93fc
leaq -0xd0(%rbp), %rdx
movq %r12, %rcx
leaq -0xac(%rbp), %r8
leaq -0x60(%rbp), %r9
leaq -0xe0(%rbp), %rax
pushq %rax
leaq -0xa4(%rbp), %rax
pushq %rax
leaq -0xa8(%rbp), %rax
pushq %rax
leaq -0x90(%rbp), %rax
pushq %rax
callq 0xc8f6
addq $0x20, %rsp
jmp 0xa0bc
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x64ec(%rip), %rsi      # 0x118d1
leaq 0x64e8(%rip), %rdx      # 0x118d4
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xb414
testq %rdx, %rdx
je 0xb418
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xb41a
xorl %ebx, %ebx
jmp 0xb41a
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xb42f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xb4be
movq %r14, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movb $0x0, -0x40(%rbp)
leaq -0x348(%rbp), %rdi
movq %r12, %rsi
callq 0x4300
leaq -0x170(%rbp), %rbx
leaq -0x160(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xcc30
movq -0xa0(%rbp), %rdi
movq %rbx, %rsi
movl -0xb8(%rbp), %edx
callq 0x9908
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0xb299
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x4280
jmp 0xb299
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x6409(%rip), %rsi      # 0x118d5
leaq 0x6406(%rip), %rdx      # 0x118d9
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xb4fb
testq %rdx, %rdx
je 0xb4ff
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xb501
xorl %ebx, %ebx
jmp 0xb501
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xb516
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xb564
movq %r12, %rdi
xorl %esi, %esi
callq 0x4380
movl $0xa, %edx
movq %r13, %rdi
leaq 0x63a7(%rip), %rsi      # 0x118da
callq 0x42d0
leaq -0x1b8(%rbp), %rdi
movq %r12, %rsi
callq 0xfd7c
divsd 0x5ad1(%rip), %xmm0     # 0x11020
movq %r13, %rdi
callq 0x4360
movq %rax, %rdi
callq 0x4120
jmp 0xa0bc
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x6373(%rip), %rsi      # 0x118e5
leaq 0x6371(%rip), %rdx      # 0x118ea
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xb5a1
testq %rdx, %rdx
je 0xb5a5
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xb5a7
xorl %ebx, %ebx
jmp 0xb5a7
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xb5bc
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xb5e5
leaq -0x348(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x4150
movslq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movq %r12, %rdi
callq 0xc0b8
jmp 0xa0bc
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x5a75(%rip), %rsi      # 0x11068
leaq 0x5a72(%rip), %rdx      # 0x1106c
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xb622
testq %rdx, %rdx
je 0xb626
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xb628
xorl %ebx, %ebx
jmp 0xb628
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xb63d
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xb67b
movq -0xa0(%rbp), %rdi
callq 0xc97a
movq %r13, %rdi
movl %eax, %esi
callq 0x43f0
movq %rax, %rbx
movl $0x8, %edx
movq %rax, %rdi
leaq 0x5a0b(%rip), %rsi      # 0x11074
callq 0x42d0
movq %rbx, %rdi
callq 0x4120
jmp 0xa0bc
movq %r14, -0x50(%rbp)
movq %r12, %rdi
leaq 0x59f4(%rip), %rsi      # 0x1107d
leaq 0x59f1(%rip), %rdx      # 0x11081
callq 0x7c1e
movq -0x48(%rbp), %rdx
cmpq -0x78(%rbp), %rdx
jne 0xb6b8
testq %rdx, %rdx
je 0xb6bc
movq -0x80(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x42a0
testl %eax, %eax
sete %bl
jmp 0xb6be
xorl %ebx, %ebx
jmp 0xb6be
movb $0x1, %bl
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0xb6d3
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
testb %bl, %bl
je 0xb7c5
movq -0xa0(%rbp), %rdi
callq 0xca4e
jmp 0xa0bc
leaq -0x1c8(%rbp), %rdi
xorl %esi, %esi
callq 0x4380
movq -0x100(%rbp), %rbx
cmpq -0xf8(%rbp), %rbx
jae 0xb718
movq %rbx, %rdi
callq 0x43e0
addq $0x8, %rbx
jmp 0xb701
leaq -0x1b8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0xfd7c
movsd %xmm0, -0xb8(%rbp)
leaq -0x100(%rbp), %rdi
callq 0xcbf2
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0xb761
movq -0x180(%rbp), %rsi
incq %rsi
callq 0x4280
movsd -0xb8(%rbp), %xmm0
divsd 0x58af(%rip), %xmm0     # 0x11020
cvttsd2si %xmm0, %eax
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xd862(%rip), %rdi      # 0x18ff0
leaq 0x600a(%rip), %rsi      # 0x1179f
movl $0xf, %edx
callq 0x42d0
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq 0xd842(%rip), %rdi      # 0x18ff0
callq 0x42d0
movq %rax, %rdi
callq 0x4120
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x42f0
movq 0xd824(%rip), %rdi      # 0x18ff0
leaq 0x5900(%rip), %rsi      # 0x110d3
movl $0x18, %edx
callq 0x42d0
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq 0xd804(%rip), %rdi      # 0x18ff0
callq 0x42d0
movq %rax, %rdi
callq 0x4120
jmp 0xb7bb
jmp 0xba47
jmp 0xba47
jmp 0xba47
jmp 0xba47
jmp 0xba47
jmp 0xba47
movq %rax, %rbx
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0xb869
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x4280
jmp 0xb869
jmp 0xba47
jmp 0xba47
jmp 0xba47
jmp 0xb866
jmp 0xb9f6
jmp 0xb866
jmp 0xb9f6
jmp 0xba47
jmp 0xb866
jmp 0xb866
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0xba4a
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x4280
jmp 0xba4a
jmp 0xb9f6
jmp 0xba47
jmp 0xb9f6
jmp 0xba47
jmp 0xb9f6
jmp 0xb9f6
jmp 0xba47
jmp 0xb9f6
jmp 0xb9f6
jmp 0xba47
jmp 0xba47
jmp 0xb9f6
jmp 0xba47
jmp 0xb9f6
jmp 0xba47
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xba47
jmp 0xba47
jmp 0xb93d
jmp 0xba47
jmp 0xba47
jmp 0xba47
jmp 0xba04
jmp 0xba47
jmp 0xba47
jmp 0xba47
movq %rax, %rbx
movq -0x110(%rbp), %rax
testq %rax, %rax
je 0xba4a
leaq -0x120(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xba4a
movq %rax, %rdi
callq 0x4d4d
jmp 0xba47
jmp 0xba42
jmp 0xba42
jmp 0xba47
jmp 0xb9f6
jmp 0xb9f6
jmp 0xb9f6
jmp 0xba47
movq %rax, %rbx
movq -0x128(%rbp), %rdi
testq %rdi, %rdi
je 0xb9e0
callq 0x6810
jmp 0xb9e0
jmp 0xba47
jmp 0xba47
jmp 0xb9f6
movq %rax, %rbx
movq -0x138(%rbp), %rdi
testq %rdi, %rdi
je 0xba18
callq 0x6810
jmp 0xba18
jmp 0xba47
jmp 0xba47
jmp 0xba47
jmp 0xba47
jmp 0xba47
jmp 0xba47
movq %rax, %rbx
movq -0x148(%rbp), %rdi
testq %rdi, %rdi
je 0xba2d
callq 0x6810
jmp 0xba2d
jmp 0xba47
jmp 0xba47
movq %rax, %rbx
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0xba4a
jmp 0xba39
jmp 0xb9f6
jmp 0xb9f6
jmp 0xba47
jmp 0xba42
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0xba4a
jmp 0xba39
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0xba4a
jmp 0xba39
movq %rax, %rbx
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0xba4a
jmp 0xba39
jmp 0xba47
jmp 0xba42
movq %rax, %rbx
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0xba4a
callq 0x6810
jmp 0xba4a
jmp 0xba47
movq %rax, %rbx
jmp 0xba82
movq %rax, %rbx
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0xba63
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x4280
movq 0xd54e(%rip), %rsi      # 0x18fb8
leaq -0x348(%rbp), %rdi
callq 0x4310
leaq -0x2d0(%rbp), %rdi
callq 0x40b0
leaq -0x100(%rbp), %rdi
callq 0xcbf2
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0xbab0
movq -0x180(%rbp), %rsi
incq %rsi
callq 0x4280
movq %rbx, %rdi
callq 0x4400