// File: /workspace/github_cpp_makefile_star2_O2/4n6ist[P]usn_analytics/lib/usnjrnl.cpp
// Function: UsnJrnl::CheckRecords()
int UsnJrnl::CheckRecords() {
  
  uint64_t i,j;
  uint16_t rec_cnt;
  double time_taken;
  uint64_t progress = usn_set.size() / 20;
  uint64_t rel_ts; // relative timestamp
  vector<uint64_t> skip_set;
  for(i=0; i+1 < usn_set.size(); i++) {
    
    if (i+1 > progress) {
  	  printf(".");
      progress += usn_set.size() / 20;
    }

    // if current record already processed then skip
    if (find(skip_set.begin(), skip_set.end(), i) != skip_set.end()) {
      skip_set.erase(remove(skip_set.begin(), skip_set.end(), i), skip_set.end());
      continue;
    }

    UsnRecord* ur_base = new UsnRecord(fp_in);    
    ur_base->ReadParseRecord(usn_table[usn_set[i]]);
    rec_cnt = 1;
    time_taken = 0;
    
    // DELETE|CLOSE or DELETE|TRANSACT|CLOSE - don't pack
    if (ur_base->usn_record.Reason == (DELETE|CLOSE) || ur_base->usn_record.Reason == (DELETE|TRANSACT|CLOSE)) { 
      UsnMain* um = new UsnMain();
      um->StoreRecord(ur_base, rec_cnt, time_taken);
      usnmain_set.push_back(*um);
      delete um, ur_base;
      continue;
    }

    // if next record already processed then skip
    j=1;
    while(find(skip_set.begin(), skip_set.end(), i+j) != skip_set.end())
      j++;
    
    UsnRecord* ur_next = new UsnRecord(fp_in);    
	  ur_next->ReadParseRecord(usn_table[usn_set[i+j]]);

    // SECURITY -> SECURITY|CLOSE - finish packing
    if ((ur_base->usn_record.Reason == SECURITY) && (ur_next->usn_record.Reason == (SECURITY|CLOSE))) {
      rec_cnt++;
      time_taken += double(ur_next->usn_record.TimeStamp - ur_base->usn_record.TimeStamp) / 10000000; // 1s
      ur_base->usn_record.Reason |= ur_next->usn_record.Reason;
      ur_base->usn_record.FileAttributes |= ur_next->usn_record.FileAttributes;
      UsnMain* um = new UsnMain();
      um->StoreRecord(ur_base, rec_cnt, time_taken);
      usnmain_set.push_back(*um);
      skip_set.push_back(i+j);
      delete um, ur_next, ur_base;
      continue;
    }

    // OLDNAME -> NEWNAME - determine RENAME or MOVE and finish packing
    if ((ur_base->usn_record.Reason & OLDNAME) && (ur_next->usn_record.Reason & NEWNAME)) {
      if (ur_base->file_name == ur_next->file_name) {
        ur_base->usn_record.Reason = MOVE;
        ur_base->file_name += " (" + to_string(ur_base->pid) + " -> " + to_string(ur_next->pid) + ")";
      }
      else {
        ur_base->usn_record.Reason = RENAME;
        ur_base->file_name += " -> " + ur_next->file_name;
      }
      rec_cnt++;
      time_taken += double(ur_next->usn_record.TimeStamp - ur_base->usn_record.TimeStamp) / 10000000;
      ur_base->usn_record.FileAttributes |= ur_next->usn_record.FileAttributes;
      skip_set.push_back(i+j);
      // OLDNAME -> NEWNAME -> NEWNAME|CLOSE - also pack
      rel_ts = ur_next->usn_record.TimeStamp;
      ur_next->ReadParseRecord(usn_table[usn_set[i+j+1]]);
      if (ur_next->usn_record.Reason == (NEWNAME|CLOSE)) {
        ur_base->usn_record.FileAttributes |= ur_next->usn_record.FileAttributes;
        rec_cnt++;
        time_taken += double(ur_next->usn_record.TimeStamp - rel_ts) / 10000000;
        skip_set.push_back(i+j+1);
      }    
      UsnMain* um = new UsnMain();
      um->StoreRecord(ur_base, rec_cnt, time_taken);
      usnmain_set.push_back(*um);
      delete um, ur_next, ur_base;
      continue;
    }
    
    rel_ts = ur_base->usn_record.TimeStamp;
    map<string, uint16_t> filename_vote;
    filename_vote[ur_base->file_name] = 1;
    
    // main pack process
    while(ur_next->usn_record.TimeStamp - rel_ts < 10000000) { // 1s
      if(ur_base->cid == ur_next->cid) { // check if next record is the same id and packable
        // count filename because of garbage exclusion
        if(filename_vote.find(ur_next->file_name) == filename_vote.end())
          filename_vote[ur_next->file_name] = 1;
        else 
          filename_vote[ur_next->file_name]++;
        if (ur_next->usn_record.Reason & (OLDNAME|NEWNAME)) // stop if next operation includes RENAME 
          break;
        rec_cnt++;
        time_taken += double(ur_next->usn_record.TimeStamp - rel_ts) / 10000000;
        ur_base->usn_record.Reason |= ur_next->usn_record.Reason;
        ur_base->usn_record.FileAttributes |= ur_next->usn_record.FileAttributes;
        rel_ts = ur_next->usn_record.TimeStamp;
        skip_set.push_back(i+j);
        if ((ur_next->usn_record.Reason & DELETE) && (ur_next->usn_record.Reason & CLOSE)) // finish if next operation includes DELETE|CLOSE
          break;
      } // skip checking procedure when it doesn't exist relevant record for faster processing
      else if (usnmain_set.size() > 0 && rec_cnt == usnmain_set.back().rec_cnt && ur_base->pid == usnmain_set.back().pid
        && ur_base->usn_record.Reason == usnmain_set.back().reasons_i && ur_base->usn_record.FileAttributes == usnmain_set.back().attrs_i) {
        if (rec_cnt == usnmain_set[usnmain_set.size()-2].rec_cnt && usnmain_set[usnmain_set.size()-2].pid == ur_base->pid
          && ur_base->usn_record.Reason == usnmain_set[usnmain_set.size()-2].reasons_i  && ur_base->usn_record.FileAttributes == usnmain_set[usnmain_set.size()-2].attrs_i) {
          break;
        }
      }
      j++;
      while(find(skip_set.begin(), skip_set.end(), i+j) != skip_set.end())
        j++;
      ur_next->ReadParseRecord(usn_table[usn_set[i+j]]);
    }

    int c=0;
    for(auto x: filename_vote) {
      if(x.second > c) {
        ur_base->file_name = x.first;
        c = x.second;
      }
    }
    // current record is the same pattern as previous record then update last record
    if(usnmain_set.size() > 0 && ur_base->cid == usnmain_set.back().cid && ur_base->pid == usnmain_set.back().pid 
      && ur_base->usn_record.Reason == usnmain_set.back().reasons_i && ur_base->usn_record.FileAttributes == usnmain_set.back().attrs_i) {
      usnmain_set.back().rec_cnt += rec_cnt;
      usnmain_set.back().time_taken = double(ur_base->usn_record.TimeStamp - usnmain_set.back().timestamp_i) / 10000000 + time_taken;
    } else { // not the same then push
      UsnMain* um = new UsnMain();
      um->StoreRecord(ur_base, rec_cnt, time_taken);
      usnmain_set.push_back(*um);
      delete um, ur_next, ur_base;
    }
  }
  // Todo: should process last record even if it's isolated 
  printf("Done\n");
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movq 0x28(%rbx), %rsi
movq %rsi, %rax
subq %rdi, %rax
sarq $0x3, %rax
xorl %ecx, %ecx
pushq $0x14
popq %r13
xorl %edx, %edx
divq %r13
xorpd %xmm0, %xmm0
leaq 0x30(%rsp), %rdx
andq $0x0, 0x10(%rdx)
movapd %xmm0, (%rdx)
leaq 0x68(%rbx), %rdx
movq %rdx, 0x58(%rsp)
leaq 0x50(%rbx), %rdx
movq %rdx, 0x50(%rsp)
leaq 0xa0(%rsp), %r15
movq %rbx, 0x18(%rsp)
subq %rdi, %rsi
movq %rcx, 0x8(%rsp)
incq %rcx
sarq $0x3, %rsi
cmpq %rsi, %rcx
jae 0x4511
cmpq %rax, %rcx
jbe 0x3c96
pushq $0x2e
popq %rdi
movq %rax, %r14
callq 0x3370
movq 0x28(%rbx), %rax
subq 0x20(%rbx), %rax
sarq $0x3, %rax
xorl %edx, %edx
divq %r13
addq %rax, %r14
movq %r14, 0x90(%rsp)
jmp 0x3c9e
movq %rax, 0x90(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x82e4
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
je 0x3ce2
movq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x8371
movq 0x38(%rsp), %rdx
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x711e
jmp 0x3d77
movl $0x80, %edi
callq 0x3260
movq %rax, %rbp
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x9ad4
movq 0x8(%rsp), %rsi
shlq $0x3, %rsi
addq 0x20(%rbx), %rsi
movq 0x58(%rsp), %rdi
callq 0x70ce
movq (%rax), %rsi
movq %rbp, %rdi
callq 0x9cf6
movl 0x38(%rbp), %eax
movl $0x400000, %ecx         # imm = 0x400000
orl %ecx, %eax
cmpl $0x80400200, %eax       # imm = 0x80400200
jne 0x3d94
movl $0xca, %edi
callq 0x3260
movq %rax, %r14
movq %rax, %rdi
callq 0x9f9a
xorpd %xmm0, %xmm0
movq %r14, %rdi
movq %rbp, %rsi
pushq $0x1
popq %rdx
callq 0xa09e
movq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x7124
movq %r14, %rdi
callq 0x7154
movl $0xca, %esi
movq %r14, %rdi
callq 0x3270
movq 0x8(%rsp), %rcx
incq %rcx
movq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rsi
movq 0x90(%rsp), %rax
jmp 0x3c50
movq 0x38(%rsp), %rsi
pushq $0x10
popq %r14
pushq $0x1
popq %r13
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rax
addq %r13, %rax
movq %rax, 0x60(%rsp)
leaq 0x60(%rsp), %rdx
callq 0x82e4
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
je 0x3dd0
incq %r13
addq $0x8, %r14
jmp 0x3da1
movl $0x80, %edi
callq 0x3260
movq %rax, %r12
movq 0x18(%rsp), %rbx
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x9ad4
movq 0x8(%rsp), %rax
shlq $0x3, %rax
addq 0x20(%rbx), %rax
leaq (%r14,%rax), %rsi
addq $-0x8, %rsi
movq 0x58(%rsp), %rdi
callq 0x70ce
movq (%rax), %rsi
movq %r12, %rdi
callq 0x9cf6
movl 0x38(%rbp), %eax
movl %eax, %edx
xorl $0x800, %edx            # imm = 0x800
movl 0x38(%r12), %ecx
movl %ecx, %esi
xorl $0x80000800, %esi       # imm = 0x80000800
orl %edx, %esi
jne 0x3ef1
movq 0x30(%r12), %rax
subq 0x30(%rbp), %rax
movq %rax, %xmm0
punpckldq 0x81d2(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x81da(%rip), %xmm0     # 0xc030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd 0x81d6(%rip), %xmm1     # 0xc040
movapd %xmm1, 0x20(%rsp)
movl $0x80000800, 0x38(%rbp) # imm = 0x80000800
movl 0x44(%r12), %eax
orl %eax, 0x44(%rbp)
movl $0xca, %edi
callq 0x3260
movq 0x18(%rsp), %rbx
movq %rax, %r14
movq %rax, %rdi
callq 0x9f9a
movq %r14, %rdi
movq %rbp, %rsi
pushq $0x2
popq %rdx
movapd 0x20(%rsp), %xmm0
callq 0xa09e
movq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x7124
addq 0x8(%rsp), %r13
movq %r13, 0x60(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x8654
movq %r14, %rdi
callq 0x7154
movl $0xca, %esi
movq %r14, %rdi
callq 0x3270
pushq $0x14
popq %r13
jmp 0x3d77
btl $0xc, %eax
setae %al
btl $0xd, %ecx
setae %cl
orb %al, %cl
je 0x414d
andl $0x0, 0x68(%rsp)
andq $0x0, 0x70(%rsp)
leaq 0x68(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %rax, 0x80(%rsp)
andq $0x0, 0x88(%rsp)
movq 0x30(%rbp), %r14
movq %rbp, %rsi
addq $0x60, %rsi
leaq 0x60(%rsp), %rdi
movq %rsi, 0x98(%rsp)
callq 0x72f8
movw $0x1, (%rax)
movq %r12, %rax
addq $0x60, %rax
movq %rax, 0x48(%rsp)
movw $0x1, %ax
movl %eax, 0x14(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x30(%r12), %rax
subq %r14, %rax
cmpq $0x98967f, %rax         # imm = 0x98967F
ja 0x4254
movl 0x54(%rbp), %eax
cmpl 0x54(%r12), %eax
jne 0x3fc0
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq 0x48(%rsp), %rsi
callq 0x8b14
leaq 0x68(%rsp), %rcx
cmpq %rcx, %rax
je 0x403a
movq %rbx, %rdi
movq 0x48(%rsp), %rsi
callq 0x72f8
incw (%rax)
jmp 0x404c
movq 0x18(%rsp), %rcx
movq 0x50(%rcx), %rax
movq 0x58(%rcx), %rdx
movq %rdx, %rcx
subq %rax, %rcx
je 0x4032
movl 0x14(%rsp), %esi
cmpw -0xc2(%rdx), %si
jne 0x4032
movl 0x5a(%rbp), %esi
cmpl -0x24(%rdx), %esi
jne 0x4032
movl 0x38(%rbp), %r8d
cmpl -0x70(%rdx), %r8d
jne 0x4032
movl 0x44(%rbp), %edi
cmpl -0x4c(%rdx), %edi
jne 0x4032
movl 0x14(%rsp), %edx
cmpw -0x18c(%rax,%rcx), %dx
jne 0x4032
cmpl %esi, -0xee(%rax,%rcx)
jne 0x4032
cmpl -0x13a(%rax,%rcx), %r8d
jne 0x4032
movq %r14, %rbx
cmpl -0x116(%rax,%rcx), %edi
jne 0x40dd
jmp 0x4254
movq %r14, %rbx
jmp 0x40dd
movq %rbx, %rdi
movq 0x48(%rsp), %rsi
callq 0x72f8
movw $0x1, (%rax)
movl 0x38(%r12), %eax
testw $0x3000, %ax            # imm = 0x3000
jne 0x4254
orl %eax, 0x38(%rbp)
movl 0x44(%r12), %eax
orl %eax, 0x44(%rbp)
movq 0x30(%r12), %rbx
movq 0x8(%rsp), %rax
addq %r13, %rax
movq %rax, 0xa0(%rsp)
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x8654
movq %rbx, %rax
subq %r14, %rax
movq %rax, %xmm0
punpckldq 0x7f85(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x7f8d(%rip), %xmm0     # 0xc030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd 0x7f89(%rip), %xmm1     # 0xc040
movsd 0x20(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
incl 0x14(%rsp)
movl 0x38(%r12), %eax
notl %eax
testl $0x80000200, %eax       # imm = 0x80000200
je 0x4254
movq 0x38(%rsp), %rsi
leaq (,%r13,8), %r14
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rax
addq %r13, %rax
incq %rax
movq %rax, 0xa0(%rsp)
movq %r15, %rdx
callq 0x82e4
movq 0x38(%rsp), %rsi
addq $0x8, %r14
incq %r13
cmpq %rsi, %rax
jne 0x40ea
movq 0x8(%rsp), %rsi
shlq $0x3, %rsi
movq 0x18(%rsp), %rax
addq 0x20(%rax), %rsi
addq %r14, %rsi
movq 0x58(%rsp), %rdi
callq 0x70ce
movq (%rax), %rsi
movq %r12, %rdi
callq 0x9cf6
movq %rbx, %r14
jmp 0x3f6d
movq %rbp, %rdi
addq $0x60, %rdi
movq %r12, %rsi
addq $0x60, %rsi
movq %rdi, 0x20(%rsp)
movq %rsi, 0x48(%rsp)
callq 0x718f
testb %al, %al
leaq 0x60(%rsp), %rbx
je 0x4390
movl $0x2000000, 0x38(%rbp)  # imm = 0x2000000
movl 0x5a(%rbp), %esi
leaq 0xc8(%rsp), %rdi
callq 0x7243
leaq 0x128(%rsp), %rbx
movq %rbx, %rdi
leaq 0x7ff6(%rip), %rsi      # 0xc196
leaq 0xc8(%rsp), %rdx
callq 0x721f
leaq 0xe8(%rsp), %rdi
movq %rbx, %rsi
leaq 0x7fda(%rip), %rdx      # 0xc199
callq 0x7031
movl 0x5a(%r12), %esi
leaq 0x108(%rsp), %rbx
movq %rbx, %rdi
callq 0x7243
movq %r15, %rdi
leaq 0xe8(%rsp), %rsi
movq %rbx, %rdx
callq 0x71b8
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x8930(%rip), %rdx      # 0xcb2e
callq 0x7031
movq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x34e0
movq %rbx, %rdi
callq 0x3100
movq %r15, %rdi
callq 0x3100
leaq 0x108(%rsp), %rdi
callq 0x3100
leaq 0xe8(%rsp), %rdi
callq 0x3100
leaq 0x128(%rsp), %rdi
callq 0x3100
leaq 0xc8(%rsp), %rdi
jmp 0x43bb
xorl %ebx, %ebx
movq 0x78(%rsp), %r12
pushq $0x14
popq %r13
movq 0x98(%rsp), %r14
leaq 0x68(%rsp), %rax
cmpq %rax, %r12
je 0x42b2
leaq 0x20(%r12), %rsi
movq %r15, %rdi
callq 0x735e
movzwl 0xc0(%rsp), %eax
cmpl %eax, %ebx
jge 0x429d
movq %r14, %rdi
movq %r15, %rsi
callq 0x3150
movzwl 0xc0(%rsp), %ebx
movq %r15, %rdi
callq 0x3100
movq %r12, %rdi
callq 0x3180
movq %rax, %r12
jmp 0x4267
movq 0x18(%rsp), %rbx
movq 0x58(%rbx), %rax
cmpq 0x50(%rbx), %rax
je 0x4334
movl 0x54(%rbp), %ecx
cmpl -0x28(%rax), %ecx
jne 0x4334
movl 0x5a(%rbp), %ecx
cmpl -0x24(%rax), %ecx
jne 0x4334
movl 0x38(%rbp), %ecx
cmpl -0x70(%rax), %ecx
jne 0x4334
movl 0x44(%rbp), %ecx
cmpl -0x4c(%rax), %ecx
jne 0x4334
movl 0x14(%rsp), %ecx
addw %cx, -0xc2(%rax)
movq 0x30(%rbp), %rcx
subq -0xc0(%rax), %rcx
movq %rcx, %xmm0
punpckldq 0x7d1c(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x7d24(%rip), %xmm0     # 0xc030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd 0x7d20(%rip), %xmm1     # 0xc040
movsd 0x20(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rax)
jmp 0x4381
movl $0xca, %edi
callq 0x3260
movq %rax, %r12
movq %rax, %rdi
callq 0x9f9a
movzwl 0x14(%rsp), %edx
movq %r12, %rdi
movq %rbp, %rsi
movsd 0x20(%rsp), %xmm0
callq 0xa09e
movq 0x50(%rsp), %rdi
movq %r12, %rsi
callq 0x7124
movq %r12, %rdi
callq 0x7154
movl $0xca, %esi
movq %r12, %rdi
callq 0x3270
leaq 0x60(%rsp), %rdi
callq 0x7844
jmp 0x3d77
movl $0x1000000, 0x38(%rbp)  # imm = 0x1000000
movq %rbx, %rdi
leaq 0x7df8(%rip), %rsi      # 0xc199
movq 0x48(%rsp), %rdx
callq 0x7282
movq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x34e0
movq %rbx, %rdi
callq 0x3100
movq 0x30(%r12), %rax
subq 0x30(%rbp), %rax
movq %rax, %xmm0
punpckldq 0x7c4a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x7c52(%rip), %xmm0     # 0xc030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movl 0x44(%r12), %eax
orl %eax, 0x44(%rbp)
divsd 0x7c46(%rip), %xmm1     # 0xc040
movapd %xmm1, 0x20(%rsp)
movq 0x8(%rsp), %rax
addq %r13, %rax
movq %rax, 0x60(%rsp)
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x8654
movq 0x30(%r12), %rbx
movq 0x8(%rsp), %rsi
shlq $0x3, %rsi
movq 0x18(%rsp), %rax
addq 0x20(%rax), %rsi
addq %r14, %rsi
movq 0x58(%rsp), %rdi
callq 0x70ce
movq (%rax), %rsi
movq %r12, %rdi
callq 0x9cf6
cmpl $0x80002000, 0x38(%r12) # imm = 0x80002000
jne 0x44c7
movl 0x44(%r12), %eax
orl %eax, 0x44(%rbp)
movq 0x30(%r12), %r14
movq 0x8(%rsp), %rax
addq %r13, %rax
incq %rax
movq %rax, 0x60(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x8654
subq %rbx, %r14
movq %r14, %xmm0
punpckldq 0x7b90(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x7b98(%rip), %xmm0     # 0xc030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd 0x7b94(%rip), %xmm1     # 0xc040
movapd 0x20(%rsp), %xmm0
addsd %xmm1, %xmm0
movapd %xmm0, 0x20(%rsp)
movw $0x3, %r12w
pushq $0x14
popq %r13
jmp 0x44d0
pushq $0x14
popq %r13
movw $0x2, %r12w
movl $0xca, %edi
callq 0x3260
movq 0x18(%rsp), %rbx
movq %rax, %r14
movq %rax, %rdi
callq 0x9f9a
movzwl %r12w, %edx
movq %r14, %rdi
movq %rbp, %rsi
movapd 0x20(%rsp), %xmm0
callq 0xa09e
movq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x7124
jmp 0x3d62
leaq 0x8118(%rip), %rdi      # 0xc630
callq 0x33f0
leaq 0x30(%rsp), %rdi
callq 0x790c
xorl %eax, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x456b
jmp 0x4631
movq %rax, %rbx
jmp 0x459f
jmp 0x4631
movq %rax, %rbx
jmp 0x4578
movq %rax, %rbx
jmp 0x4592
movq %rax, %rbx
jmp 0x4585
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3100
leaq 0xa0(%rsp), %rdi
callq 0x3100
leaq 0x108(%rsp), %rdi
callq 0x3100
leaq 0xe8(%rsp), %rdi
callq 0x3100
leaq 0x128(%rsp), %rdi
callq 0x3100
leaq 0xc8(%rsp), %rdi
callq 0x3100
jmp 0x4643
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x45a7
jmp 0x4631
movq %rax, %rbx
movl $0xca, %esi
movq %r12, %rdi
callq 0x3270
jmp 0x4639
jmp 0x4631
jmp 0x45f0
jmp 0x4636
jmp 0x4631
jmp 0x45f0
jmp 0x4636
jmp 0x4631
movq %rax, %rbx
movl $0x80, %esi
movq %r12, %rdi
jmp 0x4608
jmp 0x4631
jmp 0x4636
jmp 0x4636
movq %rax, %rbx
movl $0xca, %esi
movq %r14, %rdi
jmp 0x4608
movq %rax, %rbx
movl $0x80, %esi
movq %rbp, %rdi
callq 0x3270
jmp 0x4643
jmp 0x4631
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x3100
jmp 0x4639
jmp 0x4631
jmp 0x4631
jmp 0x4631
jmp 0x4636
jmp 0x4631
jmp 0x4631
jmp 0x4636
movq %rax, %rbx
jmp 0x4643
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x7844
leaq 0x30(%rsp), %rdi
callq 0x790c
movq %rbx, %rdi
callq 0x3480
nop