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

```asm
<__glTexImage1D_size>:
  endbr64
  xor    %eax,%eax
  test   %edx,%edx
  js     L92
  cmp    $0x93,%edi
  je     L28
  jle    L48
  lea    -0x94(%rdi),%ecx
  cmp    $0xc,%ecx
  ja     L123
  mov    $0x1,%r8d
  shl    %cl,%r8
  test   $0x8ab,%r8d
  jne    L55
  test   $0x1200,%r8d
  jne    L38
  cmp    $0xa,%ecx
  je     L125
L92:
  ret
L48:
  cmp    $0x91,%edi
  je     L84
  cmp    $0x92,%edi
  je     L80
  cmp    $0x90,%edi
  jne    L27
  mov    $0x8,%r9d
  mov    $0x10,%eax
  mov    $0x4,%r8d
L49:
  add    $0xffffff80,%esi
  cmp    $0x1a,%esi
  ja     L79
L78:
  lea    D0(%rip),%rdi
  movslq (%rdi,%rsi,4),%rcx
  add    %rdi,%rcx
  notrack jmp *%rcx
  cs nopw 0x0(%rax,%rax,1)
L55:
  mov    $0x2,%r9d
  mov    $0x4,%eax
  mov    $0x1,%r8d
L10:
  add    $0xffffff80,%esi
  cmp    $0x1c,%esi
  ja     L79
  lea    D1(%rip),%r10
  movslq (%r10,%rsi,4),%rcx
  add    %r10,%rcx
  notrack jmp *%rcx
  nopw   0x0(%rax,%rax,1)
L27:
  ret
  nopl   0x0(%rax)
L80:
  add    $0xffffff80,%esi
  mov    $0x2,%r9d
  mov    $0x4,%eax
  mov    $0x1,%r8d
  cmp    $0x1a,%esi
  jbe    L78
L79:
  xor    %eax,%eax
  ret
  nopl   0x0(%rax)
L84:
  mov    $0x6,%r9d
  mov    $0xc,%eax
  mov    $0x3,%r8d
  jmp    L49
  xchg   %ax,%ax
  lea    (%rdx,%rdx,1),%eax
  ret
  nopl   0x0(%rax)
  lea    0x0(,%rdx,4),%eax
  ret
  imul   %edx,%eax
  ret
  nopl   0x0(%rax)
L125:
  mov    $0x6,%r9d
  mov    $0xc,%eax
  mov    $0x3,%r8d
  jmp    L10
  xchg   %ax,%ax
  mov    %edx,%eax
  imul   %r8d,%eax
  ret
  nopw   0x0(%rax,%rax,1)
  mov    %edx,%eax
  imul   %r9d,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L28:
  mov    $0x4,%r9d
  mov    $0x8,%eax
  mov    $0x2,%r8d
  jmp    L49
  cs nopw 0x0(%rax,%rax,1)
L38:
  mov    $0x8,%r9d
  mov    $0x10,%eax
  mov    $0x4,%r8d
  jmp    L10
  cs nopw 0x0(%rax,%rax,1)
L123:
  ret
  nopl   0x0(%rax)
  mov    %edx,%eax
  ret
  lea    0x7(%rdx),%eax
  xor    %edx,%edx
  sar    $0x3,%eax
  cmp    $0x99,%edi
  cmovne %edx,%eax
  ret
```

assistant: ```c
GLint __glTexImage1D_size(GLenum format, GLenum type, GLsizei w) {
  GLint elements, esize;
  if (w < 0)
    return 0;
  switch (format) {
  case GL_COLOR_INDEX:
    elements = 1;
    break;
  case GL_RED:
  case GL_GREEN:
  case GL_BLUE:
  case GL_ALPHA:
  case GL_LUMINANCE:
  case GL_INTENSITY:
    elements = 1;
    break;
  case GL_LUMINANCE_ALPHA:
    elements = 2;
    break;
  case GL_RGB:
  case GL_BGR:
    elements = 3;
    break;
  case GL_RGBA:
  case GL_BGRA:
  case GL_ABGR_EXT:
    elements = 4;
    break;
  default:
    return 0;
  }
  switch (type) {
  case GL_BITMAP:
    if (format == GL_COLOR_INDEX) {
      return (w + 7) / 8;
    } else {
      return 0;
    }
  case GL_BYTE:
  case GL_UNSIGNED_BYTE:
    esize = 1;
    break;
  case GL_UNSIGNED_BYTE_3_3_2:
  case GL_UNSIGNED_BYTE_2_3_3_REV:
    esize = 1;
    elements = 1;
    break;
  case GL_SHORT:
  case GL_UNSIGNED_SHORT:
    esize = 2;
    break;
  case GL_UNSIGNED_SHORT_5_6_5:
  case GL_UNSIGNED_SHORT_5_6_5_REV:
  case GL_UNSIGNED_SHORT_4_4_4_4:
  case GL_UNSIGNED_SHORT_4_4_4_4_REV:
  case GL_UNSIGNED_SHORT_5_5_5_1:
  case GL_UNSIGNED_SHORT_1_5_5_5_REV:
    esize = 2;
    elements = 1;
    break;
  case GL_INT:
  case GL_UNSIGNED_INT:
  case GL_FLOAT:
    esize = 4;
    break;
  case GL_UNSIGNED_INT_8_8_8_8:
  case GL_UNSIGNED_INT_8_8_8_8_REV:
  case GL_UNSIGNED_INT_10_10_10_2:
  case GL_UNSIGNED_INT_2_10_10_10_REV:
    esize = 4;
    elements = 1;
    break;
  default:
    return 0;
  }
  return (elements * esize * w);
}
```