int rsock_scm_optname_to_int(const char *str, long len, int *valp) {
  switch (len) {
  case 5:
    return -1;
  case 6:
    return -1;
  case 7:
    return -1;
  case 9:
    return -1;
  case 10:
    return -1;
  case 11:
    return -1;
  case 12:
    return -1;
  case 13:
    return -1;
  case 15:
    return -1;
  case 16:
    return -1;
  default:
    if (!str || !valp) {
    }
    return -1;
  }
}


x86 assembly (clang, -O0):
<rsock_scm_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    $0xfffffffffffffffb,%rax
mov    %rax,-0x28(%rbp)
sub    $0xb,%rax
ja     11b2 <rsock_scm_optname_to_int+0xb2>
mov    -0x28(%rbp),%rax
lea    0xecf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xffffffff,-0x4(%rbp)
jmp    11d4 <rsock_scm_optname_to_int+0xd4>
movl   $0xffffffff,-0x4(%rbp)
jmp    11d4 <rsock_scm_optname_to_int+0xd4>
movl   $0xffffffff,-0x4(%rbp)
jmp    11d4 <rsock_scm_optname_to_int+0xd4>
movl   $0xffffffff,-0x4(%rbp)
jmp    11d4 <rsock_scm_optname_to_int+0xd4>
movl   $0xffffffff,-0x4(%rbp)
jmp    11d4 <rsock_scm_optname_to_int+0xd4>
movl   $0xffffffff,-0x4(%rbp)
jmp    11d4 <rsock_scm_optname_to_int+0xd4>
movl   $0xffffffff,-0x4(%rbp)
jmp    11d4 <rsock_scm_optname_to_int+0xd4>
movl   $0xffffffff,-0x4(%rbp)
jmp    11d4 <rsock_scm_optname_to_int+0xd4>
movl   $0xffffffff,-0x4(%rbp)
jmp    11d4 <rsock_scm_optname_to_int+0xd4>
movl   $0xffffffff,-0x4(%rbp)
jmp    11d4 <rsock_scm_optname_to_int+0xd4>
cmpq   $0x0,-0x10(%rbp)
je     11c8 <rsock_scm_optname_to_int+0xc8>
cmpq   $0x0,-0x20(%rbp)
jne    11cd <rsock_scm_optname_to_int+0xcd>
jmp    11cd <rsock_scm_optname_to_int+0xcd>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rsock_scm_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 %19 [
i64 5, label %9
i64 6, label %10
i64 7, label %11
i64 9, label %12
i64 10, label %13
i64 11, label %14
i64 12, label %15
i64 13, label %16
i64 15, label %17
i64 16, label %18
]
9: ; preds = %3
store i32 -1, i32* %4
br label %27
10: ; preds = %3
store i32 -1, i32* %4
br label %27
11: ; preds = %3
store i32 -1, i32* %4
br label %27
12: ; preds = %3
store i32 -1, i32* %4
br label %27
13: ; preds = %3
store i32 -1, i32* %4
br label %27
14: ; preds = %3
store i32 -1, i32* %4
br label %27
15: ; preds = %3
store i32 -1, i32* %4
br label %27
16: ; preds = %3
store i32 -1, i32* %4
br label %27
17: ; preds = %3
store i32 -1, i32* %4
br label %27
18: ; preds = %3
store i32 -1, i32* %4
br label %27
19: ; preds = %3
%20 = load i8*, i8** %5
%21 = icmp ne i8* %20, null
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32*, i32** %7
%24 = icmp ne i32* %23, null
br i1 %24, label %26, label %25
25: ; preds = %22, %19
br label %26
26: ; preds = %25, %22
store i32 -1, i32* %4
br label %27
27: ; preds = %26, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9
%28 = load i32, i32* %4
ret i32 %28
}

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