// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rdi, %rax
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq (%rdi), %rdi
movq %rax, 0x8(%rsp)
movq 0x8(%rax), %rsi
addq %rdi, %rsi
leaq 0x4ff04(%rip), %rcx     # 0xa49c0
xorl %r8d, %r8d
callq 0x54d6c
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
movq %rdx, %rcx
subq %rax, %rcx
leaq -0x48(%rdx), %rdi
cmpq $0x48, %rcx
movq %rax, %rsi
cmoveq %rdi, %rsi
movq %rdx, %rcx
subq %rax, %rcx
cmoveq %rdi, %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x54afc
movq (%rsi), %rdi
cmpq %rdi, 0x8(%rsi)
jne 0x54b16
movq 0x8(%rsp), %rdi
callq 0x54d24
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
movq %rdx, %rcx
subq %rax, %rcx
cmpq %rdx, %rax
je 0x54b4a
movq %rcx, %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
leaq -0x8(%rdx), %rsi
cmpq $-0x5, %rsi
jae 0x54b74
cmpb $0x1, 0x70(%rax)
jne 0x54b91
movq 0x68(%rax), %rsi
subq 0x60(%rax), %rsi
jmp 0x54b85
xorl %ebp, %ebp
cmpb $0x1, -0x38(%rax,%rcx)
jne 0x54c09
movq -0x40(%rax,%rcx), %rdx
subq -0x48(%rax,%rcx), %rdx
movl $0x0, %edi
testq %rdx, %rdx
jg 0x54cd4
jmp 0x54c0f
cmpb $0x1, -0x38(%rax,%rcx)
jne 0x54b91
movq -0x40(%rax,%rcx), %rsi
subq -0x48(%rax,%rcx), %rsi
testq %rsi, %rsi
jle 0x54b91
xorl %ebp, %ebp
jmp 0x54cd4
leaq -0x5(%rdx), %rsi
cmpq $-0x2, %rsi
jae 0x54bdb
movq 0x20(%rax), %rsi
subq 0x18(%rax), %rsi
testq %rsi, %rsi
setg %dil
andb 0x28(%rax), %dil
leaq -0x6(%rdx), %rsi
cmpq $-0x3, %rsi
jae 0x54bf1
movq 0x38(%rax), %rsi
subq 0x30(%rax), %rsi
testq %rsi, %rsi
setg %sil
andb 0x40(%rax), %sil
addq $-0x7, %rdx
cmpq $-0x5, %rdx
ja 0x54c0d
addq $0x48, %rax
jmp 0x54c18
movq -0x40(%rax,%rcx), %rdx
subq -0x48(%rax,%rcx), %rdx
testq %rdx, %rdx
setg %dil
andb -0x38(%rax,%rcx), %dil
movq -0x40(%rax,%rcx), %rdx
subq -0x48(%rax,%rcx), %rdx
testq %rdx, %rdx
setg %bpl
andb -0x38(%rax,%rcx), %bpl
jmp 0x54c0f
xorl %edi, %edi
jmp 0x54c0f
movl %esi, %ebp
addq %rcx, %rax
addq $-0x48, %rax
movl %ebp, %esi
movl %edi, 0x14(%rsp)
movq %rbx, 0x18(%rsp)
movq (%rax), %r12
movq 0x8(%rax), %r13
cmpq %r12, %r13
je 0x54cb5
movb %sil, 0x7(%rsp)
testb %sil, %sil
movl $0x10, %eax
movl $0xa, %ebx
cmovnel %eax, %ebx
xorl %r14d, %r14d
movzbl (%r12), %r15d
leal -0x30(%r15), %eax
cmpb $0x9, %al
ja 0x54c5c
addl $-0x30, %r15d
jmp 0x54c90
cmpb $0x0, 0x7(%rsp)
je 0x54c83
cmpb $0x61, %r15b
jl 0x54c75
cmpb $0x66, %r15b
ja 0x54c83
addl $-0x57, %r15d
jmp 0x54c90
leal -0x41(%r15), %eax
cmpb $0x5, %al
ja 0x54c83
addl $-0x37, %r15d
jmp 0x54c90
xorl %r15d, %r15d
movq 0x8(%rsp), %rdi
callq 0x54d24
movl %r14d, %ebp
imull %ebx, %ebp
addl %r15d, %ebp
cmpl %ebp, %r14d
jbe 0x54ca8
movq 0x8(%rsp), %rdi
callq 0x54d24
incq %r12
movl %ebp, %r14d
cmpq %r13, %r12
jne 0x54c49
jmp 0x54cb7
xorl %ebp, %ebp
cmpb $0x0, 0x14(%rsp)
je 0x54ccf
movq 0x8(%rsp), %rdi
callq 0x54d24
movq 0x18(%rsp), %rbx
jmp 0x54cd4
movq 0x18(%rsp), %rbx
movl %ebp, (%rbx)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x54ced
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a480
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x54d02
jmp 0x54d02
jmp 0x54d02
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x54d1c
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a480
movq %rbx, %rdi
callq 0x3a790