LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::printNumbers(std::ostream&)
void Rubik::printNumbers(std::ostream& os){
   os << "                     _______________ \n";
   os << "                     | 01 | 02 | 03 |\n";
   os << "                     _______________ \n";
   os << "                     | 04 | 05 | 06 |\n";
   os << "                     _______________ \n";
   os << "                     | 07 | 08 | 09 |\n";
   os << "    _________________________________________________________________ \n";
   os << "    || 10 | 11 | 12 || 19 | 20 | 21 || 28 | 29 | 30 || 37 | 38 | 39 ||\n";
   os << "    _________________________________________________________________ \n";
   os << "    || 13 | 14 | 15 || 22 | 23 | 24 || 31 | 32 | 33 || 40 | 41 | 42 ||\n";
   os << "    _________________________________________________________________ \n";
   os << "    || 16 | 17 | 18 || 25 | 26 | 27 || 34 | 35 | 36 || 43 | 44 | 45 ||\n";
   os << "    _________________________________________________________________ \n";
   os << "                     | 46 | 47 | 48 |\n";
   os << "                     _______________ \n";
   os << "                     | 49 | 50 | 51 |\n";
   os << "                     _______________ \n";
   os << "                     | 52 | 53 | 54 |\n";
   os << "                     _______________ "<< endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x4db6(%rip), %rsi      # 0x181dd
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4dcd(%rip), %rsi      # 0x18204
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4d96(%rip), %rsi      # 0x181dd
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4dd4(%rip), %rsi      # 0x1822b
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4d76(%rip), %rsi      # 0x181dd
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4ddb(%rip), %rsi      # 0x18252
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4df2(%rip), %rsi      # 0x18279
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4e2a(%rip), %rsi      # 0x182c1
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4dd2(%rip), %rsi      # 0x18279
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4e52(%rip), %rsi      # 0x18309
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4db2(%rip), %rsi      # 0x18279
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4e7a(%rip), %rsi      # 0x18351
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4d92(%rip), %rsi      # 0x18279
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4ea2(%rip), %rsi      # 0x18399
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4cd6(%rip), %rsi      # 0x181dd
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4ea9(%rip), %rsi      # 0x183c0
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4cb6(%rip), %rsi      # 0x181dd
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4eb0(%rip), %rsi      # 0x183e7
callq 0x2230
movq -0x8(%rbp), %rdi
leaq 0x4ec7(%rip), %rsi      # 0x1840e
callq 0x2230
movq %rax, %rdi
movq 0x9a62(%rip), %rsi      # 0x1cfb8
callq 0x2260
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::readSticker(char&, std::istream&)
void Rubik::readSticker(char& c, std::istream& is){
   char caracter;
   c = 'f';
   do{
      is >> caracter;
      if( ( tolower(caracter) == 'w') || ( caracter == '1' ) )
         c = 'w';
      else if( ( tolower(caracter) == 'o') || ( caracter == '2' ) )
         c = 'o';
      else if( ( tolower(caracter) == 'g') || ( caracter == '3' ) )
         c = 'g';
      else if( ( tolower(caracter) == 'r') || ( caracter == '4' ) )
         c = 'r';
      else if( ( tolower(caracter) == 'l') || ( caracter == '5' ) )
         c = 'l';
      else if( ( tolower(caracter) == 'y') || ( caracter == '6' ) )
         c = 'y';
      else
         cout << "Invalid char. Try again:\n";
   }while (c == 'f');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb $0x66, (%rax)
movq -0x18(%rbp), %rdi
leaq -0x19(%rbp), %rsi
callq 0x2310
movsbl -0x19(%rbp), %edi
callq 0x2340
cmpl $0x77, %eax
je 0x135af
movsbl -0x19(%rbp), %eax
cmpl $0x31, %eax
jne 0x135bb
movq -0x10(%rbp), %rax
movb $0x77, (%rax)
jmp 0x1367b
movsbl -0x19(%rbp), %edi
callq 0x2340
cmpl $0x6f, %eax
je 0x135d2
movsbl -0x19(%rbp), %eax
cmpl $0x32, %eax
jne 0x135de
movq -0x10(%rbp), %rax
movb $0x6f, (%rax)
jmp 0x13679
movsbl -0x19(%rbp), %edi
callq 0x2340
cmpl $0x67, %eax
je 0x135f5
movsbl -0x19(%rbp), %eax
cmpl $0x33, %eax
jne 0x135fe
movq -0x10(%rbp), %rax
movb $0x67, (%rax)
jmp 0x13677
movsbl -0x19(%rbp), %edi
callq 0x2340
cmpl $0x72, %eax
je 0x13615
movsbl -0x19(%rbp), %eax
cmpl $0x34, %eax
jne 0x1361e
movq -0x10(%rbp), %rax
movb $0x72, (%rax)
jmp 0x13675
movsbl -0x19(%rbp), %edi
callq 0x2340
cmpl $0x6c, %eax
je 0x13635
movsbl -0x19(%rbp), %eax
cmpl $0x35, %eax
jne 0x1363e
movq -0x10(%rbp), %rax
movb $0x6c, (%rax)
jmp 0x13673
movsbl -0x19(%rbp), %edi
callq 0x2340
cmpl $0x79, %eax
je 0x13655
movsbl -0x19(%rbp), %eax
cmpl $0x36, %eax
jne 0x1365e
movq -0x10(%rbp), %rax
movb $0x79, (%rax)
jmp 0x13671
movq 0x9963(%rip), %rdi      # 0x1cfc8
leaq 0x4e62(%rip), %rsi      # 0x184ce
callq 0x2230
jmp 0x13673
jmp 0x13675
jmp 0x13677
jmp 0x13679
jmp 0x1367b
jmp 0x1367d
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x66, %eax
je 0x1358b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::solve(std::vector<char, std::allocator<char>>&, char const&)
void Rubik::solve(vector<char>& solution, const char &method){
   solution.clear();
   if (method == 'B'){ // Beginners method
     firstStep(solution); // White face
     secondStep(solution); // Middle step
     thirdStep(solution); // Bottom face
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x16030
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x42, %eax
jne 0x14518
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5df0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xbd00
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xea90
addq $0x20, %rsp
popq %rbp
retq
nop
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::fileExample()
void Rubik::fileExample(){
  Rubik rubik = Rubik::randomRubik();
  cout << "Input file example:";
  cout << rubik;
  cout << "\nThis file represents this Rubik's cube:\n";
  rubik.printAll();
  cout << "\n\nLetters can be in capital letters, lowercase or number in {1, ... , 6}.";
  cout << "\nEach line is a side of Rubik's cube, the program read from ";
  cout << "left to right and from top to bottom without spaces, tabulator ";
  cout << "or new lines.";
  cout << "\nEach side is read first top three colours, then middle ones, and down colours:";
  cout << endl << "\t1 2 3\n\t4 5 6\n\t7 8 9" << endl;
  cout << "Order: top, left, frontal, right, back and down faces." << endl;
  cout << "Numbers of sequence with green side in front of you are:\n";
  Rubik::printNumbers(cout);
  cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq -0x36(%rbp), %rdi
callq 0x14660
movq 0x8a90(%rip), %rdi      # 0x1cfc8
leaq 0x38cc(%rip), %rsi      # 0x17e0b
callq 0x2230
movq 0x8a7d(%rip), %rdi      # 0x1cfc8
leaq -0x36(%rbp), %rsi
callq 0x146a0
movq 0x8a6d(%rip), %rdi      # 0x1cfc8
leaq 0x38bd(%rip), %rsi      # 0x17e1f
callq 0x2230
leaq -0x36(%rbp), %rdi
callq 0x136a0
movq 0x8a51(%rip), %rdi      # 0x1cfc8
leaq 0x38cb(%rip), %rsi      # 0x17e49
callq 0x2230
movq 0x8a3e(%rip), %rdi      # 0x1cfc8
leaq 0x3902(%rip), %rsi      # 0x17e93
callq 0x2230
movq 0x8a2b(%rip), %rdi      # 0x1cfc8
leaq 0x392c(%rip), %rsi      # 0x17ed0
callq 0x2230
movq 0x8a18(%rip), %rdi      # 0x1cfc8
leaq 0x3959(%rip), %rsi      # 0x17f10
callq 0x2230
movq 0x8a05(%rip), %rdi      # 0x1cfc8
leaq 0x3954(%rip), %rsi      # 0x17f1e
callq 0x2230
movq 0x89f2(%rip), %rdi      # 0x1cfc8
movq 0x89db(%rip), %rsi      # 0x1cfb8
callq 0x2260
movq %rax, %rdi
leaq 0x3982(%rip), %rsi      # 0x17f6e
callq 0x2230
movq %rax, %rdi
movq 0x89bd(%rip), %rsi      # 0x1cfb8
callq 0x2260
movq 0x89c1(%rip), %rdi      # 0x1cfc8
leaq 0x3975(%rip), %rsi      # 0x17f83
callq 0x2230
movq %rax, %rdi
movq 0x899b(%rip), %rsi      # 0x1cfb8
callq 0x2260
movq 0x899f(%rip), %rdi      # 0x1cfc8
leaq 0x398a(%rip), %rsi      # 0x17fba
callq 0x2230
movq 0x898c(%rip), %rdi      # 0x1cfc8
callq 0x13410
movq 0x8980(%rip), %rdi      # 0x1cfc8
movq 0x8969(%rip), %rsi      # 0x1cfb8
callq 0x2260
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::exportSolution(std::ostream&) const
void Rubik::exportSolution(std::ostream& os) const{
   vector<char> solution;
   Rubik aux = *this;
   aux.solve(solution);

   for(unsigned int i=0; i<solution.size(); ++i)
      os << solution[i];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3900
movq -0x80(%rbp), %rsi
leaq -0x5e(%rbp), %rdi
callq 0x11b70
jmp 0x14e03
movb $0x42, -0x6d(%rbp)
leaq -0x5e(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x6d(%rbp), %rdx
callq 0x144c0
jmp 0x14e1a
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movq %rax, -0x88(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x39d0
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
jae 0x14e91
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movl -0x74(%rbp), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x39f0
movq -0x90(%rbp), %rdi
movsbl (%rax), %esi
callq 0x22e0
jmp 0x14e6d
jmp 0x14e6f
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x14e21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3a10
jmp 0x14ea3
leaq -0x28(%rbp), %rdi
callq 0x3a10
addq $0x90, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x23c0
nopl (%rax)
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::printColour(char const&) const
void Rubik::printColour(const char& c) const{
   char colour = tolower(c);

   if (colour == 'w')
      printf(WHITE "W" RESET);
   else if (colour == 'o')
      printf(BLACK "O" RESET);
   else if (colour == 'g')
      printf(GREEN "G" RESET);
   else if (colour == 'r')
      printf(RED "R" RESET);
   else if (colour == 'l')
      printf(BLUE "L" RESET);
   else if (colour == 'y')
      printf(YELLOW "Y" RESET);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x2340
movb %al, -0x11(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x77, %eax
jne 0x1522b
leaq 0x2f7c(%rip), %rdi      # 0x1819b
movb $0x0, %al
callq 0x2040
jmp 0x152b0
movsbl -0x11(%rbp), %eax
cmpl $0x6f, %eax
jne 0x15244
leaq 0x2f6b(%rip), %rdi      # 0x181a6
movb $0x0, %al
callq 0x2040
jmp 0x152ae
movsbl -0x11(%rbp), %eax
cmpl $0x67, %eax
jne 0x1525d
leaq 0x2f5d(%rip), %rdi      # 0x181b1
movb $0x0, %al
callq 0x2040
jmp 0x152ac
movsbl -0x11(%rbp), %eax
cmpl $0x72, %eax
jne 0x15276
leaq 0x2f4f(%rip), %rdi      # 0x181bc
movb $0x0, %al
callq 0x2040
jmp 0x152aa
movsbl -0x11(%rbp), %eax
cmpl $0x6c, %eax
jne 0x1528f
leaq 0x2f41(%rip), %rdi      # 0x181c7
movb $0x0, %al
callq 0x2040
jmp 0x152a8
movsbl -0x11(%rbp), %eax
cmpl $0x79, %eax
jne 0x152a6
leaq 0x2f33(%rip), %rdi      # 0x181d2
movb $0x0, %al
callq 0x2040
jmp 0x152a8
jmp 0x152aa
jmp 0x152ac
jmp 0x152ae
jmp 0x152b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::getCenter(int const&) const
Center Rubik::getCenter(const int& position) const{
   Center ret;
   ret.center = 'f';

   if (position >= 0 && position < 6)
      ret.center = center[position].center;

   return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $0x66, -0x1(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jl 0x1591b
movq -0x18(%rbp), %rax
cmpl $0x6, (%rax)
jge 0x1591b
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::getEdge(int const&) const
Edge Rubik::getEdge(const int& position) const{
   Edge ret;
   ret.up = ret.down = 'f';

   if (position >= 0 && position < 12){
      ret.up   = edge[position].up;
      ret.down = edge[position].down;
   }

   return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $0x66, -0x1(%rbp)
movb $0x66, -0x2(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jl 0x1596e
movq -0x18(%rbp), %rax
cmpl $0xc, (%rax)
jge 0x1596e
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movb 0x6(%rax,%rcx,2), %cl
movb %cl, -0x2(%rbp)
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movb 0x7(%rax,%rcx,2), %al
movb %al, -0x1(%rbp)
movw -0x2(%rbp), %ax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::getCorner(int const&) const
Corner Rubik::getCorner(const int& position) const{
   Corner ret;
   ret.up = ret.left = ret.right = 'f';

   if (position >= 0 && position < 8){
      ret.up    = corner[position].up;
      ret.left  = corner[position].left;
      ret.right = corner[position].right;
   }

   return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movb $0x66, -0x1(%rbp)
movb $0x66, -0x2(%rbp)
movb $0x66, -0x3(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jl 0x15a03
movq -0x18(%rbp), %rax
cmpl $0x8, (%rax)
jge 0x15a03
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1e, %rcx
movq -0x18(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0x3, %rdx, %rdx
addq %rdx, %rcx
movb (%rcx), %cl
movb %cl, -0x3(%rbp)
movq %rax, %rcx
addq $0x1e, %rcx
movq -0x18(%rbp), %rdx
movslq (%rdx), %rdx
imulq $0x3, %rdx, %rdx
addq %rdx, %rcx
movb 0x1(%rcx), %cl
movb %cl, -0x2(%rbp)
addq $0x1e, %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
imulq $0x3, %rcx, %rcx
addq %rcx, %rax
movb 0x2(%rax), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
movb %al, -0x1a(%rbp)
movw -0x3(%rbp), %ax
movw %ax, -0x1c(%rbp)
movzbl -0x1a(%rbp), %ecx
shll $0x10, %ecx
movzwl -0x1c(%rbp), %eax
orl %ecx, %eax
popq %rbp
retq
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: guide()
void guide(){
   cout << "\tThe rubik's cube will be read from file or keyboard.\n";
   cout << "\tThe standard position for the rubik's cube is: green side in front of you and white side up.\n";

   cout << "\t-W (WHITE, top side)\t-O (ORANGE, left side)\t-G (GREEN, front side)\n";
   cout << "\t-R (RED, right side)" << "\t-L (BLUE, back side)" << "\t-Y (YELLOW, below side)\n";
   cout << "\tIf your rubik's cube has different patterns or colours, look at this:\n\t";
   printf (RED "-Example 1: " RESET);
   cout << "If the center of the left side is red, in all stickers you should select orange.\n\t";
   printf (RED "-Example 2: " RESET);
   cout << "If the center of the back side is black, in your black stickers you should select blue.\n";
   cout << "\tThe program will read 54 colours, one side each time.\n";
   
   Rubik::printNumbers(cout);

   cout << "\tYou can use three different options: \n\t";
   printf (WHITE  "W/w/1, " RESET);
   printf (BLACK  "O/o/2"   RESET " (\"orange\"), ");
   printf (GREEN  "G/g/3, " RESET);
   printf (RED    "R/r/4, " RESET);
   printf (BLUE   "L/l/5, " RESET);
   printf (YELLOW "Y/y/6 "  RESET);
   cout << "\n\tYou will be able to change the colours." << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x730d(%rip), %rdi      # 0x1cfc8
leaq 0x289c(%rip), %rsi      # 0x1855e
callq 0x2230
movq 0x72fa(%rip), %rdi      # 0x1cfc8
leaq 0x28c0(%rip), %rsi      # 0x18595
callq 0x2230
movq 0x72e7(%rip), %rdi      # 0x1cfc8
leaq 0x290c(%rip), %rsi      # 0x185f4
callq 0x2230
movq 0x72d4(%rip), %rdi      # 0x1cfc8
leaq 0x293e(%rip), %rsi      # 0x18639
callq 0x2230
movq %rax, %rdi
leaq 0x2945(%rip), %rsi      # 0x1864f
callq 0x2230
movq %rax, %rdi
leaq 0x294c(%rip), %rsi      # 0x18665
callq 0x2230
movq 0x72a3(%rip), %rdi      # 0x1cfc8
leaq 0x2953(%rip), %rsi      # 0x1867f
callq 0x2230
leaq 0x2990(%rip), %rdi      # 0x186c8
movb $0x0, %al
callq 0x2040
movq 0x7282(%rip), %rdi      # 0x1cfc8
leaq 0x2991(%rip), %rsi      # 0x186de
callq 0x2230
leaq 0x29d8(%rip), %rdi      # 0x18731
movb $0x0, %al
callq 0x2040
movq 0x7261(%rip), %rdi      # 0x1cfc8
leaq 0x29d9(%rip), %rsi      # 0x18747
callq 0x2230
movq 0x724e(%rip), %rdi      # 0x1cfc8
leaq 0x2a1f(%rip), %rsi      # 0x187a0
callq 0x2230
movq 0x723b(%rip), %rdi      # 0x1cfc8
callq 0x13410
movq 0x722f(%rip), %rdi      # 0x1cfc8
leaq 0x2a38(%rip), %rsi      # 0x187d8
callq 0x2230
leaq 0x2a55(%rip), %rdi      # 0x18801
movb $0x0, %al
callq 0x2040
leaq 0x2a58(%rip), %rdi      # 0x18812
movb $0x0, %al
callq 0x2040
leaq 0x2a66(%rip), %rdi      # 0x1882e
movb $0x0, %al
callq 0x2040
leaq 0x2a69(%rip), %rdi      # 0x1883f
movb $0x0, %al
callq 0x2040
leaq 0x2a6c(%rip), %rdi      # 0x18850
movb $0x0, %al
callq 0x2040
leaq 0x2a6f(%rip), %rdi      # 0x18861
movb $0x0, %al
callq 0x2040
movq 0x71c8(%rip), %rdi      # 0x1cfc8
leaq 0x2a6a(%rip), %rsi      # 0x18871
callq 0x2230
movq %rax, %rdi
movq 0x71a2(%rip), %rsi      # 0x1cfb8
callq 0x2260
popq %rbp
retq
nopl (%rax)
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: presentation()
void presentation(){
   cout << "\t";
   printf (BT_ON BLUE " #############################################################" RESET "\n");
   cout << "\t -";
   printf (BT_ON "This program solves rubik's cubes 3x3" RESET "\n");
   cout << "\t";
   printf (BT_ON BLUE " #############################################################" RESET "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x719d(%rip), %rdi      # 0x1cfc8
leaq 0x29cd(%rip), %rsi      # 0x187ff
callq 0x2230
leaq 0x2a5d(%rip), %rdi      # 0x1889b
movb $0x0, %al
callq 0x2040
movq 0x717c(%rip), %rdi      # 0x1cfc8
leaq 0x2a95(%rip), %rsi      # 0x188e8
callq 0x2230
leaq 0x2a8d(%rip), %rdi      # 0x188ec
movb $0x0, %al
callq 0x2040
movq 0x715b(%rip), %rdi      # 0x1cfc8
leaq 0x298b(%rip), %rsi      # 0x187ff
callq 0x2230
leaq 0x2a1b(%rip), %rdi      # 0x1889b
movb $0x0, %al
callq 0x2040
popq %rbp
retq
nopl (%rax)
// File: Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: arguments(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void arguments(string name){
	cout << "Usage: " << name << " [option] [<input_file> [<output_file>]]" << endl;
  cout << "Where options are: \n";
  cout << "\t-e\t explanation of valid <input_file> (same format for <output_file>)\n";
  cout << "\t-h\t print this help and exit\n";
  cout << "\t-i\t interactive mode of resolution, without extra arguments\n";
  cout << "\t-MX\t execute movement X(in {U,u,D,d,L,l,R,r,F,f,B,b}) to cube in <input_file> (modified)";
  cout << "\t-m\t explain movements\n";
  cout << "\t-p\t print cube in human-readable format, need <input_file>";
  cout << "\t-r\t random Rubik's cube solution\n";
  cout << "\t-R\t generate a random Rubik's cube\n";
  cout << "\t-s\t show if a Rubik's cube is solved (y[es]/n[o]), need <input_file>" << endl;    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq %rdi, -0x8(%rbp)
movq 0x70d1(%rip), %rdi      # 0x1cfc8
leaq 0x2af8(%rip), %rsi      # 0x189f6
callq 0x2230
movq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
leaq 0x2ae5(%rip), %rsi      # 0x189fe
callq 0x2230
movq %rax, %rdi
movq 0x7090(%rip), %rsi      # 0x1cfb8
callq 0x2260
movq 0x7094(%rip), %rdi      # 0x1cfc8
leaq 0x2aec(%rip), %rsi      # 0x18a27
callq 0x2230
movq 0x7081(%rip), %rdi      # 0x1cfc8
leaq 0x2aee(%rip), %rsi      # 0x18a3c
callq 0x2230
movq 0x706e(%rip), %rdi      # 0x1cfc8
leaq 0x2b23(%rip), %rsi      # 0x18a84
callq 0x2230
movq 0x705b(%rip), %rdi      # 0x1cfc8
leaq 0x2b2f(%rip), %rsi      # 0x18aa3
callq 0x2230
movq 0x7048(%rip), %rdi      # 0x1cfc8
leaq 0x2b5a(%rip), %rsi      # 0x18ae1
callq 0x2230
movq 0x7035(%rip), %rdi      # 0x1cfc8
leaq 0x2ba1(%rip), %rsi      # 0x18b3b
callq 0x2230
movq 0x7022(%rip), %rdi      # 0x1cfc8
leaq 0x2ba6(%rip), %rsi      # 0x18b53
callq 0x2230
movq 0x700f(%rip), %rdi      # 0x1cfc8
leaq 0x2bcf(%rip), %rsi      # 0x18b8f
callq 0x2230
movq 0x6ffc(%rip), %rdi      # 0x1cfc8
leaq 0x2bdf(%rip), %rsi      # 0x18bb2
callq 0x2230
movq 0x6fe9(%rip), %rdi      # 0x1cfc8
leaq 0x2bf1(%rip), %rsi      # 0x18bd7
callq 0x2230
movq %rax, %rdi
movq 0x6fc3(%rip), %rsi      # 0x1cfb8
callq 0x2260
addq $0x10, %rsp
popq %rbp
retq
// File: hkbu-victor[P]SFastLDA/super_fast_final1_d.cpp
// Function: show_help()
void show_help(){
	printf("\nHKBU SuperFast Gibb's sampling for LDA\n");
	printf("\n doc-by-doc LDA modeling\n");
	printf("=====================================\n");
	printf("Command line usage:\n");
	printf("super_fast_final1_d -alpha <double> -beta <double> -ntopics <int> -niters <int> -dfile <string> -seed <int> -ofile <string>\n");
	printf("=====================================\n");
	printf("Parameters \t Type \t\t Descriptions\n");
	printf("-alpha\t\t<double> Hyper-parameter for documents-topic distributions\n");
	printf("-beta\t\t<double> Hyper-parameter for word-topic distributions \n");
	printf("-ntopics\t\t<int> Number of topics \n");
	printf("-niters\t\t<int> Number of Gibbs sampling iterations \n");
	printf("-seed\t\t<int> Random seed \n");
	printf("-dfile\t\t<file> Input training data file \n");
	printf("-ofile\t\t<file> The output WP file and Z file (in text format)\n");
}

// Assembly:
pushq %rax
leaq 0x4da8(%rip), %rdi      # 0x6020
movb $0x0, %al
callq 0x1040
leaq 0x4dc3(%rip), %rdi      # 0x6049
movb $0x0, %al
callq 0x1040
leaq 0x4dd0(%rip), %rdi      # 0x6064
movb $0x0, %al
callq 0x1040
leaq 0x4de9(%rip), %rdi      # 0x608b
movb $0x0, %al
callq 0x1040
leaq 0x4df0(%rip), %rdi      # 0x60a0
movb $0x0, %al
callq 0x1040
leaq 0x4da6(%rip), %rdi      # 0x6064
movb $0x0, %al
callq 0x1040
leaq 0x4e51(%rip), %rdi      # 0x611d
movb $0x0, %al
callq 0x1040
leaq 0x4e66(%rip), %rdi      # 0x6140
movb $0x0, %al
callq 0x1040
leaq 0x4e9c(%rip), %rdi      # 0x6184
movb $0x0, %al
callq 0x1040
leaq 0x4ecd(%rip), %rdi      # 0x61c3
movb $0x0, %al
callq 0x1040
leaq 0x4ee2(%rip), %rdi      # 0x61e6
movb $0x0, %al
callq 0x1040
leaq 0x4f09(%rip), %rdi      # 0x621b
movb $0x0, %al
callq 0x1040
leaq 0x4f16(%rip), %rdi      # 0x6236
movb $0x0, %al
callq 0x1040
leaq 0x4f32(%rip), %rdi      # 0x6260
movb $0x0, %al
callq 0x1040
popq %rax
retq
nopw (%rax,%rax)
// File: hkbu-victor[P]SFastLDA/super_fast_final1_d.cpp
// Function: eval_ALPHA_W_2_norm()
void eval_ALPHA_W_2_norm(){
    double dtemp;
    for (int wi=0; wi<W; wi++){
        ALPHA_W_2_norm[ wi ] = 0.0;
        wi_idx = wpIdx[wi];
        wi_array = wpVal[wi];
        for (int j=0; j<W_pair_count[wi]; j++){
         	dtemp = (double) wi_array[ wi_idx[j] ] * ALPHA[ wi_idx[j] ];
            ALPHA_W_2_norm[ wi ] += dtemp*dtemp;
        }
    }
}

// Assembly:
movl $0x0, -0xc(%rsp)
movl -0xc(%rsp), %eax
cmpl 0x7ae6(%rip), %eax      # 0x9108
jge 0x1711
movq 0x7b99(%rip), %rax      # 0x91c8
movslq -0xc(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq 0x7bad(%rip), %rax      # 0x91f0
movslq -0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x7b8d(%rip)      # 0x91e0
movq 0x7b8e(%rip), %rax      # 0x91e8
movslq -0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x7b6e(%rip)      # 0x91d8
movl $0x0, -0x10(%rsp)
movl -0x10(%rsp), %eax
movq 0x7af3(%rip), %rcx      # 0x9170
movslq -0xc(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x16ff
movq 0x7b4a(%rip), %rax      # 0x91d8
movq 0x7b4b(%rip), %rcx      # 0x91e0
movslq -0x10(%rsp), %rdx
movslq (%rcx,%rdx,4), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
movq 0x7af6(%rip), %rax      # 0x91a0
movq 0x7b2f(%rip), %rcx      # 0x91e0
movslq -0x10(%rsp), %rdx
movslq (%rcx,%rdx,4), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x8(%rsp)
movsd -0x8(%rsp), %xmm0
movsd -0x8(%rsp), %xmm2
movq 0x7af0(%rip), %rax      # 0x91c8
movslq -0xc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rsp)
jmp 0x1672
jmp 0x1701
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
jmp 0x1618
retq
nopw %cs:(%rax,%rax)
// File: hkbu-victor[P]SFastLDA/super_fast_final1_d.cpp
// Function: eval_ONE_OVER_Z_2_norm()
void eval_ONE_OVER_Z_2_norm(){
     double dtemp;
     ONE_OVER_Z_2_norm = 0.0;
     for (int topic=0; topic<T; topic++){
         dtemp = 1.0/(WBETA + (double) ztot[topic]);
         ONE_OVER_Z_2_norm += dtemp*dtemp;
     }
}

// Assembly:
xorps %xmm0, %xmm0
movsd %xmm0, 0x79ed(%rip)     # 0x9198
movl $0x0, -0xc(%rsp)
movl -0xc(%rsp), %eax
cmpl 0x793b(%rip), %eax      # 0x90f8
jge 0x181f
movsd 0x79c1(%rip), %xmm1     # 0x9188
movq 0x7952(%rip), %rax      # 0x9120
movslq -0xc(%rsp), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
addsd %xmm0, %xmm1
movsd 0x482c(%rip), %xmm0     # 0x6010
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rsp)
movsd -0x8(%rsp), %xmm0
movsd -0x8(%rsp), %xmm2
movsd 0x7996(%rip), %xmm1     # 0x9198
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x7986(%rip)     # 0x9198
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
jmp 0x17b3
retq
// File: hkbu-victor[P]SFastLDA/super_fast_final1_d.cpp
// Function: export_results(char*)
int export_results(char *filename)
{
	int i;

	FILE *fh;
	fh = fopen(filename, "w");
    if (fh == NULL){
      printf("\nFile writting error !!!");
      exit (-1);
    }

    for (i=0; i<nTokens; i++){
    	fprintf(fh, "%d %d %d\n", d[ i ] + 1, w[ i ] + 1, z[ i ] + 1);
    }

	fclose(fh);
	return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x2872(%rip), %rsi      # 0x6377
callq 0x10e0
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x3b2d
leaq 0x285d(%rip), %rdi      # 0x6379
movb $0x0, %al
callq 0x1040
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x10f0
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x55d9(%rip), %eax      # 0x9118
jge 0x3b98
movq (%rsp), %rdi
movq 0x55f4(%rip), %rax      # 0x9140
movslq 0xc(%rsp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movq 0x55ea(%rip), %rax      # 0x9148
movslq 0xc(%rsp), %rcx
movl (%rax,%rcx,4), %ecx
addl $0x1, %ecx
movq 0x55f0(%rip), %rax      # 0x9160
movslq 0xc(%rsp), %rsi
movl (%rax,%rsi,4), %r8d
addl $0x1, %r8d
leaq 0x280e(%rip), %rsi      # 0x6392
movb $0x0, %al
callq 0x1120
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x3b35
movq (%rsp), %rdi
callq 0x10d0
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: iZhangHui[P]CppPrimer/CH05_Statements/examples/rangefor.cc
// Function: main
int main()
{
	vector<int> ivec;
	vector<int> v = {0,1,2,3,4,5,6,7,8,9};

	// range variable must be a reference so we can write to the elements
	for (auto &r : v)   // for each element in v
		r *= 2;         // double the value of each element in v
	
	// print every element in v
	for (int r : v)
		cout << r << " "; // print the elements in v
	cout << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x1470
movabsq $0x900000008, %rax      # imm = 0x900000008
movq %rax, -0x50(%rbp)
movups 0xd94(%rip), %xmm0      # 0x2014
movaps %xmm0, -0x60(%rbp)
movups 0xd79(%rip), %xmm0      # 0x2004
movaps %xmm0, -0x70(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0xa, -0x40(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x1490
movq -0xd0(%rbp), %rcx
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x14b0
jmp 0x12c9
leaq -0x71(%rbp), %rdi
callq 0x1530
leaq -0x38(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
callq 0x1550
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rdi
callq 0x1580
movq %rax, -0xa0(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x15b0
testb $0x1, %al
jne 0x131c
jmp 0x1367
leaq -0x98(%rbp), %rdi
callq 0x15f0
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movl (%rax), %ecx
shll %ecx
movl %ecx, (%rax)
leaq -0x98(%rbp), %rdi
callq 0x1610
jmp 0x1303
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x71(%rbp), %rdi
callq 0x1530
jmp 0x1459
leaq -0x38(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x1550
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x1580
movq %rax, -0xc0(%rbp)
leaq -0xb8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x15b0
testb $0x1, %al
jne 0x13b1
jmp 0x141f
leaq -0xb8(%rbp), %rdi
callq 0x15f0
movl (%rax), %eax
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %esi
movq 0x2c06(%rip), %rdi      # 0x3fd8
callq 0x10f0
movq %rax, -0xd8(%rbp)
jmp 0x13e0
movq -0xd8(%rbp), %rdi
leaq 0xc3e(%rip), %rsi       # 0x202c
callq 0x1090
jmp 0x13f5
jmp 0x13f7
leaq -0xb8(%rbp), %rdi
callq 0x1610
jmp 0x1398
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x1630
jmp 0x1459
movq 0x2bb2(%rip), %rdi      # 0x3fd8
movq 0x2b9b(%rip), %rsi      # 0x3fc8
callq 0x10c0
jmp 0x1434
movl $0x0, -0x4(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x1630
leaq -0x20(%rbp), %rdi
callq 0x1630
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x1630
movq -0x80(%rbp), %rdi
callq 0x1100
nopl (%rax,%rax)
// File: WojciechMula[P]utf16utf8/include/reference.h
// Function: strlen_utf8_to_utf16_with_length(unsigned char const*, unsigned long)
static inline size_t strlen_utf8_to_utf16_with_length(const uint8_t *str, size_t len)
{
	size_t i, count;
	uint32_t c;

	for (i=0, count=0;i < len; i++)
	{

		c = utf8_to_unicode32(&str[i], &i);
		count += codepoint_utf16_size(c);
	}
	return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x6b0e
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x6ba0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
callq 0x6d10
cltq
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6ad0
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: WojciechMula[P]utf16utf8/include/reference.h
// Function: utf8_to_utf16_with_length(unsigned char const*, unsigned long, unsigned short*)
static inline void utf8_to_utf16_with_length(const uint8_t *utf8, size_t len, uint16_t *utf16)
{
	int j;
	uint32_t c;
    size_t i;


	for (i=0, j=0, c=1; i < len; i++)
	{
		c = utf8_to_unicode32(&utf8[i], &i);
		sprint_utf16(&utf16[j], c);
		j += codepoint_utf16_size(c);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x1, -0x20(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x6b9a
movq -0x8(%rbp), %rdi
addq -0x28(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x6ba0
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rax
shlq %rax
addq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x6eb0
movl -0x20(%rbp), %edi
callq 0x6d10
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x6b4a
addq $0x30, %rsp
popq %rbp
retq
// File: WojciechMula[P]utf16utf8/include/reference.h
// Function: utf8_to_unicode32(unsigned char const*, unsigned long*)
static inline uint32_t utf8_to_unicode32(const uint8_t *c, size_t *index)
{
	uint32_t v;
	int size;
	const uint8_t m6 = 63, m5 = 31, m4 = 15, m3 = 7;

	if (c==NULL)
		return 0;

	size = utf8_char_size(c);

	if (size > 0 && index)
		*index += size-1;

	switch (size)
	{
		case 1:
			v = c[0];
			break;
		case 2:
			v = c[0] & m5;
			v = v << 6 | (c[1] & m6);
			break;
		case 3:
			v = c[0] & m4;
			v = v << 6 | (c[1] & m6);
			v = v << 6 | (c[2] & m6);
			break;
		case 4:
			v = c[0] & m3;
			v = v << 6 | (c[1] & m6);
			v = v << 6 | (c[2] & m6);
			v = v << 6 | (c[3] & m6);
			break;
		case 0:				// not a first UTF-8 byte
		case -1:			// corrupt UTF-8 letter
		default:
			v = -1;
			break;
	}

	return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x3f, -0x21(%rbp)
movb $0x1f, -0x22(%rbp)
movb $0xf, -0x23(%rbp)
movb $0x7, -0x24(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x6bd3
movl $0x0, -0x4(%rbp)
jmp 0x6cf9
movq -0x10(%rbp), %rdi
callq 0x6d50
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jle 0x6bff
cmpq $0x0, -0x18(%rbp)
je 0x6bff
movl -0x20(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl -0x20(%rbp), %eax
incl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x5, %eax
ja 0x6cec
movq -0x30(%rbp), %rax
leaq 0xd3f2(%rip), %rcx      # 0x14010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x6cf3
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0x1f, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shll $0x6, %eax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
andl $0x3f, %ecx
orl %ecx, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6cf3
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0xf, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shll $0x6, %eax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
andl $0x3f, %ecx
orl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shll $0x6, %eax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
andl $0x3f, %ecx
orl %ecx, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6cf3
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0x7, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shll $0x6, %eax
movq -0x10(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
andl $0x3f, %ecx
orl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shll $0x6, %eax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
andl $0x3f, %ecx
orl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shll $0x6, %eax
movq -0x10(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
andl $0x3f, %ecx
orl %ecx, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6cf3
jmp 0x6cec
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: WojciechMula[P]utf16utf8/include/reference.h
// Function: utf8_char_size(unsigned char const*)
static inline int utf8_char_size(const uint8_t *c)
{
	const uint8_t	m0x	= 0x80, c0x	= 0x00,
	      		m10x	= 0xC0, c10x	= 0x80,
	      		m110x	= 0xE0, c110x	= 0xC0,
	      		m1110x	= 0xF0, c1110x	= 0xE0,
	      		m11110x	= 0xF8, c11110x	= 0xF0;

	if ((c[0] & m0x) == c0x)
		return 1;

	if ((c[0] & m110x) == c110x)
	if ((c[1] & m10x) == c10x)
		return 2;

	if ((c[0] & m1110x) == c1110x)
	if ((c[1] & m10x) == c10x)
	if ((c[2] & m10x) == c10x)
		return 3;

	if ((c[0] & m11110x) == c11110x)
	if ((c[1] & m10x) == c10x)
	if ((c[2] & m10x) == c10x)
	if ((c[3] & m10x) == c10x)
		return 4;

	if ((c[0] & m10x) == c10x)	// not a first UTF-8 byte
		return 0;

	return -1;			// if c[0] is a first byte but the other bytes don't match
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movb $-0x80, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
movb $-0x40, -0x13(%rbp)
movb $-0x80, -0x14(%rbp)
movb $-0x20, -0x15(%rbp)
movb $-0x40, -0x16(%rbp)
movb $-0x10, -0x17(%rbp)
movb $-0x20, -0x18(%rbp)
movb $-0x8, -0x19(%rbp)
movb $-0x10, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x6d9d
movl $0x1, -0x4(%rbp)
jmp 0x6e9e
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0xe0, %eax
cmpl $0xc0, %eax
jne 0x6dd2
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x6dd0
movl $0x2, -0x4(%rbp)
jmp 0x6e9e
jmp 0x6dd2
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0xf0, %eax
cmpl $0xe0, %eax
jne 0x6e1d
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x6e1b
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x6e19
movl $0x3, -0x4(%rbp)
jmp 0x6e9e
jmp 0x6e1b
jmp 0x6e1d
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0xf8, %eax
cmpl $0xf0, %eax
jne 0x6e7b
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x6e79
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x6e77
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x6e75
movl $0x4, -0x4(%rbp)
jmp 0x6e9e
jmp 0x6e77
jmp 0x6e79
jmp 0x6e7b
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0x6e97
movl $0x0, -0x4(%rbp)
jmp 0x6e9e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: WojciechMula[P]utf16utf8/include/reference.h
// Function: sprint_utf16(unsigned short*, unsigned int)
static inline uint16_t *sprint_utf16(uint16_t *str, uint32_t c)	// str must be able to hold 1 to 3 bytes and will be null-terminated by this function
{
	int c_size;

	if (str==NULL)
		return NULL;

	c_size = codepoint_utf16_size(c);
	switch (c_size)
	{
		case 1:
			str[0] = uint16_t(c);
			if (c > 0)
				str[1] = '\0';
			break;

		case 2:
			c -= 0x10000;
			str[0] = uint16_t(0xD800 + (c >> 10));
			str[1] = uint16_t(0xDC00 + (c & 0x3FF));
			str[2] = '\0';
			break;

		default:
			str[0] = '\0';
	}

	return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x6ed3
movq $0x0, -0x8(%rbp)
jmp 0x6f69
movl -0x14(%rbp), %edi
callq 0x6d10
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
subl $0x1, %eax
je 0x6ef5
jmp 0x6eeb
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0x6f14
jmp 0x6f58
movl -0x14(%rbp), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
cmpl $0x0, -0x14(%rbp)
jbe 0x6f12
movq -0x10(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0x6f61
movl -0x14(%rbp), %eax
subl $0x10000, %eax          # imm = 0x10000
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
shrl $0xa, %eax
addl $0xd800, %eax           # imm = 0xD800
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movl -0x14(%rbp), %eax
andl $0x3ff, %eax            # imm = 0x3FF
addl $0xdc00, %eax           # imm = 0xDC00
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x10(%rbp), %rax
movw $0x0, 0x4(%rax)
jmp 0x6f61
movq -0x10(%rbp), %rax
movw $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: WojciechMula[P]utf16utf8/include/scalar_utf8.h
// Function: int encode_utf8<sse_convert_utf16_to_utf8(unsigned short const*, unsigned long, unsigned char*)::$_0::operator()(unsigned int) const::'lambda'(int)>(unsigned int, sse_convert_utf16_to_utf8(unsigned short const*, unsigned long, unsigned char*)::$_0::operator()(unsigned int) const::'lambda'(int))
int encode_utf8(uint32_t value, CONSUMER consumer) {
    if (value < 0x00000080) {
        consumer(uint8_t(value));
        return 1;
    }

    if (value < 0x00000800) {
        consumer(0xc0 | (value >> 6));
        consumer(0x80 | (value & 0x3f));
        return 2;
    }

    if (value < 0x00010000) {
        consumer(0xe0 | (value >> 12));
        consumer(0x80 | ((value >> 6) & 0x3f));
        consumer(0x80 | (value & 0x3f));
        return 3;
    }

    {
        consumer(0xf0 | (value >> 18));
        consumer(0x80 | ((value >> 12) & 0x3f));
        consumer(0x80 | ((value >> 6) & 0x3f));
        consumer(0x80 | (value & 0x3f));
        return 4;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x10(%rbp)
movl %edi, -0x14(%rbp)
cmpl $0x80, -0x14(%rbp)
jae 0x7053
movl -0x14(%rbp), %eax
movzbl %al, %esi
leaq -0x10(%rbp), %rdi
callq 0x7150
movl $0x1, -0x4(%rbp)
jmp 0x7147
cmpl $0x800, -0x14(%rbp)     # imm = 0x800
jae 0x7092
movl -0x14(%rbp), %esi
shrl $0x6, %esi
orl $0xc0, %esi
leaq -0x10(%rbp), %rdi
callq 0x7150
movl -0x14(%rbp), %esi
andl $0x3f, %esi
orl $0x80, %esi
leaq -0x10(%rbp), %rdi
callq 0x7150
movl $0x2, -0x4(%rbp)
jmp 0x7147
cmpl $0x10000, -0x14(%rbp)   # imm = 0x10000
jae 0x70e6
movl -0x14(%rbp), %esi
shrl $0xc, %esi
orl $0xe0, %esi
leaq -0x10(%rbp), %rdi
callq 0x7150
movl -0x14(%rbp), %esi
shrl $0x6, %esi
andl $0x3f, %esi
orl $0x80, %esi
leaq -0x10(%rbp), %rdi
callq 0x7150
movl -0x14(%rbp), %esi
andl $0x3f, %esi
orl $0x80, %esi
leaq -0x10(%rbp), %rdi
callq 0x7150
movl $0x3, -0x4(%rbp)
jmp 0x7147
movl -0x14(%rbp), %esi
shrl $0x12, %esi
orl $0xf0, %esi
leaq -0x10(%rbp), %rdi
callq 0x7150
movl -0x14(%rbp), %esi
shrl $0xc, %esi
andl $0x3f, %esi
orl $0x80, %esi
leaq -0x10(%rbp), %rdi
callq 0x7150
movl -0x14(%rbp), %esi
shrl $0x6, %esi
andl $0x3f, %esi
orl $0x80, %esi
leaq -0x10(%rbp), %rdi
callq 0x7150
movl -0x14(%rbp), %esi
andl $0x3f, %esi
orl $0x80, %esi
leaq -0x10(%rbp), %rdi
callq 0x7150
movl $0x4, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: WojciechMula[P]utf16utf8/src/random_utf16.cpp
// Function: RandomUTF16::RandomUTF16(std::random_device&, int, int, int, int)
RandomUTF16::RandomUTF16(std::random_device& rd, int prob_1byte, int prob_2bytes, int prob_3bytes, int prob_4bytes)
    : gen(rd())
    , utf8_length({double(2*prob_1byte),
                   double(2*prob_2bytes),
                   double(prob_3bytes),
                   double(prob_3bytes),
                   double(2*prob_4bytes)}) {}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7730
movq -0x70(%rbp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0x7750
movq -0x70(%rbp), %rdi
addq $0x1388, %rdi           # imm = 0x1388
movq %rdi, -0x78(%rbp)
movl -0x14(%rbp), %eax
addl %eax, %eax
vcvtsi2sd %eax, %xmm0, %xmm0
vmovsd %xmm0, -0x58(%rbp)
movl -0x18(%rbp), %eax
addl %eax, %eax
vcvtsi2sd %eax, %xmm0, %xmm0
vmovsd %xmm0, -0x50(%rbp)
vcvtsi2sdl -0x1c(%rbp), %xmm0, %xmm0
vmovsd %xmm0, -0x48(%rbp)
vcvtsi2sdl -0x1c(%rbp), %xmm0, %xmm0
vmovsd %xmm0, -0x40(%rbp)
movl -0x20(%rbp), %eax
addl %eax, %eax
vcvtsi2sd %eax, %xmm0, %xmm0
vmovsd %xmm0, -0x38(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x5, -0x28(%rbp)
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x7780
movq -0x70(%rbp), %rdi
addq $0x13b8, %rdi           # imm = 0x13B8
movl $0x1, %esi
movl $0x7f, %edx
callq 0x77c0
jmp 0x7445
movq -0x70(%rbp), %rdi
addq $0x13c0, %rdi           # imm = 0x13C0
movl $0x80, %esi
movl $0x7ff, %edx            # imm = 0x7FF
callq 0x77c0
jmp 0x7461
movq -0x70(%rbp), %rdi
addq $0x13c8, %rdi           # imm = 0x13C8
movl $0x800, %esi            # imm = 0x800
movl $0xd7ff, %edx           # imm = 0xD7FF
callq 0x77c0
jmp 0x747d
movq -0x70(%rbp), %rdi
addq $0x13d0, %rdi           # imm = 0x13D0
movl $0xe000, %esi           # imm = 0xE000
movl $0xffff, %edx           # imm = 0xFFFF
callq 0x77c0
jmp 0x7499
movq -0x70(%rbp), %rdi
addq $0x13d8, %rdi           # imm = 0x13D8
movl $0x10000, %esi          # imm = 0x10000
movl $0x10ffff, %edx         # imm = 0x10FFFF
callq 0x77c0
jmp 0x74b5
addq $0x80, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
callq 0x77f0
movq -0x60(%rbp), %rdi
callq 0x22e0
nopl (%rax)
// File: WojciechMula[P]utf16utf8/src/random_utf16.cpp
// Function: RandomUTF16::generate()
uint32_t RandomUTF16::generate() {
    switch (utf8_length(gen)) {
        case 0: return val_1byte(gen);
        case 1: return val_2bytes(gen);
        case 2: return val_3bytes_a(gen);
        case 3: return val_3bytes_b(gen);
        case 4: return val_4bytes(gen);
        default:
            return val_1byte(gen);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x20(%rbp)
movq %rsi, %rdi
addq $0x1388, %rdi           # imm = 0x1388
callq 0x7810
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x4, %eax
ja 0x759e
movq -0x18(%rbp), %rax
leaq 0x11b93(%rip), %rcx     # 0x190b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
addq $0x13b8, %rdi           # imm = 0x13B8
callq 0x7840
movl %eax, -0x4(%rbp)
jmp 0x75b4
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
addq $0x13c0, %rdi           # imm = 0x13C0
callq 0x7840
movl %eax, -0x4(%rbp)
jmp 0x75b4
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
addq $0x13c8, %rdi           # imm = 0x13C8
callq 0x7840
movl %eax, -0x4(%rbp)
jmp 0x75b4
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
addq $0x13d0, %rdi           # imm = 0x13D0
callq 0x7840
movl %eax, -0x4(%rbp)
jmp 0x75b4
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
addq $0x13d8, %rdi           # imm = 0x13D8
callq 0x7840
movl %eax, -0x4(%rbp)
jmp 0x75b4
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
addq $0x13b8, %rdi           # imm = 0x13B8
callq 0x7840
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: WojciechMula[P]utf16utf8/src/random_utf16.cpp
// Function: RandomUTF16::generate(unsigned long)
std::vector<uint16_t> RandomUTF16::generate(size_t count)
{
    std::vector<uint16_t> result;
    result.reserve(count);
    while (result.size() < count) {
        const uint32_t value = generate();
        uint16_t W1;
        uint16_t W2;
        if (utf16::encode(value, W1, W2) == 1)
            result.push_back(W1);
        else {
            result.push_back(W1);
            result.push_back(W2);
        }
    }

    result.push_back(0); // EOS for scalar code

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x7870
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7890
jmp 0x75ff
jmp 0x7601
movq -0x40(%rbp), %rdi
callq 0x7980
cmpq -0x18(%rbp), %rax
jae 0x768e
movq -0x48(%rbp), %rdi
callq 0x74e0
movl %eax, -0x54(%rbp)
jmp 0x761e
movl -0x54(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %edi
leaq -0x32(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0xaab0
movl %eax, -0x58(%rbp)
jmp 0x7639
movl -0x58(%rbp), %eax
cmpl $0x1, %eax
jne 0x7669
movq -0x40(%rbp), %rdi
leaq -0x32(%rbp), %rsi
callq 0x79a0
jmp 0x7650
jmp 0x7689
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x7a40
jmp 0x76c0
movq -0x40(%rbp), %rdi
leaq -0x32(%rbp), %rsi
callq 0x79a0
jmp 0x7678
movq -0x40(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x79a0
jmp 0x7687
jmp 0x7689
jmp 0x7601
movq -0x40(%rbp), %rdi
movw $0x0, -0x36(%rbp)
leaq -0x36(%rbp), %rsi
callq 0x7a10
jmp 0x76a3
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x76b6
movq -0x40(%rbp), %rdi
callq 0x7a40
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x22e0
nopl (%rax)