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

```asm
<v_size_is_p2>:
  endbr64
  cmp    $0x10000,%edi
  je     L3
  ja     L34
  cmp    $0x100,%edi
  je     L18
  jbe    L10
  cmp    $0x1000,%edi
  je     L263
  jbe    L86
  mov    $0xe,%eax
  cmp    $0x4000,%edi
  je     L85
  cmp    $0x8000,%edi
  jne    L127
  mov    $0xf,%eax
  ret
  nopl   (%rax)
L34:
  cmp    $0x1000000,%edi
  je     L39
  jbe    L126
  cmp    $0x10000000,%edi
  je     L179
  jbe    L211
  mov    $0x1e,%eax
  cmp    $0x40000000,%edi
  je     L85
  cmp    $0x80000000,%edi
  jne    L80
  mov    $0x1f,%eax
L85:
  ret
L80:
  xor    %eax,%eax
  mov    $0x1d,%edx
  cmp    $0x20000000,%edi
  cmove  %edx,%eax
  ret
L211:
  mov    $0x1a,%eax
  cmp    $0x4000000,%edi
  je     L85
  cmp    $0x8000000,%edi
  jne    L135
  mov    $0x1b,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L126:
  cmp    $0x100000,%edi
  je     L221
  jbe    L41
  mov    $0x16,%eax
  cmp    $0x400000,%edi
  je     L85
  cmp    $0x800000,%edi
  jne    L47
  mov    $0x17,%eax
  ret
L135:
  xor    %eax,%eax
  mov    $0x19,%edx
  cmp    $0x2000000,%edi
  cmove  %edx,%eax
  ret
L47:
  xor    %eax,%eax
  mov    $0x15,%edx
  cmp    $0x200000,%edi
  cmove  %edx,%eax
  ret
L41:
  mov    $0x12,%eax
  cmp    $0x40000,%edi
  je     L85
  cmp    $0x80000,%edi
  jne    L262
  mov    $0x13,%eax
  ret
L127:
  xor    %eax,%eax
  mov    $0xd,%edx
  cmp    $0x2000,%edi
  cmove  %edx,%eax
  ret
L262:
  xor    %eax,%eax
  mov    $0x11,%edx
  cmp    $0x20000,%edi
  cmove  %edx,%eax
  ret
L86:
  mov    $0xa,%eax
  cmp    $0x400,%edi
  je     L85
  cmp    $0x800,%edi
  jne    L83
  mov    $0xb,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L10:
  cmp    $0x20,%edi
  ja     L169
  xor    %eax,%eax
  cmp    $0x1,%edi
  jbe    L85
  cmp    $0x20,%edi
  ja     L184
  lea    D9(%rip),%rdx
  mov    %edi,%edi
  movslq (%rdx,%rdi,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
L184:
  xor    %eax,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L169:
  mov    $0x6,%eax
  cmp    $0x40,%edi
  je     L85
  xor    %eax,%eax
  mov    $0x7,%edx
  cmp    $0x80,%edi
  cmove  %edx,%eax
  ret
L83:
  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)
L263:
  mov    $0xc,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L179:
  mov    $0x1c,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L221:
  mov    $0x14,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L18:
  mov    $0x8,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L39:
  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)
L3:
  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);
  }
}
```