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

```asm
<split_matrix_fix_3f>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  mov    %edi,-0x38(%rsp)
  mov    %esi,-0x34(%rsp)
  mov    %rdx,-0x48(%rsp)
  mov    %r9,-0x20(%rsp)
  mov    0x38(%rsp),%r13
  lea    (%rdi,%rdi,2),%edi
  mov    %edi,-0x8(%rsp)
  lea    (%rsi,%rsi,2),%ebp
  mov    %edi,%eax
  sub    %ebp,%eax
  mov    %eax,-0x14(%rsp)
  test   %esi,%esi
  jle    L106
  lea    (%rbx,%rbx,8),%eax
  mov    %eax,-0x40(%rsp)
  mov    %ebp,%ebx
  mov    %ebp,-0x18(%rsp)
  cltq
  mov    %rax,-0x30(%rsp)
  lea    (%rsi,%rsi,8),%eax
  cltq
  mov    %rax,-0x28(%rsp)
  movslq %edi,%rdi
  shl    $0x3,%rdi
  movslq %ebp,%r11
  shl    $0x3,%r11
  mov    $0x0,%r15d
  mov    $0x0,%esi
  mov    $0x0,%eax
  mov    $0x0,%r14d
  mov    %r8,-0x10(%rsp)
  mov    %rsi,%r12
  mov    %rcx,%r13
  mov    %ebp,-0x4(%rsp)
  mov    %eax,%ebp
  jmp    L337
L8:
  add    %rdi,%rdx
  add    %r11,%rcx
  sub    $0x1,%esi
  je     L355
L110:
  mov    $0x0,%eax
L276:
  movsd  (%rdx,%rax,1),%xmm0
  movsd  %xmm0,(%rcx,%rax,1)
  add    $0x8,%rax
  cmp    $0x18,%rax
  jne    L276
  jmp    L8
L355:
  add    $0x3,%r8d
  add    $0x18,%r10
  add    $0x18,%r9
  cmp    %ebx,%r8d
  je     L129
L177:
  mov    %r9,%rcx
  mov    %r10,%rdx
  mov    $0x3,%esi
  jmp    L110
L129:
  mov    -0x40(%rsp),%eax
  add    %eax,%ebx
  add    $0x3,%r14d
  add    %eax,%ebp
  add    -0x30(%rsp),%r12
  add    -0x28(%rsp),%r15
  cmp    %r14d,-0x18(%rsp)
  je     L73
L337:
  mov    -0x48(%rsp),%rax
  lea    (%rax,%r12,8),%r10
  lea    0x0(%r13,%r15,8),%r9
  mov    %ebp,%r8d
  jmp    L177
L73:
  mov    -0x10(%rsp),%r12
  mov    -0x4(%rsp),%ebp
  mov    -0x14(%rsp),%ebx
  lea    (%rbx,%rbx,2),%eax
  cltq
  mov    %rax,-0x30(%rsp)
  movslq %ebp,%rax
  mov    %rax,-0x28(%rsp)
  mov    -0x38(%rsp),%eax
  sub    -0x34(%rsp),%eax
  lea    (%rax,%rax,2),%r14d
  movslq %ebx,%r11
  shl    $0x3,%r11
  mov    %esi,%r15d
  mov    $0x0,%ebx
  mov    %esi,%r13d
  jmp    L340
L268:
  add    %rdi,%rdx
  add    %r11,%rcx
  sub    $0x1,%r8d
  je     L173
L89:
  mov    $0x0,%eax
L97:
  movsd  (%rdx,%rax,1),%xmm0
  movsd  %xmm0,(%rcx,%rax,1)
  add    $0x8,%rax
  cmp    $0x18,%rax
  jne    L97
  jmp    L268
L173:
  add    $0x3,%r9d
  add    $0x18,%r10
  cmp    %r14d,%r9d
  je     L333
L232:
  movslq %r9d,%rax
  add    %rbx,%rax
  lea    (%r12,%rax,8),%rcx
  mov    %r10,%rdx
  mov    $0x3,%r8d
  jmp    L89
L333:
  add    $0x3,%r15d
  add    -0x30(%rsp),%rbx
  add    -0x40(%rsp),%r13d
  cmp    %ebp,%r15d
  je     L147
L340:
  mov    -0x34(%rsp),%edx
  cmp    %edx,-0x38(%rsp)
  jle    L333
  movslq %r13d,%rax
  add    -0x28(%rsp),%rax
  mov    -0x48(%rsp),%rcx
  lea    (%rcx,%rax,8),%r10
  mov    %esi,%r9d
  jmp    L232
L147:
  mov    0x38(%rsp),%r13
L106:
  mov    -0x38(%rsp),%ebx
  mov    -0x34(%rsp),%esi
  cmp    %esi,%ebx
  jle    L356
  lea    (%rbx,%rbx,8),%eax
  mov    %eax,-0x38(%rsp)
  cltq
  mov    %rax,-0x40(%rsp)
  mov    -0x8(%rsp),%edi
  mov    %edi,%eax
  imul   %esi,%eax
  lea    (%rax,%rax,2),%r12d
  movslq %r12d,%r14
  lea    0x0(%rbp,%rbp,2),%eax
  mov    %eax,-0x34(%rsp)
  mov    %ebx,%eax
  sub    %esi,%eax
  lea    (%rax,%rax,2),%ebx
  movslq %edi,%rdi
  shl    $0x3,%rdi
  movslq %ebp,%r11
  shl    $0x3,%r11
  mov    $0x0,%eax
  mov    $0x0,%r15d
  mov    %r14,-0x30(%rsp)
  mov    %esi,%r14d
  mov    %r13,0x38(%rsp)
  mov    %eax,%r13d
  jmp    L239
L238:
  add    %rdi,%rdx
  add    %r11,%rcx
  sub    $0x1,%esi
  je     L88
L63:
  mov    $0x0,%eax
L139:
  movsd  (%rdx,%rax,1),%xmm0
  movsd  %xmm0,(%rcx,%rax,1)
  add    $0x8,%rax
  cmp    $0x18,%rax
  jne    L139
  jmp    L238
L88:
  add    $0x18,%r10
  add    $0x18,%r9
  add    $0x3,%r8d
  cmp    %ebp,%r8d
  je     L205
L171:
  mov    %r9,%rcx
  mov    %r10,%rdx
  mov    $0x3,%esi
  jmp    L63
L205:
  add    $0x3,%r15d
  add    -0x38(%rsp),%r12d
  add    -0x34(%rsp),%r13d
  cmp    %ebx,%r15d
  je     L83
L239:
  test   %r14d,%r14d
  jle    L205
  movslq %r12d,%rax
  mov    -0x48(%rsp),%rsi
  lea    (%rsi,%rax,8),%r10
  movslq %r13d,%rax
  mov    -0x20(%rsp),%rsi
  lea    (%rsi,%rax,8),%r9
  mov    $0x0,%r8d
  jmp    L171
L83:
  mov    -0x30(%rsp),%r14
  mov    0x38(%rsp),%r13
  mov    -0x48(%rsp),%r12
  add    %r11,%r12
  mov    -0x14(%rsp),%r15d
  movslq %r15d,%r10
  shl    $0x3,%r10
  mov    $0x0,%ebp
  jmp    L32
L131:
  add    %rdi,%rdx
  add    %r10,%rcx
  sub    $0x1,%esi
  je     L292
L24:
  mov    $0x0,%eax
L241:
  movsd  (%rdx,%rax,1),%xmm0
  movsd  %xmm0,(%rcx,%rax,1)
  add    $0x8,%rax
  cmp    $0x18,%rax
  jne    L241
  jmp    L131
L292:
  add    $0x3,%r8d
  add    $0x18,%r9
  cmp    %ebx,%r8d
  je     L342
L7:
  movslq %r8d,%rax
  add    %r11,%rax
  lea    0x0(%r13,%rax,8),%rcx
  mov    %r9,%rdx
  mov    $0x3,%esi
  jmp    L24
L342:
  add    $0x3,%ebp
  add    -0x40(%rsp),%r14
  cmp    %ebx,%ebp
  je     L356
L32:
  lea    (%r12,%r14,8),%r9
  mov    %ebp,%r11d
  imul   %r15d,%r11d
  movslq %r11d,%r11
  mov    $0x0,%r8d
  jmp    L7
L356:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void split_matrix_fix_3f(int np, int nm, const double *mat, double *mat_ll, double *mat_lh, double *mat_hl, double *mat_hh) {
  int i, j;
  int ii, jj;
  int i3, j3;
  int n3;
  int nl, nh;
  n3 = np * 3;
  nl = nm * 3;
  nh = n3 - nl;
  for (i = 0; i < nm; ++i) {
    i3 = i * 3;
    for (j = 0; j < nm; ++j) {
      j3 = j * 3;
      for (ii = 0; ii < 3; ++ii) {
        for (jj = 0; jj < 3; ++jj) {
          mat_ll[(i3 + ii) * nl + j3 + jj] = mat[(i3 + ii) * n3 + j3 + jj];
        }
      }
    }
  }
  for (i = 0; i < nm; ++i) {
    i3 = i * 3;
    for (j = nm; j < np; ++j) {
      j3 = j * 3;
      for (ii = 0; ii < 3; ++ii) {
        for (jj = 0; jj < 3; ++jj) {
          mat_lh[(i3 + ii) * nh + (j - nm) * 3 + jj] = mat[(i3 + ii) * n3 + j3 + jj];
        }
      }
    }
  }
  for (i = nm; i < np; ++i) {
    i3 = i * 3;
    for (j = 0; j < nm; ++j) {
      j3 = j * 3;
      for (ii = 0; ii < 3; ++ii) {
        for (jj = 0; jj < 3; ++jj) {
          mat_hl[((i - nm) * 3 + ii) * nl + j3 + jj] = mat[(i3 + ii) * n3 + j3 + jj];
        }
      }
    }
  }
  for (i = nm; i < np; ++i) {
    i3 = i * 3;
    for (j = nm; j < np; ++j) {
      j3 = j * 3;
      for (ii = 0; ii < 3; ++ii) {
        for (jj = 0; jj < 3; ++jj) {
          mat_hh[((i - nm) * 3 + ii) * nh + (j - nm) * 3 + jj] = mat[(i3 + ii) * n3 + j3 + jj];
        }
      }
    }
  }
}
```