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

```asm
<conv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,-0x54(%rsp)
  test   %edx,%edx
  jle    L9
  mov    %rsi,%r10
  mov    %ecx,%esi
  test   %ecx,%ecx
  jle    L9
  mov    %esi,%ebp
  movslq %ecx,%rax
  shr    $0x4,%ecx
  mov    %rdi,%r9
  and    $0xfffffff0,%ebp
  lea    -0x1(%rcx),%r11d
  lea    -0x1(%rsi),%ecx
  mov    %rax,-0x50(%rsp)
  lea    0x2(%rbp),%ebx
  mov    %ecx,-0x40(%rsp)
  add    %rax,%rax
  add    $0x1,%r11
  mov    %ebx,-0x3c(%rsp)
  lea    0x3(%rbp),%ebx
  mov    %rdi,%rdx
  shl    $0x4,%r11
  mov    %ebx,-0x38(%rsp)
  lea    0x4(%rbp),%ebx
  lea    0x1(%rbp),%r15d
  xor    %edi,%edi
  mov    %ebx,-0x34(%rsp)
  lea    0x5(%rbp),%ebx
  pxor   %xmm2,%xmm2
  mov    %esi,%r14d
  mov    %ebx,-0x30(%rsp)
  lea    0x6(%rbp),%ebx
  mov    %ebx,-0x2c(%rsp)
  lea    0x7(%rbp),%ebx
  mov    %ebx,-0x28(%rsp)
  lea    0x8(%rbp),%ebx
  mov    %ebx,-0x24(%rsp)
  lea    0x9(%rbp),%ebx
  mov    %ebx,-0x20(%rsp)
  lea    0xa(%rbp),%ebx
  mov    %ebx,-0x1c(%rsp)
  lea    0xb(%rbp),%ebx
  mov    %ebx,-0x18(%rsp)
  lea    0xc(%rbp),%ebx
  mov    %ebx,-0x14(%rsp)
  lea    0xd(%rbp),%ebx
  mov    %ebx,-0x10(%rsp)
  lea    0xe(%rbp),%ebx
  mov    %rax,-0x48(%rsp)
  mov    %r10,%rax
  mov    %ebx,-0xc(%rsp)
  xor    %ebx,%ebx
  nopl   (%rax)
L154:
  mov    -0x50(%rsp),%rcx
  lea    (%rdx,%rcx,1),%r13
  mov    -0x48(%rsp),%rcx
  cmp    %r13,%rax
  lea    (%rax,%rcx,1),%r12
  setae  %r8b
  cmp    %r12,%rdx
  setae  %cl
  or     %r8b,%cl
  je     L35
  xor    %ecx,%ecx
  cmpl   $0xe,-0x40(%rsp)
  jbe    L35
  nopl   (%rax)
L53:
  movdqu (%rdx,%rcx,1),%xmm0
  movdqa %xmm0,%xmm1
  punpckhbw %xmm2,%xmm0
  punpcklbw %xmm2,%xmm1
  psllw  $0x8,%xmm0
  psllw  $0x8,%xmm1
  movups %xmm0,0x10(%rax,%rcx,2)
  movups %xmm1,(%rax,%rcx,2)
  add    $0x10,%rcx
  cmp    %r11,%rcx
  jne    L53
  cmp    %esi,%ebp
  je     L28
  lea    (%rdi,%rbp,1),%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  cmp    %r15d,%esi
  jle    L28
  lea    (%rdi,%r15,1),%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x3c(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x38(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x34(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x30(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x2c(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x28(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x24(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x20(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x1c(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x18(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x14(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0x10(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  mov    -0xc(%rsp),%eax
  cmp    %eax,%esi
  jle    L28
  add    %edi,%eax
  cltq
  movzbl (%r9,%rax,1),%edx
  shl    $0x8,%edx
  mov    %dx,(%r10,%rax,2)
  nopl   0x0(%rax,%rax,1)
L28:
  add    $0x1,%ebx
  mov    %r12,%rax
  mov    %r13,%rdx
  add    %esi,%edi
  cmp    %ebx,-0x54(%rsp)
  jne    L154
L9:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L35:
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L122:
  movzbl (%rdx,%rcx,1),%r8d
  shl    $0x8,%r8d
  mov    %r8w,(%rax,%rcx,2)
  add    $0x1,%rcx
  cmp    %r14,%rcx
  jne    L122
  jmp    L28
```

assistant: ```c
int conv(unsigned char *input, unsigned char *output, int height, int width) {
  int i;
  int j;
  unsigned char value;
  unsigned short *output_short = (unsigned short *)output;
  for (i = 0; i < height; i++) {
    for (j = 0; j < width; j++) {
      value = *(input + ((width * i) + j));
      unsigned short y_short = (unsigned short)(((unsigned short)value) << 8);
      *(output_short + ((i * width) + j)) = y_short;
    }
  }
  return 0;
}
```