LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ArashPartow[P]exprtk-extras/exprtk_groups_examples.cpp
// Function: groups_impl::add<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:
pushq %rax
movq %rsp, %rdx
movq %rsi, (%rdx)
movq (%rsi), %rax
movq (%rax), %rax
movq (%rax), %rsi
callq 0x112fdc
popq %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ArashPartow[P]exprtk-extras/exprtk_groups_examples.cpp
// Function: groups_impl::contains<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));
      const auto& set = *make_set_handle<strgrps_cllctn::set_t>(ptr);
      return process(set, parameters);
   }

// Assembly:
pushq %rax
movq %rsp, %rdx
movq %rsi, (%rdx)
movq (%rsi), %rax
movq (%rax), %rax
movq (%rax), %rsi
callq 0x1130ac
popq %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ArashPartow[P]exprtk-extras/exprtk_groups_examples.cpp
// Function: groups_impl::contains<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>>>> const&, exprtk::type_store<double>::parameter_list&) const
inline T process(const strgrps_cllctn::set_t& set, parameter_list_t& parameters) const
   {
      for (std::size_t i = 1; i < parameters.size(); ++i)
      {
         if (set.count(to_str(string_t(parameters[i]))))
         {
            return T(1);
         }
      }

      return T(0);
   }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
pushq $0x18
popq %rbp
xorl %r12d, %r12d
leaq 0x18(%rsp), %r15
movq (%rbx), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
incq %r12
cmpq %rax, %r12
jae 0x113130
leaq (%rcx,%rbp), %rax
movq %rax, 0x8(%rsp)
movq (%rcx,%rbp), %rax
movq %rax, 0x10(%rsp)
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x112ecc
movq %r14, %rdi
movq %r15, %rsi
callq 0x113158
movq %rax, %r13
addq $0x18, %rbp
movq %r15, %rdi
callq 0x10e5e8
testq %r13, %r13
movsd 0x124f4c(%rip), %xmm0   # 0x238078
je 0x1130cb
jmp 0x113133
xorps %xmm0, %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x10e5e8
movq %rbx, %rdi
callq 0x10e310
nop
// File: /workspace/github_cpp_makefile_star2_O2/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), %rcx
movq 0x18(%rax), %rdx
movq (%rcx), %rax
cvttsd2si (%rdx), %esi
testl %esi, %esi
js 0x113265
movl %esi, %ecx
xorps %xmm0, %xmm0
cmpq %rcx, 0x28(%rax)
jbe 0x11328e
movq 0x18(%rax), %rax
movq %rsp, %r14
movq %rax, (%r14)
movq %r14, %rdi
callq 0x113296
movq (%r14), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x10e560
movsd 0x124dea(%rip), %xmm0   # 0x238078
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rax
movq %rsp, %rdx
movq %rsi, (%rdx)
movq (%rsi), %rax
movq (%rax), %rax
movq (%rax), %rsi
callq 0x11332c
popq %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
pushq $0x1
popq %r13
pushq $0x18
popq %r12
xorl %ebp, %ebp
leaq 0x18(%rsp), %r15
movq (%rbx), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
subq %rcx, %rax
cqto
pushq $0x18
popq %rsi
idivq %rsi
cmpq %rax, %r13
jae 0x1133a7
leaq (%rcx,%r12), %rax
movq %rax, 0x8(%rsp)
movq (%rcx,%r12), %rax
movq %rax, 0x10(%rsp)
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x112ecc
movq %r14, %rdi
movq %r15, %rsi
callq 0x1133ec
addq %rax, %rbp
movq %r15, %rdi
callq 0x10e5e8
incq %r13
addq $0x18, %r12
jmp 0x11334f
movq %rbp, %xmm1
punpckldq 0x124c6c(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x124c74(%rip), %xmm1   # 0x238030
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x10e5e8
movq %rbx, %rdi
callq 0x10e310
// File: /workspace/github_cpp_makefile_star2_O2/yayuntian[P]user_agent/test_ua.cpp
// Function: TestUserAgent()
void TestUserAgent() {
    UserAgent ua;
    for (auto p : uastrings) {
        Parse(ua, p.ua, p.ua.size());

        if (p.expected != format(ua)) {
            fprintf(stderr, "Test: %s\ngot:      %s\nexpected: %s\n",
                    p.title.c_str(), format(ua).c_str(), p.expected.c_str());
            exit(1);
        }
    }
    printf("Test %ld Case OK.\n", uastrings.size());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
leaq 0xa0(%rsp), %r13
movq %r13, %rdi
callq 0xa6a8
movq 0x37261(%rip), %r14     # 0x413c0
movq 0x37262(%rip), %rbx     # 0x413c8
leaq 0x80(%rsp), %rbp
movq %rsp, %r15
cmpq %rbx, %r14
je 0xa1e5
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0xa712
movq %rbp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x7490
movl 0x48(%rsp), %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0xad79
movq %rbp, %rdi
callq 0x7748
movq %r15, %rdi
movq %r13, %r12
movq %r13, %rsi
callq 0x9dac
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0xa768
movl %eax, %r13d
movq %r15, %rdi
callq 0x7748
testb %r13b, %r13b
jne 0xa22b
leaq 0x20(%rsp), %rdi
callq 0xa5d2
addq $0x60, %r14
movq %r12, %r13
jmp 0xa171
movq 0x371dc(%rip), %rax     # 0x413c8
subq 0x371cd(%rip), %rax     # 0x413c0
pushq $0x60
popq %rcx
cqto
idivq %rcx
leaq 0x211b0(%rip), %rdi     # 0x2b3b2
movq %rax, %rsi
xorl %eax, %eax
callq 0x7060
leaq 0xa0(%rsp), %rdi
callq 0xa772
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x36d9e(%rip), %rax     # 0x40fd0
movq (%rax), %r14
movq 0x20(%rsp), %rbx
movq %rsp, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x9dac
movq %rsp, %r15
movq (%r15), %rcx
movq 0x60(%rsp), %r8
leaq 0x21132(%rip), %rsi     # 0x2b38e
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x74c0
movq %r15, %rdi
callq 0x7748
pushq $0x1
popq %rdi
callq 0x73f0
jmp 0xa28f
jmp 0xa28f
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x7748
jmp 0xa292
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xa5d2
jmp 0xa2a1
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0xa772
movq %rbx, %rdi
callq 0x7640
// File: /workspace/github_cpp_makefile_star2_O2/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 0x210f2(%rip), %rdi     # 0x2b3c5
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x7060
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0xa6a8
movq %rsp, %rdi
xorl %esi, %esi
callq 0x7580
testl %ebx, %ebx
movl $0x0, %ebp
cmovgl %ebx, %ebp
leaq 0x10(%rsp), %r12
cmpl %r13d, %ebp
je 0xa33c
movq %r12, %rdi
movq %r14, %rsi
callq 0x7490
movl 0x8(%r14), %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0xad79
movq %r12, %rdi
callq 0x7748
testl %r13d, %r13d
jne 0xa337
movq %r15, %rdi
callq 0xaf21
incl %r13d
jmp 0xa303
leaq 0x30(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x7580
movq (%r14), %rax
subq (%rsp), %rax
imulq $0xf4240, %rax, %rsi    # imm = 0xF4240
addq 0x8(%r14), %rsi
subq 0x8(%rsp), %rsi
cvtsi2sd %ebx, %xmm0
cvtsi2sd %rsi, %xmm1
divsd %xmm1, %xmm0
mulsd 0x1cc91(%rip), %xmm0    # 0x27008
leaq 0x21056(%rip), %rdi     # 0x2b3d4
movb $0x1, %al
callq 0x7060
leaq 0x40(%rsp), %rdi
callq 0xa772
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7748
jmp 0xa3b3
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xa772
movq %rbx, %rdi
callq 0x7640
// File: /workspace/github_cpp_makefile_star2_O2/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 0xaa91
retq
movslq %edx, %rax
addq (%rsi), %rax
movslq %ecx, %rdx
movq %rax, %rsi
jmp 0x71d0
// File: /workspace/github_cpp_makefile_star2_O2/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, %r15
movq %rdi, %rax
movslq (%rcx), %r14
movq (%rdi), %rcx
movslq %esi, %rdx
xorl %esi, %esi
leaq 0x8(%rsp), %r12
leaq 0x28(%rsp), %rdi
cmpq %rdx, %r14
jge 0xaafc
movb (%rcx,%r14), %r10b
cmpb %r8b, %r10b
jne 0xaae1
testl %esi, %esi
je 0xaaf9
decl %esi
jmp 0xaaf4
testb %r9b, %r9b
je 0xaaf4
xorl %r11d, %r11d
cmpb $0x28, %r10b
sete %r11b
addl %r11d, %esi
incq %r14
jmp 0xaacb
movq %rdi, %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x7490
movl (%rbx), %edx
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %ecx
callq 0xaa8c
movq %r12, %rdi
callq 0x7748
incl %r14d
movl %r14d, (%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x20eb8(%rip), %rsi     # 0x2ba08
movq %r14, %rdi
callq 0x7680
movq %rax, %r15
movq %r14, %rdi
callq 0x7150
cltq
addq %r14, %rax
decq %rax
cmpb $0x5c, (%rax)
jne 0xab78
movb $0x0, (%rax)
decq %rax
jmp 0xab6b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7700
testq %r15, %r15
je 0xab93
movq 0x8(%rsp), %rsi
addq $0x20, %rbx
jmp 0xab9e
addq $0x20, %rbx
leaq 0x20826(%rip), %rsi     # 0x2b3c4
movq %rbx, %rdi
callq 0x7700
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0x20
popq %r8
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
movq %r14, %rcx
xorl %r9d, %r9d
callq 0xaaa2
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb %r13b, 0x10(%rbx)
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
andq $0x0, 0x28(%rbx)
movb %r13b, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
andq $0x0, 0x50(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xab31
movslq (%r14), %rax
cmpl %ebp, %eax
jge 0xaca4
movq (%r15), %rcx
cmpb $0x28, (%rcx,%rax)
jne 0xaca4
incl %eax
movl %eax, (%r14)
leaq 0x10(%rsp), %r12
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0x7200
pushq $0x29
popq %r8
pushq $0x1
popq %r9
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0xaaa2
leaq 0x20d90(%rip), %rsi     # 0x2ba0a
movq %rsp, %rdi
xorl %edx, %edx
callq 0xb184
leaq 0x40(%rbx), %rdi
leaq 0x10(%rsp), %rsi
movq %rsp, %rdx
xorl %ecx, %ecx
callq 0x17a82
leaq 0x8(%rsp), %rdi
callq 0xd0f4
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 0xd0f4
jmp 0xaccd
jmp 0xacca
movq %rax, %r14
movq %rbx, %rdi
callq 0xb1b6
movq %r14, %rdi
callq 0x7640
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0x206d9(%rip), %r14     # 0x2b3c4
movq %r14, %rsi
callq 0x7700
leaq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x7700
leaq 0x40(%rbx), %rdi
movq %r14, %rsi
callq 0x7700
leaq 0x60(%rbx), %rdi
movq %r14, %rsi
callq 0x7700
leaq 0x80(%rbx), %rdi
movq %r14, %rsi
callq 0x7700
leaq 0xa0(%rbx), %rdi
movq %r14, %rsi
callq 0x7700
leaq 0xc0(%rbx), %rdi
movq %r14, %rsi
callq 0x7700
leaq 0xe0(%rbx), %rdi
movq %r14, %rsi
callq 0x7700
leaq 0x100(%rbx), %rdi
movq %r14, %rsi
callq 0x7700
andw $0x0, 0x120(%rbx)
movb $0x0, 0x122(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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)
andq $0x0, 0x20(%rsp)
callq 0xacdd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x71f0
leaq 0xc(%rsp), %r15
andl $0x0, (%r15)
xorl %eax, %eax
leaq 0x30(%rsp), %r12
leaq 0x10(%rsp), %r13
cmpl %ebp, %eax
jge 0xae15
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %r15, %rcx
callq 0xabb0
cmpb $0x0, 0x121(%rbx)
jne 0xadfc
movq %r12, %rdi
leaq 0x2441a(%rip), %rsi     # 0x2f206
callq 0xb1d5
testb %al, %al
je 0xadfc
movb $0x1, 0x121(%rbx)
movq %r13, %rdi
movq %r12, %rsi
callq 0xb1e2
movq %r12, %rdi
callq 0xb1b6
movl 0xc(%rsp), %eax
jmp 0xadc5
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
subq %rdi, %rax
pushq $0x58
popq %rcx
cqto
idivq %rcx
movq %rax, %r14
testl %r14d, %r14d
jle 0xae96
leaq 0x1e7da(%rip), %rsi     # 0x29613
callq 0xb1d5
testb %al, %al
je 0xae54
movq 0x10(%rsp), %rsi
addq $0x20, %rsi
leaq 0x20(%rbx), %rdi
callq 0x71f0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x25d74
movq 0x10(%rsp), %rsi
movq 0x48(%rsi), %rdx
subq 0x40(%rsi), %rdx
shrq $0x5, %rdx
movq %rbx, %rdi
callq 0x1eaa3
cmpb $0x1, 0x122(%rbx)
jne 0xae96
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x20cba
leaq 0x10(%rsp), %rdi
callq 0xb20e
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xaec5
jmp 0xaec5
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xb1b6
jmp 0xaec8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb20e
movq %rbx, %rdi
callq 0x7640
// File: /workspace/github_cpp_makefile_star2_O2/yayuntian[P]user_agent/userAgent.cpp
// Function: echo_ua(UserAgent&)
void echo_ua(UserAgent& p) {

    cout << p.ua << endl;
    if (!p.browser.Name.empty()) {
        printf("browser Name: %s, Version: %s\n",
               p.browser.Name.c_str(),
               p.browser.Version.c_str());
    }
    if (!p.browser.Engine.empty()) {
        printf("browser Engine: %s, Version: %s\n",
               p.browser.Engine.c_str(),
               p.browser.EngineVersion.c_str());
    }

    print_val("os", p.os);
    print_val("platform", p.platform);
    print_val("localization", p.localization);
    print_val("mozilla", p.mozilla);

    print_val("bot", p.bot);
    print_val("mobile", p.mobile);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rdi, %rbx
movq 0x36091(%rip), %rdi     # 0x40fc8
movq %rbx, %rsi
callq 0x72d0
movq %rax, %rdi
callq 0x7180
cmpq $0x0, 0xe8(%rbx)
je 0xaf6d
movq 0xe0(%rbx), %rsi
movq 0x100(%rbx), %rdx
leaq 0x20aaf(%rip), %rdi     # 0x2ba15
xorl %eax, %eax
callq 0x7060
cmpq $0x0, 0xa8(%rbx)
je 0xaf93
movq 0xa0(%rbx), %rsi
movq 0xc0(%rbx), %rdx
leaq 0x20aa8(%rip), %rdi     # 0x2ba34
xorl %eax, %eax
callq 0x7060
leaq 0x2302f(%rip), %rsi     # 0x2dfc9
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xa55c
leaq 0x60(%rbx), %rsi
leaq 0xf0(%rsp), %rdi
callq 0x7490
leaq 0x70(%rsp), %r14
leaq 0xf0(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xaeda
movq %r15, %rdi
callq 0x7748
movq %r14, %rdi
callq 0x7748
leaq 0x20a6c(%rip), %rsi     # 0x2ba55
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xa55c
leaq 0x40(%rbx), %rsi
leaq 0xd0(%rsp), %rdi
callq 0x7490
leaq 0x50(%rsp), %r14
leaq 0xd0(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xaeda
movq %r15, %rdi
callq 0x7748
movq %r14, %rdi
callq 0x7748
leaq 0x20a26(%rip), %rsi     # 0x2ba5e
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xa55c
leaq 0x80(%rbx), %rsi
leaq 0xb0(%rsp), %rdi
callq 0x7490
leaq 0x30(%rsp), %r14
leaq 0xb0(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xaeda
movq %r15, %rdi
callq 0x7748
movq %r14, %rdi
callq 0x7748
leaq 0x209e1(%rip), %rsi     # 0x2ba6b
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0xa55c
leaq 0x20(%rbx), %rsi
leaq 0x90(%rsp), %rdi
callq 0x7490
leaq 0x10(%rsp), %r14
leaq 0x90(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xaeda
movq %r15, %rdi
callq 0x7748
movq %r14, %rdi
callq 0x7748
leaq 0x1c491(%rip), %rsi     # 0x2756a
leaq 0x130(%rsp), %r14
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0xa55c
movzbl 0x120(%rbx), %esi
movq %r14, %rdi
callq 0xaef9
movq %r14, %rdi
callq 0x7748
leaq 0x20967(%rip), %rsi     # 0x2ba73
leaq 0x110(%rsp), %r14
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0xa55c
movzbl 0x121(%rbx), %esi
movq %r14, %rdi
callq 0xaef9
movq %r14, %rdi
callq 0x7748
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0xb171
jmp 0xb178
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0xb171
jmp 0xb178
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0xb171
jmp 0xb178
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x7748
jmp 0xb17b
movq %rax, %rbx
movq %rbx, %rdi
callq 0x7640
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1da2a
movq %rsi, %r14
movq (%rsi), %rdi
leaq 0x1173c(%rip), %rsi     # 0x2f13c
callq 0x1ec6a
testb %al, %al
je 0x1da2a
movq (%r14), %rdi
leaq 0x11734(%rip), %rsi     # 0x2f147
callq 0x1f0da
testb %al, %al
je 0x1da49
leaq 0x11724(%rip), %rsi     # 0x2f147
leaq 0x7(%rsp), %rdx
jmp 0x1da36
leaq 0xd993(%rip), %rsi      # 0x2b3c4
leaq 0x3(%rsp), %rdx
movq %rbx, %rdi
callq 0xa55c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rdi
leaq 0xd233(%rip), %rsi      # 0x2ac86
callq 0x1f0da
testb %al, %al
je 0x1da6a
leaq 0xd223(%rip), %rsi      # 0x2ac86
leaq 0x6(%rsp), %rdx
jmp 0x1da36
movq (%r14), %rdi
leaq 0xc7ec(%rip), %rsi      # 0x2a260
callq 0x1f125
testb %al, %al
je 0x1da8b
leaq 0xc7dc(%rip), %rsi      # 0x2a260
leaq 0x5(%rsp), %rdx
jmp 0x1da36
movq (%r14), %rdi
leaq 0xcade(%rip), %rsi      # 0x2a573
callq 0xb1d5
testb %al, %al
je 0x1daac
leaq 0xc9b4(%rip), %rsi      # 0x2a459
leaq 0x4(%rsp), %rdx
jmp 0x1da36
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x7490
jmp 0x1da3e
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
addq $0x40, %rdi
leaq 0x10f1a(%rip), %rsi     # 0x2f147
callq 0x7700
leaq 0x60(%r14), %r12
leaq 0xd187(%rip), %rsi      # 0x2b3c4
movq %r12, %rdi
callq 0xb1d5
testb %al, %al
je 0x1e29e
cmpl $0x3, %ebx
jl 0x1e28f
movq (%r15), %rsi
addq $0x40, %rsi
movq %rsp, %r13
movq %r13, %rdi
callq 0x7490
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x1dab9
leaq 0x20(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x7400
movq %r13, %rdi
callq 0x7748
movq %rsp, %rdi
callq 0x7748
jmp 0x1e29e
leaq 0x10f5f(%rip), %rsi     # 0x2f1f5
movq %r12, %rdi
callq 0x7700
xorl %edi, %edi
testl %ebx, %ebx
cmovlel %edi, %ebx
shlq $0x5, %rbx
addq $0x20, %rbx
leaq 0x10f50(%rip), %r12     # 0x2f204
leaq 0x20(%rdi), %r13
cmpq %r13, %rbx
je 0x1e2d7
addq (%r15), %rdi
movq %r12, %rsi
callq 0x2050d
movq %r13, %rdi
testb %al, %al
je 0x1e2b4
movb $0x1, 0x121(%r14)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7748
movq %rbx, %rdi
callq 0x7640
// File: /workspace/github_cpp_makefile_star2_O2/yayuntian[P]user_agent/operatingSystem.cpp
// Function: opera(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 opera(UserAgent& p, vector<string>& comment, int slen) {
    if (starts_with(comment[0], "Windows")) {
        p.platform = "Windows";
        p.os = normalizeOS(comment[0]);
        if (slen > 2) {
            if (slen > 3 && starts_with(comment[2], "MRA")) {
                p.localization = comment[3];
            } else {
                p.localization = comment[2];
            }
        }
    } else {
        if (starts_with(comment[0], "Android")) {
            p.mobile = true;
        }
        p.platform = comment[0];
        if (slen > 1) {
            p.os = comment[1];
            if (slen > 3) {
                p.localization = comment[3];
            }
        } else {
            p.os = comment[0];
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x10e33(%rip), %rsi     # 0x2f147
callq 0x1f0da
testb %al, %al
je 0x1e39c
leaq 0x40(%rbx), %rdi
leaq 0x10e1f(%rip), %rsi     # 0x2f147
callq 0x7700
movq (%r14), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x7490
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x1dab9
leaq 0x60(%rbx), %rdi
leaq 0x28(%rsp), %r15
movq %r15, %rsi
callq 0x7400
movq %r15, %rdi
callq 0x7748
leaq 0x8(%rsp), %rdi
callq 0x7748
cmpl $0x3, %ebp
jl 0x1e412
je 0x1e3ff
movq (%r14), %rdi
addq $0x40, %rdi
leaq 0xb141(%rip), %rsi      # 0x294cb
callq 0x204c2
testb %al, %al
je 0x1e3ff
movq (%r14), %rsi
addq $0x60, %rsi
jmp 0x1e406
movq (%r14), %rdi
leaq 0xb001(%rip), %rsi      # 0x293a7
callq 0x1f0da
testb %al, %al
je 0x1e3b6
movb $0x1, 0x121(%rbx)
movq (%r14), %rsi
leaq 0x40(%rbx), %rdi
callq 0x71f0
movq (%r14), %rsi
cmpl $0x2, %ebp
jl 0x1e3e9
addq $0x20, %rsi
leaq 0x60(%rbx), %rdi
callq 0x71f0
cmpl $0x4, %ebp
jb 0x1e412
movq (%r14), %rsi
addq $0x60, %rsi
subq $-0x80, %rbx
jmp 0x1e3ed
addq $0x60, %rbx
movq %rbx, %rdi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x71f0
movq (%r14), %rsi
addq $0x40, %rsi
subq $-0x80, %rbx
movq %rbx, %rdi
callq 0x71f0
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7748
movq %rbx, %rdi
callq 0x7640
// File: /workspace/github_cpp_makefile_star2_O2/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
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0xadb2(%rip), %rsi      # 0x291fa
callq 0x1f125
testb %al, %al
je 0x1e479
movq (%r14), %rsi
leaq 0x40(%rbx), %rdi
callq 0x71f0
cmpl $0x3, %ebp
jl 0x1e472
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_O2/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 0x1e4d5
movl %edx, %ebp
movq %rsi, %r14
movl %ecx, %r15d
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1ed96
movslq %ebp, %r12
shlq $0x5, %r15
shlq $0x5, %r12
xorl %r13d, %r13d
cmpq %r13, %r15
je 0x1e4e0
movq (%r14), %rsi
addq %r12, %rsi
addq %r13, %rsi
movq (%rbx), %rdi
addq %r13, %rdi
callq 0x71f0
addq $0x20, %r13
jmp 0x1e4b6
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $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 0xb230
movq %r14, %rdi
callq 0x7640
// File: /workspace/github_cpp_makefile_star2_O2/yayuntian[P]user_agent/operatingSystem.cpp
// Function: detectOS(UserAgent&, Section&, int)
void detectOS(UserAgent& p, Section& s, int slen) {
    if (s.name == "Mozilla") {
        p.platform = getPlatform(s.comment, slen);
        if (p.platform == "Windows" && slen > 0) {
            p.os = normalizeOS(s.comment[0]);
        }

        if (p.browser.Engine == "") {
            p.undecided = true;
        } else if(p.browser.Engine == "Gecko") {
            gecko(p, s.comment, slen);
        } else if (p.browser.Engine == "AppleWebKit") {
            webKit(p, s.comment, slen);
        } else if (p.browser.Engine == "Trident") {
            trident(p, s.comment, slen);
        }
    } else if (s.name == "Opera") {
        if (slen > 0) {
            opera(p, s.comment, slen);
        }
    } else if (s.name == "Dalvik") {
        if (slen > 0) {
            dalvik(p, s.comment, slen);
        }
    } else {
        p.undecided = true;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xab54(%rip), %rsi      # 0x29613
movq %r14, %rdi
callq 0xb1d5
testb %al, %al
je 0x1eb93
addq $0x40, %r14
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x1d9e8
leaq 0x40(%r15), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x7400
movq %r12, %rdi
callq 0x7748
leaq 0x10644(%rip), %rsi     # 0x2f147
movq %r13, %rdi
callq 0xb1d5
testl %ebx, %ebx
jle 0x1eb4f
testb %al, %al
je 0x1eb4f
movq (%r14), %rsi
movq %rsp, %r12
movq %r12, %rdi
callq 0x7490
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x1dab9
leaq 0x60(%r15), %rdi
leaq 0x20(%rsp), %r12
movq %r12, %rsi
callq 0x7400
movq %r12, %rdi
callq 0x7748
movq %rsp, %rdi
callq 0x7748
leaq 0xa0(%r15), %r12
leaq 0xc867(%rip), %rsi      # 0x2b3c4
movq %r12, %rdi
callq 0xb1d5
testb %al, %al
jne 0x1ebfd
leaq 0x9272(%rip), %rsi      # 0x27de6
movq %r12, %rdi
callq 0xb1d5
testb %al, %al
je 0x1ec13
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x1dfcb
jmp 0x1ec05
leaq 0x106b1(%rip), %rsi     # 0x2f24b
movq %r14, %rdi
callq 0xb1d5
testb %al, %al
je 0x1ebc8
testl %ebx, %ebx
jle 0x1ec05
addq $0x40, %r14
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1e2f8
leaq 0x10682(%rip), %rsi     # 0x2f251
movq %r14, %rdi
callq 0xb1d5
testb %al, %al
je 0x1ebfd
testl %ebx, %ebx
jle 0x1ec05
addq $0x40, %r14
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1e432
movb $0x1, 0x122(%r15)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1061d(%rip), %rsi     # 0x2f237
movq %r12, %rdi
callq 0xb1d5
testb %al, %al
je 0x1ec35
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x1dcbd
jmp 0x1ec05
leaq 0x10607(%rip), %rsi     # 0x2f243
movq %r12, %rdi
callq 0xb1d5
testb %al, %al
je 0x1ec05
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x1e20d
jmp 0x1ec05
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7748
movq %rbx, %rdi
callq 0x7640
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0xe776(%rip), %rsi      # 0x2f2f8
callq 0x25c64
testb %al, %al
je 0x20ba6
leaq 0x40(%rbx), %rdi
leaq 0xa82e(%rip), %rsi      # 0x2b3c4
callq 0x7700
movb $0x1, 0x122(%rbx)
movb $0x1, %al
jmp 0x20bac
movb 0x122(%rbx), %al
andb $0x1, %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movb %cl, 0x120(%rdi)
testl %ecx, %ecx
jne 0x20be0
leaq 0x20(%rbx), %rdi
leaq 0xa7e9(%rip), %rsi      # 0x2b3c4
callq 0x7700
leaq 0xe71b(%rip), %rdx      # 0x2f302
leaq 0xa7d6(%rip), %r14      # 0x2b3c4
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x1ed38
leaq 0xa0(%rbx), %r12
leaq 0xe0(%rbx), %rdi
movq %r13, %rsi
callq 0x7400
movq %r13, %rdi
callq 0x7748
leaq 0x100(%rbx), %rdi
movq %r15, %rsi
callq 0x71f0
movq %r12, %rdi
movq %r14, %rsi
callq 0x7700
leaq 0xc0(%rbx), %rdi
movq %r14, %rsi
callq 0x7700
leaq 0x60(%rbx), %rdi
movq %r14, %rsi
callq 0x7700
subq $-0x80, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7700
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x20cb9
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
addq $0x20, %rbx
leaq 0xa71a(%rip), %rsi      # 0x2b3c4
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7700
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq $0xc
popq %rcx
mulq %rcx
pushq $-0x1
popq %rdi
cmovnoq %rax, %rdi
callq 0x2040
movq %rax, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x8(%rsp), %r13
movq %r13, %rdi
movq %r9, %rsi
callq 0x2360
movq %r13, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
callq 0x26da
movq %rax, 0x10(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x2140
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2420
// File: /workspace/github_cpp_makefile_star2_O2/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 %edx, %ecx
movl (%rdi), %r8d
testl %esi, %esi
js 0x291b
cmpl %esi, %r8d
jg 0x2937
addl %r8d, %esi
subl %r8d, %esi
cmpl %r8d, %esi
jge 0x2911
jmp 0x2937
movl %esi, %eax
cmpl $0x1, %r8d
movl %r8d, %r9d
adcl $0x0, %r9d
notl %eax
xorl %edx, %edx
divl %r9d
incl %eax
imull %r8d, %eax
addl %eax, %esi
movl 0x4(%rdi), %r9d
testl %ecx, %ecx
js 0x2951
cmpl %ecx, %r9d
jg 0x296d
addl %r9d, %ecx
subl %r9d, %ecx
cmpl %r9d, %ecx
jge 0x2947
jmp 0x296d
movl %ecx, %eax
cmpl $0x1, %r9d
movl %r9d, %r10d
adcl $0x0, %r10d
notl %eax
xorl %edx, %edx
divl %r10d
incl %eax
imull %r9d, %eax
addl %eax, %ecx
movq 0x10(%rdi), %rdx
imull %ecx, %r8d
addl %esi, %r8d
movslq %r8d, %rax
imulq $0xc, %rax, %rcx
movq (%rdx,%rcx), %rax
movl 0x8(%rdx,%rcx), %edx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %edx, %r9d
movl (%rdi), %r10d
testl %esi, %esi
js 0x29a4
cmpl %esi, %r10d
jg 0x29c0
addl %r10d, %esi
subl %r10d, %esi
cmpl %r10d, %esi
jge 0x299a
jmp 0x29c0
movl %esi, %eax
cmpl $0x1, %r10d
movl %r10d, %r11d
adcl $0x0, %r11d
notl %eax
xorl %edx, %edx
divl %r11d
incl %eax
imull %r10d, %eax
addl %eax, %esi
pushq %rbx
movl 0x4(%rdi), %r11d
testl %r9d, %r9d
js 0x29dc
cmpl %r9d, %r11d
jg 0x29f8
addl %r11d, %r9d
subl %r11d, %r9d
cmpl %r11d, %r9d
jge 0x29d2
jmp 0x29f8
movl %r9d, %eax
cmpl $0x1, %r11d
movl %r11d, %ebx
adcl $0x0, %ebx
notl %eax
xorl %edx, %edx
divl %ebx
incl %eax
imull %r11d, %eax
addl %eax, %r9d
movq 0x10(%rdi), %rax
imull %r9d, %r10d
addl %esi, %r10d
movslq %r10d, %rdx
imulq $0xc, %rdx, %rdx
movq %rcx, (%rax,%rdx)
movl %r8d, %ecx
shrl $0x10, %ecx
movb %cl, 0xa(%rax,%rdx)
movw %r8w, 0x8(%rax,%rdx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movsbl 0x9(%rsi), %eax
movb $0x8, %dl
idivb %dl
movsbl %al, %eax
imull %ecx, %eax
movslq %eax, %rsi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
xorl %r12d, %r12d
xorl %edx, %edx
callq 0x2310
pushq $0x1
popq %r13
cmpl 0x4(%r14), %r12d
jge 0x2b34
xorl %ebp, %ebp
movq %r12, 0x10(%rsp)
movl (%r14), %r15d
cmpl %r15d, %ebp
jge 0x2b2c
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x2900
movq %rax, (%rsp)
movw %dx, 0x8(%rsp)
shrl $0x10, %edx
movb %dl, 0xa(%rsp)
movsbl 0x9(%r14), %eax
movb $0x8, %cl
idivb %cl
movsbl %al, %ecx
movsbl 0x8(%r14), %eax
imull %r12d, %r15d
addl %ebp, %r15d
imull %eax, %r15d
imull %ecx, %r15d
movslq %r15d, %r12
xorl %r15d, %r15d
movsbq %al, %rax
cmpq %rax, %r15
jge 0x2b20
cmpb $0x8, 0x9(%r14)
movzwl (%rsp,%r15,2), %eax
jne 0x2b04
movzwl %ax, %eax
cvtsi2sd %eax, %xmm0
divsd 0x3525(%rip), %xmm0     # 0x6010
mulsd 0x3515(%rip), %xmm0     # 0x6008
callq 0x2120
cvttsd2si %xmm0, %eax
movq %r12, %rcx
movq %r15, %rdx
jmp 0x2b11
leaq (%r12,%r15,2), %rcx
movq (%rbx), %rdx
movb %ah, (%rdx,%rcx)
movq %r13, %rdx
addq (%rbx), %rcx
movb %al, (%rdx,%rcx)
incq %r15
movb 0x8(%r14), %al
jmp 0x2ac7
incl %ebp
movq 0x10(%rsp), %r12
jmp 0x2a78
incl %r12d
jmp 0x2a67
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_O2/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, (%rsp)
movl %r8d, %ebp
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movb %r15b, 0x8(%rdi)
movb %bpl, 0x9(%rdi)
movq 0x10(%rdi), %rdi
pushq $0xc
popq %rsi
callq 0x22e0
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq (%rsp), %rsi
callq 0x2360
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
callq 0x26da
movq %rax, 0x10(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x2140
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x2420
// File: /workspace/github_cpp_makefile_star2_O2/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 0x29bd(%rip), %xmm1     # 0x6130
xorps %xmm0, %xmm1
maxss %xmm0, %xmm1
movss 0x298e(%rip), %xmm0     # 0x6110
ucomiss %xmm1, %xmm0
jbe 0x37b8
cvtss2sd %xmm1, %xmm0
movsd 0x288d(%rip), %xmm2     # 0x6020
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
mulss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm0, %xmm2
subsd %xmm1, %xmm2
addsd 0x2995(%rip), %xmm2     # 0x6148
cvtsd2ss %xmm2, %xmm0
retq
xorps %xmm0, %xmm0
movss 0x2951(%rip), %xmm2     # 0x6114
ucomiss %xmm1, %xmm2
jbe 0x37e7
subss %xmm1, %xmm2
movaps %xmm2, %xmm0
mulss %xmm2, %xmm0
mulss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x295d(%rip), %xmm0     # 0x6140
cvtsd2ss %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2941(%rip), %xmm2     # 0x6130
xorps %xmm0, %xmm2
maxss %xmm0, %xmm2
cvtss2sd %xmm2, %xmm1
movss 0x290e(%rip), %xmm0     # 0x6110
ucomiss %xmm2, %xmm0
jbe 0x383c
movsd 0x2961(%rip), %xmm0     # 0x6170
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movsd 0x2959(%rip), %xmm2     # 0x6178
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
addsd 0x27e1(%rip), %xmm0     # 0x6018
cvtsd2ss %xmm0, %xmm0
retq
xorps %xmm0, %xmm0
movss 0x28cd(%rip), %xmm3     # 0x6114
ucomiss %xmm2, %xmm3
jbe 0x388c
movsd 0x28fc(%rip), %xmm0     # 0x6150
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movsd 0x28f4(%rip), %xmm2     # 0x6158
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
mulsd 0x28e4(%rip), %xmm1     # 0x6160
addsd %xmm0, %xmm1
addsd 0x28e0(%rip), %xmm1     # 0x6168
cvtsd2ss %xmm1, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x27d5(%rip), %xmm1     # 0x6130
xorps %xmm0, %xmm1
maxss %xmm0, %xmm1
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
movss 0x279f(%rip), %xmm0     # 0x6110
ucomiss %xmm1, %xmm0
jbe 0x39a0
mulss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm0
cvtss2sd %xmm2, %xmm1
mulsd 0x2826(%rip), %xmm1     # 0x61b0
mulsd 0x2826(%rip), %xmm0     # 0x61b8
addsd %xmm1, %xmm0
addsd 0x2822(%rip), %xmm0     # 0x61c0
jmp 0x39e8
xorps %xmm0, %xmm0
movss 0x2769(%rip), %xmm3     # 0x6114
ucomiss %xmm1, %xmm3
jbe 0x39f4
cvtss2sd %xmm1, %xmm0
mulss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
cvtss2sd %xmm2, %xmm2
mulsd 0x27c8(%rip), %xmm2     # 0x6190
mulsd 0x27c8(%rip), %xmm1     # 0x6198
mulsd 0x27c8(%rip), %xmm0     # 0x61a0
addsd %xmm2, %xmm1
addsd %xmm1, %xmm0
addsd 0x27c0(%rip), %xmm0     # 0x61a8
cvtsd2ss %xmm0, %xmm0
divss 0x2728(%rip), %xmm0     # 0x611c
retq
nop