user: 请将以下的汇编代码转换成C语言代码：

```asm
<neuralops_caffe_im2col>:
  endbr64
  push   %r15
  mov    %rdi,%r10
  push   %r14
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x58,%rsp
  mov    0x90(%rsp),%eax
  mov    %edx,0x18(%rsp)
  mov    0xa0(%rsp),%r12d
  mov    0xa8(%rsp),%ecx
  mov    %r8d,0x38(%rsp)
  lea    (%rdx,%rax,2),%eax
  lea    -0x1(%r8),%edx
  mov    %r9d,0x24(%rsp)
  mov    0xc0(%rsp),%rdi
  imul   0xb0(%rsp),%edx
  add    $0x1,%edx
  sub    %edx,%eax
  cltd
  idiv   %r12d
  lea    -0x1(%r9),%edx
  imul   0xb8(%rsp),%edx
  add    $0x1,%edx
  add    $0x1,%eax
  mov    %eax,0x28(%rsp)
  mov    0x98(%rsp),%eax
  lea    0x0(%r13,%rax,2),%eax
  sub    %edx,%eax
  cltd
  idiv   %ecx
  mov    %ebx,%edx
  lea    -0x1(%rsi),%ebx
  imul   %r13d,%edx
  mov    %ebx,0x3c(%rsp)
  test   %esi,%esi
  je     L138
  movslq %edx,%rdx
  mov    %r12d,%r14d
  lea    0x1(%rax),%ebp
  mov    %eax,%eax
  lea    0x0(,%rdx,4),%rsi
  mov    0x90(%rsp),%edx
  pxor   %xmm1,%xmm1
  mov    %r12d,%r9d
  mov    %rsi,0x40(%rsp)
  mov    0xb0(%rsp),%esi
  imul   %r13d,%r14d
  lea    0x4(,%rax,4),%r15
  imul   %r13d,%edx
  imul   %r13d,%esi
  mov    %r14d,%r8d
  mov    %ebp,%r14d
  mov    %ecx,%ebp
  mov    %r13d,%ecx
  neg    %edx
  mov    %r15,%r13
  mov    %esi,0x48(%rsp)
  mov    %edx,0x4c(%rsp)
L6:
  mov    0x38(%rsp),%eax
  test   %eax,%eax
  jle    L15
  mov    0x90(%rsp),%eax
  movl   $0x0,0x34(%rsp)
  mov    %r13,%rdx
  mov    %r14d,%r13d
  mov    %ecx,%r14d
  neg    %eax
  mov    %eax,0x2c(%rsp)
  mov    0x4c(%rsp),%eax
  mov    %eax,0x30(%rsp)
L151:
  mov    0x98(%rsp),%eax
  mov    0x24(%rsp),%ecx
  movl   $0x0,0x20(%rsp)
  neg    %eax
  mov    %eax,0x1c(%rsp)
  test   %ecx,%ecx
  jle    L43
  cs nopw 0x0(%rax,%rax,1)
L186:
  mov    0x28(%rsp),%r15d
  test   %r15d,%r15d
  je     L102
  mov    %r15d,%eax
  mov    0x30(%rsp),%ebx
  mov    0x2c(%rsp),%r12d
  mov    %r13d,%r15d
  mov    %eax,%r13d
L16:
  test   %r12d,%r12d
  js     L72
  cmp    %r12d,0x18(%rsp)
  jle    L72
  test   %r15d,%r15d
  je     L132
  mov    0x1c(%rsp),%eax
  lea    (%rdi,%rdx,1),%r11
  jmp    L46
  nopl   0x0(%rax,%rax,1)
L67:
  lea    (%rax,%rbx,1),%ecx
  add    %ebp,%eax
  movslq %ecx,%rcx
  movss  (%r10,%rcx,4),%xmm0
  movss  %xmm0,-0x4(%rdi)
  cmp    %r11,%rdi
  je     L132
L46:
  add    $0x4,%rdi
  test   %eax,%eax
  js     L78
  cmp    %eax,%r14d
  jg     L67
L78:
  movaps %xmm1,%xmm0
  add    %ebp,%eax
  movss  %xmm0,-0x4(%rdi)
  cmp    %r11,%rdi
  jne    L46
L132:
  add    %r9d,%r12d
  add    %r8d,%ebx
  sub    $0x1,%r13d
  jne    L16
L166:
  mov    %r15d,%r13d
L102:
  addl   $0x1,0x20(%rsp)
  mov    0xb8(%rsp),%ebx
  mov    0x20(%rsp),%eax
  add    %ebx,0x1c(%rsp)
  cmp    %eax,0x24(%rsp)
  jne    L186
L43:
  mov    0xb0(%rsp),%ebx
  addl   $0x1,0x34(%rsp)
  add    %ebx,0x2c(%rsp)
  mov    0x34(%rsp),%eax
  mov    0x48(%rsp),%ebx
  add    %ebx,0x30(%rsp)
  cmp    %eax,0x38(%rsp)
  jne    L151
  mov    %r14d,%ecx
  mov    %r13d,%r14d
  mov    %rdx,%r13
L15:
  subl   $0x1,0x3c(%rsp)
  mov    0x3c(%rsp),%eax
  add    0x40(%rsp),%r10
  cmp    $0xffffffff,%eax
  jne    L6
L138:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L72:
  test   %r15d,%r15d
  je     L132
  xor    %esi,%esi
  mov    %r9d,0x14(%rsp)
  mov    %r10,0x8(%rsp)
  mov    %r8d,0x10(%rsp)
  mov    %rdx,(%rsp)
  call   <memset@plt>
  mov    (%rsp),%rdx
  mov    0x10(%rsp),%r8d
  pxor   %xmm1,%xmm1
  mov    0x14(%rsp),%r9d
  mov    %rax,%rdi
  mov    0x8(%rsp),%r10
  add    %rdx,%rdi
  add    %r8d,%ebx
  add    %r9d,%r12d
  sub    $0x1,%r13d
  jne    L16
  jmp    L166
```

assistant: ```c
void neuralops_caffe_im2col(const float *in_buf, const int channels, const int height, const int width, const int kernel_h, const int kernel_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, float *col_buf) {
  const float *data_im = in_buf;
  float *data_col = col_buf;
  const int output_h = (height + 2 * pad_h - (dilation_h * (kernel_h - 1) + 1)) / stride_h + 1;
  const int output_w = (width + 2 * pad_w - (dilation_w * (kernel_w - 1) + 1)) / stride_w + 1;
  const int channel_size = height * width;
  for (int channel = channels; channel--; data_im += channel_size) {
    for (int kernel_row = 0; kernel_row < kernel_h; kernel_row++) {
      for (int kernel_col = 0; kernel_col < kernel_w; kernel_col++) {
        int input_row = -pad_h + kernel_row * dilation_h;
        for (int output_rows = output_h; output_rows; output_rows--) {
          if (!(input_row >= 0 && input_row < height)) {
            for (int output_cols = output_w; output_cols; output_cols--) {
              *(data_col++) = 0.0f;
            }
          } else {
            int input_col = -pad_w + kernel_col * dilation_w;
            for (int output_col = output_w; output_col; output_col--) {
              if (input_col >= 0 && input_col < width) {
                *(data_col++) = data_im[input_row * width + input_col];
              } else {
                *(data_col++) = 0.0f;
              }
              input_col += stride_w;
            }
          }
          input_row += stride_h;
        }
      }
    }
  }
}
```