// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/src/Driver.cpp
// Function: t2::DriverShowTargets(t2::Driver*)
void DriverShowTargets(Driver* self)
{
  const DagData* dag = self->m_DagData;

  printf("%-20s %-20s %-20s\n", "Config", "Variant", "SubVariant");
  printf("----------------------------------------------------------------\n");

  for (const BuildTupleData& tuple : dag->m_BuildTuples)
  {
    const char* config_name = dag->m_ConfigNames[tuple.m_ConfigIndex];
    const char* variant_name = dag->m_VariantNames[tuple.m_VariantIndex];
    const char* subvariant_name = dag->m_SubVariantNames[tuple.m_SubVariantIndex];
    printf("%-20s %-20s %-20s\n", config_name, variant_name, subvariant_name);
  }

  printf("\nNamed nodes and aliases:\n");
  printf("----------------------------------------------------------------\n");

  for (const BuildTupleData& tuple : dag->m_BuildTuples)
  {
    int32_t count = tuple.m_NamedNodes.GetCount();
    const char** temp = (const char**)alloca(sizeof(const char*) * count);
    for (int i = 0; i < count; ++i)
    {
      temp[i] = tuple.m_NamedNodes[i].m_Name.Get();
    }
    std::sort(temp, temp + count, [](const char *a, const char *b) { return strcmp(a, b) < 0; });

    for (int i = 0; i < count; ++i)
    {
      printf(" - %s\n", temp[i]);
    }
    // Currently the named nodes are the same for all build tuples.
    // We just need one.
    break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xa0(%rdi), %rbx
leaq 0xcf8e(%rip), %rdi      # 0x1659d
leaq 0xcf9a(%rip), %rsi      # 0x165b0
leaq 0xcf9d(%rip), %rdx      # 0x165ba
leaq 0xcf93(%rip), %rcx      # 0x165b7
xorl %eax, %eax
callq 0x3060
leaq 0xd406(%rip), %rdi      # 0x16a38
callq 0x3540
movslq 0x40(%rbx), %rax
testq %rax, %rax
leaq 0x40(%rax,%rbx), %r15
cmoveq %rax, %r15
movq %rbx, -0x30(%rbp)
movslq 0x3c(%rbx), %rax
testq %rax, %rax
je 0x96f0
leaq (%rax,%rax,8), %rax
leaq (%r15,%rax,4), %r12
movq -0x30(%rbp), %rax
leaq 0x1c(%rax), %r13
leaq 0x28(%rax), %r14
leaq 0x34(%rax), %rbx
movslq (%r13), %rax
leaq (%rax,%r13), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movslq (%r15), %rax
leaq (%rcx,%rax,4), %rsi
movslq (%rsi), %rax
addq %rax, %rsi
testq %rax, %rax
cmoveq %rax, %rsi
movslq (%r14), %rax
leaq (%rax,%r14), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movslq 0x4(%r15), %rax
leaq (%rcx,%rax,4), %rdx
movslq (%rdx), %rax
addq %rax, %rdx
testq %rax, %rax
cmoveq %rax, %rdx
movslq (%rbx), %rax
leaq (%rax,%rbx), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movslq 0x8(%r15), %rax
leaq (%rcx,%rax,4), %rcx
movslq (%rcx), %rax
addq %rax, %rcx
testq %rax, %rax
cmoveq %rax, %rcx
leaq 0xcebd(%rip), %rdi      # 0x1659d
xorl %eax, %eax
callq 0x3060
addq $0x24, %r15
cmpq %r12, %r15
jne 0x9670
leaq 0xd327(%rip), %rdi      # 0x16a1e
callq 0x3540
leaq 0xd335(%rip), %rdi      # 0x16a38
callq 0x3540
movq -0x30(%rbp), %rdx
cmpl $0x0, 0x3c(%rdx)
je 0x9807
addq $0x40, %rdx
movslq (%rdx), %rax
addq %rax, %rdx
testq %rax, %rax
cmoveq %rax, %rdx
movslq 0x1c(%rdx), %r15
leaq 0xf(,%r15,8), %rax
andq $-0x10, %rax
movq %rsp, %rbx
subq %rax, %rbx
movq %rbx, %rsp
testq %r15, %r15
jle 0x977e
movslq 0x20(%rdx), %rcx
testq %rcx, %rcx
leaq 0x20(%rcx,%rdx), %rax
cmoveq %rcx, %rax
leaq (,%r15,8), %rcx
xorl %edx, %edx
leaq (%rax,%rdx), %rsi
movslq (%rax,%rdx), %rdi
addq %rdi, %rsi
testq %rdi, %rdi
cmoveq %rdi, %rsi
movq %rsi, (%rbx,%rdx)
addq $0x8, %rdx
cmpq %rdx, %rcx
jne 0x975f
testl %r15d, %r15d
je 0x97e2
leaq (%rbx,%r15,8), %r14
bsrq %r15, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbf64
cmpl $0x11, %r15d
jl 0x97d7
leaq (,%r15,8), %r12
leaq 0x80(%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc259
addq $-0x80, %r12
movq %r14, %rdi
callq 0xc2c4
addq $0x8, %r14
addq $-0x8, %r12
jne 0x97c3
jmp 0x97e2
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc259
testl %r15d, %r15d
jle 0x9807
leaq 0xcdd4(%rip), %r14      # 0x165c2
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x3060
incq %r12
cmpq %r12, %r15
jne 0x97f1
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq