user: Converte this assembly snippet into its equivalent C code:

```asm
<getRowBytes>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x20,-0x18(%rbp)
  ja     L12
  mov    -0x18(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D24(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D24(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x4(%rbp),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x4(%rbp),%eax
  and    $0x7,%eax
  test   %eax,%eax
  je     L34
  addl   $0x1,-0xc(%rbp)
L34:
  mov    -0xc(%rbp),%eax
  shl    $0x3,%eax
  add    $0x1f,%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  shl    $0x2,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L41
  mov    -0x4(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0xc(%rbp)
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L89
  addl   $0x1,-0xc(%rbp)
L89:
  mov    -0xc(%rbp),%eax
  shl    $0x3,%eax
  add    $0x1f,%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  shl    $0x2,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L41
  mov    -0x4(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  shl    $0x3,%eax
  add    $0x1f,%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  shl    $0x2,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L41
  mov    -0x4(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  shl    $0x3,%eax
  add    $0x1f,%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  shl    $0x2,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L41
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  shl    $0x3,%eax
  add    $0x1f,%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  shl    $0x2,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L41
  mov    -0x4(%rbp),%eax
  shl    $0x2,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  shl    $0x3,%eax
  add    $0x1f,%eax
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x5,%eax
  shl    $0x2,%eax
  mov    %eax,-0x8(%rbp)
  jmp    L41
L12:
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L97
L41:
  mov    -0x8(%rbp),%eax
L97:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D0
type: string

tool: D0: Invalid BitCount %d!


assistant: ```c
int getRowBytes(int width, int bpp) {
  int j, l, k = width;
  switch (bpp) {
  case 1:
    j = k / 8;
    if (k % 8)
      j++;
    l = (((((j * 8)) + 31) / 32) * 4);
    break;
  case 4:
    j = k / 2;
    if (k % 2)
      j++;
    l = (((((j * 8)) + 31) / 32) * 4);
    break;
  case 8:
    j = k;
    l = (((((j * 8)) + 31) / 32) * 4);
    break;
  case 16:
    j = k * 2;
    l = (((((j * 8)) + 31) / 32) * 4);
    break;
  case 24:
    j = k * 3;
    l = (((((j * 8)) + 31) / 32) * 4);
    break;
  case 32:
    j = k * 4;
    l = (((((j * 8)) + 31) / 32) * 4);
    break;
  default:
    printf("Invalid BitCount %d!\n", bpp);
    return -1;
  }
  return l;
}
```