int rsock_so_optname_to_int(const char *str, long len, int *valp) {
  switch (len) {
  case 3:
    return -1;
  case 4:
    return -1;
  case 5:
    return -1;
  case 6:
    return -1;
  case 7:
    return -1;
  case 8:
    return -1;
  case 9:
    return -1;
  case 10:
    return -1;
  case 11:
    return -1;
  case 12:
    return -1;
  case 13:
    return -1;
  case 14:
    return -1;
  case 15:
    return -1;
  case 16:
    return -1;
  case 17:
    return -1;
  case 18:
    return -1;
  case 19:
    return -1;
  case 23:
    return -1;
  case 26:
    return -1;
  case 27:
    return -1;
  case 29:
    return -1;
  case 30:
    return -1;
  case 32:
    return -1;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<rsock_so_optname_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0xfffffffffffffffd,%rax
mov    %rax,-0x28(%rbp)
sub    $0x1d,%rax
ja     124e <rsock_so_optname_to_int+0x14e>
mov    -0x28(%rbp),%rax
lea    0xecf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
jmp    1255 <rsock_so_optname_to_int+0x155>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rsock_so_optname_to_int>:
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @rsock_so_optname_to_int(i8* %0, i64 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i32* %2, i32** %7
%8 = load i64, i64* %6
switch i64 %8, label %32 [
i64 3, label %9
i64 4, label %10
i64 5, label %11
i64 6, label %12
i64 7, label %13
i64 8, label %14
i64 9, label %15
i64 10, label %16
i64 11, label %17
i64 12, label %18
i64 13, label %19
i64 14, label %20
i64 15, label %21
i64 16, label %22
i64 17, label %23
i64 18, label %24
i64 19, label %25
i64 23, label %26
i64 26, label %27
i64 27, label %28
i64 29, label %29
i64 30, label %30
i64 32, label %31
]
9: ; preds = %3
store i32 -1, i32* %4
br label %33
10: ; preds = %3
store i32 -1, i32* %4
br label %33
11: ; preds = %3
store i32 -1, i32* %4
br label %33
12: ; preds = %3
store i32 -1, i32* %4
br label %33
13: ; preds = %3
store i32 -1, i32* %4
br label %33
14: ; preds = %3
store i32 -1, i32* %4
br label %33
15: ; preds = %3
store i32 -1, i32* %4
br label %33
16: ; preds = %3
store i32 -1, i32* %4
br label %33
17: ; preds = %3
store i32 -1, i32* %4
br label %33
18: ; preds = %3
store i32 -1, i32* %4
br label %33
19: ; preds = %3
store i32 -1, i32* %4
br label %33
20: ; preds = %3
store i32 -1, i32* %4
br label %33
21: ; preds = %3
store i32 -1, i32* %4
br label %33
22: ; preds = %3
store i32 -1, i32* %4
br label %33
23: ; preds = %3
store i32 -1, i32* %4
br label %33
24: ; preds = %3
store i32 -1, i32* %4
br label %33
25: ; preds = %3
store i32 -1, i32* %4
br label %33
26: ; preds = %3
store i32 -1, i32* %4
br label %33
27: ; preds = %3
store i32 -1, i32* %4
br label %33
28: ; preds = %3
store i32 -1, i32* %4
br label %33
29: ; preds = %3
store i32 -1, i32* %4
br label %33
30: ; preds = %3
store i32 -1, i32* %4
br label %33
31: ; preds = %3
store i32 -1, i32* %4
br label %33
32: ; preds = %3
store i32 -1, i32* %4
br label %33
33: ; preds = %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9
%34 = load i32, i32* %4
ret i32 %34
}

LLVM IR (-O2):
define i32 @rsock_so_optname_to_int(i8* nocapture readnone %0, i64 %1, i32* nocapture readnone %2) {
ret i32 -1
}