// File: /workspace/github_c_makefile_star2_O1/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 0x2b8c5
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 0x3168b
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x1f78f
testb %al, %al
jne 0x2b810
movq %rbp, %rdi
leaq 0x269cd(%rip), %rsi     # 0x521c1
leaq 0x47f9d(%rip), %rdx     # 0x73798
callq 0x1f74d
testb %al, %al
je 0x2b83e
leaq 0x47f8d(%rip), %rdi     # 0x73798
callq 0x1f977
movl (%r14), %eax
movl %eax, %ecx
subl %r13d, %ecx
je 0x2b834
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 0x2b824
decl %eax
movl %eax, (%r14)
decl %r13d
jmp 0x2b89d
movq %r15, %rdi
leaq 0x29555(%rip), %rsi     # 0x54d9d
callq 0xc180
testl %eax, %eax
je 0x2b896
movq %r15, %rdi
leaq 0x29549(%rip), %rsi     # 0x54da4
callq 0xc180
testl %eax, %eax
je 0x2b896
movq %r15, %rdi
leaq 0x29539(%rip), %rsi     # 0x54da7
callq 0xc180
testl %eax, %eax
je 0x2b896
movq %r15, %rdi
leaq 0x29529(%rip), %rsi     # 0x54daa
callq 0xc180
testl %eax, %eax
je 0x2b896
movq %rbp, %rdi
callq 0x287e2
testb %al, %al
je 0x2b89d
movb $0x1, 0x47e4c(%rip)     # 0x736e9
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2b8b9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xc600
incl %r13d
cmpl (%r14), %r13d
jl 0x2b7ca
cmpb $0x0, 0x47e1d(%rip)     # 0x736e9
je 0x2b8d3
callq 0x2885e
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 0x2b901
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xc600
movq %rbx, %rdi
callq 0xcbb0