// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/src/gtest.cc
// Function: testing::internal::ShouldShard(char const*, char const*, bool)
bool ShouldShard(const char* total_shards_env, const char* shard_index_env,
                 bool in_subprocess_for_death_test) {
  if (in_subprocess_for_death_test) {
    return false;
  }

  const int32_t total_shards = Int32FromEnvOrDie(total_shards_env, -1);
  const int32_t shard_index = Int32FromEnvOrDie(shard_index_env, -1);

  if (total_shards == -1 && shard_index == -1) {
    return false;
  } else if (total_shards == -1 && shard_index != -1) {
    const Message msg = Message() << "Invalid environment variables: you have "
                                  << kTestShardIndex << " = " << shard_index
                                  << ", but have left " << kTestTotalShards
                                  << " unset.\n";
    ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str());
    fflush(stdout);
    exit(EXIT_FAILURE);
  } else if (total_shards != -1 && shard_index == -1) {
    const Message msg = Message()
                        << "Invalid environment variables: you have "
                        << kTestTotalShards << " = " << total_shards
                        << ", but have left " << kTestShardIndex << " unset.\n";
    ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str());
    fflush(stdout);
    exit(EXIT_FAILURE);
  } else if (shard_index < 0 || shard_index >= total_shards) {
    const Message msg =
        Message() << "Invalid environment variables: we require 0 <= "
                  << kTestShardIndex << " < " << kTestTotalShards
                  << ", but you have " << kTestShardIndex << "=" << shard_index
                  << ", " << kTestTotalShards << "=" << total_shards << ".\n";
    ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str());
    fflush(stdout);
    exit(EXIT_FAILURE);
  }

  return total_shards > 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
testl %edx, %edx
jne 0x418e3
movq %rsi, %r14
pushq $-0x1
popq %rbp
movl %ebp, %esi
callq 0x41be2
movl %eax, %ebx
movq %r14, %rdi
movl %ebp, %esi
callq 0x41be2
movl %eax, %ebp
andl %ebx, %eax
cmpl $-0x1, %eax
je 0x418e3
cmpl $-0x1, %ebx
setne %al
cmpl $-0x1, %ebp
sete %cl
orb %al, %cl
je 0x418ee
cmpl $-0x1, %ebp
setne %al
cmpl $-0x1, %ebx
sete %cl
orb %al, %cl
je 0x419af
testl %ebp, %ebp
js 0x41a8c
cmpl %ebx, %ebp
jge 0x41a8c
cmpl $0x2, %ebx
setge %al
jmp 0x418e5
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x3d5f6
movq (%rbx), %rbx
addq $0x10, %rbx
leaq 0x1b0a0(%rip), %rsi     # 0x5c9a9
movq %rbx, %rdi
callq 0xd550
leaq 0x18528(%rip), %rsi     # 0x59e40
movq %rbx, %rdi
callq 0xd550
leaq 0x1b136(%rip), %rsi     # 0x5ca5d
movq %rbx, %rdi
callq 0xd550
movq %rbx, %rdi
movl %ebp, %esi
callq 0xda80
leaq 0x1b092(%rip), %rsi     # 0x5c9d2
movq %rbx, %rdi
callq 0xd550
leaq 0x184d1(%rip), %rsi     # 0x59e20
movq %rbx, %rdi
callq 0xd550
leaq 0x1b085(%rip), %rsi     # 0x5c9e3
movq %rbx, %rdi
callq 0xd550
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4ef7e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x41985
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x3d7ba
movq 0x10(%rsp), %rdx
leaq 0x1b0c3(%rip), %rsi     # 0x5ca63
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x41733
jmp 0x41a6b
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x3d5f6
movq (%r14), %r14
addq $0x10, %r14
leaq 0x1afdf(%rip), %rsi     # 0x5c9a9
movq %r14, %rdi
callq 0xd550
leaq 0x18447(%rip), %rsi     # 0x59e20
movq %r14, %rdi
callq 0xd550
leaq 0x1b075(%rip), %rsi     # 0x5ca5d
movq %r14, %rdi
callq 0xd550
movq %r14, %rdi
movl %ebx, %esi
callq 0xda80
leaq 0x1afd1(%rip), %rsi     # 0x5c9d2
movq %r14, %rdi
callq 0xd550
leaq 0x18430(%rip), %rsi     # 0x59e40
movq %r14, %rdi
callq 0xd550
leaq 0x1afc4(%rip), %rsi     # 0x5c9e3
movq %r14, %rdi
callq 0xd550
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4ef7e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x41a46
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x3d7ba
movq 0x10(%rsp), %rdx
leaq 0x1b002(%rip), %rsi     # 0x5ca63
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x41733
leaq 0x10(%rsp), %rdi
callq 0xdbe8
movq 0x42504(%rip), %rax     # 0x83f80
movq (%rax), %rdi
callq 0xd6b0
pushq $0x1
popq %rdi
callq 0xd710
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x3d5f6
movq (%r14), %r14
addq $0x10, %r14
leaq 0x1af45(%rip), %rsi     # 0x5c9ec
movq %r14, %rdi
callq 0xd550
leaq 0x1838a(%rip), %rsi     # 0x59e40
movq %r14, %rdi
callq 0xd550
leaq 0x1af57(%rip), %rsi     # 0x5ca1c
movq %r14, %rdi
callq 0xd550
leaq 0x1834c(%rip), %rsi     # 0x59e20
movq %r14, %rdi
callq 0xd550
leaq 0x1af3d(%rip), %rsi     # 0x5ca20
movq %r14, %rdi
callq 0xd550
leaq 0x1834e(%rip), %rsi     # 0x59e40
movq %r14, %rdi
callq 0xd550
leaq 0x1b995(%rip), %rsi     # 0x5d496
movq %r14, %rdi
callq 0xd550
movq %r14, %rdi
movl %ebp, %esi
callq 0xda80
leaq 0x1bc2f(%rip), %rsi     # 0x5d749
movq %r14, %rdi
callq 0xd550
leaq 0x182f7(%rip), %rsi     # 0x59e20
movq %r14, %rdi
callq 0xd550
leaq 0x1b95e(%rip), %rsi     # 0x5d496
movq %r14, %rdi
callq 0xd550
movq %r14, %rdi
movl %ebx, %esi
callq 0xda80
leaq 0x1a6ba(%rip), %rsi     # 0x5c20b
movq %r14, %rdi
callq 0xd550
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4ef7e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x41b78
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x3d7ba
movq 0x10(%rsp), %rdx
leaq 0x1aed0(%rip), %rsi     # 0x5ca63
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x41733
jmp 0x41a6b
jmp 0x41ba8
jmp 0x41bb9
jmp 0x41ba8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xdbe8
jmp 0x41bbc
jmp 0x41bb9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x41bcf
jmp 0x41bc7
jmp 0x41bc7
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x41bda
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0xdaa0