// File: /workspace/github_c_makefile_star2_O3/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 0xd32e(%rip), %rdi      # 0x1658d
leaq 0xd33a(%rip), %rsi      # 0x165a0
leaq 0xd33d(%rip), %rdx      # 0x165aa
leaq 0xd333(%rip), %rcx      # 0x165a7
xorl %eax, %eax
callq 0x3060
leaq 0xd7a6(%rip), %rdi      # 0x16a28
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 0x9340
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 0xd25d(%rip), %rdi      # 0x1658d
xorl %eax, %eax
callq 0x3060
addq $0x24, %r15
cmpq %r12, %r15
jne 0x92c0
leaq 0xd6c7(%rip), %rdi      # 0x16a0e
callq 0x3540
leaq 0xd6d5(%rip), %rdi      # 0x16a28
callq 0x3540
movq -0x30(%rbp), %rdx
cmpl $0x0, 0x3c(%rdx)
je 0x944f
addq $0x40, %rdx
movslq (%rdx), %rax
addq %rax, %rdx
testq %rax, %rax
cmoveq %rax, %rdx
movslq 0x1c(%rdx), %r15
leaq (,%r15,8), %r12
leaq 0xf(,%r15,8), %rax
andq $-0x10, %rax
movq %rsp, %rbx
subq %rax, %rbx
movq %rbx, %rsp
testq %r15, %r15
jle 0x93ce
movslq 0x20(%rdx), %rcx
testq %rcx, %rcx
leaq 0x20(%rcx,%rdx), %rax
cmoveq %rcx, %rax
xorl %ecx, %ecx
leaq (%rax,%rcx), %rdx
movslq (%rax,%rcx), %rsi
addq %rsi, %rdx
testq %rsi, %rsi
cmoveq %rsi, %rdx
movq %rdx, (%rbx,%rcx)
addq $0x8, %rcx
cmpq %rcx, %r12
jne 0x93af
testl %r15d, %r15d
je 0x944f
leaq (%rbx,%r12), %r14
bsrq %r15, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbafb
cmpl $0x11, %r15d
jl 0x941f
leaq 0x80(%rbx), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbdd9
addq $-0x80, %r12
movq %r14, %rdi
callq 0xbe44
addq $0x8, %r14
addq $-0x8, %r12
jne 0x940b
jmp 0x942a
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbdd9
testl %r15d, %r15d
jle 0x944f
leaq 0xd17c(%rip), %r14      # 0x165b2
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x3060
incq %r12
cmpq %r12, %r15
jne 0x9439
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq