// File: /workspace/github_c_makefile_star2_O2/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
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %r12
leaq 0x8(%rsp), %r15
cmpl (%r14), %r12d
jge 0x21c7e
movslq %r12d, %r13
leaq (%rbx,%r13,8), %rsi
movq %r15, %rdi
callq 0x26fef
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x1aa87
testb %al, %al
jne 0x21bef
movq %rbp, %rdi
leaq 0x215ee(%rip), %rsi     # 0x431c1
leaq 0x47bee(%rip), %rdx     # 0x697c8
callq 0x1aa58
testb %al, %al
je 0x21c0f
leaq 0x47bde(%rip), %rdi     # 0x697c8
callq 0x1ac6f
movslq (%r14), %rax
cmpq %r13, %rax
je 0x21c05
movq 0x8(%rbx,%r13,8), %rcx
movq %rcx, (%rbx,%r13,8)
incq %r13
jmp 0x21bf2
decl %eax
movl %eax, (%r14)
decl %r12d
jmp 0x21c6e
movq %r15, %rdi
leaq 0x24184(%rip), %rsi     # 0x45d9d
callq 0x216cd
testb %al, %al
jne 0x21c67
movq %r15, %rdi
leaq 0x24178(%rip), %rsi     # 0x45da4
callq 0x216cd
testb %al, %al
jne 0x21c67
movq %r15, %rdi
leaq 0x24168(%rip), %rsi     # 0x45da7
callq 0x216cd
testb %al, %al
jne 0x21c67
movq %r15, %rdi
leaq 0x24158(%rip), %rsi     # 0x45daa
callq 0x216cd
testb %al, %al
jne 0x21c67
movq %rbp, %rdi
callq 0x1f1b3
testb %al, %al
je 0x21c6e
movb $0x1, 0x47aab(%rip)     # 0x69719
movq %r15, %rdi
callq 0xdd68
incl %r12d
jmp 0x21ba0
cmpb $0x0, 0x47a94(%rip)     # 0x69719
je 0x21c8c
callq 0x1f22f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xdd68
movq %rbx, %rdi
callq 0xdbf0