// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/unittest/googletest/googletest/src/gtest.cc
// Function: void testing::internal::ParseGoogleTestFlagsOnlyImpl<char>(int*, char**)
void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
  for (int i = 1; i < *argc; i++) {
    const std::string arg_string = StreamableToString(argv[i]);
    const char* const arg = arg_string.c_str();

    using internal::ParseBoolFlag;
    using internal::ParseInt32Flag;
    using internal::ParseStringFlag;

    bool remove_flag = false;
    if (ParseGoogleTestFlag(arg)) {
      remove_flag = true;
#if GTEST_USE_OWN_FLAGFILE_FLAG_
    } else if (ParseStringFlag(arg, kFlagfileFlag, &GTEST_FLAG(flagfile))) {
      LoadFlagsFromFile(GTEST_FLAG(flagfile));
      remove_flag = true;
#endif  // GTEST_USE_OWN_FLAGFILE_FLAG_
    } else if (arg_string == "--help" || arg_string == "-h" ||
               arg_string == "-?" || arg_string == "/?" ||
               HasGoogleTestFlagPrefix(arg)) {
      // Both help flag and unrecognized Google Test flags (excluding
      // internal ones) trigger help display.
      g_help_flag = true;
    }

    if (remove_flag) {
      // Shift the remainder of the argv list left by one.  Note
      // that argv has (*argc + 1) elements, the last one always being
      // NULL.  The following loop moves the trailing NULL element as
      // well.
      for (int j = i; j != *argc; j++) {
        argv[j] = argv[j + 1];
      }

      // Decrements the argument count.
      (*argc)--;

      // We also need to decrement the iterator as we just removed
      // an element.
      i--;
    }
  }

  if (g_help_flag) {
    // We print the help here instead of in RUN_ALL_TESTS(), as the
    // latter may not be called at all if the user is using Google
    // Test with another testing framework.
    PrintColorEncoded(kColorEncodedHelpMessage);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x2, (%rdi)
jl 0x2b377
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsi), %rax
movq %rax, (%rsp)
movl $0x1, %r13d
leaq 0x8(%rsp), %r15
movslq %r13d, %r12
leaq (%rbx,%r12,8), %rsi
movq %r15, %rdi
callq 0x311b9
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x1f52d
testb %al, %al
jne 0x2b2c2
movq %rbp, %rdi
leaq 0x25f4b(%rip), %rsi     # 0x511f1
leaq 0x474eb(%rip), %rdx     # 0x72798
callq 0x1f4eb
testb %al, %al
je 0x2b2f0
leaq 0x474db(%rip), %rdi     # 0x72798
callq 0x1f715
movl (%r14), %eax
movl %eax, %ecx
subl %r13d, %ecx
je 0x2b2e6
movq (%rsp), %rdx
leaq (%rdx,%r12,8), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
movq %rdi, -0x8(%rdx,%rsi,8)
incq %rsi
cmpl %esi, %ecx
jne 0x2b2d6
decl %eax
movl %eax, (%r14)
decl %r13d
jmp 0x2b34f
movq %r15, %rdi
leaq 0x28ad3(%rip), %rsi     # 0x53dcd
callq 0xc180
testl %eax, %eax
je 0x2b348
movq %r15, %rdi
leaq 0x28ac7(%rip), %rsi     # 0x53dd4
callq 0xc180
testl %eax, %eax
je 0x2b348
movq %r15, %rdi
leaq 0x28ab7(%rip), %rsi     # 0x53dd7
callq 0xc180
testl %eax, %eax
je 0x2b348
movq %r15, %rdi
leaq 0x28aa7(%rip), %rsi     # 0x53dda
callq 0xc180
testl %eax, %eax
je 0x2b348
movq %rbp, %rdi
callq 0x28419
testb %al, %al
je 0x2b34f
movb $0x1, 0x4739a(%rip)     # 0x726e9
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2b36b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xc600
incl %r13d
cmpl (%r14), %r13d
jl 0x2b27c
cmpb $0x0, 0x4736b(%rip)     # 0x726e9
je 0x2b385
callq 0x28495
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2b3b3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xc600
movq %rbx, %rdi
callq 0xcbb0