user: What would the C source look like for the assembly code provided here:

```asm
<main>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  mov    %edi,%ebp
  mov    %rsi,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  lea    D48(%rip),%rdi
  call   <printf@plt>
  cmp    $0x3,%ebp
  je     L77
L138:
  lea    D37(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%eax
L143:
  mov    0x108(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L104
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L77:
  mov    0x8(%rbx),%rdi
  lea    D23(%rip),%rsi
  call   <CheckExtension@plt>
  mov    $0x1,%ebp
  test   %rax,%rax
  jne    L107
L9:
  mov    0x8(%rbx),%rdi
  lea    D54(%rip),%rsi
  call   <CheckExtension@plt>
  test   %rax,%rax
  jne    L23
  mov    0x8(%rbx),%rdi
  lea    D10(%rip),%rsi
  call   <CheckExtension@plt>
  test   %rax,%rax
  je     L138
  mov    $0x1,%r13d
L113:
  mov    0x10(%rbx),%rdi
  lea    D10(%rip),%rsi
  call   <CheckExtension@plt>
  test   %rax,%rax
  sete   %r12b
  movzbl %r12b,%r12d
  add    %r12d,%r12d
  test   %r13d,%r13d
  jne    L76
L61:
  test   %r12d,%r12d
  setne  %dl
  cmp    %r12d,%ebp
  setne  %al
  test   %al,%dl
  je     L138
  test   %ebp,%ebp
  je     L138
  movslq %ebp,%rbp
  lea    (%rbx,%rbp,8),%rbp
  mov    %rsp,%r13
  mov    0x0(%rbp),%rdx
  mov    $0x104,%esi
  mov    %r13,%rdi
  call   <GetFilenameWithoutExt@plt>
  movslq %r12d,%r12
  mov    (%rbx,%r12,8),%rdi
  mov    %r13,%rdx
  mov    0x0(%rbp),%rsi
  call   <Hd2Unpack@plt>
  jmp    L143
L107:
  mov    0x10(%rbx),%rdi
  lea    D23(%rip),%rsi
  call   <CheckExtension@plt>
  test   %rax,%rax
  sete   %bpl
  movzbl %bpl,%ebp
  add    %ebp,%ebp
  jmp    L9
L23:
  mov    0x10(%rbx),%rdi
  lea    D54(%rip),%rsi
  call   <CheckExtension@plt>
  test   %rax,%rax
  sete   %r13b
  movzbl %r13b,%r13d
  add    %r13d,%r13d
  mov    0x8(%rbx),%rdi
  lea    D10(%rip),%rsi
  call   <CheckExtension@plt>
  test   %rax,%rax
  jne    L113
  test   %r13d,%r13d
  jne    L114
  mov    $0x1,%r12d
  jmp    L61
L76:
  cmp    %r13d,%r12d
  je     L138
  test   %r12d,%r12d
  je     L138
L36:
  movslq %r13d,%r13
  lea    (%rbx,%r13,8),%rbp
  mov    %rsp,%r13
  mov    0x0(%rbp),%rdx
  mov    $0x104,%esi
  mov    %r13,%rdi
  call   <GetFilenameWithoutExt@plt>
  movslq %r12d,%r12
  mov    (%rbx,%r12,8),%rdi
  mov    %r13,%rdx
  mov    0x0(%rbp),%rsi
  call   <Hd3Unpack@plt>
  jmp    L143
L114:
  mov    $0x1,%r12d
  jmp    L36
L104:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D48
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D37
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D23
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D54
type_guessed: string
name: extract_symbolic_data
arguments: data_tag: D10
type_guessed: string

tool: D48: White Cloud - Dark Cloud's HD2/HD3 unpacker
Developed by Luciano Ciccariello (Xeeynamo)



tool: D37: Usage:	whitecloud <data.dat> (<data.hd3> | <data.hd2)
	whitecloud (<data.hd3> | <data.hd2) <data.dat>


tool: D23: .HD2

tool: D54: .HD3

tool: D10: .DAT

assistant: ```c
int main(int argc, char *argv[]) {
  printf("White Cloud - Dark Cloud's HD2/HD3 unpacker\n"
         "Developed by Luciano Ciccariello (Xeeynamo)\n\n");
  if (argc == 3) {
    int hd2Pos;
    int hd3Pos;
    int datPos;
    hd2Pos = CheckExtension(argv[1], ".HD2") == 0 ? 1 : CheckExtension(argv[2], ".HD2") == 0 ? 2 : 0;
    hd3Pos = CheckExtension(argv[1], ".HD3") == 0 ? 1 : CheckExtension(argv[2], ".HD3") == 0 ? 2 : 0;
    datPos = CheckExtension(argv[1], ".DAT") == 0 ? 1 : CheckExtension(argv[2], ".DAT") == 0 ? 2 : 0;
    if (hd3Pos != 0) {
      if (hd3Pos != 0 && datPos != 0 && hd3Pos != datPos) {
        char exportDir[260];
        GetFilenameWithoutExt(exportDir, sizeof(exportDir), argv[hd3Pos]);
        return Hd3Unpack(argv[datPos], argv[hd3Pos], exportDir);
      }
    } else {
      if (hd2Pos != 0 && datPos != 0 && hd2Pos != datPos) {
        char exportDir[260];
        GetFilenameWithoutExt(exportDir, sizeof(exportDir), argv[hd2Pos]);
        return Hd2Unpack(argv[datPos], argv[hd2Pos], exportDir);
      }
    }
  }
  printf("Usage:"
         "\twhitecloud <data.dat> (<data.hd3> | <data.hd2)\n"
         "\twhitecloud (<data.hd3> | <data.hd2) <data.dat>\n");
  return 1;
}
```