int ft_sizeof(c)
int c;
{
  switch (c) {
  case 'P':
    return 8;
  case 'U':
    return 2;
  case 'I':
    return 2;
  case 'V':
    return 4;
  case 'J':
    return 4;
  case 'K':
    return 8;
  case 'F':
    return 4;
  case 'E':
    return 4;
  case 'D':
    return 8;
  case 'A':
    return 1;
  case 'L':
    return 1;
  case 'X':
    return 1;
  case 'B':
    return 1;
  case 'C':
    return 8;
  case 'M':
    return 16;
  case 8:
    return 1;
  case 16:
    return 2;
  case 32:
    return 4;
  case 64:
    return 8;
  case 0x1000 | 8:
    return 1;
  case 0x1000 | 16:
    return 2;
  case 0x1000 | 32:
    return 4;
  case -32:
    return 4;
  case -64:
    return 8;
  }
  return 0;
}


x86 assembly (clang, -O0):
<ft_sizeof>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xffffffc0,%eax
je     13bc <ft_sizeof+0x2bc>
jmp    111b <ft_sizeof+0x1b>
mov    -0xc(%rbp),%eax
sub    $0xffffffe0,%eax
je     13b0 <ft_sizeof+0x2b0>
jmp    112c <ft_sizeof+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x8,%eax
je     135c <ft_sizeof+0x25c>
jmp    113d <ft_sizeof+0x3d>
mov    -0xc(%rbp),%eax
sub    $0x10,%eax
je     1368 <ft_sizeof+0x268>
jmp    114e <ft_sizeof+0x4e>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
je     1374 <ft_sizeof+0x274>
jmp    115f <ft_sizeof+0x5f>
mov    -0xc(%rbp),%eax
sub    $0x40,%eax
je     1380 <ft_sizeof+0x280>
jmp    1170 <ft_sizeof+0x70>
mov    -0xc(%rbp),%eax
sub    $0x41,%eax
je     1314 <ft_sizeof+0x214>
jmp    1181 <ft_sizeof+0x81>
mov    -0xc(%rbp),%eax
sub    $0x42,%eax
je     1338 <ft_sizeof+0x238>
jmp    1192 <ft_sizeof+0x92>
mov    -0xc(%rbp),%eax
sub    $0x43,%eax
je     1344 <ft_sizeof+0x244>
jmp    11a3 <ft_sizeof+0xa3>
mov    -0xc(%rbp),%eax
sub    $0x44,%eax
je     1308 <ft_sizeof+0x208>
jmp    11b4 <ft_sizeof+0xb4>
mov    -0xc(%rbp),%eax
sub    $0x45,%eax
je     12fc <ft_sizeof+0x1fc>
jmp    11c5 <ft_sizeof+0xc5>
mov    -0xc(%rbp),%eax
sub    $0x46,%eax
je     12f0 <ft_sizeof+0x1f0>
jmp    11d6 <ft_sizeof+0xd6>
mov    -0xc(%rbp),%eax
sub    $0x49,%eax
je     12c0 <ft_sizeof+0x1c0>
jmp    11e7 <ft_sizeof+0xe7>
mov    -0xc(%rbp),%eax
sub    $0x4a,%eax
je     12d8 <ft_sizeof+0x1d8>
jmp    11f8 <ft_sizeof+0xf8>
mov    -0xc(%rbp),%eax
sub    $0x4b,%eax
je     12e4 <ft_sizeof+0x1e4>
jmp    1209 <ft_sizeof+0x109>
mov    -0xc(%rbp),%eax
sub    $0x4c,%eax
je     1320 <ft_sizeof+0x220>
jmp    121a <ft_sizeof+0x11a>
mov    -0xc(%rbp),%eax
sub    $0x4d,%eax
je     1350 <ft_sizeof+0x250>
jmp    122b <ft_sizeof+0x12b>
mov    -0xc(%rbp),%eax
sub    $0x50,%eax
je     12a8 <ft_sizeof+0x1a8>
jmp    123c <ft_sizeof+0x13c>
mov    -0xc(%rbp),%eax
sub    $0x55,%eax
je     12b4 <ft_sizeof+0x1b4>
jmp    124d <ft_sizeof+0x14d>
mov    -0xc(%rbp),%eax
sub    $0x56,%eax
je     12cc <ft_sizeof+0x1cc>
jmp    125e <ft_sizeof+0x15e>
mov    -0xc(%rbp),%eax
sub    $0x58,%eax
je     132c <ft_sizeof+0x22c>
jmp    126f <ft_sizeof+0x16f>
mov    -0xc(%rbp),%eax
sub    $0x1008,%eax
je     138c <ft_sizeof+0x28c>
jmp    1282 <ft_sizeof+0x182>
mov    -0xc(%rbp),%eax
sub    $0x1010,%eax
je     1398 <ft_sizeof+0x298>
jmp    1295 <ft_sizeof+0x195>
mov    -0xc(%rbp),%eax
sub    $0x1020,%eax
je     13a4 <ft_sizeof+0x2a4>
jmp    13c8 <ft_sizeof+0x2c8>
movl   $0x8,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x2,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x2,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x4,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x4,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x8,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x4,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x4,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x8,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x1,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x1,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x1,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x1,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x8,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x10,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x1,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x2,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x4,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x8,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x1,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x2,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x4,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x4,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x8,-0x4(%rbp)
jmp    13cf <ft_sizeof+0x2cf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_sizeof>:
cmp    $0x1007,%edi
jg     1129 <ft_sizeof+0x29>
add    $0x40,%edi
cmp    $0x98,%edi
ja     1159 <ft_sizeof+0x59>
mov    $0x8,%eax
lea    0xee1(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
cmp    $0x1008,%edi
je     1147 <ft_sizeof+0x47>
cmp    $0x1010,%edi
je     114d <ft_sizeof+0x4d>
cmp    $0x1020,%edi
jne    1159 <ft_sizeof+0x59>
mov    $0x4,%eax
ret
mov    $0x1,%eax
ret
mov    $0x2,%eax
ret
mov    $0x10,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ft_sizeof(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %29 [
i32 80, label %5
i32 85, label %6
i32 73, label %7
i32 86, label %8
i32 74, label %9
i32 75, label %10
i32 70, label %11
i32 69, label %12
i32 68, label %13
i32 65, label %14
i32 76, label %15
i32 88, label %16
i32 66, label %17
i32 67, label %18
i32 77, label %19
i32 8, label %20
i32 16, label %21
i32 32, label %22
i32 64, label %23
i32 4104, label %24
i32 4112, label %25
i32 4128, label %26
i32 -32, label %27
i32 -64, label %28
]
5: ; preds = %1
store i32 8, i32* %2
br label %30
6: ; preds = %1
store i32 2, i32* %2
br label %30
7: ; preds = %1
store i32 2, i32* %2
br label %30
8: ; preds = %1
store i32 4, i32* %2
br label %30
9: ; preds = %1
store i32 4, i32* %2
br label %30
10: ; preds = %1
store i32 8, i32* %2
br label %30
11: ; preds = %1
store i32 4, i32* %2
br label %30
12: ; preds = %1
store i32 4, i32* %2
br label %30
13: ; preds = %1
store i32 8, i32* %2
br label %30
14: ; preds = %1
store i32 1, i32* %2
br label %30
15: ; preds = %1
store i32 1, i32* %2
br label %30
16: ; preds = %1
store i32 1, i32* %2
br label %30
17: ; preds = %1
store i32 1, i32* %2
br label %30
18: ; preds = %1
store i32 8, i32* %2
br label %30
19: ; preds = %1
store i32 16, i32* %2
br label %30
20: ; preds = %1
store i32 1, i32* %2
br label %30
21: ; preds = %1
store i32 2, i32* %2
br label %30
22: ; preds = %1
store i32 4, i32* %2
br label %30
23: ; preds = %1
store i32 8, i32* %2
br label %30
24: ; preds = %1
store i32 1, i32* %2
br label %30
25: ; preds = %1
store i32 2, i32* %2
br label %30
26: ; preds = %1
store i32 4, i32* %2
br label %30
27: ; preds = %1
store i32 4, i32* %2
br label %30
28: ; preds = %1
store i32 8, i32* %2
br label %30
29: ; preds = %1
store i32 0, i32* %2
br label %30
30: ; preds = %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
define i32 @ft_sizeof(i32 %0) {
switch i32 %0, label %20 [
i32 80, label %21
i32 85, label %2
i32 73, label %3
i32 86, label %4
i32 74, label %5
i32 75, label %21
i32 70, label %6
i32 69, label %7
i32 68, label %21
i32 65, label %8
i32 76, label %9
i32 88, label %10
i32 66, label %11
i32 67, label %21
i32 77, label %12
i32 8, label %13
i32 16, label %14
i32 32, label %15
i32 64, label %21
i32 4104, label %16
i32 4112, label %17
i32 4128, label %18
i32 -32, label %19
i32 -64, label %21
]
2: ; preds = %1
br label %21
3: ; preds = %1
br label %21
4: ; preds = %1
br label %21
5: ; preds = %1
br label %21
6: ; preds = %1
br label %21
7: ; preds = %1
br label %21
8: ; preds = %1
br label %21
9: ; preds = %1
br label %21
10: ; preds = %1
br label %21
11: ; preds = %1
br label %21
12: ; preds = %1
br label %21
13: ; preds = %1
br label %21
14: ; preds = %1
br label %21
15: ; preds = %1
br label %21
16: ; preds = %1
br label %21
17: ; preds = %1
br label %21
18: ; preds = %1
br label %21
19: ; preds = %1
br label %21
20: ; preds = %1
br label %21
21: ; preds = %1, %1, %1, %1, %1, %1, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%22 = phi i32 [ 0, %20 ], [ 4, %19 ], [ 4, %18 ], [ 2, %17 ], [ 1, %16 ], [ 4, %15 ], [ 2, %14 ], [ 1, %13 ], [ 16, %12 ], [ 1, %11 ], [ 1, %10 ], [ 1, %9 ], [ 1, %8 ], [ 4, %7 ], [ 4, %6 ], [ 4, %5 ], [ 4, %4 ], [ 2, %3 ], [ 2, %2 ], [ 8, %1 ], [ 8, %1 ], [ 8, %1 ], [ 8, %1 ], [ 8, %1 ], [ 8, %1 ]
ret i32 %22
}