// File: /workspace/github_cpp_makefile_star2_O3/interimadd[P]M5Stack-PixelArt/test/lib/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 0x42017
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 0x47e65
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x361df
testb %al, %al
jne 0x41f62
movq %rbp, %rdi
leaq 0x883b(%rip), %rsi      # 0x4a781
leaq 0x1e7f3(%rip), %rdx     # 0x60740
callq 0x3619d
testb %al, %al
je 0x41f90
leaq 0x1e7e3(%rip), %rdi     # 0x60740
callq 0x363c7
movl (%r14), %eax
movl %eax, %ecx
subl %r13d, %ecx
je 0x41f86
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 0x41f76
decl %eax
movl %eax, (%r14)
decl %r13d
jmp 0x41fef
movq %r15, %rdi
leaq 0xb462(%rip), %rsi      # 0x4d3fc
callq 0x1d140
testl %eax, %eax
je 0x41fe8
movq %r15, %rdi
leaq 0xb456(%rip), %rsi      # 0x4d403
callq 0x1d140
testl %eax, %eax
je 0x41fe8
movq %r15, %rdi
leaq 0xb446(%rip), %rsi      # 0x4d406
callq 0x1d140
testl %eax, %eax
je 0x41fe8
movq %r15, %rdi
leaq 0xb436(%rip), %rsi      # 0x4d409
callq 0x1d140
testl %eax, %eax
je 0x41fe8
movq %rbp, %rdi
callq 0x3f031
testb %al, %al
je 0x41fef
movb $0x1, 0x1e6a2(%rip)     # 0x60691
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4200b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1d460
incl %r13d
cmpl (%r14), %r13d
jl 0x41f1c
cmpb $0x0, 0x1e673(%rip)     # 0x60691
je 0x42025
callq 0x3f0ad
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 0x42053
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1d460
movq %rbx, %rdi
callq 0x1d900