// File: /workspace/github_cpp_makefile_star2_O2/Lut99[P]RayTracer/src/lib/include/cxxopts.hpp
// Function: void cxxopts::values::integer_parser<unsigned int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int&)
void
    integer_parser(const std::string& text, T& value)
    {
      std::smatch match;
      std::regex_match(text, match, integer_pattern);

      if (match.length() == 0)
      {
        throw_or_mimic<argument_incorrect_type>(text);
      }

      if (match.length(4) > 0)
      {
        value = 0;
        return;
      }

      using US = typename std::make_unsigned<T>::type;

      constexpr bool is_signed = std::numeric_limits<T>::is_signed;
      const bool negative = match.length(1) > 0;
      const uint8_t base = match.length(2) > 0 ? 16 : 10;

      auto value_match = match[3];

      US result = 0;

      for (auto iter = value_match.first; iter != value_match.second; ++iter)
      {
        US digit = 0;

        if (*iter >= '0' && *iter <= '9')
        {
          digit = static_cast<US>(*iter - '0');
        }
        else if (base == 16 && *iter >= 'a' && *iter <= 'f')
        {
          digit = static_cast<US>(*iter - 'a' + 10);
        }
        else if (base == 16 && *iter >= 'A' && *iter <= 'F')
        {
          digit = static_cast<US>(*iter - 'A' + 10);
        }
        else
        {
          throw_or_mimic<argument_incorrect_type>(text);
        }

        const US next = static_cast<US>(result * base + digit);
        if (result > next)
        {
          throw_or_mimic<argument_incorrect_type>(text);
        }

        result = next;
      }

      detail::check_signed_range<T>(negative, result, text);

      if (negative)
      {
        value = checked_negate<T>(result,
          text,
          std::integral_constant<bool, is_signed>());
      }
      else
      {
        value = static_cast<T>(result);
      }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq 0x4b46d(%rip), %rdx     # 0xb29d0
movq %rdi, 0x8(%rsp)
xorl %ecx, %ecx
callq 0x676e1
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x676fc
testq %rax, %rax
jne 0x6758a
movq 0x8(%rsp), %rdi
callq 0x67718
leaq 0x20(%rsp), %rdi
pushq $0x4
popq %rsi
callq 0x676fc
xorl %r14d, %r14d
testq %rax, %rax
jg 0x676a6
leaq 0x20(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x676fc
movq %rax, %r14
leaq 0x20(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0x676fc
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rcx
subq %rsi, %rcx
movq %rbx, 0x10(%rsp)
movq %r14, 0x40(%rsp)
je 0x675f9
pushq $0x18
popq %rdi
movq %rcx, %rax
cqto
idivq %rdi
addq $-0x7, %rax
cmpq $-0x5, %rax
ja 0x675f9
addq $0x48, %rsi
jmp 0x67600
addq %rcx, %rsi
addq $-0x48, %rsi
cmpq $0x0, 0x18(%rsp)
movq (%rsi), %r13
movq 0x8(%rsi), %r15
pushq $0x10
popq %rax
pushq $0xa
popq %rbx
cmovgl %eax, %ebx
xorl %r14d, %r14d
cmpq %r15, %r13
je 0x67688
movzbl (%r13), %r12d
leal -0x30(%r12), %eax
cmpb $0x9, %al
ja 0x67632
addl $-0x30, %r12d
jmp 0x67668
cmpq $0x0, 0x18(%rsp)
jle 0x6765b
cmpb $0x61, %r12b
jl 0x6764c
cmpb $0x66, %r12b
ja 0x6765b
addl $-0x57, %r12d
jmp 0x67668
leal -0x41(%r12), %eax
cmpb $0x5, %al
ja 0x6765b
addl $-0x37, %r12d
jmp 0x67668
xorl %r12d, %r12d
movq 0x8(%rsp), %rdi
callq 0x67718
movl %r14d, %ebp
imull %ebx, %ebp
addl %r12d, %ebp
cmpl %ebp, %r14d
jbe 0x67680
movq 0x8(%rsp), %rdi
callq 0x67718
incq %r13
movl %ebp, %r14d
jmp 0x67619
cmpq $0x0, 0x40(%rsp)
jle 0x676a1
movq 0x8(%rsp), %rdi
callq 0x67718
movq 0x10(%rsp), %rbx
jmp 0x676a6
movq 0x10(%rsp), %rbx
movl %r14d, (%rbx)
leaq 0x20(%rsp), %rdi
callq 0x67c28
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x676cc
jmp 0x676cc
jmp 0x676cc
jmp 0x676cc
jmp 0x676cc
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x67c28
movq %rbx, %rdi
callq 0x527a0