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

```asm
<create_header>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %esi,-0x5c(%rbp)
  mov    %edx,-0x60(%rbp)
  mov    %rcx,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x5c(%rbp),%eax
  imul   -0x60(%rbp),%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x36,%eax
  mov    %eax,-0x4c(%rbp)
  movq   $0x4d42,-0x3e(%rbp)
  movl   $0x360000,-0x36(%rbp)
  movw   $0x0,-0x32(%rbp)
  mov    $0x28,%eax
  movabs $0x18000100000000,%rdx
  mov    %rax,-0x30(%rbp)
  mov    %rdx,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  movw   $0x0,-0x41(%rbp)
  movb   $0x0,-0x3f(%rbp)
  movl   $0x0,-0x48(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %al,-0x3c(%rbp)
  mov    -0x4c(%rbp),%eax
  sar    $0x8,%eax
  mov    %al,-0x3b(%rbp)
  mov    -0x4c(%rbp),%eax
  sar    $0x10,%eax
  mov    %al,-0x3a(%rbp)
  mov    -0x4c(%rbp),%eax
  sar    $0x18,%eax
  mov    %al,-0x39(%rbp)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0x3e(%rbp),%rax
  mov    $0xe,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x48(%rbp),%eax
  add    $0xe,%eax
  mov    %eax,-0x48(%rbp)
  mov    -0x5c(%rbp),%eax
  mov    %al,-0x2c(%rbp)
  mov    -0x5c(%rbp),%eax
  sar    $0x8,%eax
  mov    %al,-0x2b(%rbp)
  mov    -0x5c(%rbp),%eax
  sar    $0x10,%eax
  mov    %al,-0x2a(%rbp)
  mov    -0x5c(%rbp),%eax
  sar    $0x18,%eax
  mov    %al,-0x29(%rbp)
  mov    -0x60(%rbp),%eax
  mov    %al,-0x28(%rbp)
  mov    -0x60(%rbp),%eax
  sar    $0x8,%eax
  mov    %al,-0x27(%rbp)
  mov    -0x60(%rbp),%eax
  sar    $0x10,%eax
  mov    %al,-0x26(%rbp)
  mov    -0x60(%rbp),%eax
  sar    $0x18,%eax
  mov    %al,-0x25(%rbp)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0x30(%rbp),%rax
  mov    $0x28,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x48(%rbp),%eax
  add    $0x28,%eax
  mov    %eax,-0x48(%rbp)
  mov    -0x48(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L9
  call   <__stack_chk_fail@plt>
L9:
  leave
  ret
```

assistant: ```c
int create_header(char *filename, uint32_t w, uint32_t h, uint8_t *data) {
  uint32_t filesize = 14 + 40 + w * h * 3;
  unsigned char bmpfileheader[14] = {'B', 'M', 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0};
  unsigned char bmpinfoheader[40] = {40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 24, 0};
  unsigned char bmppad[3] = {0, 0, 0};
  int index = 0;
  bmpfileheader[2] = (unsigned char)(filesize);
  bmpfileheader[3] = (unsigned char)(filesize >> 8);
  bmpfileheader[4] = (unsigned char)(filesize >> 16);
  bmpfileheader[5] = (unsigned char)(filesize >> 24);
  memcpy(data + index, bmpfileheader, sizeof(bmpfileheader));
  index += sizeof(bmpfileheader);
  bmpinfoheader[4] = (unsigned char)(w);
  bmpinfoheader[5] = (unsigned char)(w >> 8);
  bmpinfoheader[6] = (unsigned char)(w >> 16);
  bmpinfoheader[7] = (unsigned char)(w >> 24);
  bmpinfoheader[8] = (unsigned char)(h);
  bmpinfoheader[9] = (unsigned char)(h >> 8);
  bmpinfoheader[10] = (unsigned char)(h >> 16);
  bmpinfoheader[11] = (unsigned char)(h >> 24);
  memcpy(data + index, bmpinfoheader, sizeof(bmpinfoheader));
  index += sizeof(bmpinfoheader);
  return index;
}
```