// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]tundra/src/Main.cpp
// Function: ShowHelp()
static void ShowHelp()
{
  printf("\nTundra Build Processor 2.0\n");
  printf("Copyright (C) 2010-2023 Andreas Fredriksson\n\n");

#ifdef HAVE_GIT_INFO
  printf("Git branch: %s\n", g_GitBranch);
  printf("Git commit: %s\n\n", g_GitVersion);
#endif

  printf("This program comes with ABSOLUTELY NO WARRANTY.\n");

  printf("Usage: tundra2 [options...] [targets...]\n\n");
  printf("Options:\n");

  size_t max_opt_len = 0;
  for (size_t i = 0; i < ARRAY_SIZE(g_OptionTemplates); ++i)
  {
    size_t opt_len = strlen(g_OptionTemplates[i].m_LongName) + 12;
    if (opt_len > max_opt_len)
      max_opt_len = opt_len;
  }

  for (size_t i = 0; i < ARRAY_SIZE(g_OptionTemplates); ++i)
  {
    const OptionTemplate* t = g_OptionTemplates + i;

    if (!t->m_Help)
      continue;

    char long_text[256];
    if (t->m_Type == OptionType::kInt)
      snprintf(long_text, sizeof long_text, "%s=<integer>", t->m_LongName);
    else if (t->m_Type == OptionType::kString)
      snprintf(long_text, sizeof long_text, "%s=<string>", t->m_LongName);
    else
      snprintf(long_text, sizeof long_text, "%s          ", t->m_LongName);

    printf("  -%c, --%-*s %s\n", t->m_ShortName, (int) max_opt_len, long_text, t->m_Help);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
leaq 0x1f56d(%rip), %rdi     # 0x2381f
movb $0x0, %al
callq 0x3060
leaq 0x1f57c(%rip), %rdi     # 0x2383c
movb $0x0, %al
callq 0x3060
leaq 0x1f59c(%rip), %rdi     # 0x2386a
leaq 0x1ed64(%rip), %rsi     # 0x23039
movb $0x0, %al
callq 0x3060
leaq 0x1f597(%rip), %rdi     # 0x2387a
leaq 0x1ed26(%rip), %rsi     # 0x23010
movb $0x0, %al
callq 0x3060
leaq 0x1f593(%rip), %rdi     # 0x2388b
movb $0x0, %al
callq 0x3060
leaq 0x1f5b6(%rip), %rdi     # 0x238bc
movb $0x0, %al
callq 0x3060
leaq 0x1f5d3(%rip), %rdi     # 0x238e7
movb $0x0, %al
callq 0x3060
movq $0x0, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
cmpq $0x14, -0x10(%rbp)
jae 0x4374
leaq 0x2a757(%rip), %rax     # 0x2ea90
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x3150
addq $0xc, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x8(%rbp), %rax
jbe 0x4364
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4366
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x432b
movq $0x0, -0x20(%rbp)
cmpq $0x14, -0x20(%rbp)
jae 0x4465
leaq 0x2a702(%rip), %rax     # 0x2ea90
imulq $0x28, -0x20(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x43aa
jmp 0x4454
movq -0x28(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x43d8
leaq -0x130(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movl $0x100, %esi            # imm = 0x100
leaq 0x1f522(%rip), %rdx     # 0x238f1
movb $0x0, %al
callq 0x3540
jmp 0x442a
movq -0x28(%rbp), %rax
cmpl $0x2, 0x10(%rax)
jne 0x4406
leaq -0x130(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movl $0x100, %esi            # imm = 0x100
leaq 0x1f501(%rip), %rdx     # 0x238fe
movb $0x0, %al
callq 0x3540
jmp 0x4428
leaq -0x130(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
movl $0x100, %esi            # imm = 0x100
leaq 0x1f4e9(%rip), %rdx     # 0x2390a
movb $0x0, %al
callq 0x3540
jmp 0x442a
movq -0x28(%rbp), %rax
movsbl (%rax), %esi
movq -0x8(%rbp), %rax
movl %eax, %edx
leaq -0x130(%rbp), %rcx
movq -0x28(%rbp), %rax
movq 0x20(%rax), %r8
leaq 0x1f4ca(%rip), %rdi     # 0x23917
movb $0x0, %al
callq 0x3060
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x437c
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nop