LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0xaf75
movq %rax, 0x8(%rbx)
cmpb $0x42, (%rdx)
jne 0xafad
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4406
movq %r14, %rdi
movq %rbx, %rsi
callq 0x593e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6bda
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7f0a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
leaq 0x32(%rsp), %r15
movq %r15, %rdi
callq 0x94d4
leaq 0xf(%rsp), %rdx
movb $0x42, (%rdx)
movq %r15, %rdi
movq %r14, %rsi
callq 0xaf5e
movq 0x10(%rsp), %rdi
cmpq %rdi, 0x18(%rsp)
je 0xbd99
movl $0x1, %ebp
xorl %eax, %eax
leaq 0xf(%rsp), %r14
movb (%rdi,%rax), %al
movb %al, 0xf(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
movl %ebp, %eax
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rcx
subq %rdi, %rcx
incl %ebp
cmpq %rax, %rcx
ja 0xbd6c
testq %rdi, %rdi
je 0xbdab
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbdb8
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbdd2
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/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 %rax
movsbl (%rsi), %edi
callq 0x2210
movzbl %al, %eax
cmpl $0x71, %eax
jg 0xc023
cmpl $0x67, %eax
je 0xc03b
cmpl $0x6c, %eax
je 0xc04f
cmpl $0x6f, %eax
jne 0xc04d
leaq 0x2422(%rip), %rdi      # 0xe443
jmp 0xc05f
cmpl $0x72, %eax
je 0xc044
cmpl $0x77, %eax
je 0xc058
cmpl $0x79, %eax
jne 0xc04d
leaq 0x2436(%rip), %rdi      # 0xe46f
jmp 0xc05f
leaq 0x240c(%rip), %rdi      # 0xe44e
jmp 0xc05f
leaq 0x240e(%rip), %rdi      # 0xe459
jmp 0xc05f
popq %rax
retq
leaq 0x240e(%rip), %rdi      # 0xe464
jmp 0xc05f
leaq 0x23d9(%rip), %rdi      # 0xe438
xorl %eax, %eax
popq %rcx
jmp 0x2040
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl (%rsi), %esi
movb $0x66, %al
movb $0x66, %cl
movb $0x66, %dl
cmpq $0x7, %rsi
ja 0xc426
leaq (%rsi,%rsi,2), %rdx
movb 0x1e(%rdi,%rdx), %al
movb 0x1f(%rdi,%rdx), %cl
movb 0x20(%rdi,%rdx), %dl
movzbl %dl, %edx
shll $0x10, %edx
movzbl %cl, %ecx
shll $0x8, %ecx
orl %edx, %ecx
movzbl %al, %eax
orl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Rubenmp[P]Rubik/src/defineRubik.cpp
// Function: Rubik::operator==(Rubik const&)
bool Rubik::operator == (const Rubik& rubik){
   bool equal = true;
   int i;
   if (this != &rubik){
      for (i=0; i<6; ++i){
         if (center[i].center != rubik.getCenter(i).center)
            equal = false;
      }

      for (i=0; i<12 && !equal; ++i){
         if (edge[i].up != rubik.getEdge(i).up ||
             edge[i].down != rubik.getEdge(i).down)
            equal = false;
      }

      for (i=0; i<8 && !equal; ++i){
         if (corner[i].up != rubik.getCorner(i).up     ||
             corner[i].left != rubik.getCorner(i).left ||
             corner[i].right != rubik.getCorner(i).right)
            equal = false;
      }
   }

   return equal;
}

// Assembly:
movb $0x1, %al
cmpq %rsi, %rdi
je 0xc4c9
xorl %ecx, %ecx
xorl %edx, %edx
movb (%rdi,%rdx), %r8b
cmpb (%rsi,%rdx), %r8b
movzbl %al, %eax
cmovnel %ecx, %eax
incq %rdx
cmpq $0x6, %rdx
jne 0xc449
testb $0x1, %al
jne 0xc489
xorl %ecx, %ecx
movb 0x6(%rsi,%rcx,2), %dl
cmpb 0x6(%rdi,%rcx,2), %dl
jne 0xc47a
movb 0x7(%rsi,%rcx,2), %dl
cmpb 0x7(%rdi,%rcx,2), %dl
je 0xc47c
xorl %eax, %eax
cmpq $0xa, %rcx
ja 0xc489
incq %rcx
testb $0x1, %al
je 0xc466
testb $0x1, %al
jne 0xc4c9
movl $0x20, %ecx
xorl %edx, %edx
movb -0x2(%rsi,%rcx), %r8b
cmpb -0x2(%rdi,%rcx), %r8b
jne 0xc4b6
movb -0x1(%rsi,%rcx), %r8b
cmpb -0x1(%rdi,%rcx), %r8b
jne 0xc4b6
movb (%rsi,%rcx), %r8b
cmpb (%rdi,%rcx), %r8b
je 0xc4b8
xorl %eax, %eax
cmpq $0x6, %rdx
ja 0xc4c9
incq %rdx
addq $0x3, %rcx
testb $0x1, %al
je 0xc494
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x585d(%rip), %rbx      # 0x11fc8
leaq 0x24a5(%rip), %rsi      # 0xec17
movl $0x7, %edx
movq %rbx, %rdi
callq 0x21d0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x21d0
movq %rax, %r14
leaq 0x2487(%rip), %rsi      # 0xec1f
movl $0x28, %edx
movq %rax, %rdi
callq 0x21d0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0x2475(%rip), %rsi      # 0xec48
movl $0x14, %edx
movq %rbx, %rdi
callq 0x21d0
leaq 0x2476(%rip), %rsi      # 0xec5d
movl $0x47, %edx
movq %rbx, %rdi
callq 0x21d0
leaq 0x24aa(%rip), %rsi      # 0xeca5
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x21d0
leaq 0x24b5(%rip), %rsi      # 0xecc4
movl $0x3d, %edx
movq %rbx, %rdi
callq 0x21d0
leaq 0x24df(%rip), %rsi      # 0xed02
movl $0x59, %edx
movq %rbx, %rdi
callq 0x21d0
leaq 0x2525(%rip), %rsi      # 0xed5c
movl $0x17, %edx
movq %rbx, %rdi
callq 0x21d0
leaq 0x2529(%rip), %rsi      # 0xed74
movl $0x3b, %edx
movq %rbx, %rdi
callq 0x21d0
leaq 0x2551(%rip), %rsi      # 0xedb0
movl $0x22, %edx
movq %rbx, %rdi
callq 0x21d0
leaq 0x2560(%rip), %rsi      # 0xedd3
movl $0x24, %edx
movq %rbx, %rdi
callq 0x21d0
leaq 0x2571(%rip), %rsi      # 0xedf8
movl $0x45, %edx
movq %rbx, %rdi
callq 0x21d0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2110
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
leaq 0x30ab(%rip), %rdi      # 0x433f
callq 0x1140
leaq 0x30c7(%rip), %rdi      # 0x4367
callq 0x1140
leaq 0x3165(%rip), %rbx      # 0x4411
movq %rbx, %rdi
callq 0x1140
leaq 0x30c6(%rip), %rdi      # 0x4381
callq 0x1140
leaq 0x30ce(%rip), %rdi      # 0x4395
callq 0x1140
movq %rbx, %rdi
callq 0x1140
leaq 0x315c(%rip), %rdi      # 0x4437
callq 0x1140
leaq 0x3172(%rip), %rdi      # 0x4459
callq 0x1140
leaq 0x31a9(%rip), %rdi      # 0x449c
callq 0x1140
leaq 0x31db(%rip), %rdi      # 0x44da
callq 0x1140
leaq 0x31f1(%rip), %rdi      # 0x44fc
callq 0x1140
leaq 0x3219(%rip), %rdi      # 0x4530
callq 0x1140
leaq 0x3227(%rip), %rdi      # 0x454a
callq 0x1140
leaq 0x3244(%rip), %rdi      # 0x4573
popq %rbx
jmp 0x1140
// File: /workspace/github_cpp_makefile_star2_O1/hkbu-victor[P]SFastLDA/super_fast_final1_d.cpp
// Function: parse_args(int, char**)
int parse_args(int argc, char **argv){
	char *arg;

	dFile = NULL; oFile = NULL;
	T = 0; NN = 0; SEED = 0;
	argALPHA = 0.0, BETA = 0.01;

	if (argc < 10){
		show_help();
		return -1;
	}

	int i = 0;
	while (i < argc){
		arg = argv[i];

		if (strcmp(arg,"-dfile")==0){
			dFile = argv[++i];
		} else if (strcmp(arg,"-ofile")==0){
			oFile = argv[++i];
		} else if (strcmp(arg,"-alpha")==0){
			argALPHA = atof(argv[++i]);
		} else if (strcmp(arg,"-beta")==0){
			BETA = atof(argv[++i]);
		} else if (strcmp(arg,"-ntopics")==0){
			T = atoi(argv[++i]);
		} else if (strcmp(arg,"-niters")==0){
			NN = atoi(argv[++i]);
		} else if (strcmp(arg,"-seed")==0){
			SEED = atoi(argv[++i]);
		} else {
            // any more
		}

		i++;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r12d, %r12d
movq %r12, 0x4d96(%rip)      # 0x60e0
movq %r12, 0x4d97(%rip)      # 0x60e8
movl %r12d, 0x4db0(%rip)     # 0x6108
movl %r12d, 0x4dad(%rip)     # 0x610c
movl %r12d, 0x4daa(%rip)     # 0x6110
movq %r12, 0x4e1b(%rip)      # 0x6188
movabsq $0x3f847ae147ae147b, %rax # imm = 0x3F847AE147AE147B
movq %rax, 0x4e12(%rip)      # 0x6190
cmpl $0xa, %edi
jge 0x1392
callq 0x128c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x14e4
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x2cb2(%rip), %r14      # 0x4050
movslq %r12d, %r15
movq (%rbx,%r15,8), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x1120
testl %eax, %eax
je 0x1458
movq %r13, %rdi
leaq 0x2c95(%rip), %rsi      # 0x4057
callq 0x1120
testl %eax, %eax
je 0x146a
movq %r13, %rdi
leaq 0x2c85(%rip), %rsi      # 0x405e
callq 0x1120
testl %eax, %eax
je 0x147c
movq %r13, %rdi
leaq 0x2c75(%rip), %rsi      # 0x4065
callq 0x1120
testl %eax, %eax
je 0x1494
movq %r13, %rdi
leaq 0x2c64(%rip), %rsi      # 0x406b
callq 0x1120
testl %eax, %eax
je 0x14ac
movq %r13, %rdi
leaq 0x2c56(%rip), %rsi      # 0x4074
callq 0x1120
testl %eax, %eax
je 0x14c2
movq %r13, %rdi
leaq 0x2c47(%rip), %rsi      # 0x407c
callq 0x1120
testl %eax, %eax
jne 0x14d6
leal 0x1(%r15), %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1150
movl %eax, 0x4cba(%rip)      # 0x6110
jmp 0x14d6
leal 0x1(%r15), %r12d
movq 0x8(%rbx,%r15,8), %rax
movq %rax, 0x4c78(%rip)      # 0x60e0
jmp 0x14d6
leal 0x1(%r15), %r12d
movq 0x8(%rbx,%r15,8), %rax
movq %rax, 0x4c6e(%rip)      # 0x60e8
jmp 0x14d6
leal 0x1(%r15), %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1110
movsd %xmm0, 0x4cf6(%rip)     # 0x6188
jmp 0x14d6
leal 0x1(%r15), %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1110
movsd %xmm0, 0x4ce6(%rip)     # 0x6190
jmp 0x14d6
leal 0x1(%r15), %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1150
movl %eax, 0x4c48(%rip)      # 0x6108
jmp 0x14d6
leal 0x1(%r15), %r12d
movq 0x8(%rbx,%r15,8), %rdi
callq 0x1150
movl %eax, 0x4c36(%rip)      # 0x610c
incl %r12d
cmpl %ebp, %r12d
jl 0x139e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movslq 0x4beb(%rip), %rax      # 0x6118
testq %rax, %rax
jle 0x15c7
pushq %r15
pushq %r14
pushq %rbx
movq 0x4c96(%rip), %rcx      # 0x61d8
movq 0x4cb7(%rip), %rdx      # 0x6200
movq 0x4ca8(%rip), %rsi      # 0x61f8
movq 0x4c29(%rip), %rdi      # 0x6180
movq 0x4c52(%rip), %r8       # 0x61b0
xorl %r9d, %r9d
movq $0x0, (%rcx,%r9,8)
movq (%rdx,%r9,8), %r10
movq %r10, 0x4c7c(%rip)      # 0x61f0
movq (%rsi,%r9,8), %r11
movq %r11, 0x4c69(%rip)      # 0x61e8
movslq (%rdi,%r9,4), %rbx
testq %rbx, %rbx
jle 0x15ba
movsd (%rcx,%r9,8), %xmm0
xorl %r14d, %r14d
movslq (%r10,%r14,4), %r15
xorps %xmm1, %xmm1
cvtsi2sdl (%r11,%r15,4), %xmm1
mulsd (%r8,%r15,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rcx,%r9,8)
incq %r14
cmpq %r14, %rbx
jne 0x1591
incq %r9
cmpq %rax, %r9
jne 0x1561
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq $0x0, 0x4b68(%rip) # 0x61a8
movslq 0x4ac1(%rip), %rax      # 0x6108
testq %rax, %rax
jle 0x1699
movsd 0x4b54(%rip), %xmm0     # 0x61a8
movsd 0x4b3c(%rip), %xmm1     # 0x6198
movq 0x4acd(%rip), %rcx      # 0x6130
xorl %edx, %edx
movsd 0x299b(%rip), %xmm2     # 0x4008
xorps %xmm3, %xmm3
cvtsi2sdl (%rcx,%rdx,4), %xmm3
addsd %xmm1, %xmm3
movapd %xmm2, %xmm4
divsd %xmm3, %xmm4
mulsd %xmm4, %xmm4
addsd %xmm4, %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0x166d
movsd %xmm0, 0x4b0f(%rip)     # 0x61a8
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x121f(%rip), %rsi      # 0x40e4
callq 0x10f0
testq %rax, %rax
je 0x2f39
movq %rax, %rbx
cmpl $0x0, 0x324f(%rip)      # 0x6128
jle 0x2f29
leaq 0x121d(%rip), %r14      # 0x40ff
xorl %r15d, %r15d
movq 0x3264(%rip), %rax      # 0x6150
movl (%rax,%r15,4), %edx
incl %edx
movq 0x325f(%rip), %rax      # 0x6158
movl (%rax,%r15,4), %ecx
incl %ecx
movq 0x326a(%rip), %rax      # 0x6170
movl (%rax,%r15,4), %r8d
incl %r8d
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1130
incq %r15
movslq 0x3204(%rip), %rax      # 0x6128
cmpq %rax, %r15
jl 0x2ee5
movq %rbx, %rdi
callq 0x10e0
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x11a6(%rip), %rdi      # 0x40e6
xorl %eax, %eax
callq 0x1040
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movups 0xda2(%rip), %xmm0      # 0x2014
leaq -0x70(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0xd83(%rip), %xmm0      # 0x2004
movaps %xmm0, (%rsi)
movabsq $0x900000008, %rax      # imm = 0x900000008
movq %rax, 0x20(%rsi)
leaq -0x40(%rbp), %rbx
leaq -0x21(%rbp), %rcx
movl $0xa, %edx
movq %rbx, %rdi
callq 0x136e
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r12, %r15
je 0x12c1
movq %r15, %rax
shll (%rax)
addq $0x4, %rax
cmpq %r12, %rax
jne 0x12b6
cmpq %r12, %r15
je 0x12f8
movq 0x2d0b(%rip), %rbx      # 0x3fd8
leaq 0xd58(%rip), %r14       # 0x202c
movl (%r15), %esi
movq %rbx, %rdi
callq 0x10f0
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x10c0
addq $0x4, %r15
cmpq %r12, %r15
jne 0x12d4
movq 0x2cd9(%rip), %rdi      # 0x3fd8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x1090
movsbl %al, %esi
movq 0x2cbe(%rip), %rdi      # 0x3fd8
callq 0x1030
movq %rax, %rdi
callq 0x1060
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x133c
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x10b0
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x134d
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x1365
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x10b0
movq %rbx, %rdi
callq 0x1100
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x3030
movb (%rdi), %al
movl $0x1, %ecx
testb %al, %al
jns 0x3006
movl %eax, %ecx
andb $-0x20, %cl
cmpb $-0x40, %cl
jne 0x2fab
movb 0x1(%rdi), %dl
andb $-0x40, %dl
movl $0x2, %ecx
negb %dl
jo 0x3006
movl %eax, %ecx
andb $-0x10, %cl
cmpb $-0x20, %cl
jne 0x2fce
movb 0x1(%rdi), %cl
andb $-0x40, %cl
negb %cl
jno 0x2fce
movb 0x2(%rdi), %dl
andb $-0x40, %dl
movl $0x3, %ecx
negb %dl
jo 0x3006
movl %eax, %ecx
andb $-0x8, %cl
cmpb $-0x10, %cl
jne 0x2ffb
movb 0x1(%rdi), %cl
andb $-0x40, %cl
negb %cl
jno 0x2ffb
movb 0x2(%rdi), %cl
andb $-0x40, %cl
negb %cl
jno 0x2ffb
movb 0x3(%rdi), %dl
andb $-0x40, %dl
movl $0x4, %ecx
negb %dl
jo 0x3006
andb $-0x40, %al
xorl %ecx, %ecx
negb %al
setno %cl
negl %ecx
testq %rsi, %rsi
je 0x3015
testl %ecx, %ecx
jle 0x3015
leal -0x1(%rcx), %eax
addq %rax, (%rsi)
decl %ecx
cmpl $0x3, %ecx
ja 0x308c
leaq 0x5001(%rip), %rax      # 0x8024
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movzbl (%rdi), %eax
retq
xorl %eax, %eax
retq
movzbl (%rdi), %eax
andl $0xf, %eax
movzbl 0x1(%rdi), %ecx
andl $0x3f, %ecx
shll $0xc, %eax
shll $0x6, %ecx
orl %eax, %ecx
movzbl 0x2(%rdi), %eax
jmp 0x3086
movzbl (%rdi), %eax
andl $0x7, %eax
movzbl 0x1(%rdi), %ecx
andl $0x3f, %ecx
shll $0xc, %eax
shll $0x6, %ecx
orl %eax, %ecx
movzbl 0x2(%rdi), %edx
andl $0x3f, %edx
orl %ecx, %edx
shll $0x6, %edx
movzbl 0x3(%rdi), %eax
andl $0x3f, %eax
orl %edx, %eax
retq
movzbl (%rdi), %ecx
andl $0x1f, %ecx
shll $0x6, %ecx
movzbl 0x1(%rdi), %eax
andl $0x3f, %eax
orl %ecx, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %r9d, %ebp
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r12d
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2220
movl %eax, %eax
movq %rax, (%rbx)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, (%rbx,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x30c1
movq $0x270, 0x1380(%rbx) # imm = 0x270
leaq 0x1388(%rbx), %rdi
addl %r12d, %r12d
vcvtsi2sd %r12d, %xmm0, %xmm0
leaq 0x8(%rsp), %rsi
vmovsd %xmm0, (%rsi)
addl %r15d, %r15d
vcvtsi2sd %r15d, %xmm1, %xmm0
vmovsd %xmm0, 0x8(%rsi)
vcvtsi2sd %r14d, %xmm1, %xmm0
vmovsd %xmm0, 0x10(%rsi)
vmovsd %xmm0, 0x18(%rsi)
addl %ebp, %ebp
vcvtsi2sd %ebp, %xmm1, %xmm0
vmovsd %xmm0, 0x20(%rsi)
movl $0x5, %edx
callq 0x33bc
vmovaps 0x9ec2(%rip), %ymm0     # 0xd000
vmovups %ymm0, 0x13b8(%rbx)
movabsq $0x10ffff00010000, %rax # imm = 0x10FFFF00010000
movq %rax, 0x13d8(%rbx)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
addq $0x1388, %rdi           # imm = 0x1388
movq %rbx, %rsi
movq %rdi, %rdx
callq 0x37e0
movl %eax, %edi
shlq $0x3, %rdi
movl $0x13b8, %ecx           # imm = 0x13B8
addq %rcx, %rdi
cmpl $0x5, %eax
cmovaeq %rcx, %rdi
addq %rbx, %rdi
movq %rbx, %rsi
movq %rdi, %rdx
popq %rbx
jmp 0x3a7c
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rdx, %rsi
callq 0x3328
movq 0x8(%rbx), %rsi
movq %rsi, %rax
subq (%rbx), %rax
sarq %rax
cmpq %r14, %rax
jae 0x3280
leaq 0xa(%rsp), %r12
leaq 0xe(%rsp), %r13
movq %r15, %rdi
callq 0x3168
movl %eax, %edi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3d70
movq 0x8(%rbx), %rsi
cmpl $0x1, %eax
jne 0x321b
cmpq 0x10(%rbx), %rsi
je 0x3233
movzwl 0xa(%rsp), %eax
jmp 0x3252
cmpq 0x10(%rbx), %rsi
je 0x3238
movzwl 0xa(%rsp), %eax
movw %ax, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3243
movq %r12, %rdx
jmp 0x3262
movq %rbx, %rdi
movq %r12, %rdx
callq 0x3b86
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x325f
movzwl 0xe(%rsp), %eax
movw %ax, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x326a
movq %r13, %rdx
movq %rbx, %rdi
callq 0x3b86
movq 0x8(%rbx), %rsi
movq %rsi, %rax
subq (%rbx), %rax
sarq %rax
cmpq %r14, %rax
jb 0x31f0
movw $0x0, 0xc(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x329c
movw $0x0, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x32a9
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x3c9c
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x32c0
jmp 0x32c0
jmp 0x32c0
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x32d7
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/WojciechMula[P]utf16utf8/src/scalar_utf16.cpp
// Function: utf16::encode(unsigned int, unsigned short&, unsigned short&)
int encode(uint32_t value, uint16_t& W1, uint16_t& W2) {
        assert(value <= 0xd800 || value > 0xdfff);
        assert(value <= 0x10ffff);
        if (value <= 0xffff) {
            W1 = uint16_t(value);
            return 1;
        } else {
            value -= 0x10000;
            W1 = uint16_t(0xd800 | ((value >> 10) & 0x03ff));
            W2 = uint16_t(0xdc00 | (value & 0x03ff));
            return 2;
        }
    }

// Assembly:
pushq %rax
leal -0xe000(%rdi), %eax
cmpl $0xfffff801, %eax       # imm = 0xFFFFF801
jae 0x3dc6
cmpl $0x110000, %edi         # imm = 0x110000
jae 0x3de5
cmpl $0xffff, %edi           # imm = 0xFFFF
ja 0x3d98
movw %di, (%rsi)
movl $0x1, %eax
jmp 0x3dc4
leal 0xf0000(%rdi), %eax
movl $0xa0a, %ecx            # imm = 0xA0A
bextrl %ecx, %eax, %eax
orl $0xd800, %eax           # imm = 0xD800
movw %ax, (%rsi)
andl $0x3ff, %edi            # imm = 0x3FF
orl $0xdc00, %edi           # imm = 0xDC00
movw %di, (%rdx)
movl $0x2, %eax
popq %rcx
retq
leaq 0x92c6(%rip), %rdi      # 0xd093
leaq 0x92e1(%rip), %rsi      # 0xd0b5
leaq 0x92ef(%rip), %rcx      # 0xd0ca
movl $0x9, %edx
callq 0x2120
leaq 0x9312(%rip), %rdi      # 0xd0fe
leaq 0x92c2(%rip), %rsi      # 0xd0b5
leaq 0x92d0(%rip), %rcx      # 0xd0ca
movl $0xa, %edx
callq 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/WojciechMula[P]utf16utf8/src/scalar_utf16.cpp
// Function: utf16::test_utf16_encode_and_decode()
void test_utf16_encode_and_decode() {
        uint16_t array[2];
        for (uint32_t v = 0x10000; v <= 0x10ffff; v++) {
            uint32_t decoded = 0;
            const int n = encode(v, array[0], array[1]);

            decode(array, n,
                [&decoded](uint32_t vv) { decoded = vv; },
                [](const uint16_t*, const uint16_t*, Error) { puts("critical error"); abort(); });

            if (decoded != v)
                printf("%06x != %06x\n", v, decoded);
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0x10000, %ebx          # imm = 0x10000
leaq 0x6(%rsp), %r14
leaq 0x4(%rsp), %r15
leaq 0x92ee(%rip), %r12      # 0xd110
movl %ebx, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3d70
movl %eax, %eax
leaq 0x4(%rsp,%rax,2), %rax
movq %r15, %rcx
movzwl (%rcx), %edx
leaq 0x2(%rcx), %rsi
leal 0x2000(%rdx), %edi
cmpw $0xf800, %di            # imm = 0xF800
jae 0x3e52
movq %rsi, %rcx
jmp 0x3e8b
cmpw $0xdc00, %dx            # imm = 0xDC00
jae 0x3eba
cmpq %rax, %rsi
je 0x3eba
movzwl (%rsi), %esi
leal 0x2000(%rsi), %edi
cmpw $0xfbff, %di            # imm = 0xFBFF
jbe 0x3eba
andl $0x3ff, %esi            # imm = 0x3FF
shll $0xa, %edx
andl $0xffc00, %edx          # imm = 0xFFC00
leal 0x10000(%rdx,%rsi), %edx
addq $0x4, %rcx
movq %rcx, %rsi
cmpq %rax, %rsi
jne 0x3e39
cmpl %ebx, %edx
je 0x3ea0
movq %r12, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x2050
incl %ebx
cmpl $0x110000, %ebx         # imm = 0x110000
jne 0x3e22
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x925d(%rip), %rdi      # 0xd11e
callq 0x2270
callq 0x2110
nop
// File: /workspace/github_cpp_makefile_star2_O1/WojciechMula[P]utf16utf8/src/pext.cpp
// Function: pext_convert_utf8_to_utf16(unsigned char const*, unsigned long, unsigned short*)
size_t pext_convert_utf8_to_utf16(const uint8_t* input, size_t size, uint16_t* output) {
    uint16_t* output_start = output;
    const uint8_t* end = input + size;
    const uint8_t* curr = input;
    while (curr + 4 < end)
    {
        if (int8_t(*curr) >= 0) {
            *output++ = *curr++;
            continue;
        }

        const auto& entry = pext_lookup[*curr];
        if (entry.utf8_length == 0)
            // wrong leading byte
            abort();

        uint32_t value;
        memcpy(&value, input, 4);
        value = __builtin_bswap32(value);

        if ((entry.utf8_bits_mask) == entry.utf8_bits_expected)
            // wrong encoding
            abort();

        value = _pext_u32(value, entry.pext_mask);

        if (value <= 0xffff) {
            *output++ = static_cast<uint16_t>(value);
        } else {
            value -= 0x10000;
            *output++ = uint16_t(0xd800 | ((value >> 10) & 0x03ff));
            *output++ = uint16_t(0xdc00 | (value & 0x03ff));
            return 2;
        }

        curr += entry.utf8_length;
    }
    
    // TODO process the tail

    return output - output_start;
}

// Assembly:
pushq %rbx
movq %rdx, %rax
cmpq $0x5, %rsi
jl 0x47fd
addq %rdi, %rsi
leaq 0xca50(%rip), %rcx      # 0x111a0
movl $0xa0a, %r8d            # imm = 0xA0A
movq %rdi, %r9
movq %rdx, %rax
movsbl (%r9), %r10d
testw %r10w, %r10w
js 0x4773
incq %r9
movw %r10w, (%rax)
addq $0x2, %rax
jmp 0x47f0
movzbl %r10b, %r10d
shll $0x4, %r10d
movzbl 0xc(%r10,%rcx), %r11d
testq %r11, %r11
je 0x480c
addq %rcx, %r10
movl 0x4(%r10), %ebx
cmpl 0x8(%r10), %ebx
je 0x480c
movbel (%rdi), %ebx
pextl (%r10), %ebx, %r10d
cmpl $0xffff, %r10d          # imm = 0xFFFF
ja 0x47b6
movw %r10w, (%rax)
addq $0x2, %rax
addq %r11, %r9
jmp 0x47e7
leal 0xf0000(%r10), %r11d
bextrl %r8d, %r11d, %r11d
orl $0xd800, %r11d          # imm = 0xD800
movw %r11w, (%rax)
movl %r10d, %r11d
andl $0x3ff, %r11d           # imm = 0x3FF
orl $0xdc00, %r11d          # imm = 0xDC00
movw %r11w, 0x2(%rax)
addq $0x4, %rax
cmpl $0x10000, %r10d         # imm = 0x10000
jae 0x4805
leaq 0x4(%r9), %r10
cmpq %rsi, %r10
jb 0x475c
subq %rdx, %rax
sarq %rax
popq %rbx
retq
movl $0x2, %eax
jmp 0x4803
callq 0x2110
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/WojciechMula[P]utf16utf8/benchmarks/benchmark_from_utf8.cpp
// Function: main
int main() {
    // todo: Daniel finds the endless stream of numbers too much
    // Because some schemes use branching, you need to have a sizeable input if you
    // want fair results, given that we repeat the tests many times (we need to account
    // for branch predictors learning the branches).
    std::vector<size_t> input_size{16384};
    for (const size_t size: input_size) {
        Benchmark bench(size);
        bench.run_from_utf8();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x13b8, %rsp           # imm = 0x13B8
leaq 0x28(%rsp), %rsi
movq $0x4000, (%rsi)         # imm = 0x4000
leaq 0x10(%rsp), %rbx
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
movq %rbx, %rdi
callq 0x49fa
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r12, %r15
je 0x4884
leaq 0x30(%rsp), %rbx
leaq 0x28(%rsp), %r14
movq (%r15), %rax
movq %rax, 0x28(%rsp)
movq %rbx, %rdi
callq 0x4e5c
movq %r14, %rdi
callq 0x4a42
movq %rbx, %rdi
callq 0x21a0
addq $0x8, %r15
cmpq %r12, %r15
jne 0x485b
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x489b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
xorl %eax, %eax
addq $0x13b8, %rsp           # imm = 0x13B8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
jmp 0x48bc
movq %rax, %r14
movq %rbx, %rdi
callq 0x21a0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x48d3
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x22b0
jmp 0x48dd
movq %rax, %rdi
callq 0x4f66
// File: /workspace/github_cpp_makefile_star2_O1/WojciechMula[P]utf16utf8/benchmarks/event_counter.h
// Function: event_collector::event_collector()
event_collector() : linux_events(vector<int>{
    PERF_COUNT_HW_CPU_CYCLES,
    PERF_COUNT_HW_INSTRUCTIONS,
    PERF_COUNT_HW_BRANCH_MISSES,
    PERF_COUNT_HW_CACHE_REFERENCES,
    PERF_COUNT_HW_CACHE_MISSES
  }) {}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorl %r12d, %r12d
movq %r12, (%rdi)
leaq 0x8(%rdi), %r14
leaq 0x20(%rsp), %r15
movq %r12, 0x20(%r15)
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, (%r15)
leaq 0x7(%rsp), %rcx
movl $0x5, %edx
movq %r14, %rdi
movq %r15, %rsi
vzeroupper
callq 0x60ca
movq %r12, 0x20(%rbx)
vmovups 0x7796(%rip), %xmm0     # 0xd190
vmovaps %xmm0, (%r15)
movl $0x3, 0x10(%r15)
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x7(%rsp), %rcx
movl $0x5, %edx
callq 0x5ea0
leaq 0x28(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5ee8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5a45
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5a70
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
jmp 0x5a70
movq %rax, %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x5a84
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %r15, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O1/WojciechMula[P]utf16utf8/benchmarks/event_counter.h
// Function: event_aggregate::operator<<(event_count const&)
void operator<<(const event_count& other) {
    if (iterations == 0 || other.elapsed < best.elapsed) {
      best = other;
    }
    if (iterations == 0 || other.elapsed > worst.elapsed) {
      worst = other;
    }
    iterations++;
    total += other;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, (%rdi)
je 0x5cef
vmovsd 0x28(%r14), %xmm0
vucomisd (%rbx), %xmm0
jbe 0x5d03
movq (%rbx), %rax
movq %rax, 0x28(%r14)
leaq 0x8(%rbx), %rsi
leaq 0x30(%r14), %rdi
callq 0x69ba
cmpl $0x0, (%r14)
je 0x5d15
vmovsd (%rbx), %xmm0
vucomisd 0x48(%r14), %xmm0
jbe 0x5d29
movq (%rbx), %rax
movq %rax, 0x48(%r14)
leaq 0x8(%rbx), %rsi
leaq 0x50(%r14), %rdi
callq 0x69ba
incl (%r14)
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6944
// File: /workspace/github_cpp_makefile_star2_O1/WojciechMula[P]utf16utf8/benchmarks/linux-perf-events.h
// Function: LinuxEvents<0>::start()
inline void start() {
    if (fd != -1) {
      if (ioctl(fd, PERF_EVENT_IOC_RESET, PERF_IOC_FLAG_GROUP) == -1) {
        report_error("ioctl(PERF_EVENT_IOC_RESET)");
      }

      if (ioctl(fd, PERF_EVENT_IOC_ENABLE, PERF_IOC_FLAG_GROUP) == -1) {
        report_error("ioctl(PERF_EVENT_IOC_ENABLE)");
      }
    }
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl (%rdi), %edi
cmpl $-0x1, %edi
je 0x674b
movl $0x2403, %esi           # imm = 0x2403
movl $0x1, %edx
xorl %eax, %eax
callq 0x2240
cmpl $-0x1, %eax
jne 0x66ee
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x6cdb(%rip), %rsi      # 0xd394
leaq 0x6cef(%rip), %rdx      # 0xd3af
leaq 0x8(%rsp), %rdi
callq 0x4ed6
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6284
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x66ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
movl (%rbx), %edi
movl $0x2400, %esi           # imm = 0x2400
movl $0x1, %edx
xorl %eax, %eax
callq 0x2240
cmpl $-0x1, %eax
jne 0x674b
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x6c9a(%rip), %rsi      # 0xd3b0
leaq 0x6caf(%rip), %rdx      # 0xd3cc
leaq 0x8(%rsp), %rdi
callq 0x4ed6
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6284
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x674b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x6755
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x6776
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x6776
jmp 0x6773
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O1/WojciechMula[P]utf16utf8/benchmarks/linux-perf-events.h
// Function: LinuxEvents<0>::end(std::vector<unsigned long long, std::allocator<unsigned long long>>&)
inline void end(std::vector<unsigned long long> &results) {
    if (fd != -1) {
      if (ioctl(fd, PERF_EVENT_IOC_DISABLE, PERF_IOC_FLAG_GROUP) == -1) {
        report_error("ioctl(PERF_EVENT_IOC_DISABLE)");
      }

      if (read(fd, temp_result_vec.data(), temp_result_vec.size() * 8) == -1) {
        report_error("read");
      }
    }
    // our actual results are in slots 1,3,5, ... of this structure
    // we really should be checking our ids obtained earlier to be safe
    for (uint32_t i = 1; i < temp_result_vec.size(); i += 2) {
      results[i / 2] = temp_result_vec[i];
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %edi
cmpl $-0x1, %edi
je 0x684d
movl $0x2401, %esi           # imm = 0x2401
movl $0x1, %edx
xorl %eax, %eax
callq 0x2240
cmpl $-0x1, %eax
jne 0x67ee
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6c0f(%rip), %rsi      # 0xd3cd
leaq 0x6c25(%rip), %rdx      # 0xd3ea
movq %rsp, %rdi
callq 0x4ed6
movq %rsp, %rsi
movq %r14, %rdi
callq 0x6284
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x67ee
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movl (%r14), %edi
movq 0x90(%r14), %rsi
movq 0x98(%r14), %rdx
subq %rsi, %rdx
callq 0x2250
cmpq $-0x1, %rax
jne 0x684d
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x6bce(%rip), %rsi      # 0xd3eb
leaq 0x6bcb(%rip), %rdx      # 0xd3ef
movq %rsp, %rdi
callq 0x4ed6
movq %rsp, %rsi
movq %r14, %rdi
callq 0x6284
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x684d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x90(%r14), %rax
movq 0x98(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq $0x2, %rcx
jb 0x688e
movq (%rbx), %rdx
movl $0x1, %edi
movl $0x3, %esi
leal -0x2(%rsi), %r8d
movq (%rax,%rdi,8), %rdi
shrl %r8d
movq %rdi, (%rdx,%r8,8)
movl %esi, %edi
addl $0x2, %esi
cmpq %rdi, %rcx
ja 0x6875
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x689a
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x68ba
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x68ba
jmp 0x68b7
movq %rax, %rbx
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O1/WojciechMula[P]utf16utf8/benchmarks/event_counter.h
// Function: event_count::operator+(event_count const&) const
event_count operator+(const event_count& other) const {
    return event_count(elapsed+other.elapsed, {
      event_counts[0]+other.event_counts[0],
      event_counts[1]+other.event_counts[1],
      event_counts[2]+other.event_counts[2],
      event_counts[3]+other.event_counts[3],
      event_counts[4]+other.event_counts[4],
    });
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
vmovsd (%rsi), %xmm0
vaddsd (%rdx), %xmm0, %xmm0
vmovsd %xmm0, 0x10(%rsp)
movq 0x8(%rsi), %rax
movq 0x8(%rdx), %rcx
movq (%rcx), %rdx
addq (%rax), %rdx
leaq 0x30(%rsp), %rsi
movq %rdx, (%rsi)
movq 0x8(%rcx), %rdx
addq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsi)
movq 0x10(%rcx), %rdx
addq 0x10(%rax), %rdx
movq %rdx, 0x10(%rsi)
movq 0x18(%rcx), %rdx
addq 0x18(%rax), %rdx
movq %rdx, 0x18(%rsi)
movq 0x20(%rcx), %rcx
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rsi)
leaq 0x18(%rsp), %r14
leaq 0xf(%rsp), %rcx
movl $0x5, %edx
movq %r14, %rdi
callq 0x60ca
vmovsd 0x10(%rsp), %xmm0
vmovsd %xmm0, (%rbx)
leaq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x68c2
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6b32
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6b57
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/WojciechMula[P]utf16utf8/dependencies/utf8_v2_3_4/source/utf8/checked.h
// Function: std::back_insert_iterator<std::vector<unsigned short, std::allocator<unsigned short>>> utf8::utf8to16<std::back_insert_iterator<std::vector<unsigned short, std::allocator<unsigned short>>>, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>, std::back_insert_iterator<std::vector<unsigned short, std::allocator<unsigned short>>>)
u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result)
    {
        while (start != end) {
            uint32_t cp = utf8::next(start, end);
            if (cp > 0xffff) { //make a surrogate pair
                *result++ = static_cast<uint16_t>((cp >> 10)   + internal::LEAD_OFFSET);
                *result++ = static_cast<uint16_t>((cp & 0x3ff) + internal::TRAIL_SURROGATE_MIN);
            }
            else
                *result++ = static_cast<uint16_t>(cp);
        }
        return result;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, 0x10(%rsp)
cmpq %rsi, %rdi
je 0x6c85
movq %rsi, %r14
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r13
leaq 0xa(%rsp), %rbp
movq %r15, %rdi
movq %r14, %rsi
callq 0x6c97
movl %eax, %r12d
cmpl $0x10000, %eax          # imm = 0x10000
jb 0x6c1e
movl %r12d, %eax
shrl $0xa, %eax
addl $0xffffd7c0, %eax       # imm = 0xFFFFD7C0
movw %ax, 0xe(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6c36
movw %ax, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x6c43
movw %r12w, 0xa(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x6c61
movq %rbx, %rdi
movq %rbp, %rdx
jmp 0x6c75
movq %rbx, %rdi
leaq 0xe(%rsp), %rdx
callq 0x3c9c
andl $0x3ff, %r12d           # imm = 0x3FF
orl $0xdc00, %r12d          # imm = 0xDC00
movw %r12w, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x6c6f
movw %r12w, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x6c7a
movq %rbx, %rdi
movq %r13, %rdx
callq 0x3c9c
cmpq %r14, 0x10(%rsp)
jne 0x6be2
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::parseFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, tmxparser::TmxMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
TmxReturn parseFromFile(const std::string& fileName, TmxMap* outMap, const std::string& tilesetPath)
{
	tinyxml2::XMLDocument doc;
	if (doc.LoadFile(fileName.c_str()) != tinyxml2::XML_SUCCESS)
	{
		LOGE("Cannot read xml file");
		return TmxReturn::kErrorParsing;
	}

	// parse the map node
	return _parseStart(doc.FirstChildElement("map"), outMap, tilesetPath);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x280, %rsp            # imm = 0x280
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x2a0(%rbp), %r12
movq %r12, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0xf5c4
movq (%r15), %rsi
movq %r12, %rdi
callq 0xf784
testl %eax, %eax
jne 0x4d5d
leaq 0xd30c(%rip), %rsi      # 0x1202f
leaq -0x2a0(%rbp), %rdi
callq 0xd6a6
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4d80
movl %eax, %ebx
leaq -0x2a0(%rbp), %rdi
callq 0xf6d0
movl %ebx, %eax
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x4480
movl $0x1, %ebx
jmp 0x4d3f
movq %rax, %rbx
leaq -0x2a0(%rbp), %rdi
callq 0xf6d0
movq %rbx, %rdi
callq 0x43d0
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::parseFromMemory(void*, unsigned long, tmxparser::TmxMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
TmxReturn parseFromMemory(void* data, size_t length, TmxMap* outMap, const std::string& tilesetPath)
{
	tinyxml2::XMLDocument doc;
	if (doc.Parse((char*)data, length))
	{
		LOGE("Cannot parse xml memory file...");
		return TmxReturn::kErrorParsing;
	}

	return _parseStart(doc.FirstChildElement("map"), outMap, tilesetPath);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq -0x2a8(%rbp), %r13
movq %r13, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0xf5c4
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xfa44
testl %eax, %eax
jne 0x4ea0
leaq 0xd1cb(%rip), %rsi      # 0x1202f
leaq -0x2a8(%rbp), %rdi
callq 0xd6a6
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4d80
movl %eax, %ebx
leaq -0x2a8(%rbp), %rdi
callq 0xf6d0
movl %ebx, %eax
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x44b4
movl $0x1, %ebx
jmp 0x4e80
movq %rax, %rbx
leaq -0x2a8(%rbp), %rdi
callq 0xf6d0
movq %rbx, %rdi
callq 0x43d0
// File: /workspace/github_cpp_makefile_star2_O1/halsafar[P]libtmx-parser/./src/tmxparser.cpp
// Function: tmxparser::_parseEnd(tmxparser::TmxMap*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
TmxReturn _parseEnd(TmxMap* outMap, const std::string& tilesetPath)
{
	for (auto tileIt = outMap->tilesetCollection.begin(); tileIt != outMap->tilesetCollection.end(); ++tileIt)
		_parseEndHelper(tileIt->image, tilesetPath);

	for (auto tileIt = outMap->imageLayerCollection.begin(); tileIt != outMap->imageLayerCollection.end(); ++tileIt)
		_parseEndHelper(tileIt->image, tilesetPath);

	return TmxReturn::kSuccess;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0xb0(%rdi), %r15
cmpq 0xb8(%rdi), %r15
je 0x583e
leaq 0x68(%r15), %rdi
movq %rbx, %rsi
callq 0x5870
addq $0x108, %r15            # imm = 0x108
cmpq 0xb8(%r14), %r15
jne 0x5822
movq 0xf8(%r14), %r15
cmpq 0x100(%r14), %r15
je 0x5863
leaq 0x70(%r15), %rdi
movq %rbx, %rsi
callq 0x5870
addq $0xd8, %r15
jmp 0x5845
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq