int what_kind_of_float(int letter, int *precisionP, long *exponent_bitsP) {
  int retval;
  retval = 0;
  switch (letter) {
  case 'f':
    *precisionP = 2;
    *exponent_bitsP = 8;
    break;
  case 'd':
    *precisionP = 4;
    *exponent_bitsP = 8;
    break;
  case 'g':
    *precisionP = 4;
    *exponent_bitsP = 11;
    break;
  case 'h':
    *precisionP = 8;
    *exponent_bitsP = 15;
    break;
  default:
    retval = 69;
    break;
  }
  return retval;
}


x86 assembly (clang, -O0):
<what_kind_of_float>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff9c,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x4,%eax
ja     11a7 <what_kind_of_float+0xa7>
mov    -0x28(%rbp),%rax
lea    0xeca(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x18(%rbp),%rax
movq   $0x8,(%rax)
jmp    11ae <what_kind_of_float+0xae>
mov    -0x10(%rbp),%rax
movl   $0x4,(%rax)
mov    -0x18(%rbp),%rax
movq   $0x8,(%rax)
jmp    11ae <what_kind_of_float+0xae>
mov    -0x10(%rbp),%rax
movl   $0x4,(%rax)
mov    -0x18(%rbp),%rax
movq   $0xb,(%rax)
jmp    11ae <what_kind_of_float+0xae>
mov    -0x10(%rbp),%rax
movl   $0x8,(%rax)
mov    -0x18(%rbp),%rax
movq   $0xf,(%rax)
jmp    11ae <what_kind_of_float+0xae>
movl   $0x45,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<what_kind_of_float>:
add    $0xffffff9c,%edi
mov    $0x45,%eax
cmp    $0x4,%edi
ja     1136 <what_kind_of_float+0x36>
mov    $0x1d,%ecx
bt     %edi,%ecx
jae    1136 <what_kind_of_float+0x36>
movslq %edi,%rax
lea    0xedf(%rip),%rcx
mov    (%rcx,%rax,4),%ecx
lea    0xeed(%rip),%rdi
mov    (%rdi,%rax,8),%rax
mov    %ecx,(%rsi)
mov    %rax,(%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @what_kind_of_float(i32 %0, i32* %1, i64* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i64*
%7 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i64* %2, i64** %6
store i32 0, i32* %7
%8 = load i32, i32* %4
switch i32 %8, label %21 [
i32 102, label %9
i32 100, label %12
i32 103, label %15
i32 104, label %18
]
9: ; preds = %3
%10 = load i32*, i32** %5
store i32 2, i32* %10
%11 = load i64*, i64** %6
store i64 8, i64* %11
br label %22
12: ; preds = %3
%13 = load i32*, i32** %5
store i32 4, i32* %13
%14 = load i64*, i64** %6
store i64 8, i64* %14
br label %22
15: ; preds = %3
%16 = load i32*, i32** %5
store i32 4, i32* %16
%17 = load i64*, i64** %6
store i64 11, i64* %17
br label %22
18: ; preds = %3
%19 = load i32*, i32** %5
store i32 8, i32* %19
%20 = load i64*, i64** %6
store i64 15, i64* %20
br label %22
21: ; preds = %3
store i32 69, i32* %7
br label %22
22: ; preds = %21, %18, %15, %12, %9
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
@switch.table.what_kind_of_float = [5 x i32] [i32 4, i32 2, i32 2, i32 4, i32 8]
@switch.table.what_kind_of_float.1 = [5 x i64] [i64 8, i64 8, i64 8, i64 11, i64 15]
define i32 @what_kind_of_float(i32 %0, i32* nocapture writeonly %1, i64* nocapture writeonly %2) {
%4 = add i32 %0, -100
%5 = icmp ult i32 %4, 5
br i1 %5, label %6, label %18
6: ; preds = %3
%7 = trunc i32 %4 to i8
%8 = lshr i8 29, %7
%9 = and i8 %8, 1
%10 = icmp eq i8 %9, 0
br i1 %10, label %18, label %11
11: ; preds = %6
%12 = sext i32 %4 to i64
%13 = getelementptr inbounds [5 x i32], [5 x i32]* @switch.table.what_kind_of_float, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = sext i32 %4 to i64
%16 = getelementptr inbounds [5 x i64], [5 x i64]* @switch.table.what_kind_of_float.1, i64 0, i64 %15
%17 = load i64, i64* %16
store i32 %14, i32* %1
store i64 %17, i64* %2
br label %18
18: ; preds = %6, %3, %11
%19 = phi i32 [ 69, %3 ], [ 0, %11 ], [ 69, %6 ]
ret i32 %19
}