user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r12
  mov    %edi,%r12d
  xor    %edi,%edi
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  mov    $0x400,%esi
  call   <getcwd@plt>
  mov    %rax,%rbp
  cmp    $0x1,%r12d
  jle    L56
  mov    0x8(%rbx),%rbp
L56:
  mov    %rbp,%rdi
  call   <basename@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <countupper@plt>
  lea    D94(%rip),%rdi
  mov    %eax,%ebx
  call   <getenv@plt>
  mov    %rbp,%rsi
  mov    %eax,%edi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L16
  cmp    $0x1,%ebx
  jle    L60
  mov    $0x2d,%esi
  mov    %r12,%rdi
  call   <strrchr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L40
  lea    D23(%rip),%rdx
  mov    %rax,%rsi
  mov    %r12,%rdi
  call   <strreplace@plt>
  mov    %rax,%rdi
  call   <strremovelower@plt>
  mov    %rbp,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    %rax,%rsi
L10:
  lea    D90(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L34:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
L60:
  mov    %r12,%rdi
  lea    D46(%rip),%rdx
  lea    D21(%rip),%rsi
  call   <strreplace@plt>
  lea    D85(%rip),%rdx
  lea    D40(%rip),%rsi
  mov    %rax,%rdi
  call   <strreplace@plt>
  lea    D96(%rip),%rdx
  lea    D18(%rip),%rsi
  mov    %rax,%rdi
  call   <strreplace@plt>
  lea    D90(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L34
L16:
  lea    D45(%rip),%rdi
  call   <printf@plt>
  jmp    L34
L40:
  mov    %r12,%rdi
  call   <strremovelower@plt>
  mov    %rax,%rsi
  jmp    L10
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D94
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D23
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D90
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D46
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D21
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D85
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D40
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D96
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D18
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D45
type_infered: string

tool: D94: HOME

tool: 

tool: D90: %s

tool: D46: jo

tool: D21: joshuaoldenburg

tool: D85: .gh.io

tool: D40: .github.io

tool: D96: .gh.com

tool: D18: .github.com

tool: D45: scratch

assistant: ```c
int main(int argc, const char *argv[]) {
  const char *fullDirectory = getcwd(NULL, 1024);
  if (argc >= 2)
    fullDirectory = argv[1];
  const char *directory = (const char *)basename((char *)fullDirectory);
  int numberUpper = countupper(directory);
  if (strcmp(getenv("HOME"), fullDirectory) == 0) {
    printf("scratch");
  } else if (numberUpper <= 1) {
    directory = strreplace(directory, "joshuaoldenburg", "jo");
    directory = strreplace(directory, ".github.io", ".gh.io");
    directory = strreplace(directory, ".github.com", ".gh.com");
    printf("%s", directory);
  } else {
    char *suffix = strrchr(directory, '-');
    if (suffix)
      directory = strreplace(directory, suffix, "");
    directory = strremovelower(directory);
    if (suffix)
      directory = (const char *)strcat((char *)directory, suffix);
    printf("%s", directory);
  }
  return 0;
}
```