// File: /workspace/github_cpp_makefile_star2_O1/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, 0x10(%rsp)
movq 0x8(%rax), %rsi
addq %rdi, %rsi
leaq 0x50c5e(%rip), %rcx     # 0xa59c0
xorl %r8d, %r8d
callq 0x5501e
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq %rdx, %rax
subq %rcx, %rax
leaq -0x48(%rdx), %rsi
cmpq $0x48, %rax
movq %rcx, %rax
cmoveq %rsi, %rax
cmpq %rcx, %rdx
cmoveq %rsi, %rax
cmpb $0x1, 0x10(%rax)
jne 0x54d9f
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
jne 0x54da9
movq 0x10(%rsp), %rdi
callq 0x54fd6
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rdx
xorl %r12d, %r12d
cmpq %rdx, %rax
je 0x54de1
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rsi
addq $-0x8, %rsi
cmpq $-0x5, %rsi
setb %dil
jmp 0x54de3
xorl %edi, %edi
leaq 0x60(%rax), %rsi
leaq -0x48(%rdx), %rcx
testb %dil, %dil
cmoveq %rcx, %rsi
cmpb $0x1, 0x10(%rsi)
jne 0x54e08
movq 0x8(%rsi), %rdi
subq (%rsi), %rdi
testq %rdi, %rdi
jg 0x54f85
movq %rdx, %rsi
subq %rax, %rsi
je 0x54e33
movq %rsi, %rdi
sarq $0x3, %rdi
movabsq $-0x5555555555555555, %r8 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdi, %r8
addq $-0x5, %r8
cmpq $-0x2, %r8
setb %r8b
jmp 0x54e36
xorl %r8d, %r8d
leaq 0x18(%rax), %rdi
testb %r8b, %r8b
cmoveq %rcx, %rdi
movq 0x8(%rdi), %r8
subq (%rdi), %r8
testq %r8, %r8
setg %r10b
cmpq %rdx, %rax
je 0x54e77
movq %rsi, %r8
sarq $0x3, %r8
movabsq $-0x5555555555555555, %r9 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r8, %r9
addq $-0x6, %r9
cmpq $-0x3, %r9
setb %r9b
jmp 0x54e7a
xorl %r9d, %r9d
leaq 0x30(%rax), %r8
testb %r9b, %r9b
cmoveq %rcx, %r8
movq 0x8(%r8), %r9
subq (%r8), %r9
testq %r9, %r9
setg 0xe(%rsp)
xorl %r12d, %r12d
cmpq %rdx, %rax
movq %rbx, 0x18(%rsp)
je 0x54ec0
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
addq $-0x7, %rdx
cmpq $-0x4, %rdx
setb %dl
jmp 0x54ec2
xorl %edx, %edx
andb 0x10(%rdi), %r10b
movb %r10b, 0xf(%rsp)
addq $0x48, %rax
testb %dl, %dl
cmovneq %rax, %rcx
movq (%rcx), %r13
movq 0x8(%rcx), %rbx
cmpq %r13, %rbx
je 0x54f68
movb 0xe(%rsp), %al
andb 0x10(%r8), %al
movb %al, 0xe(%rsp)
movl $0x10, %eax
movl $0xa, %ebp
cmovnel %eax, %ebp
xorl %r14d, %r14d
movzbl (%r13), %r15d
leal -0x30(%r15), %eax
cmpb $0x9, %al
ja 0x54f14
addl $-0x30, %r15d
jmp 0x54f44
cmpb $0x0, 0xe(%rsp)
je 0x54f37
leal -0x61(%r15), %eax
cmpb $0x5, %al
ja 0x54f29
addl $-0x57, %r15d
jmp 0x54f44
leal -0x41(%r15), %eax
cmpb $0x5, %al
ja 0x54f37
addl $-0x37, %r15d
jmp 0x54f44
xorl %r15d, %r15d
movq 0x10(%rsp), %rdi
callq 0x54fd6
movl %r14d, %r12d
imull %ebp, %r12d
addl %r15d, %r12d
cmpl %r12d, %r14d
jbe 0x54f5d
movq 0x10(%rsp), %rdi
callq 0x54fd6
incq %r13
movl %r12d, %r14d
cmpq %rbx, %r13
jne 0x54f01
cmpb $0x0, 0xf(%rsp)
je 0x54f80
movq 0x10(%rsp), %rdi
callq 0x54fd6
movq 0x18(%rsp), %rbx
jmp 0x54f85
movq 0x18(%rsp), %rbx
movl %r12d, (%rbx)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x54f9f
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a470
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x54fb4
jmp 0x54fb4
jmp 0x54fb4
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x54fce
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x3a470
movq %rbx, %rdi
callq 0x3a780