// File: /workspace/github_cpp_makefile_star2_O1/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 0x53b93
movq %rsi, %r14
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x53fb9
movl %eax, %ebx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x53fb9
movl %eax, %ebp
andl %ebx, %eax
cmpl $-0x1, %eax
je 0x53b93
cmpl $-0x1, %ebx
setne %al
cmpl $-0x1, %ebp
sete %cl
orb %al, %cl
je 0x53b9e
cmpl $-0x1, %ebp
setne %al
cmpl $-0x1, %ebx
sete %cl
orb %al, %cl
je 0x53ca0
testl %ebp, %ebp
js 0x53dc0
cmpl %ebx, %ebp
jge 0x53dc0
cmpl $0x2, %ebx
setge %al
jmp 0x53b95
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x4e2e8
movq (%rbx), %rdi
addq $0x10, %rdi
leaq 0x20da0(%rip), %rsi     # 0x74959
movl $0x28, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x1e21d(%rip), %rsi     # 0x71df0
movl $0x11, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x20e20(%rip), %rsi     # 0x74a0d
movl $0x3, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movl %ebp, %esi
callq 0xda30
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x20d6b(%rip), %rsi     # 0x74982
movl $0x10, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x1e19f(%rip), %rsi     # 0x71dd0
movl $0x12, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x20d48(%rip), %rsi     # 0x74993
movl $0x8, %edx
callq 0xd600
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x66586
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x53c74
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x4e54b
movq 0x8(%rsp), %rdx
leaq 0x20d84(%rip), %rsi     # 0x74a13
movl $0x1, %edi
xorl %eax, %eax
callq 0x539c2
jmp 0x53d9d
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4e2e8
movq (%r14), %rdi
addq $0x10, %rdi
leaq 0x20c9e(%rip), %rsi     # 0x74959
movl $0x28, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x1e0fb(%rip), %rsi     # 0x71dd0
movl $0x12, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x20d1e(%rip), %rsi     # 0x74a0d
movl $0x3, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movl %ebx, %esi
callq 0xda30
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x20c69(%rip), %rsi     # 0x74982
movl $0x10, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x1e0bd(%rip), %rsi     # 0x71df0
movl $0x11, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x20c46(%rip), %rsi     # 0x74993
movl $0x8, %edx
callq 0xd600
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x66586
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x53d76
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x4e54b
movq 0x8(%rsp), %rdx
leaq 0x20c82(%rip), %rsi     # 0x74a13
movl $0x1, %edi
xorl %eax, %eax
callq 0x539c2
leaq 0x8(%rsp), %rdi
callq 0xdb88
movq 0x421c2(%rip), %rax     # 0x95f70
movq (%rax), %rdi
callq 0xd650
movl $0x1, %edi
callq 0xd6c0
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4e2e8
movq (%r14), %rdi
addq $0x10, %rdi
leaq 0x20bc1(%rip), %rsi     # 0x7499c
movl $0x2f, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x1dffb(%rip), %rsi     # 0x71df0
movl $0x11, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x20bbd(%rip), %rsi     # 0x749cc
movl $0x3, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x1dfa7(%rip), %rsi     # 0x71dd0
movl $0x12, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x20b8d(%rip), %rsi     # 0x749d0
movl $0xf, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x1df93(%rip), %rsi     # 0x71df0
movl $0x11, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x215cf(%rip), %rsi     # 0x75446
movl $0x1, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movl %ebp, %esi
callq 0xda30
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x21858(%rip), %rsi     # 0x756f9
movl $0x2, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x1df15(%rip), %rsi     # 0x71dd0
movl $0x12, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x21571(%rip), %rsi     # 0x75446
movl $0x1, %edx
callq 0xd600
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movl %ebx, %esi
callq 0xda30
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x202bc(%rip), %rsi     # 0x741bb
movl $0x2, %edx
callq 0xd600
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x66586
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x53f28
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x4e54b
movq 0x8(%rsp), %rdx
leaq 0x20ad0(%rip), %rsi     # 0x74a13
movl $0x1, %edi
xorl %eax, %eax
callq 0x539c2
jmp 0x53d9d
jmp 0x53f5a
jmp 0x53f7c
jmp 0x53f5a
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x53f7f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x53f7f
jmp 0x53f7c
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x53f8f
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x28(%rsp)
jmp 0x53fb1
jmp 0x53f9e
jmp 0x53f9e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x53fb1
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0xda70