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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xd0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x2a,-0xb0(%rbp)
  movq   $0x0,-0xa8(%rbp)
  movq   $0x0,-0xa0(%rbp)
  movq   $0x0,-0x98(%rbp)
  movq   $0x0,-0x90(%rbp)
  movq   $0x0,-0x88(%rbp)
  movq   $0x0,-0x80(%rbp)
  movq   $0x0,-0x78(%rbp)
  movq   $0x0,-0x70(%rbp)
  movq   $0x0,-0x68(%rbp)
  movq   $0x2a,-0x60(%rbp)
  movq   $0x0,-0x58(%rbp)
  movq   $0x0,-0x50(%rbp)
  movq   $0x0,-0x48(%rbp)
  movq   $0x0,-0x40(%rbp)
  movq   $0x0,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movl   $0x0,-0xc0(%rbp)
  movl   $0x0,-0xbc(%rbp)
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L69
L83:
  mov    -0xbc(%rbp),%eax
  cltq
  movzbl -0xc1(%rbp),%edx
  mov    %dl,-0x60(%rbp,%rax,1)
  addl   $0x1,-0xbc(%rbp)
L69:
  mov    $0x0,%eax
  call   <getchar@plt>
  mov    %al,-0xc1(%rbp)
  cmpb   $0xa,-0xc1(%rbp)
  jne    L83
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc0(%rbp),%rax
  mov    %rax,%rsi
  lea    D35(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  movl   $0x0,-0xb8(%rbp)
  jmp    L124
L11:
  mov    -0xb8(%rbp),%eax
  cltq
  movzbl -0x60(%rbp,%rax,1),%eax
  cmp    $0x60,%al
  jle    L78
  mov    -0xb8(%rbp),%eax
  cltq
  movzbl -0x60(%rbp,%rax,1),%eax
  cmp    $0x7a,%al
  jg     L78
  mov    -0xb8(%rbp),%eax
  cltq
  movzbl -0x60(%rbp,%rax,1),%eax
  movsbl %al,%eax
  lea    -0x61(%rax),%edx
  mov    -0xc0(%rbp),%eax
  add    %edx,%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
  mov    %edx,%eax
  add    $0x61,%eax
  mov    %eax,%edx
  mov    -0xb8(%rbp),%eax
  cltq
  mov    %dl,-0xb0(%rbp,%rax,1)
  jmp    L76
L78:
  mov    -0xb8(%rbp),%eax
  cltq
  movzbl -0x60(%rbp,%rax,1),%eax
  cmp    $0x40,%al
  jle    L49
  mov    -0xb8(%rbp),%eax
  cltq
  movzbl -0x60(%rbp,%rax,1),%eax
  cmp    $0x5a,%al
  jg     L49
  mov    -0xb8(%rbp),%eax
  cltq
  movzbl -0x60(%rbp,%rax,1),%eax
  movsbl %al,%eax
  lea    -0x41(%rax),%edx
  mov    -0xc0(%rbp),%eax
  add    %edx,%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
  mov    %edx,%eax
  add    $0x41,%eax
  mov    %eax,%edx
  mov    -0xb8(%rbp),%eax
  cltq
  mov    %dl,-0xb0(%rbp,%rax,1)
  jmp    L76
L49:
  mov    -0xb8(%rbp),%eax
  cltq
  movzbl -0x60(%rbp,%rax,1),%edx
  mov    -0xb8(%rbp),%eax
  cltq
  mov    %dl,-0xb0(%rbp,%rax,1)
L76:
  addl   $0x1,-0xb8(%rbp)
L124:
  mov    -0xb8(%rbp),%eax
  cmp    -0xbc(%rbp),%eax
  jl     L11
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0xb4(%rbp)
  jmp    L3
L54:
  mov    -0xb4(%rbp),%eax
  cltq
  movzbl -0xb0(%rbp,%rax,1),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  addl   $0x1,-0xb4(%rbp)
L3:
  mov    -0xb4(%rbp),%eax
  cmp    -0xbc(%rbp),%eax
  jl     L54
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L96
  call   <__stack_chk_fail@plt>
L96:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D37
type_guessed: string
name: retrieve_data
arguments: label: D9
type_guessed: string
name: retrieve_data
arguments: label: D35
type_guessed: string
name: retrieve_data
arguments: label: D10
type_guessed: string

tool: D37: enter message to be encrypted:

tool: D9: enter shift amount(1-25)

tool: D35: %d

tool: D10: encrypted message:

assistant: ```c
int main(void) {
  char encrypted_ms[80] = {'*'}, unencrypted_ms[80] = {'*'}, ch;
  int shift_amount = 0, index = 0;
  printf("enter message to be encrypted:\n");
  while ((ch = getchar()) != '\n') {
    unencrypted_ms[index] = ch;
    index++;
  }
  printf("enter shift amount(1-25)\n");
  scanf("%d", &shift_amount);
  for (int i = 0; i < index; i++) {
    if (unencrypted_ms[i] >= 'a' && unencrypted_ms[i] <= 'z') {
      encrypted_ms[i] = ((unencrypted_ms[i] - 'a') + shift_amount) % 26 + 'a';
    } else if (unencrypted_ms[i] >= 'A' && unencrypted_ms[i] <= 'Z') {
      encrypted_ms[i] = ((unencrypted_ms[i] - 'A') + shift_amount) % 26 + 'A';
    } else {
      encrypted_ms[i] = unencrypted_ms[i];
    }
  }
  printf("encrypted message:\n");
  for (int j = 0; j < index; j++) {
    printf("%c", encrypted_ms[j]);
  }
  printf("\n");
  return 0;
}
```