LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/aleperno[P]Datos/Parser.cpp
// Function: Parser::isFractionScore(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Parser::isFractionScore(string s) {
	int counter  = 0;
	for (unsigned int i=0; i< s.size(); i++) {
		if (s[i]=='/')
			counter ++;
	}

	return (counter==1);
}

// Assembly:
movq 0x8(%rsi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x4829
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rdx
xorl %esi, %esi
xorl %edi, %edi
cmpb $0x2f, (%rdx,%rsi)
sete %dil
addl %edi, %eax
incq %rsi
movl %esi, %edi
cmpq %rdi, %rcx
ja 0x480c
cmpl $0x1, %eax
sete %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/aleperno[P]Datos/Parser.cpp
// Function: Parser::fractionScore(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
float Parser::fractionScore(string s) {
	float f = 0.5;
	if (isFractionScore(s)){
		vector<string> fs = tokenize(s, "/");
		if (fs.size()==2) {
			std::string::size_type sz;
			float f_aux = 0.0;//std::stof(fs[0], &sz)/std::stof(fs[1], &sz);
			if ((f_aux >= 0)&&(f_aux <= 1)) {
				f = f_aux;
			}
		}
	}

	return f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
leaq -0x88(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x98(%rbp), %r14
movq %r14, %rdi
callq 0x3cb2
movq 0x8(%r14), %rax
xorl %r14d, %r14d
testq %rax, %rax
je 0x4895
movq -0x98(%rbp), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpb $0x2f, (%rcx,%rdx)
sete %sil
addl %esi, %r14d
incq %rdx
movl %edx, %esi
cmpq %rsi, %rax
ja 0x4876
cmpl $0x1, %r14d
sete %r14b
movq -0x98(%rbp), %rdi
cmpq %r15, %rdi
je 0x48a6
callq 0x3210
testb %r14b, %r14b
je 0x4944
leaq -0x68(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x78(%rbp), %rdi
callq 0x3cb2
leaq -0x48(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x579b(%rip), %rsi      # 0xa074
leaq 0x5795(%rip), %rdx      # 0xa075
leaq -0x58(%rbp), %rdi
callq 0x4bb0
leaq -0x38(%rbp), %rdi
leaq -0x78(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x43ae
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x4908
callq 0x3210
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0x4916
callq 0x3210
movq -0x30(%rbp), %rax
subq -0x38(%rbp), %rax
xorps %xmm0, %xmm0
cmpq $0x40, %rax
je 0x492f
movss 0x5729(%rip), %xmm0     # 0xa058
movss %xmm0, -0x1c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4b08
movss -0x1c(%rbp), %xmm0
jmp 0x494c
movss 0x570c(%rip), %xmm0     # 0xa058
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x4970
callq 0x3210
jmp 0x4970
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0x497e
callq 0x3210
movq %rbx, %rdi
callq 0x33e0
// File: /workspace/github_cpp_makefile_star2_O1/aleperno[P]Datos/HashingPerceptron.cpp
// Function: HashingPerceptron::dot_product(std::vector<unsigned int, std::allocator<unsigned int>>)
float HashingPerceptron::dot_product(vector<unsigned int> vec)
{
	float count = 0;
	for (unsigned int i = 0; i < vec.size(); i++)
	{
		count += this->weights[vec[i]];
	}
	return count;
}

// Assembly:
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
je 0x7a29
pushq %rbp
movq %rsp, %rbp
sarq $0x2, %rcx
movq 0x38(%rdi), %rdx
xorps %xmm0, %xmm0
xorl %esi, %esi
movl (%rax,%rsi,4), %edi
addss (%rdx,%rdi,4), %xmm0
incq %rsi
movl %esi, %edi
cmpq %rdi, %rcx
ja 0x7a15
popq %rbp
retq
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_groups_examples.cpp
// Function: groups_impl::groups_collection<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::add_group(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
bool add_group(const std::string& group_name, const std::set<T>& set)
   {
      const auto itr = groups.find(group_name);

      if (itr != groups.end())
      {
         return false;
      }

      groups[group_name] = set;
      return true;
   }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
callq 0x11c2cc
movq %rax, %r14
leaq 0x8(%r12), %r13
cmpq %r13, %rax
jne 0x119fa0
movq %r12, %rdi
movq %r15, %rsi
callq 0x11c250
movq %rax, %rdi
movq %rbx, %rsi
callq 0x11c758
cmpq %r13, %r14
sete %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_groups_examples.cpp
// Function: groups_impl::create<double>::operator()(exprtk::type_store<double>::parameter_list)
inline T operator() (parameter_list_t parameters) override
   {
      const std::string group_name = to_str(string_t(parameters[0]));

      if (
           !groups_.contains(group_name) &&
           !groups_.add_group(group_name, {})
         )
      {
         return T(0);
      }

      auto ptr = groups_.get(group_name);
      const std::size_t ptr_size = sizeof(ptr);
      T result = T(0);

      std::memcpy(reinterpret_cast<char*>(&result ),
                  reinterpret_cast<char*>(&ptr),
                  ptr_size);

      return result;
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movq (%rax), %rsi
leaq 0x10(%rsp), %r12
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r12, -0x10(%r12)
movq %rsp, %r15
movq %r15, %rdi
callq 0x119ed6
leaq 0x48(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x11d17c
movq %rax, %r15
addq $0x50, %rbx
cmpq %rbx, %rax
je 0x11cb6b
xorl %ebp, %ebp
jmp 0x11cba5
leaq 0x58(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x8(%rax)
movaps %xmm0, 0x18(%rax)
movaps %xmm0, -0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq $0x0, 0x20(%rax)
movq %rsp, %rsi
leaq 0x50(%rsp), %rdx
movq %r14, %rdi
callq 0x119f66
movl %eax, %ebp
xorb $0x1, %bpl
cmpq %rbx, %r15
jne 0x11cbb4
leaq 0x50(%rsp), %rdi
callq 0x2c662a
xorps %xmm0, %xmm0
testb %bpl, %bpl
jne 0x11cc18
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x11c610
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x11c2cc
leaq 0x40(%rax), %rcx
xorl %r14d, %r14d
cmpq %rbx, %rax
cmovneq %rcx, %r14
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x11cc0d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x116090
movq %r14, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x11cc3a
movq 0x10(%rsp), %rsi
incq %rsi
movsd %xmm0, 0x20(%rsp)
callq 0x116090
movsd 0x20(%rsp), %xmm0
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2c662a
jmp 0x11cc7a
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x11cc7a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x116090
jmp 0x11cc7a
jmp 0x11cc77
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x11cc90
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x116090
movq %rbx, %rdi
callq 0x1162e0
// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_groups_examples.cpp
// Function: groups_impl::get<double>::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, exprtk::type_store<double>::parameter_list)
inline T operator() (std::string& result, parameter_list_t parameters) override
   {
      const auto ptr = scalar_t(parameters[0])();
      const int index = static_cast<int>(scalar_t(parameters[1])());

      assert(ptr != T(0));

      auto& set = *make_set_handle<strgrps_cllctn::set_t>(ptr);

      if (
           (index >= 0) &&
           (static_cast<std::size_t>(index) >= set.size())
         )
      {
         return T(0);
      }

      auto itr = set.begin();
      std::advance(itr,index);
      result = *itr;
      return T(1);
   }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdx), %rax
movq (%rax), %rdx
movq 0x18(%rax), %rax
cvttsd2si (%rax), %ecx
movsd (%rdx), %xmm0
movsd %xmm0, (%rsp)
movq (%rsp), %rax
testl %ecx, %ecx
js 0x11d5f7
movl %ecx, %edx
xorps %xmm0, %xmm0
cmpq %rdx, 0x28(%rax)
jbe 0x11d637
movq 0x18(%rax), %rax
movslq %ecx, %r14
testl %ecx, %ecx
jle 0x11d611
movq %rax, %rdi
callq 0x116470
decq %r14
jne 0x11d602
jmp 0x11d620
je 0x11d620
movq %rax, %rdi
callq 0x1164e0
incq %r14
jne 0x11d613
addq $0x20, %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x116530
movsd 0x1a9a61(%rip), %xmm0   # 0x2c7098
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_groups_examples.cpp
// Function: groups_impl::erase<double>::operator()(exprtk::type_store<double>::parameter_list)
inline T operator() (parameter_list_t parameters) override
   {
      auto ptr = scalar_t(parameters[0])();
      assert(ptr != T(0));
      auto& set = *make_set_handle<strgrps_cllctn::set_t>(ptr);
      return process(set,parameters);
   }

// Assembly:
subq $0x18, %rsp
leaq 0x10(%rsp), %rdx
movq %rsi, (%rdx)
movq (%rsi), %rax
movq (%rax), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rsp), %rsi
callq 0x11d6aa
addq $0x18, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_groups_examples.cpp
// Function: groups_impl::erase<double>::process(std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, exprtk::type_store<double>::parameter_list&)
inline T process(strgrps_cllctn::set_t& set, parameter_list_t& parameters)
   {
      std::size_t count = 0;
      for (std::size_t i = 1; i < parameters.size(); ++i)
      {
         count += set.erase(to_str(string_t(parameters[i])));
      }

      return T(count);
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, (%rsp)
movq (%rdx), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
xorpd %xmm0, %xmm0
cmpq $0x2, %rcx
jb 0x11d7ac
movq %rsi, %r14
movl $0x1, %ebp
movl $0x20, %r12d
leaq 0x18(%rsp), %rbx
xorl %r13d, %r13d
movq (%rax), %rax
movq -0x8(%rax,%r12), %rsi
movq (%rax,%r12), %rdx
addq %rsi, %rdx
movq %rbx, %r15
movq %rbx, 0x8(%rsp)
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x119ed6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11d7de
movq 0x28(%r14), %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x11d886
addq %rbx, %r13
subq 0x28(%r14), %r13
movq 0x8(%rsp), %rdi
movq %r15, %rbx
cmpq %r15, %rdi
je 0x11d75b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116090
incq %rbp
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
addq $0x18, %r12
cmpq %rcx, %rbp
jb 0x11d6fc
movq %r13, %xmm1
punpckldq 0x1a9888(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1a9890(%rip), %xmm1   # 0x2c7030
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x11d7d5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116090
movq %rbx, %rdi
callq 0x1162e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/test_ua.cpp
// Function: BenchmarkUserAgent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void BenchmarkUserAgent(string str, int loop) {

    printf("loop cout: %u\n", loop);
    int i;
    struct timeval start, end;
    UserAgent ua;

    gettimeofday(&start, NULL);
    for (i = 0; i < loop; i++) {
        Parse(ua, str, str.size());
        if (i == 0) echo_ua(ua);
    }
    gettimeofday(&end, NULL);

    long time_cost = ((end.tv_sec - start.tv_sec) * 1000000 + \
            end.tv_usec - start.tv_usec);
    printf("cost time: %ld us, %.2f pps\n", time_cost, loop / (time_cost * 1.0) * 1000000);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movl %esi, %ebx
movq %rdi, %r14
leaq 0x25201(%rip), %rdi     # 0x333c5
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x7070
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r13, -0x8(%rax)
movb %r13b, (%rax)
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r13, -0x8(%rax)
movb %r13b, (%rax)
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r13, -0x8(%rax)
movb %r13b, (%rax)
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r13, -0x8(%rax)
movb %r13b, (%rax)
leaq 0xd0(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r13, -0x8(%rax)
movb %r13b, (%rax)
leaq 0xf0(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r13, -0x8(%rax)
movb %r13b, (%rax)
leaq 0x110(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r13, -0x8(%rax)
movb %r13b, (%rax)
leaq 0x130(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r13, -0x8(%rax)
movb %r13b, (%rax)
leaq 0x150(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r13, -0x8(%rax)
movb %r13b, (%rax)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x7590
testl %ebx, %ebx
jle 0xe2e0
leaq 0x10(%rsp), %rbp
movq %rsp, %r15
leaq 0x40(%rsp), %r12
movq %rbp, (%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xe87a
movl 0x8(%r14), %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0xefe0
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0xe2cb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7340
testl %r13d, %r13d
jne 0xe2d8
movq %r12, %rdi
callq 0xf1cb
incl %r13d
cmpl %r13d, %ebx
jne 0xe290
leaq 0x30(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x7590
movq (%r14), %rax
subq 0x20(%rsp), %rax
imulq $0xf4240, %rax, %rsi    # imm = 0xF4240
addq 0x8(%r14), %rsi
subq 0x28(%rsp), %rsi
cvtsi2sd %ebx, %xmm0
cvtsi2sd %rsi, %xmm1
divsd %xmm1, %xmm0
mulsd 0x20cec(%rip), %xmm0    # 0x2f008
leaq 0x250b1(%rip), %rdi     # 0x333d4
movb $0x1, %al
callq 0x7070
leaq 0x40(%rsp), %rdi
callq 0xe772
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0xe364
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7340
jmp 0xe364
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xe772
movq %rbx, %rdi
callq 0x7630
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/userAgent.cpp
// Function: getSubStr(char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
void getSubStr(char *sub, const string ua, int start, int end) {
    size_t len = end - start;
    if (len > 0) {
        const char *p = ua.c_str();
        strncpy(sub, p + start, len);
    }
}

// Assembly:
subl %edx, %ecx
jne 0xebdd
retq
movslq %edx, %rax
addq (%rsi), %rax
movslq %ecx, %rdx
movq %rax, %rsi
jmp 0x71d0
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/userAgent.cpp
// Function: readUtil(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int, char*, int&, char, bool)
void readUtil(string& ua, int ua_len, char *buf, int& index, char delimiter, bool cat) {
    int catalan = 0;
    int i = index;

    for (; i < ua_len; i++) {
        if (ua[i] == delimiter) {
            if (catalan == 0) {
                getSubStr(buf, ua, index, i);
                index = i + 1;
                return;
            }
            catalan--;
        } else if (cat && ua[i] == '(') {
            catalan++;
        }
    }
    getSubStr(buf, ua, index, i);
    index = i + 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movl (%rcx), %r15d
cmpl %esi, %r15d
jge 0xec4e
movl %esi, %eax
movslq %r15d, %rcx
movq (%rdi), %rsi
negl %r15d
addq %rsi, %rcx
negl %eax
xorl %edx, %edx
movb (%rcx), %r10b
cmpb %r8b, %r10b
jne 0xec2d
testl %edx, %edx
je 0xecb1
decl %edx
jmp 0xec40
testb %r9b, %r9b
je 0xec40
xorl %r11d, %r11d
cmpb $0x28, %r10b
sete %r11b
addl %r11d, %edx
decl %r15d
incq %rcx
cmpl %r15d, %eax
jne 0xec19
negl %r15d
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xe87a
movslq (%rbx), %rsi
cmpl %esi, %r15d
je 0xec89
movl %r15d, %eax
subl %esi, %eax
movslq %eax, %rdx
addq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x71d0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xec9f
movq (%r12), %rsi
incq %rsi
callq 0x7340
incl %r15d
movl %r15d, (%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xe87a
movslq (%rbx), %rsi
movl %esi, %eax
addl %r15d, %eax
je 0xecec
leal (%rsi,%r15), %eax
negl %eax
movslq %eax, %rdx
addq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x71d0
negl %r15d
movq 0x28(%rsp), %rdi
jmp 0xec8e
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/userAgent.cpp
// Function: parseProduct(Section&, char*)
void parseProduct(Section& s, char *product) {

    char *ver = NULL;
    char *ptr = strtok_r(product, "/", &ver);

    // remove json '\' character, ex: Mozilla\/5.0
    remove_rchar(product);

    s.name = product;
    if (ptr != NULL) {
        s.version = ver;
    } else {
        s.version = "";
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdx
movq $0x0, (%rdx)
leaq 0x24ceb(%rip), %rsi     # 0x33a00
movq %r14, %rdi
callq 0x7660
movq %rax, %r15
movq %r14, %rdi
callq 0x7160
decl %eax
cltq
cmpb $0x5c, (%r14,%rax)
jne 0xed43
addq %r14, %rax
movb $0x0, (%rax)
cmpb $0x5c, -0x1(%rax)
leaq -0x1(%rax), %rax
je 0xed36
movq 0x8(%rbx), %r12
movq %r14, %rdi
callq 0x7160
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x7550
testq %r15, %r15
je 0xed8b
movq (%rsp), %r14
movq 0x28(%rbx), %r15
addq $0x20, %rbx
movq %r14, %rdi
callq 0x7160
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
jmp 0xeda2
movq 0x28(%rbx), %rdx
addq $0x20, %rbx
leaq 0x2462a(%rip), %rcx     # 0x333c4
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x7550
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/userAgent.cpp
// Function: parseSection(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int, int&)
Section parseSection(string& ua, int ua_len, int& index) {
    char buf[512] = {0,};

    readUtil(ua, ua_len, buf, index, ' ', false);

    Section s;
    parseProduct(s, buf);

    if (index < ua_len && ua[index] == '(') {
        index++;
        memset(buf, 0, 512);
        readUtil(ua, ua_len, buf, index, ')', true);
        split_regex(s.comment, buf, boost::regex("; ")) ;
        index++;
    }

    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
xorl %r13d, %r13d
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0x7200
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
movq %r14, %rcx
movl $0x20, %r8d
xorl %r9d, %r9d
callq 0xebee
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r13, 0x8(%rbx)
movb %r13b, 0x10(%rbx)
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
movq %r13, 0x28(%rbx)
movb %r13b, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movq %r13, 0x50(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xecf6
movslq (%r14), %rax
cmpl %ebp, %eax
jge 0xeeaa
movq (%r15), %rcx
cmpb $0x28, (%rcx,%rax)
jne 0xeeaa
incl %eax
movl %eax, (%r14)
leaq 0x10(%rsp), %r12
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0x7200
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
movq %r14, %rcx
movl $0x29, %r8d
movl $0x1, %r9d
callq 0xebee
leaq 0x24b82(%rip), %rsi     # 0x33a02
movq %rsp, %rdi
xorl %edx, %edx
callq 0xf5ce
leaq 0x40(%rbx), %rdi
leaq 0x10(%rsp), %rsi
movq %rsp, %rdx
xorl %ecx, %ecx
callq 0x1d9a6
leaq 0x8(%rsp), %rdi
callq 0x117e0
incl (%r14)
movq %rbx, %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x117e0
jmp 0xeed3
jmp 0xeed0
movq %rax, %r14
movq %rbx, %rdi
callq 0xf616
movq %r14, %rdi
callq 0x7630
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/userAgent.cpp
// Function: initialize(UserAgent&)
void initialize(UserAgent& p) {
    p.ua = "";
    p.mozilla = "";
    p.platform = "";
    p.os = "";
    p.localization = "";
    p.browser.Engine = "";
    p.browser.EngineVersion = "";
    p.browser.Name = "";
    p.browser.Version = "";
    p.bot = false;
    p.mobile = false;
    p.undecided = false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdx
leaq 0x244cf(%rip), %r14     # 0x333c4
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
leaq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rdx
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
leaq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rdx
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
leaq 0x60(%rbx), %rdi
movq 0x68(%rbx), %rdx
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
leaq 0x80(%rbx), %rdi
movq 0x88(%rbx), %rdx
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
leaq 0xa0(%rbx), %rdi
movq 0xa8(%rbx), %rdx
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
leaq 0xc0(%rbx), %rdi
movq 0xc8(%rbx), %rdx
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
leaq 0xe0(%rbx), %rdi
movq 0xe8(%rbx), %rdx
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
leaq 0x100(%rbx), %rdi
movq 0x108(%rbx), %rdx
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
movw $0x0, 0x120(%rbx)
movb $0x0, 0x122(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/userAgent.cpp
// Function: Parse(UserAgent&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void Parse(UserAgent& p, string ua, const int ua_len) {

#ifdef LRU_CACHE
    if (cacheUA.exists(ua) == true) {
        p = cacheUA.get(ua);
        return;
    }
#endif
    vector<Section> sections;
    initialize(p);
    p.ua = ua;

    int index = 0;

    while (index < ua_len) {
        Section s = parseSection(ua, ua_len, index);
        if (!p.mobile && s.name == "Mobile") {
            p.mobile = true;
        }
        sections.push_back(s);
    }

    int slen = sections.size();
    if (slen > 0) {
        if (sections[0].name == "Mozilla") {
            p.mozilla = sections[0].version;
        }

        detectBrowser(p, sections, slen);
        detectOS(p, sections[0], sections[0].comment.size());

        if (p.undecided) {
            checkBot(p, sections, slen);
        }
#ifdef LRU_CACHE
        cacheUA.put(ua, p);
#endif
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
callq 0xeee3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x71f0
movl $0x0, 0xc(%rsp)
testl %ebp, %ebp
jle 0xf0c3
leaq 0x30(%rsp), %r12
leaq 0xc(%rsp), %r13
leaq 0x10(%rsp), %r15
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %r13, %rcx
callq 0xedb3
cmpb $0x0, 0x121(%rbx)
jne 0xf06c
movq %r12, %rdi
leaq 0x2821a(%rip), %rsi     # 0x37276
callq 0x70d0
testl %eax, %eax
jne 0xf06c
movb $0x1, 0x121(%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0xf656
leaq 0x70(%rsp), %rdi
callq 0xf6ee
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xf09d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x7340
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xf0b9
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x7340
cmpl %ebp, 0xc(%rsp)
jl 0xf039
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
subq %rdi, %rax
shrq $0x3, %rax
imull $0xba2e8ba3, %eax, %ebp # imm = 0xBA2E8BA3
testl %ebp, %ebp
jle 0xf140
leaq 0x2252e(%rip), %rsi     # 0x31613
callq 0x70d0
testl %eax, %eax
jne 0xf100
movq 0x10(%rsp), %rsi
addq $0x20, %rsi
leaq 0x20(%rbx), %rdi
callq 0x71f0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x2d914
movq 0x10(%rsp), %rsi
movq 0x48(%rsi), %rdx
subq 0x40(%rsi), %rdx
shrq $0x5, %rdx
movq %rbx, %rdi
callq 0x25f8e
cmpb $0x1, 0x122(%rbx)
jne 0xf140
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x281d4
leaq 0x10(%rsp), %rdi
callq 0xf680
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf160
jmp 0xf160
movq %rax, %rbx
jmp 0xf172
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xf616
leaq 0x10(%rsp), %rdi
callq 0xf680
movq %rbx, %rdi
callq 0x7630
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/operatingSystem.cpp
// Function: getPlatform(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, int)
string getPlatform(vector<string>& comment, int slen) {
    if (slen > 0) {
        if (comment[0] != "compatible") {
            if (starts_with(comment[0], "Windows")) {
                return "Windows";
            } else if  (starts_with(comment[0], "Symbian")) {
                return "Symbian";
            } else if (starts_with(comment[0], "webOS")) {
                return "webOS";
            } else if (comment[0] == "BB10") {
                return "BlackBerry";
            }
            return comment[0];
        }
    }
    return "";
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %edx, %edx
jle 0x24370
movq %rsi, %r14
movq (%rsi), %rdi
leaq 0x12ea8(%rip), %rsi     # 0x371ac
callq 0x70d0
testl %eax, %eax
je 0x24370
movq (%r14), %rdi
movq 0x8(%rdi), %rdx
testq %rdx, %rdx
je 0x2442b
leaq -0x1(%rdx), %rax
cmpq $0x6, %rax
movl $0x6, %esi
cmovbq %rax, %rsi
movq (%rdi), %rcx
incq %rsi
xorl %r8d, %r8d
leaq 0x12e79(%rip), %r9      # 0x371b7
movb (%rcx,%r8), %r10b
cmpb (%r8,%r9), %r10b
jne 0x24389
incq %r8
cmpq %r8, %rsi
jne 0x2433e
cmpq $0x6, %rax
jb 0x24389
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x12e53(%rip), %rsi     # 0x371b7
leaq 0x12e53(%rip), %rdx     # 0x371be
jmp 0x2446e
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xf046(%rip), %rdx      # 0x333c4
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0x24471
testq %rdx, %rdx
je 0x2442b
cmpq $0x6, %rax
movl $0x6, %esi
cmovbq %rax, %rsi
incq %rsi
xorl %r8d, %r8d
leaq 0xe8da(%rip), %r9       # 0x32c86
movb (%rcx,%r8), %r10b
cmpb (%r8,%r9), %r10b
jne 0x243de
incq %r8
cmpq %r8, %rsi
jne 0x243ac
cmpq $0x6, %rax
jb 0x243de
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xe8b4(%rip), %rsi      # 0x32c86
leaq 0xe8b4(%rip), %rdx      # 0x32c8d
jmp 0x2446e
testq %rdx, %rdx
je 0x2442b
cmpq $0x4, %rax
movl $0x4, %edx
cmovbq %rax, %rdx
incq %rdx
xorl %esi, %esi
leaq 0xde64(%rip), %r8       # 0x32260
movb (%rcx,%rsi), %r9b
cmpb (%rsi,%r8), %r9b
jne 0x2442b
incq %rsi
cmpq %rsi, %rdx
jne 0x243fc
cmpq $0x4, %rax
jb 0x2442b
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xde3e(%rip), %rsi      # 0x32260
leaq 0xde3c(%rip), %rdx      # 0x32265
jmp 0x2446e
leaq 0xe141(%rip), %rsi      # 0x32573
callq 0x70d0
testl %eax, %eax
je 0x24459
movq (%r14), %rax
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xe87a
jmp 0x24476
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xdff2(%rip), %rsi      # 0x32459
leaq 0xdff5(%rip), %rdx      # 0x32463
movq %rbx, %rdi
callq 0xe90a
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/operatingSystem.cpp
// Function: trident(UserAgent&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, int)
void trident(UserAgent& p, vector<string>& comment, int slen) {
    p.platform = "Windows";

    if (p.os == "") {
        if (slen > 2) {
            p.os = normalizeOS(comment[2]);
        } else {
            p.os = "Windows NT 4.0";
        }
    }
    for (int i = 0; i < slen; i++) {
        if (starts_with(comment[i], "IEMobile")) {
            p.mobile = true;
            return;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x40, %rdi
movq 0x48(%rbx), %rdx
leaq 0x1225d(%rip), %rcx     # 0x371b7
movl $0x7, %r8d
xorl %esi, %esi
callq 0x7550
leaq 0x60(%rbx), %r15
leaq 0xe452(%rip), %rsi      # 0x333c4
movq %r15, %rdi
callq 0x70d0
testl %eax, %eax
jne 0x25017
cmpl $0x3, %ebp
jl 0x24ffc
movq (%r14), %rax
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xe87a
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x24481
leaq 0x28(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x7410
movq (%r12), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x24fe3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7340
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x25017
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7340
jmp 0x25017
movq 0x68(%rbx), %rdx
leaq 0x1225e(%rip), %rcx     # 0x37265
movl $0xe, %r8d
movq %r15, %rdi
xorl %esi, %esi
callq 0x7550
testl %ebp, %ebp
jle 0x25080
movq (%r14), %rax
movl %ebp, %ecx
xorl %edx, %edx
leaq 0x1224b(%rip), %rsi     # 0x37274
movq %rdx, %r8
shlq $0x5, %r8
movq 0x8(%rax,%r8), %rdi
testq %rdi, %rdi
je 0x2506f
addq %rax, %r8
movq (%r8), %r8
decq %rdi
cmpq $0x7, %rdi
movl $0x7, %r9d
cmovbq %rdi, %r9
incq %r9
xorl %r10d, %r10d
movb (%r8,%r10), %r11b
cmpb (%r10,%rsi), %r11b
jne 0x2506f
incq %r10
cmpq %r10, %r9
jne 0x25057
cmpq $0x7, %rdi
jae 0x25079
incq %rdx
cmpq %rcx, %rdx
jne 0x25029
jmp 0x25080
movb $0x1, 0x121(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x250a9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7340
movq %rbx, %rdi
callq 0x7630
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/operatingSystem.cpp
// Function: dalvik(UserAgent&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, int)
void dalvik(UserAgent& p, vector<string>& comment, int slen) {
    if (starts_with(comment[0], "Linux")) {
        p.platform = comment[0];
        if (slen > 2) {
            p.os = comment[2];
        }
        p.mobile = true;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq (%rsi), %rsi
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x25318
movl %edx, %ebp
movq %rdi, %rbx
decq %rax
cmpq $0x4, %rax
movl $0x4, %ecx
cmovbq %rax, %rcx
movq (%rsi), %rdx
incq %rcx
xorl %edi, %edi
leaq 0xbf1f(%rip), %r8       # 0x311fa
movb (%rdx,%rdi), %r9b
cmpb (%rdi,%r8), %r9b
jne 0x25318
incq %rdi
cmpq %rdi, %rcx
jne 0x252db
cmpq $0x4, %rax
jb 0x25318
leaq 0x40(%rbx), %rdi
callq 0x71f0
cmpl $0x3, %ebp
jl 0x25311
movq (%r14), %rsi
addq $0x40, %rsi
leaq 0x60(%rbx), %rdi
callq 0x71f0
movb $0x1, 0x121(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/operatingSystem.cpp
// Function: split_v(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, int, int)
vector<string> split_v(const vector<string>& data, int start, int end)
{
    int n = end - start;
    if (n <= 0) {
        return std::vector<string>();
    }

    std::vector<string> y(n);
    for (int i = 0; i < n; i++) {
        y[i] = data[start++];
    }
    return y;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
subl %edx, %ecx
jle 0x25374
movl %edx, %ebp
movq %rsi, %r14
movl %ecx, %r15d
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x26342
movslq %ebp, %r12
shlq $0x5, %r12
shlq $0x5, %r15
xorl %r13d, %r13d
movq (%r14), %rsi
addq %r12, %rsi
addq %r13, %rsi
movq (%rbx), %rdi
addq %r13, %rdi
callq 0x71f0
addq $0x20, %r13
cmpq %r13, %r15
jne 0x25355
jmp 0x25382
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xf6ee
movq %r14, %rdi
callq 0x7630
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/bot.cpp
// Function: googleBot(UserAgent&)
bool googleBot(UserAgent& p) {
    if (contains(p.ua, "Googlebot")) {
        p.platform = "";
        p.undecided = true;
    }
    return p.undecided;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
leaq (%rcx,%rdx), %rax
testq %rdx, %rdx
je 0x27fe8
decq %rdx
leaq 0xf3bc(%rip), %rsi      # 0x37368
xorl %edi, %edi
movb (%rcx,%rdi), %r8b
cmpb (%rdi,%rsi), %r8b
jne 0x27fd0
leaq 0x1(%rdi), %r8
cmpq %rdi, %rdx
je 0x27fca
cmpq $0x8, %rdi
movq %r8, %rdi
jne 0x27fae
leaq (%rcx,%r8), %r9
jmp 0x27fd7
leaq (%rcx,%rdi), %r9
movq %rdi, %r8
cmpq $0x9, %r8
je 0x27fed
incq %rcx
decq %rdx
cmpq %rax, %rcx
jne 0x27fac
movq %rax, %rcx
jmp 0x27ff0
movq %r9, %rax
cmpq %rax, %rcx
je 0x28015
leaq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rdx
leaq 0xb3c0(%rip), %rcx      # 0x333c4
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x7550
movb $0x1, 0x122(%rbx)
movb 0x122(%rbx), %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/bot.cpp
// Function: setSimple(UserAgent&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
void setSimple(UserAgent& p, string name, string version, bool bot) {
    p.bot = bot;
    if(!bot) {
        p.mozilla = "";
    }
    p.browser.Name = replace_all_copy(name, "\\", "");
    p.browser.Version = version;
    p.browser.Engine = "";
    p.browser.EngineVersion = "";
    p.os = "";
    p.localization = "";
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movb %cl, 0x120(%rdi)
testl %ecx, %ecx
jne 0x28054
leaq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rdx
leaq 0xb37a(%rip), %rcx      # 0x333c4
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x7550
leaq 0xf317(%rip), %rax      # 0x37372
movq %rax, 0x20(%rsp)
leaq 0xf30c(%rip), %rax      # 0x37373
movq %rax, 0x28(%rsp)
movq (%r15), %rcx
movq 0x8(%r15), %rdx
leaq (%rcx,%rdx), %rax
testq %rdx, %rdx
je 0x28089
cmpb $0x5c, (%rcx)
je 0x2808e
incq %rcx
decq %rdx
jne 0x2807c
movq %rax, %rcx
jmp 0x28092
leaq 0x1(%rcx), %rax
leaq 0x58(%rsp), %r8
movq %rcx, (%r8)
movq %rax, 0x8(%r8)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0xb30c(%rip), %rcx      # 0x333c4
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rcx, %rdx
callq 0x2799e
leaq 0xe0(%rbx), %rdi
movq %r12, %rsi
callq 0x7410
movq (%r12), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x280f5
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7340
leaq 0xa0(%rbx), %r15
leaq 0x100(%rbx), %rdi
movq %r14, %rsi
callq 0x71f0
movq 0xa8(%rbx), %rdx
leaq 0xb2ab(%rip), %r14      # 0x333c4
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
leaq 0xc0(%rbx), %rdi
movq 0xc8(%rbx), %rdx
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
leaq 0x60(%rbx), %rdi
movq 0x68(%rbx), %rdx
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
movq 0x88(%rbx), %rdx
subq $-0x80, %rbx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x7550
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/yayuntian[P]user_agent/bot.cpp
// Function: fixOther(UserAgent&, std::vector<Section, std::allocator<Section>>&, int)
void fixOther(UserAgent& p, vector<Section>& sections, int slen) {
    if (slen > 0) {
        p.browser.Name = sections[0].name;
        p.browser.Version = sections[0].version;
        p.mozilla = "";
    }
}

// Assembly:
testl %edx, %edx
jle 0x281d3
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
addq $0xe0, %rdi
callq 0x71f0
movq (%r14), %rsi
addq $0x20, %rsi
leaq 0x100(%rbx), %rdi
callq 0x71f0
movq 0x28(%rbx), %rdx
addq $0x20, %rbx
leaq 0xb205(%rip), %rcx      # 0x333c4
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7550
retq
// File: /workspace/github_cpp_makefile_star2_O1/shirat74[P]resample/Image.cc
// Function: Image::Image(int, int, signed char, signed char)
Image::Image (int32_t width, int32_t height, int8_t num_comp, int8_t bpc)
{
  this->width  = width;
  this->height = height;
  this->nComps = num_comp;
  this->bpc    = bpc;

  data = new Color[width*height];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movb %cl, 0x8(%rdi)
movb %r8b, 0x9(%rdi)
imull %esi, %edx
movslq %edx, %rax
movl $0xc, %ecx
mulq %rcx
movq $-0x1, %rdi
cmovnoq %rax, %rdi
callq 0x2040
movq %rax, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/shirat74[P]resample/Image.cc
// Function: Image::Image(int, int, signed char, signed char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Image::Image (int32_t width, int32_t height, int8_t nComps, int8_t bpc,
              const std::string& raster)
{
  this->width  = width;
  this->height = height;
  this->nComps = nComps;
  this->bpc    = bpc;

  data = data_from_string(raster, width, height, nComps, bpc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movb %r14b, 0x8(%rdi)
movb %bpl, 0x9(%rdi)
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r9), %rsi
movq 0x8(%r9), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x2bfe
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x26f4
movq %rax, 0x10(%rbx)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x26be
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x22d0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x26ec
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x22d0
movq %rbx, %rdi
callq 0x2400
// File: /workspace/github_cpp_makefile_star2_O1/shirat74[P]resample/Image.cc
// Function: Image::getPixel(int, int) const
Color
Image::getPixel (int32_t x, int32_t y) const
{
  if (x < 0) {
    while (x < 0)
      x += width;
  } else if (x >= width) {
    while (x >= width)
      x -= width;
  }
  if (y < 0) {
    while (y < 0)
      y += height;
  } else if (y >= height) {
    while (y >= height)
      y -= height;
  }
  return data[y * width + x];
}

// Assembly:
movl (%rdi), %eax
testl %esi, %esi
js 0x2a32
cmpl %esi, %eax
jg 0x2a36
addl %eax, %esi
subl %eax, %esi
cmpl %eax, %esi
jge 0x2a2a
jmp 0x2a36
addl %eax, %esi
js 0x2a32
movl 0x4(%rdi), %eax
testl %edx, %edx
js 0x2a4b
cmpl %edx, %eax
jg 0x2a4f
addl %eax, %edx
subl %eax, %edx
cmpl %eax, %edx
jge 0x2a43
jmp 0x2a4f
addl %eax, %edx
js 0x2a4b
imull (%rdi), %edx
movq 0x10(%rdi), %rcx
addl %esi, %edx
movslq %edx, %rax
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,4), %rax
movl 0x8(%rcx,%rdx,4), %edx
retq
// File: /workspace/github_cpp_makefile_star2_O1/shirat74[P]resample/Image.cc
// Function: Image::putPixel(int, int, Color)
void
Image::putPixel (int32_t x, int32_t y, Color value)
{
  if (x < 0) {
    while (x < 0)
      x += width;
  } else if (x >= width) {
    while (x >= width)
      x -= width;
  }
  if (y < 0) {
    while (y < 0)
      y += height;
  } else if (y >= height) {
    while (y >= height)
      y -= height;
  }
  data[y * width + x] = value;
}

// Assembly:
movl (%rdi), %eax
testl %esi, %esi
js 0x2a7c
cmpl %esi, %eax
jg 0x2a80
addl %eax, %esi
subl %eax, %esi
cmpl %eax, %esi
jge 0x2a74
jmp 0x2a80
addl %eax, %esi
js 0x2a7c
movl 0x4(%rdi), %eax
testl %edx, %edx
js 0x2a95
cmpl %edx, %eax
jg 0x2a99
addl %eax, %edx
subl %eax, %edx
cmpl %eax, %edx
jge 0x2a8d
jmp 0x2a99
addl %eax, %edx
js 0x2a95
movq 0x10(%rdi), %rax
imull (%rdi), %edx
addl %esi, %edx
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rdx
movq %rcx, (%rax,%rdx,4)
movl %r8d, %ecx
shrl $0x10, %ecx
movb %cl, 0xa(%rax,%rdx,4)
movw %r8w, 0x8(%rax,%rdx,4)
retq
// File: /workspace/github_cpp_makefile_star2_O1/shirat74[P]resample/Image.cc
// Function: Image::getPixelBytes[abi:cxx11]() const
std::string
Image::getPixelBytes () const
{
  std::string bytes(width * height * nComps * (bpc / 8), 0);
  for (int32_t j = 0; j < height; j++) {
    for (int32_t i = 0; i < width; i++) {
      Color  pixel = getPixel(i, j);
      size_t pos   = (bpc / 8) * nComps * (j * width + i);
      for (int c = 0; c < nComps; c++) {
        if (bpc == 8) {
          bytes[pos + c] = round(255 * (pixel.v[c] / 65535.0));
        } else {
          bytes[pos+2*c]   = (pixel.v[c] >> 8) & 0xff;
          bytes[pos+2*c+1] =  pixel.v[c] & 0xff;
        }
      }
    }
  }
  return bytes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rsi), %eax
imull (%rsi), %eax
movsbl 0x8(%rsi), %ecx
imull %eax, %ecx
movb 0x9(%rsi), %al
movl %eax, %edx
sarb $0x7, %dl
shrb $0x5, %dl
addb %al, %dl
sarb $0x3, %dl
movsbl %dl, %eax
imull %ecx, %eax
movslq %eax, %rsi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x2320
cmpl $0x0, 0x4(%r14)
jle 0x2beb
movl (%r14), %r12d
testl %r12d, %r12d
jle 0x2bde
xorl %ebp, %ebp
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x2a1e
movq %rax, 0x8(%rsp)
movw %dx, 0x10(%rsp)
shrl $0x10, %edx
movb %dl, 0x12(%rsp)
movsbl 0x8(%r14), %eax
testl %eax, %eax
jle 0x2bd0
movb 0x9(%r14), %cl
movl %ecx, %edx
sarb $0x7, %dl
shrb $0x5, %dl
addb %cl, %dl
sarb $0x3, %dl
movsbl %dl, %ecx
imull %r15d, %r12d
addl %ebp, %r12d
imull %eax, %r12d
imull %ecx, %r12d
movslq %r12d, %r12
xorl %r13d, %r13d
cmpb $0x8, 0x9(%r14)
movzwl 0x8(%rsp,%r13,2), %eax
jne 0x2bae
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x347b(%rip), %xmm0     # 0x6010
mulsd 0x346b(%rip), %xmm0     # 0x6008
callq 0x2110
cvttsd2si %xmm0, %eax
movq %r12, %rcx
movq %r13, %rdx
jmp 0x2bbd
leaq (%r12,%r13,2), %rcx
movq (%rbx), %rdx
movb %ah, (%rdx,%rcx)
movl $0x1, %edx
addq (%rbx), %rcx
movb %al, (%rdx,%rcx)
incq %r13
movsbq 0x8(%r14), %rax
cmpq %rax, %r13
jl 0x2b76
incl %ebp
movl (%r14), %r12d
cmpl %r12d, %ebp
jl 0x2b22
incl %r15d
cmpl 0x4(%r14), %r15d
jl 0x2b14
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/shirat74[P]resample/./Image.hh
// Function: Image::reset(int, int, signed char, signed char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void reset(int32_t width, int32_t height,
             int8_t nComps, int8_t bpc, const std::string raster)
  {
    this->width  = width;
    this->height = height;
    this->nComps = nComps;
    this->bpc    = bpc;
    delete data;
    data = data_from_string(raster, width, height, nComps, bpc);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r13
movl %r8d, %r14d
movl %ecx, %r12d
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movb %r12b, 0x8(%rdi)
movb %r14b, 0x9(%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x36c1
movl $0xc, %esi
callq 0x22d0
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x2bfe
movsbl %r12b, %ecx
movsbl %r14b, %r8d
movq %r13, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x26f4
movq %rax, 0x10(%rbx)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3717
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x22d0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3745
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x22d0
movq %rbx, %rdi
callq 0x2400
nop
// File: /workspace/github_cpp_makefile_star2_O1/shirat74[P]resample/Resampler.cc
// Function: Resampler::B_spline_filter(float)
float Resampler::B_spline_filter (float t)
{
  if (t < 0.0)
    t = -t;
  if (t < 1.0) {
    return ((0.5 * t * t * t) - t * t + (2.0 / 3.0));
  } else if (t < 2) {
    t = 2 - t;
    return ((1.0 / 6.0) * (t * t * t));
  }
  return 0.0;
}

// Assembly:
movaps 0x27f5(%rip), %xmm1     # 0x6170
xorps %xmm0, %xmm1
maxss %xmm0, %xmm1
movss 0x27ca(%rip), %xmm0     # 0x6154
ucomiss %xmm1, %xmm0
jbe 0x39c6
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd 0x26f2(%rip), %xmm2     # 0x6090
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
mulss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm0, %xmm2
subsd %xmm1, %xmm2
addsd 0x27da(%rip), %xmm2     # 0x6198
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
retq
xorps %xmm0, %xmm0
movss 0x2787(%rip), %xmm2     # 0x6158
ucomiss %xmm1, %xmm2
jbe 0x39f5
subss %xmm1, %xmm2
movaps %xmm2, %xmm0
mulss %xmm2, %xmm0
mulss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x279f(%rip), %xmm0     # 0x6190
cvtsd2ss %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/shirat74[P]resample/Resampler.cc
// Function: Resampler::bicubic_filter(float)
float Resampler::bicubic_filter (float t)
{
  if (t < 0.0)
    t = -t;
  if (t < 1.0)
    return ((a+2.0)*t*t*t - (a+3.0)*t*t + 1.0);
  else if (t < 2.0)
   return (a*t*t*t - 5.0*a*t*t + 8.0*a*t - 4.0*a);
  return 0.0;
}

// Assembly:
movaps 0x2773(%rip), %xmm2     # 0x6170
xorps %xmm0, %xmm2
maxss %xmm0, %xmm2
cvtss2sd %xmm2, %xmm1
movss 0x2744(%rip), %xmm0     # 0x6154
ucomiss %xmm2, %xmm0
jbe 0x3a4a
movsd 0x27a3(%rip), %xmm0     # 0x61c0
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movsd 0x279b(%rip), %xmm2     # 0x61c8
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
addsd 0x2643(%rip), %xmm0     # 0x6088
cvtsd2ss %xmm0, %xmm0
retq
xorps %xmm0, %xmm0
movss 0x2703(%rip), %xmm3     # 0x6158
ucomiss %xmm2, %xmm3
jbe 0x3a9d
movsd 0x273e(%rip), %xmm0     # 0x61a0
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movsd 0x2736(%rip), %xmm2     # 0x61a8
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
mulsd 0x2726(%rip), %xmm1     # 0x61b0
addsd %xmm0, %xmm1
addsd 0x2722(%rip), %xmm1     # 0x61b8
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/shirat74[P]resample/Resampler.cc
// Function: Resampler::Mitchell_filter(float)
float Resampler::Mitchell_filter (float t)
{
  float tt = t*t;
  if (t < 0)
    t = -t;
  if (t < 1.0) {
    t = (((12.0 - 9.0 * B - 6.0 * C) * (t * tt))
        + ((-18.0 + 12.0 * B + 6.0 * C) * tt)
        + (6.0 - 2 * B));
    return (t / 6.0);
  } else if (t < 2.0) {
    t = (((-1.0 * B - 6.0 * C) * (t * tt))
        + ((6.0 * B + 30.0 * C) * tt)
        + ((-12.0 * B - 48.0 * C) * t)
        + (8.0 * B + 24 * C));
    return (t / 6.0);
  }
  return 0.0;
}

// Assembly:
movaps 0x2605(%rip), %xmm1     # 0x6170
xorps %xmm0, %xmm1
maxss %xmm0, %xmm1
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
movss 0x25d3(%rip), %xmm0     # 0x6154
ucomiss %xmm1, %xmm0
jbe 0x3bb6
mulss %xmm2, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtss2sd %xmm2, %xmm1
mulsd 0x2660(%rip), %xmm1     # 0x6200
mulsd 0x2660(%rip), %xmm0     # 0x6208
addsd %xmm1, %xmm0
addsd 0x265c(%rip), %xmm0     # 0x6210
jmp 0x3c01
xorps %xmm0, %xmm0
movss 0x2597(%rip), %xmm3     # 0x6158
ucomiss %xmm1, %xmm3
jbe 0x3c0d
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
mulss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
cvtss2sd %xmm2, %xmm2
mulsd 0x25ff(%rip), %xmm2     # 0x61e0
mulsd 0x25ff(%rip), %xmm1     # 0x61e8
mulsd 0x25ff(%rip), %xmm0     # 0x61f0
addsd %xmm2, %xmm1
addsd %xmm1, %xmm0
addsd 0x25f7(%rip), %xmm0     # 0x61f8
cvtsd2ss %xmm0, %xmm0
divss 0x2553(%rip), %xmm0     # 0x6160
retq