user: What is the c source code of the assembly code below:

```asm
<LastExt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x348,%rsp
  mov    %rdi,-0x338(%rbp)
  mov    %rsi,-0x340(%rbp)
  mov    %rdx,-0x348(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    -0x338(%rbp),%rdx
  lea    -0x120(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x120(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dirname@plt>
  cltq
  mov    %rax,%rdx
  lea    -0x320(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x338(%rbp),%rdx
  lea    -0x120(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x120(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <basename@plt>
  cltq
  mov    %rax,%rdx
  lea    -0x220(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x220(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  mov    %eax,-0x324(%rbp)
  lea    -0x220(%rbp),%rdx
  lea    -0x120(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x348(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x324(%rbp),%eax
  mov    %eax,-0x328(%rbp)
  jmp    L54
L56:
  mov    -0x328(%rbp),%eax
  cltq
  movzbl -0x220(%rbp,%rax,1),%eax
  cmp    $0x2e,%al
  jne    L36
  mov    -0x328(%rbp),%eax
  add    $0x1,%eax
  lea    -0x220(%rbp),%rdx
  cltq
  add    %rax,%rdx
  mov    -0x348(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x328(%rbp),%eax
  cltq
  movb   $0x0,-0x120(%rbp,%rax,1)
  jmp    L44
L36:
  subl   $0x1,-0x328(%rbp)
L54:
  cmpl   $0x0,-0x328(%rbp)
  jg     L56
L44:
  movl   $0x0,-0x328(%rbp)
  jmp    L22
L63:
  mov    -0x328(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x348(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  mov    %eax,-0x324(%rbp)
  mov    -0x328(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x348(%rbp),%rax
  add    %rdx,%rax
  mov    -0x324(%rbp),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x328(%rbp)
L22:
  mov    -0x328(%rbp),%eax
  movslq %eax,%rbx
  mov    -0x348(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %rax,%rbx
  jb     L63
  lea    -0x320(%rbp),%rdx
  mov    -0x340(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x340(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    -0x340(%rbp),%rax
  add    %rdx,%rax
  movw   $0x2f,(%rax)
  lea    -0x120(%rbp),%rdx
  mov    -0x340(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L23
  call   <__stack_chk_fail@plt>
L23:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void LastExt(string, clean, extens) char *string, *clean, *extens;
{
  int i, j;
  char dname[256], bname[256], fname[256];
  strcpy(fname, string);
  strcpy(dname, dirname(fname));
  strcpy(fname, string);
  strcpy(bname, basename(fname));
  j = strlen(bname) - 1;
  strcpy(fname, bname);
  extens[0] = 0;
  for (i = j; i > 0; i--) {
    if (bname[i] == '.') {
      strcpy(extens, &bname[i + 1]);
      fname[i] = 0;
      break;
    }
  }
  for (i = 0; i < strlen(extens); i++) {
    j = toupper(extens[i]);
    extens[i] = (char)j;
  }
  strcpy(clean, dname);
  strcat(clean, "/");
  strcat(clean, fname);
}
```