user: What is the c source code of the assembly code below:

```asm
<vid_from_reg>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  cmpl   $0x64,-0x18(%rbp)
  je     L217
  cmpl   $0x64,-0x18(%rbp)
  jg     L222
  cmpl   $0x5b,-0x18(%rbp)
  jg     L222
  cmpl   $0x5a,-0x18(%rbp)
  jge    L235
  cmpl   $0x55,-0x18(%rbp)
  je     L278
  cmpl   $0x55,-0x18(%rbp)
  jg     L222
  cmpl   $0x18,-0x18(%rbp)
  je     L187
  cmpl   $0x54,-0x18(%rbp)
  je     L109
  jmp    L222
L217:
  mov    -0x14(%rbp),%eax
  and    $0x1f,%eax
  cmp    $0x1f,%eax
  jne    L244
  mov    $0x0,%eax
  jmp    L208
L244:
  mov    -0x14(%rbp),%eax
  and    $0x1f,%eax
  cmp    $0x9,%eax
  jle    L168
  cmpl   $0xa,-0x14(%rbp)
  jne    L158
L168:
  mov    -0x14(%rbp),%eax
  and    $0x1f,%eax
  imul   $0xffffff06,%eax,%eax
  add    $0x2a7b,%eax
  mov    %eax,-0x4(%rbp)
  jmp    L253
L158:
  mov    -0x14(%rbp),%eax
  and    $0x1f,%eax
  imul   $0xffffff06,%eax,%eax
  add    $0x48c1,%eax
  mov    %eax,-0x4(%rbp)
L253:
  mov    -0x14(%rbp),%eax
  and    $0x20,%eax
  test   %eax,%eax
  je     L181
  subl   $0x7d,-0x4(%rbp)
L181:
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  jmp    L208
L187:
  cmpl   $0x1f,-0x14(%rbp)
  je     L290
  mov    -0x14(%rbp),%eax
  imul   $0xffffffe7,%eax,%eax
  add    $0x60e,%eax
  jmp    L208
L290:
  mov    $0x0,%eax
  jmp    L208
L235:
  cmpl   $0x1f,-0x14(%rbp)
  je     L214
  mov    -0x14(%rbp),%eax
  imul   $0xffffffe7,%eax,%eax
  add    $0x73a,%eax
  jmp    L208
L214:
  mov    $0x0,%eax
  jmp    L208
L278:
  mov    -0x14(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L19
  mov    $0x19,%edx
  jmp    L191
L19:
  mov    $0x0,%edx
L191:
  mov    -0x14(%rbp),%eax
  and    $0xf,%eax
  cmp    $0x4,%eax
  jle    L90
  mov    $0x802,%eax
  jmp    L223
L90:
  mov    $0x4e2,%eax
L223:
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  and    $0xf,%eax
  imul   $0xffffffce,%eax,%eax
  add    %edx,%eax
  jmp    L208
L109:
  andl   $0xf,-0x14(%rbp)
L222:
  cmpl   $0x1f,-0x14(%rbp)
  je     L284
  mov    -0x14(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L31
  mov    -0x14(%rbp),%eax
  imul   $0xffffff9c,%eax,%eax
  add    $0x13ec,%eax
  jmp    L208
L31:
  mov    -0x14(%rbp),%eax
  imul   $0xffffffce,%eax,%eax
  add    $0x802,%eax
  jmp    L208
L284:
  mov    $0x0,%eax
L208:
  pop    %rbp
  ret
```

assistant: ```c
int vid_from_reg(int val, int vrm) {
  int vid;
  switch (vrm) {
  case 100:
    if ((val & 0x1f) == 0x1f)
      return 0;
    if ((val & 0x1f) <= 0x09 || val == 0x0a)
      vid = 10875 - (val & 0x1f) * 250;
    else
      vid = 18625 - (val & 0x1f) * 250;
    if (val & 0x20)
      vid -= 125;
    vid /= 10;
    return vid;
  case 24:
    return (val == 0x1f ? 0 : 1550 - val * 25);
  case 91:
  case 90:
    return (val == 0x1f ? 0 : 1850 - val * 25);
  case 85:
    return ((val & 0x10 ? 25 : 0) + ((val & 0x0f) > 0x04 ? 2050 : 1250) - ((val & 0x0f) * 50));
  case 84:
    val &= 0x0f;
  default:
    return (val == 0x1f ? 0 : val & 0x10 ? 5100 - (val)*100 : 2050 - (val)*50);
  }
}
```