// File: /workspace/github_cpp_makefile_star2_O3/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 0x522cc
movq %rsi, %r14
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x52657
movl %eax, %ebx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x52657
movl %eax, %ebp
andl %ebx, %eax
cmpl $-0x1, %eax
je 0x522cc
cmpl $-0x1, %ebx
setne %al
cmpl $-0x1, %ebp
sete %cl
orb %al, %cl
je 0x522d7
cmpl $-0x1, %ebp
setne %al
cmpl $-0x1, %ebx
sete %cl
orb %al, %cl
je 0x523b8
testl %ebp, %ebp
js 0x524b7
cmpl %ebx, %ebp
jge 0x524b7
cmpl $0x2, %ebx
setge %al
jmp 0x522ce
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x4ca86
movq (%rbx), %rbx
addq $0x10, %rbx
leaq 0x20677(%rip), %rsi     # 0x72969
movl $0x28, %edx
movq %rbx, %rdi
callq 0xd600
leaq 0x1daca(%rip), %rsi     # 0x6fdd0
movl $0x11, %edx
movq %rbx, %rdi
callq 0xd600
leaq 0x20703(%rip), %rsi     # 0x72a1d
movl $0x3, %edx
movq %rbx, %rdi
callq 0xd600
movq %rbx, %rdi
movl %ebp, %esi
callq 0xda30
leaq 0x2065a(%rip), %rsi     # 0x72992
movl $0x10, %edx
movq %rbx, %rdi
callq 0xd600
leaq 0x1da64(%rip), %rsi     # 0x6fdb0
movl $0x12, %edx
movq %rbx, %rdi
callq 0xd600
leaq 0x20643(%rip), %rsi     # 0x729a3
movl $0x8, %edx
movq %rbx, %rdi
callq 0xd600
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x64cf2
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5238c
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x4ccdd
movq 0x10(%rsp), %rdx
leaq 0x2067c(%rip), %rsi     # 0x72a23
movl $0x1, %edi
xorl %eax, %eax
callq 0x520fb
jmp 0x52494
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x4ca86
movq (%r14), %r14
addq $0x10, %r14
leaq 0x20596(%rip), %rsi     # 0x72969
movl $0x28, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x1d9c9(%rip), %rsi     # 0x6fdb0
movl $0x12, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x20622(%rip), %rsi     # 0x72a1d
movl $0x3, %edx
movq %r14, %rdi
callq 0xd600
movq %r14, %rdi
movl %ebx, %esi
callq 0xda30
leaq 0x20579(%rip), %rsi     # 0x72992
movl $0x10, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x1d9a3(%rip), %rsi     # 0x6fdd0
movl $0x11, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x20562(%rip), %rsi     # 0x729a3
movl $0x8, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x64cf2
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5246d
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x4ccdd
movq 0x10(%rsp), %rdx
leaq 0x2059b(%rip), %rsi     # 0x72a23
movl $0x1, %edi
xorl %eax, %eax
callq 0x520fb
leaq 0x10(%rsp), %rdi
callq 0xdb88
movq 0x41acb(%rip), %rax     # 0x93f70
movq (%rax), %rdi
callq 0xd650
movl $0x1, %edi
callq 0xd6c0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x4ca86
movq (%r14), %r14
addq $0x10, %r14
leaq 0x204da(%rip), %rsi     # 0x729ac
movl $0x2f, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x1d8ea(%rip), %rsi     # 0x6fdd0
movl $0x11, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x204e2(%rip), %rsi     # 0x729dc
movl $0x3, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x1d8a2(%rip), %rsi     # 0x6fdb0
movl $0x12, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x204be(%rip), %rsi     # 0x729e0
movl $0xf, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x1d89a(%rip), %rsi     # 0x6fdd0
movl $0x11, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x20f0c(%rip), %rsi     # 0x73456
movl $0x1, %edx
movq %r14, %rdi
callq 0xd600
movq %r14, %rdi
movl %ebp, %esi
callq 0xda30
leaq 0x211a1(%rip), %rsi     # 0x73709
movl $0x2, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x1d834(%rip), %rsi     # 0x6fdb0
movl $0x12, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x20ec6(%rip), %rsi     # 0x73456
movl $0x1, %edx
movq %r14, %rdi
callq 0xd600
movq %r14, %rdi
movl %ebx, %esi
callq 0xda30
leaq 0x1fc1d(%rip), %rsi     # 0x721cb
movl $0x2, %edx
movq %r14, %rdi
callq 0xd600
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x64cf2
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x525da
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x4ccdd
movq 0x10(%rsp), %rdx
leaq 0x2042e(%rip), %rsi     # 0x72a23
movl $0x1, %edi
xorl %eax, %eax
callq 0x520fb
jmp 0x52494
jmp 0x5260c
jmp 0x5262e
jmp 0x5260c
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x52631
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x52631
jmp 0x5262e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x52644
jmp 0x5263c
jmp 0x5263c
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5264f
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0xda70