user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  cmp    $0x4,%edi
  jne    L124
  mov    0x10(%rsi),%rdi
  mov    %rsi,%rbp
  call   <strlen@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jle    L5
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L107
  mov    %ebx,%edx
  xor    %esi,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    0x10(%rbp),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  mov    0x18(%rbp),%rdi
  call   <strlen@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  jle    L134
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L107
  mov    %r14d,%edx
  xor    %esi,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    0x18(%rbp),%rsi
  mov    %r13,%rdi
  call   <strcpy@plt>
  movslq %r14d,%rcx
  mov    %r13,%rdx
  lea    0x0(%r13,%rcx,1),%rdi
  nopl   0x0(%rax)
L96:
  movzbl (%rdx),%eax
  lea    -0x5b(%rax),%esi
  cmp    $0x5,%sil
  jbe    L3
  lea    -0x41(%rax),%esi
  cmp    $0x39,%sil
  ja     L3
  lea    -0x61(%rax),%esi
  cmp    $0x19,%sil
  ja     L58
  sub    $0x20,%eax
  mov    %al,(%rdx)
L58:
  add    $0x1,%rdx
  cmp    %rdi,%rdx
  jne    L96
  mov    0x8(%rbp),%rax
  xor    %edi,%edi
  cmpb   $0x64,0x1(%rax)
  setne  %dil
  xor    %esi,%esi
  lea    -0x1(%rdi,%rdi,1),%edi
L81:
  mov    %esi,%eax
  cltd
  idiv   %ebx
  movslq %edx,%rdx
  movsbl (%r12,%rdx,1),%eax
  movsbl 0x0(%r13,%rsi,1),%edx
  sub    $0x41,%eax
  imul   %edi,%eax
  lea    -0x41(%rax,%rdx,1),%edx
  movslq %edx,%rax
  mov    %edx,%r8d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r8d
  sar    $0x23,%rax
  sub    %r8d,%eax
  imul   $0x1a,%eax,%r8d
  mov    %edx,%eax
  sub    %r8d,%eax
  lea    0x1a(%rax),%edx
  cmovs  %edx,%eax
  add    $0x41,%eax
  mov    %al,0x0(%r13,%rsi,1)
  add    $0x1,%rsi
  cmp    %rsi,%rcx
  jne    L81
  mov    0x10(%rbp),%rdx
  mov    0x18(%rbp),%rsi
  mov    %r13,%rcx
  xor    %eax,%eax
  lea    D25(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  xor    %eax,%eax
  jmp    L80
L3:
  lea    D43(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%eax
L80:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L124:
  lea    D9(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%eax
  jmp    L80
L107:
  lea    D39(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%eax
  jmp    L80
L5:
  lea    D20(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%eax
  jmp    L80
L134:
  lea    D35(%rip),%rdi
  call   <puts@plt>
  or     $0xffffffff,%eax
  jmp    L80
```

tool_calls: name: retrieve_data
arguments: label: D25
type_infered: string
name: retrieve_data
arguments: label: D43
type_infered: string
name: retrieve_data
arguments: label: D9
type_infered: string
name: retrieve_data
arguments: label: D39
type_infered: string
name: retrieve_data
arguments: label: D20
type_infered: string
name: retrieve_data
arguments: label: D35
type_infered: string

tool: D25: Input: %s
Key: %s
Output:%s


tool: D43: Message does not contain valid characters!

tool: D9: Usage: vigenere -d[ecrypt]|-e[ncrypt] <Key> <Message>

tool: D39: Malloc failed. Please make sure enough memory is available.

tool: D20: Please provide a valid key.

tool: D35: Please provide a valid message.

assistant: ```c
int main(int argc, char **argv) {
  if (argc != 4) {
    printf("Usage: vigenere -d[ecrypt]|-e[ncrypt] <Key> <Message>\r\n");
    return -1;
  }
  int key_len = strlen(argv[2]);
  if (key_len <= 0) {
    printf("Please provide a valid key.\r\n");
    return -1;
  }
  char *key = malloc(sizeof(char) * key_len);
  if (!key) {
    printf("Malloc failed. Please make sure enough memory is available.\r\n");
    return -1;
  }
  memset(key, 0, key_len);
  strcpy(key, argv[2]);
  int len = strlen(argv[3]);
  if (len <= 0) {
    printf("Please provide a valid message.\r\n");
    return -1;
  }
  char *input = malloc(sizeof(char) * len);
  if (!input) {
    printf("Malloc failed. Please make sure enough memory is available.\r\n");
    return -1;
  }
  memset(input, 0, len);
  strcpy(input, argv[3]);
  int y;
  for (y = 0; y < len; y++) {
    if (input[y] < 65 || (input[y] > 90 && input[y] < 97) || (input[y] > 122)) {
      printf("Message does not contain valid characters!\r\n");
      return -1;
    }
    if (input[y] >= 97 && input[y] <= 122)
      input[y] = input[y] - 32;
  }
  int x;
  int modifier = (argv[1][1] == 'd' ? -1 : 1);
  int val = 0;
  for (x = 0; x < len; x++) {
    val = (((input[x] - 65) + (modifier * (key[x % key_len] - 65))) % 26);
    while (val < 0)
      val += 26;
    input[x] = val + 65;
  }
  printf("Input: %s\r\nKey: %s\r\nOutput:%s\r\n", argv[3], argv[2], input);
  free(key);
  free(input);
}
```