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

```asm
<v_size_is_p2>:
  endbr64
  cmp    $0x10000,%edi
  je     L251
  ja     L29
  cmp    $0x100,%edi
  je     L203
  jbe    L201
  cmp    $0x1000,%edi
  je     L186
  jbe    L24
  mov    $0xe,%eax
  cmp    $0x4000,%edi
  je     L256
  cmp    $0x8000,%edi
  jne    L199
  mov    $0xf,%eax
  ret
  nopl   (%rax)
L29:
  cmp    $0x1000000,%edi
  je     L3
  jbe    L177
  cmp    $0x10000000,%edi
  je     L166
  jbe    L140
  mov    $0x1e,%eax
  cmp    $0x40000000,%edi
  je     L256
  cmp    $0x80000000,%edi
  jne    L155
  mov    $0x1f,%eax
L256:
  ret
L155:
  xor    %eax,%eax
  mov    $0x1d,%edx
  cmp    $0x20000000,%edi
  cmove  %edx,%eax
  ret
L140:
  mov    $0x1a,%eax
  cmp    $0x4000000,%edi
  je     L256
  cmp    $0x8000000,%edi
  jne    L249
  mov    $0x1b,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L177:
  cmp    $0x100000,%edi
  je     L227
  jbe    L9
  mov    $0x16,%eax
  cmp    $0x400000,%edi
  je     L256
  cmp    $0x800000,%edi
  jne    L252
  mov    $0x17,%eax
  ret
L249:
  xor    %eax,%eax
  mov    $0x19,%edx
  cmp    $0x2000000,%edi
  cmove  %edx,%eax
  ret
L252:
  xor    %eax,%eax
  mov    $0x15,%edx
  cmp    $0x200000,%edi
  cmove  %edx,%eax
  ret
L9:
  mov    $0x12,%eax
  cmp    $0x40000,%edi
  je     L256
  cmp    $0x80000,%edi
  jne    L157
  mov    $0x13,%eax
  ret
L199:
  xor    %eax,%eax
  mov    $0xd,%edx
  cmp    $0x2000,%edi
  cmove  %edx,%eax
  ret
L157:
  xor    %eax,%eax
  mov    $0x11,%edx
  cmp    $0x20000,%edi
  cmove  %edx,%eax
  ret
L24:
  mov    $0xa,%eax
  cmp    $0x400,%edi
  je     L256
  cmp    $0x800,%edi
  jne    L248
  mov    $0xb,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L201:
  cmp    $0x20,%edi
  ja     L26
  xor    %eax,%eax
  cmp    $0x1,%edi
  jbe    L256
  cmp    $0x20,%edi
  ja     L216
  lea    D7(%rip),%rdx
  mov    %edi,%edi
  movslq (%rdx,%rdi,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
L216:
  xor    %eax,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L26:
  mov    $0x6,%eax
  cmp    $0x40,%edi
  je     L256
  xor    %eax,%eax
  mov    $0x7,%edx
  cmp    $0x80,%edi
  cmove  %edx,%eax
  ret
L248:
  xor    %eax,%eax
  cmp    $0x200,%edi
  sete   %al
  lea    (%rax,%rax,8),%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
  mov    $0x2,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L186:
  mov    $0xc,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L166:
  mov    $0x1c,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L227:
  mov    $0x14,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L203:
  mov    $0x8,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L3:
  mov    $0x18,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
  mov    $0x1,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
  mov    $0x4,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
  mov    $0x3,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
  mov    $0x5,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L251:
  mov    $0x10,%eax
  ret
```

assistant: ```c
unsigned int v_size_is_p2(unsigned int _size) {
  switch (_size) {
  case 1:
    return (0);
    break;
  case 2:
    return (1);
    break;
  case 4:
    return (2);
    break;
  case 8:
    return (3);
    break;
  case 16:
    return (4);
    break;
  case 32:
    return (5);
    break;
  case 64:
    return (6);
    break;
  case 128:
    return (7);
    break;
  case 256:
    return (8);
    break;
  case 512:
    return (9);
    break;
  case 1024:
    return (10);
    break;
  case 2048:
    return (11);
    break;
  case 4096:
    return (12);
    break;
  case 8192:
    return (13);
    break;
  case 16384:
    return (14);
    break;
  case 32768:
    return (15);
    break;
  case 65536:
    return (16);
    break;
  case 131072:
    return (17);
    break;
  case 262144:
    return (18);
    break;
  case 524288:
    return (19);
    break;
  case 1048576:
    return (20);
    break;
  case 2097152:
    return (21);
    break;
  case 4194304:
    return (22);
    break;
  case 8388608:
    return (23);
    break;
  case 16777216:
    return (24);
    break;
  case 33554432:
    return (25);
    break;
  case 67108864:
    return (26);
    break;
  case 134217728:
    return (27);
    break;
  case 268435456:
    return (28);
    break;
  case 536870912:
    return (29);
    break;
  case 1073741824:
    return (30);
    break;
  case 2147483648:
    return (31);
    break;
  default:
    return (0);
  }
}
```