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

```asm
<double_exp_matrix>:
  endbr64
  push   %r15
  mov    %esi,%r15d
  push   %r14
  push   %r13
  push   %r12
  mov    %r8,%r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %edi,0x1c(%rsp)
  mov    %rdx,0x28(%rsp)
  mov    %ecx,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  test   %ecx,%ecx
  je     L37
  test   %edi,%edi
  je     L495
  test   %esi,%esi
  je     L495
  lea    -0x1(%rdi),%ecx
  mov    %esi,%r11d
  mov    %esi,%edi
  mov    %r8,%rax
  shl    $0x5,%rcx
  and    $0xfffffffe,%r11d
  shr    %edi
  lea    -0x1(%rsi),%ebx
  lea    0x20(%r8,%rcx,1),%r10
  mov    %r11d,%ecx
  nopl   0x0(%rax,%rax,1)
L443:
  lea    0x8(%rdx),%rsi
  cmp    %rsi,%rax
  je     L67
  cmp    $0x2,%ebx
  jbe    L67
  movupd (%rdx),%xmm3
  movups %xmm3,(%rax)
  cmp    $0x1,%edi
  jbe    L401
  movupd 0x10(%rdx),%xmm4
  movups %xmm4,0x10(%rax)
  cmp    $0x2,%edi
  je     L401
  mov    $0x20,%esi
  mov    $0x2,%r8d
L152:
  movupd (%rdx,%rsi,1),%xmm5
  add    $0x1,%r8d
  movups %xmm5,(%rax,%rsi,1)
  add    $0x10,%rsi
  cmp    %r8d,%edi
  jne    L152
L401:
  cmp    %r11d,%r15d
  je     L464
  movsd  (%rdx,%rcx,8),%xmm0
  movsd  %xmm0,(%rax,%rcx,8)
L464:
  add    $0x20,%rax
  add    $0x20,%rdx
  cmp    %r10,%rax
  jne    L443
L495:
  cmpl   $0x1,0x18(%rsp)
  je     L496
  lea    0x40(%rsp),%rax
  movl   $0x1,0xc(%rsp)
  mov    %r15d,%r14d
  mov    %rax,0x10(%rsp)
  mov    0x1c(%rsp),%eax
  lea    -0x1(%rax),%edx
  mov    %rdx,%rcx
  lea    0x4(,%rdx,4),%rdi
  shl    $0x5,%rcx
  mov    %rdi,0x30(%rsp)
  mov    0x28(%rsp),%rdi
  lea    0x60(%rsp,%rcx,1),%rax
  lea    0x20(%r12,%rcx,1),%r13
  mov    %rax,0x38(%rsp)
  lea    -0x1(%r15),%eax
  lea    0x8(,%rax,8),%rbp
  lea    0x8(%rdi,%rax,8),%rbx
  nopl   (%rax)
L465:
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  je     L53
  mov    0x10(%rsp),%rcx
  mov    %r12,%r15
  test   %r14d,%r14d
  je     L53
  mov    %rbx,0x20(%rsp)
  mov    %rbp,%rbx
  mov    %r15,%rbp
  mov    0x38(%rsp),%r15
  nopl   (%rax)
L44:
  mov    %rbp,%rsi
  mov    %rcx,%rdi
  mov    %rbx,%rdx
  add    $0x20,%rbp
  call   <memcpy@plt>
  mov    %rax,%rcx
  add    $0x20,%rcx
  cmp    %r15,%rcx
  jne    L44
  mov    %rbx,%rbp
  mov    0x20(%rsp),%rbx
  mov    %r12,%rcx
  nopl   0x0(%rax)
L362:
  mov    %rcx,%rdi
  mov    %rbp,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    %rax,%rcx
  add    $0x20,%rcx
  cmp    %rcx,%r13
  jne    L362
  mov    0x10(%rsp),%rcx
  mov    0x30(%rsp),%rdi
  xor    %esi,%esi
  mov    0x28(%rsp),%r8
L425:
  movsd  (%rcx),%xmm2
  lea    (%r12,%rsi,8),%rdx
  mov    %r8,%rax
L26:
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  addsd  (%rdx),%xmm1
  movsd  %xmm1,(%rdx)
  cmp    $0x1,%r14d
  je     L504
  movsd  0x8(%rcx),%xmm0
  mulsd  0x20(%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx)
  cmp    $0x2,%r14d
  je     L504
  movsd  0x10(%rcx),%xmm1
  mulsd  0x40(%rax),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx)
  cmp    $0x3,%r14d
  je     L504
  movsd  0x18(%rcx),%xmm1
  mulsd  0x60(%rax),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx)
L504:
  add    $0x8,%rax
  add    $0x8,%rdx
  cmp    %rax,%rbx
  jne    L26
  add    $0x4,%rsi
  add    $0x20,%rcx
  cmp    %rdi,%rsi
  jne    L425
L53:
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  cmp    %eax,0x18(%rsp)
  ja     L465
L496:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L147
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L67:
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  cmp    $0x1,%r15d
  je     L464
  movsd  0x8(%rdx),%xmm0
  movsd  %xmm0,0x8(%rax)
  cmp    $0x2,%r15d
  je     L464
  movsd  0x10(%rdx),%xmm0
  movsd  %xmm0,0x10(%rax)
  cmp    $0x3,%r15d
  je     L464
  movsd  0x18(%rdx),%xmm0
  movsd  %xmm0,0x18(%rax)
  cmp    $0x4,%r15d
  je     L464
  movsd  0x20(%rdx),%xmm0
  movsd  %xmm0,0x20(%rax)
  cmp    $0x5,%r15d
  je     L464
  mov    $0x5,%esi
L379:
  movsd  (%rdx,%rsi,8),%xmm0
  movsd  %xmm0,(%rax,%rsi,8)
  add    $0x1,%rsi
  cmp    %esi,%r15d
  ja     L379
  jmp    L464
L37:
  mov    %edi,%ecx
  test   %edi,%edi
  je     L496
  test   %esi,%esi
  je     L496
  mov    0x18(%rsp),%eax
  movsd  D3(%rip),%xmm0
  test   %eax,%eax
  je     L162
L277:
  movq   $0x0,(%r12)
  cmp    $0x1,%r15d
  je     L473
  cmp    $0x1,%eax
  je     L365
L183:
  movq   $0x0,0x8(%r12)
  cmp    $0x2,%r15d
  jbe    L473
  cmp    $0x2,%eax
  je     L262
L353:
  pxor   %xmm2,%xmm2
  movsd  %xmm2,0x10(%r12)
  cmp    $0x3,%r15d
  jbe    L473
  cmp    $0x3,%eax
  je     L474
L81:
  movq   $0x0,0x18(%r12)
  cmp    $0x4,%r15d
  jbe    L473
  movapd %xmm0,%xmm1
  cmp    $0x4,%eax
  je     L12
  movapd %xmm2,%xmm1
L12:
  movsd  %xmm1,0x20(%r12)
  cmp    $0x5,%r15d
  jbe    L473
  mov    $0x5,%edx
L177:
  cmp    %edx,%eax
  je     L418
  movq   $0x0,(%r12,%rdx,8)
  add    $0x1,%rdx
  cmp    %edx,%r15d
  ja     L177
L473:
  add    $0x1,%eax
  add    $0x20,%r12
  cmp    %eax,%ecx
  je     L496
  test   %eax,%eax
  jne    L277
L162:
  movsd  %xmm0,(%r12)
  cmp    $0x1,%r15d
  jne    L183
  jmp    L473
L365:
  movsd  %xmm0,0x8(%r12)
  cmp    $0x2,%r15d
  jne    L353
  jmp    L473
L262:
  movsd  %xmm0,0x10(%r12)
  pxor   %xmm2,%xmm2
  cmp    $0x3,%r15d
  jne    L81
  jmp    L473
L474:
  movsd  %xmm0,0x18(%r12)
  pxor   %xmm1,%xmm1
  cmp    $0x4,%r15d
  jne    L12
  jmp    L473
L418:
  movsd  %xmm0,(%r12,%rdx,8)
  add    $0x1,%rdx
  cmp    %edx,%r15d
  ja     L177
  jmp    L473
L147:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D3
data_type: f64

tool: D3: 1

assistant: ```c
void double_exp_matrix(unsigned int lines, unsigned int columns, double m1[4][4], unsigned int expNumber, double result[4][4]) {
  unsigned int i, j, k, l;
  double m2[4][4];
  if (expNumber == 0) {
    for (i = 0; i < lines; i++) {
      for (j = 0; j < columns; j++) {
        if (i == j) {
          result[i][j] = 1.0;
        } else {
          result[i][j] = 0.0;
        }
      }
    }
    return;
  }
  for (i = 0; i < lines; i++)
    for (j = 0; j < columns; j++)
      result[i][j] = m1[i][j];
  if (expNumber == 1) {
    return;
  }
  for (l = 1; l < expNumber; l++) {
    for (i = 0; i < lines; i++)
      for (j = 0; j < columns; j++)
        m2[i][j] = result[i][j];
    for (i = 0; i < lines; i++)
      for (j = 0; j < columns; j++)
        result[i][j] = 0;
    for (i = 0; i < lines; i++) {
      for (j = 0; j < columns; j++) {
        for (k = 0; k < columns; k++) {
          result[i][j] = result[i][j] + (m2[i][k] * m1[k][j]);
        }
      }
    }
  }
}
```