user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<imgLoad>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8,-0x68(%rbp)
  mov    %r9,-0x70(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  lea    -0x38(%rbp),%rcx
  lea    -0x3c(%rbp),%rdx
  lea    -0x40(%rbp),%rsi
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <read_texture@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x2c(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x2c(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x28(%rbp),%eax
  imul   -0x24(%rbp),%eax
  mov    $0x4,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x2c(%rbp),%eax
  neg    %eax
  mov    %eax,-0x30(%rbp)
  jmp    L1
L21:
  mov    -0x2c(%rbp),%eax
  neg    %eax
  mov    %eax,-0x34(%rbp)
  jmp    L81
L74:
  cmpl   $0x0,-0x30(%rbp)
  js     L53
  mov    -0x3c(%rbp),%eax
  cmp    %eax,-0x30(%rbp)
  jge    L53
  cmpl   $0x0,-0x34(%rbp)
  js     L53
  mov    -0x40(%rbp),%eax
  cmp    %eax,-0x34(%rbp)
  jge    L53
  mov    -0x40(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  shl    $0x2,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x40(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  shl    $0x2,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%rdx
  add    $0x4,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x40(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  shl    $0x2,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%rdx
  add    $0x8,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x20(%rbp),%rax
  add    $0xc,%rax
  movl   $0xff,(%rax)
  jmp    L51
L53:
  mov    -0x58(%rbp),%rax
  mov    (%rax),%edx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x20(%rbp),%rax
  mov    %ecx,(%rax)
  mov    -0x58(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%rax
  lea    0x4(%rax),%rcx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  mov    %eax,(%rcx)
  mov    -0x58(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%rax
  lea    0x8(%rax),%rcx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  mov    %eax,(%rcx)
  mov    -0x58(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x20(%rbp),%rax
  lea    0xc(%rax),%rcx
  mov    %edx,%eax
  shl    $0x8,%eax
  sub    %edx,%eax
  mov    %eax,(%rcx)
L51:
  addq   $0x10,-0x20(%rbp)
  addl   $0x1,-0x34(%rbp)
L81:
  mov    -0x40(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x34(%rbp)
  jl     L74
  addl   $0x1,-0x30(%rbp)
L1:
  mov    -0x3c(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x30(%rbp)
  jl     L21
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x60(%rbp),%rax
  mov    -0x28(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x68(%rbp),%rax
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x70(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L73
  call   <__stack_chk_fail@plt>
L73:
  leave
  ret
```

assistant: ```c
void imgLoad(char *filenameIn, int borderIn, GLfloat borderColorIn[4], int *wOut, int *hOut, GLubyte **imgOut) {
  int border = borderIn;
  int width, height;
  int w, h;
  GLubyte *image, *img, *p;
  int i, j, components;
  image = (GLubyte *)read_texture(filenameIn, &width, &height, &components);
  w = width + 2 * border;
  h = height + 2 * border;
  img = (GLubyte *)calloc(w * h, 4 * sizeof(unsigned char));
  p = img;
  for (j = -border; j < height + border; ++j) {
    for (i = -border; i < width + border; ++i) {
      if (0 <= j && j <= height - 1 && 0 <= i && i <= width - 1) {
        p[0] = image[4 * (j * width + i) + 0];
        p[1] = image[4 * (j * width + i) + 1];
        p[2] = image[4 * (j * width + i) + 2];
        p[3] = 0xff;
      } else {
        p[0] = borderColorIn[0] * 0xff;
        p[1] = borderColorIn[1] * 0xff;
        p[2] = borderColorIn[2] * 0xff;
        p[3] = borderColorIn[3] * 0xff;
      }
      p += 4;
    }
  }
  free(image);
  *wOut = w;
  *hOut = h;
  *imgOut = img;
}
```