user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x1c(%rbp),%rax
  mov    %rax,%rsi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    $0xf4240,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movl   $0x0,-0x14(%rbp)
  jmp    L92
L26:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x60,%al
  jle    L76
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x7a,%al
  jle    L22
L76:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jle    L2
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5a,%al
  jg     L2
L22:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x60,%al
  jle    L55
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x7a,%al
  jg     L55
  movb   $0x61,-0x1d(%rbp)
  jmp    L0
L55:
  movb   $0x41,-0x1d(%rbp)
L0:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  movsbl -0x1d(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x18(%rbp),%eax
  add    %ecx,%eax
  movslq %eax,%rdx
  imul   $0x4ec4ec4f,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x3,%edx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  imul   $0x1a,%edx,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  movzbl -0x1d(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
L2:
  addl   $0x1,-0x14(%rbp)
L92:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L26
  mov    -0x10(%rbp),%rax
  mov    %rax,%rsi
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L52
  call   <__stack_chk_fail@plt>
L52:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D1
data_type: string
name: extract_symbolic_data
arguments: data_label: D24
data_type: string

tool: D1: %d

tool: D24: %s

assistant: ```c
int main() {
  int n, k, i;
  char *s, ch;
  scanf("%d", &n);
  s = (char *)malloc(sizeof(char) * 1000000);
  scanf("%s", s);
  scanf("%d", &k);
  i = 0;
  while (*(s + i)) {
    if ((*(s + i) >= 'a' && *(s + i) <= 'z') || (*(s + i) >= 'A' && *(s + i) <= 'Z')) {
      if (*(s + i) >= 'a' && *(s + i) <= 'z')
        ch = 'a';
      else
        ch = 'A';
      *(s + i) = ch + (*(s + i) - ch + k) % 26;
    }
    i++;
  }
  printf("%s", s);
  return 0;
}
```