int SFilter_Analyse(char opcode, const char *optarg) {
  int val;
  switch (opcode) {
  case 'P':
    return filter_set("PROTO", "PROTO", optarg);
    break;
  case 'F':
    if (proto_setdetail(optarg)) {
      printf("%s:%d "
             "wrong filter syntax\n"
             "\n",
             __func__, 274);
      return -1;
    }
    return 0;
  case '2':
    return filter_set("PROTO", "REMOTE", optarg);
    break;
  case '3':
    return filter_set("ETH", "MacBcast", optarg);
    break;
  case '4':
    return filter_set("PROTO", "DATAOK", optarg);
    break;
  case '8':
    return filter_set("PROTO", "VNC", optarg);
    break;
  case '7':
    return filter_set("MAP", "VNCPORT", optarg);
    break;
  default:
    break;
  }
  printf("%s:%d "
         "opt:%c %s unknown\n"
         "\n",
         __func__, 303, opcode, optarg);
  return -2;
}


x86 assembly (clang, -O0):
<SFilter_Analyse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffce,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x1e,%eax
ja     1274 <SFilter_Analyse+0x144>
mov    -0x20(%rbp),%rax
lea    0xe9d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rdx
lea    0xf05(%rip),%rsi
mov    %rsi,%rdi
mov    $0x0,%al
call   1050 <filter_set@plt>
mov    %eax,-0x4(%rbp)
jmp    12a2 <SFilter_Analyse+0x172>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <proto_setdetail@plt>
cmp    $0x0,%eax
je     11c3 <SFilter_Analyse+0x93>
lea    0xede(%rip),%rdi
lea    0xef3(%rip),%rsi
mov    $0x112,%edx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    12a2 <SFilter_Analyse+0x172>
movl   $0x0,-0x4(%rbp)
jmp    12a2 <SFilter_Analyse+0x172>
mov    -0x10(%rbp),%rdx
lea    0xea2(%rip),%rdi
lea    0xecd(%rip),%rsi
mov    $0x0,%al
call   1050 <filter_set@plt>
mov    %eax,-0x4(%rbp)
jmp    12a2 <SFilter_Analyse+0x172>
mov    -0x10(%rbp),%rdx
lea    0xeba(%rip),%rdi
lea    0xeb7(%rip),%rsi
mov    $0x0,%al
call   1050 <filter_set@plt>
mov    %eax,-0x4(%rbp)
jmp    12a2 <SFilter_Analyse+0x172>
mov    -0x10(%rbp),%rdx
lea    0xe60(%rip),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x0,%al
call   1050 <filter_set@plt>
mov    %eax,-0x4(%rbp)
jmp    12a2 <SFilter_Analyse+0x172>
mov    -0x10(%rbp),%rdx
lea    0xe3f(%rip),%rdi
lea    0xe85(%rip),%rsi
mov    $0x0,%al
call   1050 <filter_set@plt>
mov    %eax,-0x4(%rbp)
jmp    12a2 <SFilter_Analyse+0x172>
mov    -0x10(%rbp),%rdx
lea    0xe6f(%rip),%rdi
lea    0xe6c(%rip),%rsi
mov    $0x0,%al
call   1050 <filter_set@plt>
mov    %eax,-0x4(%rbp)
jmp    12a2 <SFilter_Analyse+0x172>
jmp    1279 <SFilter_Analyse+0x149>
movsbl -0x5(%rbp),%ecx
mov    -0x10(%rbp),%r8
lea    0xe51(%rip),%rdi
lea    0xe0f(%rip),%rsi
mov    $0x12f,%edx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xfffffffe,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SFilter_Analyse>:
push   %rbx
mov    %rsi,%r8
mov    %edi,%ecx
lea    -0x32(%rcx),%eax
cmp    $0x1e,%eax
ja     1184 <SFilter_Analyse+0x54>
lea    0xebb(%rip),%rdx
movslq (%rdx,%rax,4),%rax
add    %rdx,%rax
jmp    *%rax
lea    0xf27(%rip),%rdi
lea    0xf52(%rip),%rsi
jmp    1202 <SFilter_Analyse+0xd2>
lea    0xf4d(%rip),%rdi
lea    0xf4a(%rip),%rsi
jmp    1202 <SFilter_Analyse+0xd2>
lea    0xf01(%rip),%rdi
lea    0xf40(%rip),%rsi
jmp    1202 <SFilter_Analyse+0xd2>
lea    0xf4e(%rip),%rdi
lea    0xf0c(%rip),%rsi
mov    $0x12f,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xfffffffe,%ebx
jmp    11f4 <SFilter_Analyse+0xc4>
lea    0xf21(%rip),%rdi
lea    0xf1e(%rip),%rsi
jmp    1202 <SFilter_Analyse+0xd2>
lea    0xec0(%rip),%rdi
lea    0xf06(%rip),%rsi
jmp    1202 <SFilter_Analyse+0xd2>
xor    %ebx,%ebx
mov    %r8,%rdi
xor    %eax,%eax
call   1030 <proto_setdetail@plt>
test   %eax,%eax
je     11f4 <SFilter_Analyse+0xc4>
lea    0xea6(%rip),%rdi
lea    0xebb(%rip),%rsi
mov    $0x112,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret
lea    0xe7d(%rip),%rdi
mov    %rdi,%rsi
mov    %r8,%rdx
xor    %eax,%eax
pop    %rbx
jmp    1050 <filter_set@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"PROTO\00"
@.str.1 = [28 x i8] c"%s:%d wrong filter syntax\0A\0A\00"
@__func__.SFilter_Analyse = [16 x i8] c"SFilter_Analyse\00"
@.str.2 = [7 x i8] c"REMOTE\00"
@.str.3 = [4 x i8] c"ETH\00"
@.str.4 = [9 x i8] c"MacBcast\00"
@.str.5 = [7 x i8] c"DATAOK\00"
@.str.6 = [4 x i8] c"VNC\00"
@.str.7 = [4 x i8] c"MAP\00"
@.str.8 = [8 x i8] c"VNCPORT\00"
@.str.9 = [26 x i8] c"%s:%d opt:%c %s unknown\0A\0A\00"
define i32 @SFilter_Analyse(i8 signext %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
store i8 %0, i8* %4
store i8* %1, i8** %5
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
switch i32 %8, label %34 [
i32 80, label %9
i32 70, label %12
i32 50, label %19
i32 51, label %22
i32 52, label %25
i32 56, label %28
i32 55, label %31
]
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %10)
store i32 %11, i32* %3
br label %40
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @proto_setdetail to i32 (i8*, ...)*)(i8* %13)
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.SFilter_Analyse, i64 0, i64 0), i32 274)
store i32 -1, i32* %3
br label %40
18: ; preds = %12
store i32 0, i32* %3
br label %40
19: ; preds = %2
%20 = load i8*, i8** %5
%21 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %20)
store i32 %21, i32* %3
br label %40
22: ; preds = %2
%23 = load i8*, i8** %5
%24 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %23)
store i32 %24, i32* %3
br label %40
25: ; preds = %2
%26 = load i8*, i8** %5
%27 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %26)
store i32 %27, i32* %3
br label %40
28: ; preds = %2
%29 = load i8*, i8** %5
%30 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %29)
store i32 %30, i32* %3
br label %40
31: ; preds = %2
%32 = load i8*, i8** %5
%33 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* %32)
store i32 %33, i32* %3
br label %40
34: ; preds = %2
br label %35
35: ; preds = %34
%36 = load i8, i8* %4
%37 = sext i8 %36 to i32
%38 = load i8*, i8** %5
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.SFilter_Analyse, i64 0, i64 0), i32 303, i32 %37, i8* %38)
store i32 -2, i32* %3
br label %40
40: ; preds = %35, %31, %28, %25, %22, %19, %18, %16, %9
%41 = load i32, i32* %3
ret i32 %41
}

LLVM IR (-O2):
@.str = [6 x i8] c"PROTO\00"
@.str.1 = [28 x i8] c"%s:%d wrong filter syntax\0A\0A\00"
@__func__.SFilter_Analyse = [16 x i8] c"SFilter_Analyse\00"
@.str.2 = [7 x i8] c"REMOTE\00"
@.str.3 = [4 x i8] c"ETH\00"
@.str.4 = [9 x i8] c"MacBcast\00"
@.str.5 = [7 x i8] c"DATAOK\00"
@.str.6 = [4 x i8] c"VNC\00"
@.str.7 = [4 x i8] c"MAP\00"
@.str.8 = [8 x i8] c"VNCPORT\00"
@.str.9 = [26 x i8] c"%s:%d opt:%c %s unknown\0A\0A\00"
define i32 @SFilter_Analyse(i8 signext %0, i8* %1) {
%3 = sext i8 %0 to i32
switch i32 %3, label %21 [
i32 80, label %4
i32 70, label %6
i32 50, label %11
i32 51, label %13
i32 52, label %15
i32 56, label %17
i32 55, label %19
]
4: ; preds = %2
%5 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %23
6: ; preds = %2
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @proto_setdetail to i32 (i8*, ...)*)(i8* %1)
%8 = icmp eq i32 %7, 0
br i1 %8, label %23, label %9
9: ; preds = %6
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.SFilter_Analyse, i64 0, i64 0), i32 274)
br label %23
11: ; preds = %2
%12 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %1)
br label %23
13: ; preds = %2
%14 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* %1)
br label %23
15: ; preds = %2
%16 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %1)
br label %23
17: ; preds = %2
%18 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %1)
br label %23
19: ; preds = %2
%20 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @filter_set to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8* %1)
br label %23
21: ; preds = %2
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @__func__.SFilter_Analyse, i64 0, i64 0), i32 303, i32 %3, i8* %1)
br label %23
23: ; preds = %6, %21, %19, %17, %15, %13, %11, %9, %4
%24 = phi i32 [ -2, %21 ], [ %20, %19 ], [ %18, %17 ], [ %16, %15 ], [ %14, %13 ], [ %12, %11 ], [ -1, %9 ], [ %5, %4 ], [ 0, %6 ]
ret i32 %24
}