// File: halfflat[P]tinyopt/test/googletest/googletest/src/gtest.cc
// Function: testing::GetDirFromEnv[abi:cxx11](std::initializer_list<char const*>, char const*, char)
static std::string GetDirFromEnv(
    std::initializer_list<const char*> environment_variables,
    const char* fallback, char separator) {
  for (const char* variable_name : environment_variables) {
    const char* value = internal::posix::GetEnv(variable_name);
    if (value != nullptr && value[0] != '\0') {
      if (value[strlen(value) - 1] != separator) {
        return std::string(value).append(1, separator);
      }
      return value;
    }
  }
  return fallback;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x98(%rbp)
movb %r8b, %al
movq %rdi, %r8
movq %r8, -0x90(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x20(%rbp)
movb %al, -0x21(%rbp)
leaq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x611c0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x611e0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x9d217
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0xa4300
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x9d204
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x9d204
movq -0x50(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x50(%rbp), %rdi
callq 0x10300
movq %rax, %rcx
movq -0xa0(%rbp), %rax
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x21(%rbp), %ecx
cmpl %ecx, %eax
je 0x9d199
movq -0x50(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x10e10
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x1d070
jmp 0x9d11b
movsbl -0x21(%rbp), %edx
leaq -0x70(%rbp), %rdi
movl $0x1, %esi
callq 0x10800
movq %rax, -0xb8(%rbp)
jmp 0x9d136
movq -0xb8(%rbp), %rsi
movq -0x98(%rbp), %rdi
callq 0x102f0
jmp 0x9d14b
leaq -0x70(%rbp), %rdi
callq 0x10fc8
leaq -0x71(%rbp), %rdi
callq 0x10810
jmp 0x9d27c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x9d18b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x10fc8
leaq -0x71(%rbp), %rdi
callq 0x10810
jmp 0x9d28c
movq -0x50(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0x85(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x10e10
movq -0x98(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
callq 0x1d070
jmp 0x9d1d3
leaq -0x85(%rbp), %rdi
callq 0x10810
jmp 0x9d27c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x85(%rbp), %rdi
callq 0x10810
jmp 0x9d28c
jmp 0x9d206
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
jmp 0x9d074
movq -0x20(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0x86(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x10e10
movq -0x98(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
callq 0x1d070
jmp 0x9d251
leaq -0x86(%rbp), %rdi
callq 0x10810
jmp 0x9d27c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x86(%rbp), %rdi
callq 0x10810
jmp 0x9d28c
movq -0x90(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x10e00
nopw %cs:(%rax,%rax)