// File: /workspace/github_cpp_makefile_star2_O1/halfflat[P]tinyopt/test/googletest/googletest/src/gtest.cc
// Function: testing::internal::ParseFlagValue(char const*, char const*, bool)
static const char* ParseFlagValue(const char* str, const char* flag_name,
                                  bool def_optional) {
  // str and flag must not be NULL.
  if (str == nullptr || flag_name == nullptr) return nullptr;

  // The flag must start with "--" followed by GTEST_FLAG_PREFIX_.
  const std::string flag_str =
      std::string("--") + GTEST_FLAG_PREFIX_ + flag_name;
  const size_t flag_len = flag_str.length();
  if (strncmp(str, flag_str.c_str(), flag_len) != 0) return nullptr;

  // Skips the flag name.
  const char* flag_end = str + flag_len;

  // When def_optional is true, it's OK to not have a "=value" part.
  if (def_optional && (flag_end[0] == '\0')) {
    return flag_end;
  }

  // If def_optional is true and there are more characters after the
  // flag name, or if def_optional is false, there must be a '=' after
  // the flag name.
  if (flag_end[0] != '=') return nullptr;

  // Returns the string after "=".
  return flag_end + 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x60684
xorl %ebx, %ebx
jmp 0x607d9
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1438b(%rip), %rsi     # 0x74a28
leaq 0x14386(%rip), %rdx     # 0x74a2a
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x15892
leaq 0x12b9c(%rip), %rsi     # 0x73254
movq %r15, %rdi
callq 0xdb40
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x606e7
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x606ee
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rsi
callq 0xdb40
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x60739
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x60741
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x60770
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xd530
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x60787
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xd530
movq 0x28(%rsp), %r14
movq 0x30(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xd230
testl %eax, %eax
je 0x607a7
xorl %ebx, %ebx
jmp 0x607c4
addq %r15, %rbx
testb %bpl, %bpl
je 0x607b4
cmpb $0x0, (%rbx)
je 0x607c4
xorl %eax, %eax
cmpb $0x3d, (%rbx)
leaq 0x1(%rbx), %rcx
cmoveq %rcx, %rax
movq %rax, %rbx
cmpq %r13, %r14
je 0x607d9
movq 0x38(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0xd530
movq %rbx, %rax
addq $0x68, %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 0x6080a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x6080a
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x60821
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xd530
movq %rbx, %rdi
callq 0xda70