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

```asm
<variable_length_array>:
  endbr64
  push   %rbp
  movslq %esi,%rdx
  lea    0x0(,%rdx,4),%r11
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  mov    %edi,%r14d
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %edi,%rax
  mov    %rsp,%rcx
  imul   %rdx,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L109
L104:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L104
L109:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L124
L21:
  mov    %rsp,%r13
  test   %r14d,%r14d
  jle    L123
  mov    %r11,%rax
  shr    $0x2,%rax
  mov    %rax,-0x48(%rbp)
  test   %r12d,%r12d
  jle    L123
  mov    %r12d,%eax
  mov    %r12d,%r9d
  movdqa D5(%rip),%xmm6
  xor    %edx,%edx
  shr    $0x2,%eax
  mov    %r13,%r8
  lea    -0x1(%r12),%ebx
  and    $0xfffffffc,%r9d
  lea    -0x1(%rax),%r10d
  add    $0x1,%r10
  shl    $0x4,%r10
  xchg   %ax,%ax
L49:
  cmp    $0x2,%ebx
  jbe    L138
  movd   %edx,%xmm7
  movdqa D39(%rip),%xmm3
  lea    (%r10,%r8,1),%rcx
  mov    %r8,%rax
  pshufd $0x0,%xmm7,%xmm4
  movdqa %xmm4,%xmm5
  psrlq  $0x20,%xmm5
  nopw   0x0(%rax,%rax,1)
L0:
  movdqa %xmm3,%xmm2
  add    $0x10,%rax
  paddd  %xmm6,%xmm3
  movdqa %xmm2,%xmm1
  movdqa %xmm2,%xmm0
  psrlq  $0x20,%xmm1
  pmuludq %xmm4,%xmm0
  pmuludq %xmm5,%xmm1
  pshufd $0x8,%xmm0,%xmm0
  pshufd $0x8,%xmm1,%xmm1
  punpckldq %xmm1,%xmm0
  paddd  %xmm2,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rcx,%rax
  jne    L0
  mov    %r9d,%eax
  cmp    %r9d,%r12d
  je     L53
L95:
  mov    %edx,%ecx
  movslq %edx,%rdi
  movslq %eax,%rsi
  imul   %eax,%ecx
  imul   -0x48(%rbp),%rdi
  lea    (%rcx,%rax,1),%r15d
  add    %rdi,%rsi
  mov    %r15d,0x0(%r13,%rsi,4)
  lea    0x1(%rax),%esi
  cmp    %esi,%r12d
  jle    L53
  movslq %esi,%r15
  add    %edx,%ecx
  add    $0x2,%eax
  add    %rdi,%r15
  add    %ecx,%esi
  mov    %esi,0x0(%r13,%r15,4)
  cmp    %eax,%r12d
  jle    L53
  movslq %eax,%rsi
  add    %edx,%ecx
  add    %rdi,%rsi
  add    %eax,%ecx
  mov    %ecx,0x0(%r13,%rsi,4)
L53:
  add    $0x1,%edx
  add    %r11,%r8
  cmp    %edx,%r14d
  jne    L49
L123:
  mov    %r12d,%edx
  mov    %r14d,%esi
  lea    D30(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r12d,%esi
  mov    %r14d,%edi
  mov    %r13,%rdx
  call   <sum2d@plt>
  lea    D25(%rip),%rdi
  mov    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L107
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L138:
  xor    %eax,%eax
  jmp    L95
L124:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L21
L107:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D5
datatype: byte[16]
name: retrieve_data
arguments: tag: D39
datatype: byte[16]
name: retrieve_data
arguments: tag: D30
datatype: string
name: retrieve_data
arguments: tag: D25
datatype: string

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

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

tool: D30: %d * %d array


tool: D25: sum of all elemts = %d


assistant: ```c
int variable_length_array(int rs, int cs) {
  int i, j;
  int varr[rs][cs];
  for (i = 0; i < rs; i++)
    for (j = 0; j < cs; j++)
      varr[i][j] = i * j + j;
  printf("%d * %d array\n", rs, cs);
  printf("sum of all elemts = %d\n", sum2d(rs, cs, varr));
}
```