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

```asm
<s_cvt_tran_mat2pmat>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r10d
  mov    %r9d,%r14d
  mov    0x38(%rsp),%r12
  mov    %edx,%eax
  sar    $0x1f,%eax
  shr    $0x1e,%eax
  add    %eax,%edx
  and    $0x3,%edx
  sub    %edx,%eax
  lea    0x4(%rax),%eax
  cltd
  shr    $0x1e,%edx
  lea    (%rax,%rdx,1),%ecx
  and    $0x3,%ecx
  sub    %edx,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  sub    %ecx,%esi
  mov    %esi,-0x4(%rsp)
  test   %ecx,%ecx
  jle    L48
  test   %edi,%edi
  jle    L119
  mov    %r8,%r11
  mov    %r12,%rsi
  movslq %r9d,%rdi
  shl    $0x2,%rdi
  mov    $0x0,%r9d
L161:
  mov    %r11,%rdx
  mov    $0x0,%eax
L32:
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rsi,%rax,4)
  add    $0x1,%rax
  add    %rdi,%rdx
  cmp    %eax,%ecx
  jg     L32
  add    $0x1,%r9d
  add    $0x4,%r11
  add    $0x10,%rsi
  cmp    %r9d,%r10d
  jne    L161
L119:
  mov    %ecx,%eax
  imul   %r14d,%eax
  cltq
  lea    (%r8,%rax,4),%r8
  mov    0x40(%rsp),%eax
  lea    -0x4(%rcx,%rax,4),%eax
  cltq
  lea    (%r12,%rax,4),%r12
L48:
  mov    -0x4(%rsp),%eax
  lea    -0x3(%rax),%r13d
  test   %r13d,%r13d
  jle    L108
  mov    0x40(%rsp),%eax
  shl    $0x2,%eax
  mov    %eax,-0x18(%rsp)
  lea    0x0(,%r14,4),%eax
  mov    %eax,-0x14(%rsp)
  lea    (%r14,%r14,2),%ebx
  lea    -0x4(%r10),%eax
  shr    $0x2,%eax
  mov    %eax,%edx
  shl    $0x4,%rdx
  mov    %rdx,-0x10(%rsp)
  lea    0x4(,%rax,4),%eax
  mov    %eax,-0x8(%rsp)
  mov    %r14d,%r9d
  mov    $0x0,%r11d
  mov    $0x0,%ebp
  lea    (%r14,%r14,1),%eax
  mov    %eax,-0x1c(%rsp)
  lea    0x40(%r12),%rax
  mov    %r14d,-0x20(%rsp)
  mov    %rax,%r14
  jmp    L107
L144:
  add    $0x4,%ebp
  add    -0x18(%rsp),%r11d
  mov    -0x14(%rsp),%eax
  add    %eax,%r9d
  add    %eax,%ebx
  cmp    %r13d,%ebp
  jge    L30
L107:
  mov    $0x0,%edx
  cmp    $0x3,%r10d
  jle    L82
  mov    %r9d,%edx
  sub    -0x20(%rsp),%edx
  movslq %edx,%rax
  lea    (%r8,%rax,4),%rdi
  movslq %r11d,%r15
  lea    (%r12,%r15,4),%rax
  movslq %r9d,%rcx
  lea    (%r8,%rcx,4),%rsi
  add    -0x1c(%rsp),%edx
  movslq %edx,%rdx
  lea    (%r8,%rdx,4),%rcx
  movslq %ebx,%rdx
  lea    (%r8,%rdx,4),%rdx
  add    -0x10(%rsp),%r15
  lea    (%r14,%r15,4),%r15
L129:
  movss  (%rdi),%xmm0
  movss  %xmm0,(%rax)
  movss  (%rsi),%xmm0
  movss  %xmm0,0x4(%rax)
  movss  (%rcx),%xmm0
  movss  %xmm0,0x8(%rax)
  movss  (%rdx),%xmm0
  movss  %xmm0,0xc(%rax)
  movss  0x4(%rdi),%xmm0
  movss  %xmm0,0x10(%rax)
  movss  0x4(%rsi),%xmm0
  movss  %xmm0,0x14(%rax)
  movss  0x4(%rcx),%xmm0
  movss  %xmm0,0x18(%rax)
  movss  0x4(%rdx),%xmm0
  movss  %xmm0,0x1c(%rax)
  movss  0x8(%rdi),%xmm0
  movss  %xmm0,0x20(%rax)
  movss  0x8(%rsi),%xmm0
  movss  %xmm0,0x24(%rax)
  movss  0x8(%rcx),%xmm0
  movss  %xmm0,0x28(%rax)
  movss  0x8(%rdx),%xmm0
  movss  %xmm0,0x2c(%rax)
  movss  0xc(%rdi),%xmm0
  movss  %xmm0,0x30(%rax)
  movss  0xc(%rsi),%xmm0
  movss  %xmm0,0x34(%rax)
  movss  0xc(%rcx),%xmm0
  movss  %xmm0,0x38(%rax)
  movss  0xc(%rdx),%xmm0
  movss  %xmm0,0x3c(%rax)
  add    $0x10,%rdi
  add    $0x40,%rax
  add    $0x10,%rsi
  add    $0x10,%rcx
  add    $0x10,%rdx
  cmp    %r15,%rax
  jne    L129
  mov    -0x8(%rsp),%edx
L82:
  cmp    %edx,%r10d
  jle    L144
  mov    %r9d,%ecx
  sub    -0x20(%rsp),%ecx
  movslq %edx,%rax
  shl    $0x2,%edx
  movslq %edx,%rdx
  movslq %r11d,%rsi
  add    %rsi,%rdx
  lea    (%r12,%rdx,4),%rdx
  movslq %ecx,%rsi
  lea    (%r8,%rsi,4),%r15
  movslq %r9d,%rsi
  lea    (%r8,%rsi,4),%rdi
  add    -0x1c(%rsp),%ecx
  movslq %ecx,%rcx
  lea    (%r8,%rcx,4),%rsi
  movslq %ebx,%rcx
  lea    (%r8,%rcx,4),%rcx
L36:
  movss  (%r15,%rax,4),%xmm0
  movss  %xmm0,(%rdx)
  movss  (%rdi,%rax,4),%xmm0
  movss  %xmm0,0x4(%rdx)
  movss  (%rsi,%rax,4),%xmm0
  movss  %xmm0,0x8(%rdx)
  movss  (%rcx,%rax,4),%xmm0
  movss  %xmm0,0xc(%rdx)
  add    $0x1,%rax
  add    $0x10,%rdx
  cmp    %eax,%r10d
  jg     L36
  jmp    L144
L30:
  mov    -0x20(%rsp),%r14d
  mov    -0x4(%rsp),%eax
  sub    $0x4,%eax
  shr    $0x2,%eax
  lea    0x4(,%rax,4),%eax
L167:
  mov    -0x4(%rsp),%ebx
  cmp    %eax,%ebx
  jle    L178
  mov    %ebx,%r9d
  sub    %eax,%r9d
  mov    $0x4,%edi
  cmp    %edi,%r9d
  cmovle %r9d,%edi
  test   %r10d,%r10d
  jle    L178
  mov    %eax,%ebx
  imul   0x40(%rsp),%ebx
  imul   %r14d,%eax
  cltq
  lea    (%r8,%rax,4),%r11
  movslq %r14d,%rcx
  shl    $0x2,%rcx
  mov    $0x0,%r8d
  movslq %ebx,%rbx
  jmp    L124
L108:
  mov    $0x0,%eax
  jmp    L167
L96:
  lea    0x0(,%r8,4),%eax
  cltq
  add    %rbx,%rax
  lea    (%r12,%rax,4),%rsi
  mov    %r11,%rdx
  mov    $0x0,%eax
L166:
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rsi,%rax,4)
  add    $0x1,%rax
  add    %rcx,%rdx
  cmp    %eax,%edi
  jg     L166
L113:
  add    $0x1,%r8d
  add    $0x4,%r11
  cmp    %r8d,%r10d
  je     L178
L124:
  test   %r9d,%r9d
  jg     L96
  jmp    L113
L178:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void s_cvt_tran_mat2pmat(int row, int col, int offset, int bs_dummy, float *A, int lda, float *pA, int sda) {
  const int bs = 4;
  int i, ii, j, row0, row1, row2;
  row0 = (bs - offset % bs) % bs;
  if (row0 > col)
    row0 = col;
  row1 = col - row0;
  ii = 0;
  if (row0 > 0) {
    for (j = 0; j < row; j++) {
      for (i = 0; i < row0; i++) {
        pA[i + j * bs + ii * sda] = A[j + (i + ii) * lda];
      }
    }
    A += row0 * lda;
    pA += row0 + bs * (sda - 1);
  }
  ii = 0;
  for (; ii < row1 - 3; ii += bs) {
    j = 0;
    for (; j < row - 3; j += 4) {
      pA[0 + (j + 0) * bs + ii * sda] = A[j + 0 + (ii + 0) * lda];
      pA[1 + (j + 0) * bs + ii * sda] = A[j + 0 + (ii + 1) * lda];
      pA[2 + (j + 0) * bs + ii * sda] = A[j + 0 + (ii + 2) * lda];
      pA[3 + (j + 0) * bs + ii * sda] = A[j + 0 + (ii + 3) * lda];
      pA[0 + (j + 1) * bs + ii * sda] = A[j + 1 + (ii + 0) * lda];
      pA[1 + (j + 1) * bs + ii * sda] = A[j + 1 + (ii + 1) * lda];
      pA[2 + (j + 1) * bs + ii * sda] = A[j + 1 + (ii + 2) * lda];
      pA[3 + (j + 1) * bs + ii * sda] = A[j + 1 + (ii + 3) * lda];
      pA[0 + (j + 2) * bs + ii * sda] = A[j + 2 + (ii + 0) * lda];
      pA[1 + (j + 2) * bs + ii * sda] = A[j + 2 + (ii + 1) * lda];
      pA[2 + (j + 2) * bs + ii * sda] = A[j + 2 + (ii + 2) * lda];
      pA[3 + (j + 2) * bs + ii * sda] = A[j + 2 + (ii + 3) * lda];
      pA[0 + (j + 3) * bs + ii * sda] = A[j + 3 + (ii + 0) * lda];
      pA[1 + (j + 3) * bs + ii * sda] = A[j + 3 + (ii + 1) * lda];
      pA[2 + (j + 3) * bs + ii * sda] = A[j + 3 + (ii + 2) * lda];
      pA[3 + (j + 3) * bs + ii * sda] = A[j + 3 + (ii + 3) * lda];
    }
    for (; j < row; j++) {
      pA[0 + (j + 0) * bs + ii * sda] = A[j + 0 + (ii + 0) * lda];
      pA[1 + (j + 0) * bs + ii * sda] = A[j + 0 + (ii + 1) * lda];
      pA[2 + (j + 0) * bs + ii * sda] = A[j + 0 + (ii + 2) * lda];
      pA[3 + (j + 0) * bs + ii * sda] = A[j + 0 + (ii + 3) * lda];
    }
  }
  if (ii < row1) {
    row2 = row1 - ii;
    if (bs < row2)
      row2 = bs;
    for (j = 0; j < row; j++) {
      for (i = 0; i < row2; i++) {
        pA[i + j * bs + ii * sda] = A[j + (i + ii) * lda];
      }
    }
  }
}
```