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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    $0x0,%eax
  call   <adainit@plt>
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x4c(%rbp),%rax
  mov    %rax,%rsi
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x50(%rbp),%edx
  mov    -0x4c(%rbp),%eax
  imul   %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%ecx
  mov    $0x0,%edx
  div    %rcx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L55:
  cmp    %rdx,%rsp
  je     L39
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L55
L39:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L67
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L67:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x4c(%rbp),%ecx
  mov    -0x50(%rbp),%eax
  mov    -0x40(%rbp),%rdx
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <generate_points@plt>
  mov    -0x40(%rbp),%rax
  mov    %rax,%rsi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x50(%rbp),%eax
  cmp    $0x2,%eax
  jne    L14
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %rax,%rsi
  mov    %edx,%edi
  call   <planar_hull@plt>
  jmp    L47
L14:
  mov    -0x50(%rbp),%eax
  cmp    $0x3,%eax
  jne    L20
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %rax,%rsi
  mov    %edx,%edi
  call   <hull_in_3d@plt>
  jmp    L47
L20:
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    -0x40(%rbp),%rax
  mov    %rax,%rsi
  mov    %edx,%edi
  call   <hull_in_4d@plt>
L47:
  mov    %rbx,%rsp
  mov    $0x0,%eax
  call   <adafinal@plt>
  mov    $0x0,%eax
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L27
  call   <__stack_chk_fail@plt>
L27:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: label: D4
data_type: string
name: read_data
arguments: label: D9
data_type: string
name: read_data
arguments: label: D3
data_type: string
name: read_data
arguments: label: D41
data_type: string
name: read_data
arguments: label: D33
data_type: string

tool: D4: Give the ambient dimension : 

tool: D9: %d

tool: D3: Give the number of points : 

tool: D41: List of tuples : %s


tool: D33: Number of characters : %d


assistant: ```c
int main(void) {
  int dim, npts;
  adainit();
  printf("Give the ambient dimension : ");
  scanf("%d", &dim);
  printf("Give the number of points : ");
  scanf("%d", &npts);
  {
    char points[dim * 10 * npts];
    generate_points(dim, npts, points);
    printf("List of tuples : %s\n", points);
    printf("Number of characters : %d\n", strlen(points));
    if (dim == 2)
      planar_hull(strlen(points), points);
    else if (dim == 3)
      hull_in_3d(strlen(points), points);
    else
      hull_in_4d(strlen(points), points);
  }
  adafinal();
  return 0;
}
```