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

```asm
<main>:
  endbr64
  push   %r15
  lea    D42(%rip),%rdi
  push   %r14
  push   %r13
  lea    D82(%rip),%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  movl   $0x1,0xc(%rsp)
  lea    0x10(%rsp),%r14
  call   <puts@plt>
  lea    D35(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc(%rsp),%rsi
  lea    D88(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0xc(%rsp),%eax
  lea    0x1(%rax),%ebp
  mov    %ebp,0xc(%rsp)
  movslq %ebp,%rbp
  shl    $0x3,%rbp
  mov    %rbp,%rdi
  call   <malloc@plt>
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <malloc@plt>
  mov    $0x8,%edi
  mov    %rax,%rbp
  call   <malloc@plt>
  lea    D51(%rip),%rdi
  movabs $0x6e696174706143,%rcx
  mov    %rcx,(%rax)
  mov    %rax,(%r12)
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%rbx
  mov    %rbx,%rdi
  call   <malloc@plt>
  mov    %rax,0x0(%rbp)
  cmp    $0x8,%ebx
  jae    L82
  test   $0x4,%bl
  jne    L132
  test   %ebx,%ebx
  je     L204
  movzbl 0x10(%rsp),%edx
  mov    %dl,(%rax)
  test   $0x2,%bl
  je     L204
  mov    %ebx,%ebx
  movzwl -0x2(%r14,%rbx,1),%edx
  mov    %dx,-0x2(%rax,%rbx,1)
  jmp    L204
L82:
  mov    %ebx,%edx
  mov    %rax,%rdi
  mov    %r14,%rsi
  mov    -0x8(%r14,%rdx,1),%rcx
  mov    %rcx,-0x8(%rax,%rdx,1)
  lea    -0x1(%rbx),%ecx
  shr    $0x3,%ecx
  rep movsq %ds:(%rsi),%es:(%rdi)
L204:
  xor    %eax,%eax
  lea    D90(%rip),%rdi
  call   <printf@plt>
  cmpl   $0x1,0xc(%rsp)
  jle    L207
  mov    $0x1,%ebx
  jmp    L160
  nopl   0x0(%rax)
L239:
  test   $0x4,%r15b
  jne    L58
  test   %r15d,%r15d
  je     L36
  movzbl (%r14),%eax
  mov    %al,(%rdx)
  test   $0x2,%r15b
  jne    L134
L36:
  lea    D93(%rip),%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <printf@plt>
  cmp    %ebx,0xc(%rsp)
  jle    L207
L160:
  mov    %r14,%rsi
  lea    D95(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%r15
  mov    %r15,%rdi
  call   <malloc@plt>
  mov    %rax,(%r12,%rbx,8)
  mov    %rax,%rdx
  cmp    $0x8,%r15d
  jae    L85
  test   $0x4,%r15b
  jne    L215
  test   %r15d,%r15d
  je     L94
  movzbl (%r14),%eax
  mov    %al,(%rdx)
  test   $0x2,%r15b
  jne    L202
L94:
  mov    %r14,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    %r14,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%r15
  mov    %r15,%rdi
  call   <malloc@plt>
  mov    %rax,0x0(%rbp,%rbx,8)
  mov    %rax,%rdx
  cmp    $0x8,%r15d
  jb     L239
  mov    %r15d,%eax
  lea    -0x1(%r15),%ecx
  mov    %rdx,%rdi
  mov    -0x8(%r14,%rax,1),%rsi
  shr    $0x3,%ecx
  mov    %rsi,-0x8(%rdx,%rax,1)
  mov    %r14,%rsi
  rep movsq %ds:(%rsi),%es:(%rdi)
  jmp    L36
  nopl   0x0(%rax)
L85:
  mov    %r15d,%eax
  lea    -0x1(%r15),%ecx
  mov    %rdx,%rdi
  mov    -0x8(%r14,%rax,1),%rsi
  shr    $0x3,%ecx
  mov    %rsi,-0x8(%rdx,%rax,1)
  mov    %r14,%rsi
  rep movsq %ds:(%rsi),%es:(%rdi)
  jmp    L94
  nop
L207:
  lea    D3(%rip),%rdi
  call   <puts@plt>
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L175
  xor    %ebx,%ebx
  lea    D109(%rip),%r15
  nopl   (%rax)
L27:
  mov    0x0(%rbp,%rbx,8),%r13
  mov    (%r12,%rbx,8),%r14
  mov    %r15,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  mov    %r13,%rdx
  mov    %r14,%rsi
  call   <printf@plt>
  mov    %r14,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  cmp    %ebx,0xc(%rsp)
  jg     L27
L175:
  mov    %r12,%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  lea    D80(%rip),%rdi
  call   <puts@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x78,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L215:
  mov    (%r14),%eax
  mov    %r15d,%ecx
  mov    %eax,(%rdx)
  mov    -0x4(%r14,%rcx,1),%eax
  mov    %eax,-0x4(%rdx,%rcx,1)
  jmp    L94
L58:
  mov    (%r14),%eax
  mov    %r15d,%ecx
  mov    %eax,(%rdx)
  mov    -0x4(%r14,%rcx,1),%eax
  mov    %eax,-0x4(%rdx,%rcx,1)
  jmp    L36
L132:
  mov    0x10(%rsp),%edx
  mov    %ebx,%ebx
  mov    %edx,(%rax)
  mov    -0x4(%r14,%rbx,1),%edx
  mov    %edx,-0x4(%rax,%rbx,1)
  jmp    L204
L134:
  mov    %r15d,%ecx
  movzwl -0x2(%r14,%rcx,1),%eax
  mov    %ax,-0x2(%rdx,%rcx,1)
  jmp    L36
L202:
  mov    %r15d,%ecx
  movzwl -0x2(%r14,%rcx,1),%eax
  mov    %ax,-0x2(%rdx,%rcx,1)
  jmp    L94
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D42
datatype: string
name: extract_symbolic_data
arguments: data_tag: D82
datatype: string
name: extract_symbolic_data
arguments: data_tag: D35
datatype: string
name: extract_symbolic_data
arguments: data_tag: D88
datatype: string
name: extract_symbolic_data
arguments: data_tag: D51
datatype: string
name: extract_symbolic_data
arguments: data_tag: D90
datatype: string
name: extract_symbolic_data
arguments: data_tag: D93
datatype: string
name: extract_symbolic_data
arguments: data_tag: D95
datatype: string
name: extract_symbolic_data
arguments: data_tag: D3
datatype: string
name: extract_symbolic_data
arguments: data_tag: D109
datatype: string
name: extract_symbolic_data
arguments: data_tag: D80
datatype: string

tool: D42: You've been promoted to Captain and get to pick your own crew to take on your adventures!

tool: D82: %80s

tool: D35: How big is your crew?
> 

tool: D88: %d

tool: D51: 
What is your name, Captain?
> 

tool: D90: And what are the positions and names of your crew? (Enter '<position> <name>')
> 

tool: D93: 
> 

tool: D95:  %80s

tool: D3: So the crew of your ship is:


tool: D109: %s %s


tool: D80: Aim for the stars, new Captain!

assistant: ```c
int main() {
  char buffer[80];
  char **positions;
  char **names;
  int crew_size = 1;
  printf("You've been promoted to Captain and get to pick your own crew to take on your adventures!\n");
  printf("How big is your crew?\n> ");
  scanf("%d", &crew_size);
  crew_size = crew_size + 1;
  positions = malloc(sizeof(char *) * crew_size);
  names = malloc(sizeof(char *) * crew_size);
  positions[0] = malloc(strlen("Captain") + 1);
  strcpy(positions[0], "Captain");
  printf("\nWhat is your name, Captain?\n> ");
  scanf("%80s", buffer);
  names[0] = malloc(strlen(buffer) + 1);
  strcpy(names[0], buffer);
  printf("And what are the positions and names of your crew? (Enter '<position> <name>')\n> ");
  int i;
  for (i = 1; i < crew_size; i++) {
    scanf(" %80s", buffer);
    positions[i] = malloc(strlen(buffer) + 1);
    strcpy(positions[i], buffer);
    scanf("%80s", buffer);
    names[i] = malloc(strlen(buffer) + 1);
    strcpy(names[i], buffer);
    printf("\n> ");
  }
  printf("So the crew of your ship is:\n\n");
  for (i = 0; i < crew_size; i++) {
    printf("%s %s\n", positions[i], names[i]);
    free(positions[i]);
    free(names[i]);
  }
  free(positions);
  free(names);
  printf("Aim for the stars, new Captain!\n");
}
```