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

```asm
<pdecrypt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  call   <strlen@plt>
  mov    %rsp,%rcx
  mov    %eax,-0x44(%rbp)
  movslq %ebx,%rax
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L166
L60:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L60
L166:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L154
L21:
  movslq -0x44(%rbp),%rax
  mov    %rsp,%rcx
  mov    %rsp,%r15
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L91
L84:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L84
L91:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L130
L161:
  lea    0x1(%rbx),%edx
  mov    %r13,%rsi
  mov    %r15,%rdi
  mov    %rsp,-0x50(%rbp)
  call   <strncpy@plt>
  mov    -0x44(%rbp),%eax
  mov    %r12,%rsi
  mov    %rsp,%rdi
  lea    0x1(%rax),%edx
  call   <strncpy@plt>
  test   %ebx,%ebx
  jle    L18
  lea    -0x1(%rbx),%eax
  mov    %r15,%r14
  xor    %r12d,%r12d
  lea    0x1(%r15,%rax,1),%r13
  jmp    L0
  nopw   0x0(%rax,%rax,1)
L73:
  add    $0x1,%r14
  cmp    %r13,%r14
  je     L58
L0:
  movsbl (%r14),%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L73
  movsbl (%r14),%edi
  call   <toupper@plt>
  mov    %eax,%ebx
  mov    %r12d,%eax
  cltd
  idivl  -0x44(%rbp)
  mov    -0x50(%rbp),%rax
  movslq %edx,%rdx
  movsbl (%rax,%rdx,1),%edi
  call   <toupper@plt>
  sub    %al,%bl
  js     L158
  movsbl %bl,%eax
  mov    %rax,%rbx
  imul   $0x4ec4ec4f,%rax,%rax
  shr    $0x23,%rax
  imul   $0x1a,%eax,%eax
  sub    %eax,%ebx
  add    $0x41,%ebx
L30:
  movslq %r12d,%rax
  add    $0x1,%r14
  add    $0x1,%r12d
  mov    %bl,(%r15,%rax,1)
  cmp    %r13,%r14
  jne    L0
L58:
  movslq %r12d,%r12
  mov    %r15,%rsi
  lea    D9(%rip),%rdi
  movb   $0x0,(%r15,%r12,1)
  call   <printf@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L39
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L154:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L21
  nopl   0x0(%rax,%rax,1)
L158:
  add    $0x1a,%ebx
  movsbl %bl,%edx
  movsbq %bl,%rbx
  imul   $0x4ec4ec4f,%rbx,%rax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sar    $0x23,%rax
  sub    %esi,%eax
  imul   $0x1a,%eax,%eax
  sub    %eax,%edx
  lea    0x41(%rdx),%ebx
  jmp    L30
L18:
  xor    %r12d,%r12d
  jmp    L58
L130:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L161
L39:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D9
type_guessed: string

tool: D9: %s


assistant: ```c
int pdecrypt(const char *cipher, const char *k) {
  int length = strlen(cipher);
  int keylength = strlen(k);
  char plain[length];
  char key[keylength];
  strncpy(plain, cipher, length + 1);
  strncpy(key, k, keylength + 1);
  int i, j;
  for (i = j = 0; i < length; i++, j++) {
    if (!isspace(plain[i])) {
      char p = ((toupper(plain[i]) - 65) - (toupper(key[(j % keylength)]) - 65));
      plain[j] = (p < 0 ? p + 26 : p) % 26 + 65;
    } else
      j--;
  }
  plain[j] = '\0';
  printf("%s\n", plain);
  return 0;
}
```