user: Demonstrate the C code that generates the assembly output below:

```asm
<__glTexImage3D_size>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    %ecx,-0x20(%rbp)
  mov    %r8d,-0x24(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jns    L42
  mov    $0x0,%eax
  jmp    L228
L42:
  cmpl   $0x0,-0x20(%rbp)
  jns    L73
  mov    $0x0,%eax
  jmp    L228
L73:
  cmpl   $0x0,-0x24(%rbp)
  jns    L152
  mov    $0x0,%eax
  jmp    L228
L152:
  mov    -0x14(%rbp),%eax
  sub    $0x90,%eax
  cmp    $0x10,%eax
  ja     L24
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D4(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D4(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  movl   $0x1,-0x8(%rbp)
  jmp    L97
  movl   $0x1,-0x8(%rbp)
  jmp    L97
  movl   $0x2,-0x8(%rbp)
  jmp    L97
  movl   $0x3,-0x8(%rbp)
  jmp    L97
  movl   $0x4,-0x8(%rbp)
  jmp    L97
L24:
  mov    $0x0,%eax
  jmp    L228
L97:
  mov    -0x18(%rbp),%eax
  add    $0xffffff80,%eax
  cmp    $0x1c,%eax
  ja     L122
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D15(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D15(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  cmpl   $0x99,-0x14(%rbp)
  jne    L19
  mov    -0x1c(%rbp),%eax
  add    $0x7,%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  imul   -0x20(%rbp),%eax
  imul   -0x24(%rbp),%eax
  jmp    L228
L19:
  mov    $0x0,%eax
  jmp    L228
  movl   $0x1,-0x4(%rbp)
  jmp    L85
  movl   $0x1,-0x4(%rbp)
  movl   $0x1,-0x8(%rbp)
  jmp    L85
  movl   $0x2,-0x4(%rbp)
  jmp    L85
  movl   $0x2,-0x4(%rbp)
  movl   $0x1,-0x8(%rbp)
  jmp    L85
  movl   $0x4,-0x4(%rbp)
  jmp    L85
  movl   $0x4,-0x4(%rbp)
  movl   $0x1,-0x8(%rbp)
  jmp    L85
L122:
  mov    $0x0,%eax
  jmp    L228
L85:
  mov    -0x8(%rbp),%eax
  imul   -0x4(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  imul   -0x20(%rbp),%eax
  imul   -0x24(%rbp),%eax
L228:
  pop    %rbp
  ret
```

assistant: ```c
GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h, GLsizei d) {
  GLint elements, esize;
  if (w < 0)
    return 0;
  if (h < 0)
    return 0;
  if (d < 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 (d * (h * ((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 * h * d);
}
```