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

```asm
<create_grid>:
  endbr64
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %edi,%ebx
  imul   %esi,%edi
  shl    $0x3,%edi
  call   <malloc@plt>
  lea    0x0(,%rbx,8),%edi
  mov    %rax,%r12
  call   <malloc@plt>
  mov    %rax,%r8
  test   %ebx,%ebx
  jle    L79
  lea    -0x1(%rbx),%eax
  cmp    $0x5,%eax
  jbe    L11
  pxor   %xmm4,%xmm4
  movd   %ebp,%xmm7
  mov    %ebx,%edx
  mov    %r8,%rax
  movdqa D4(%rip),%xmm2
  movdqa %xmm4,%xmm5
  pshufd $0x0,%xmm7,%xmm7
  shr    $0x2,%edx
  movq   %r12,%xmm6
  shl    $0x5,%rdx
  movdqa %xmm7,%xmm8
  movdqa D15(%rip),%xmm3
  pcmpgtd %xmm2,%xmm5
  psrlq  $0x20,%xmm8
  punpcklqdq %xmm6,%xmm6
  add    %r8,%rdx
  movdqa D0(%rip),%xmm9
  xchg   %ax,%ax
L32:
  movdqa %xmm3,%xmm1
  movdqa %xmm4,%xmm10
  movdqa %xmm5,%xmm11
  add    $0x20,%rax
  movdqa %xmm1,%xmm0
  psrlq  $0x20,%xmm1
  paddd  %xmm9,%xmm3
  pmuludq %xmm7,%xmm0
  pmuludq %xmm8,%xmm1
  pshufd $0x8,%xmm0,%xmm0
  pshufd $0x8,%xmm1,%xmm1
  punpckldq %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  punpckldq %xmm0,%xmm1
  punpckhdq %xmm0,%xmm0
  pcmpgtd %xmm1,%xmm10
  pmuludq %xmm1,%xmm11
  pmuludq %xmm2,%xmm1
  pmuludq %xmm2,%xmm10
  paddq  %xmm11,%xmm10
  psllq  $0x20,%xmm10
  paddq  %xmm10,%xmm1
  movdqa %xmm5,%xmm10
  paddq  %xmm6,%xmm1
  pmuludq %xmm0,%xmm10
  movups %xmm1,-0x20(%rax)
  movdqa %xmm4,%xmm1
  pcmpgtd %xmm0,%xmm1
  pmuludq %xmm2,%xmm0
  pmuludq %xmm2,%xmm1
  paddq  %xmm10,%xmm1
  psllq  $0x20,%xmm1
  paddq  %xmm1,%xmm0
  paddq  %xmm6,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rax,%rdx
  jne    L32
  mov    %ebx,%edx
  and    $0xfffffffc,%edx
  test   $0x3,%bl
  je     L79
L21:
  mov    %ebp,%eax
  movslq %edx,%rsi
  imul   %edx,%eax
  lea    0x0(,%rsi,8),%rcx
  movslq %eax,%rdi
  lea    (%r12,%rdi,8),%rdi
  mov    %rdi,(%r8,%rsi,8)
  lea    0x1(%rdx),%esi
  cmp    %esi,%ebx
  jle    L79
  add    %ebp,%eax
  movslq %eax,%rsi
  lea    (%r12,%rsi,8),%rsi
  mov    %rsi,0x8(%r8,%rcx,1)
  lea    0x2(%rdx),%esi
  cmp    %esi,%ebx
  jle    L79
  add    %ebp,%eax
  movslq %eax,%rsi
  lea    (%r12,%rsi,8),%rsi
  mov    %rsi,0x10(%r8,%rcx,1)
  lea    0x3(%rdx),%esi
  cmp    %esi,%ebx
  jle    L79
  add    %ebp,%eax
  movslq %eax,%rsi
  lea    (%r12,%rsi,8),%rsi
  mov    %rsi,0x18(%r8,%rcx,1)
  lea    0x4(%rdx),%esi
  cmp    %esi,%ebx
  jle    L79
  add    %ebp,%eax
  add    $0x5,%edx
  movslq %eax,%rsi
  lea    (%r12,%rsi,8),%rsi
  mov    %rsi,0x20(%r8,%rcx,1)
  cmp    %edx,%ebx
  jle    L79
  add    %eax,%ebp
  movslq %ebp,%rbp
  lea    (%r12,%rbp,8),%rax
  mov    %rax,0x28(%r8,%rcx,1)
L79:
  pop    %rbx
  mov    %r8,%rax
  pop    %rbp
  pop    %r12
  ret
L11:
  xor    %edx,%edx
  jmp    L21
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D4
type: byte[16]
name: extract_symbolic_data
arguments: data_label: D15
type: byte[16]
name: extract_symbolic_data
arguments: data_label: D0
type: byte[16]

tool: {"D4": [0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x08,0x00,0x00,0x00]}

tool: {"D15": [0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00]}

tool: {"D0": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

assistant: ```c
double **create_grid(int nrows, int ncols) {
  int i;
  double *data = malloc(sizeof(double) * nrows * ncols);
  double **result = malloc(sizeof(double *) * nrows);
  for (i = 0; i < nrows; i++) {
    result[i] = &data[i * ncols];
  }
  return result;
}
```