unsigned int get_IndFType(const unsigned int Eclass, const unsigned int f) {
  switch (Eclass) {
  case 0:
  case 1:
    return 0;
    break;
  case 2:
    if (f < 4)
      return 0;
    else
      return 1;
    break;
  case 3:
    if (f < 3)
      return 0;
    else
      return 1;
    break;
  default:
    printf("Error: Unsupported Eclass/f combination in get_IndFType.\n"),
        exit(1);
    break;
  }
}


x86 assembly (clang, -O0):
<get_IndFType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x2,%eax
jb     1164 <get_IndFType+0x44>
jmp    1142 <get_IndFType+0x22>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     1170 <get_IndFType+0x50>
jmp    1153 <get_IndFType+0x33>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     1192 <get_IndFType+0x72>
jmp    11b4 <get_IndFType+0x94>
movl   $0x0,-0x4(%rbp)
jmp    11cc <get_IndFType+0xac>
cmpl   $0x4,-0xc(%rbp)
jae    1186 <get_IndFType+0x66>
movl   $0x0,-0x4(%rbp)
jmp    11cc <get_IndFType+0xac>
movl   $0x1,-0x4(%rbp)
jmp    11cc <get_IndFType+0xac>
cmpl   $0x3,-0xc(%rbp)
jae    11a8 <get_IndFType+0x88>
movl   $0x0,-0x4(%rbp)
jmp    11cc <get_IndFType+0xac>
movl   $0x1,-0x4(%rbp)
jmp    11cc <get_IndFType+0xac>
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_IndFType>:
cmp    $0x2,%edi
jb     1134 <get_IndFType+0x14>
cmp    $0x3,%edi
je     113a <get_IndFType+0x1a>
cmp    $0x2,%edi
jne    1144 <get_IndFType+0x24>
cmp    $0x4,%esi
jmp    113d <get_IndFType+0x1d>
xor    %eax,%eax
movzbl %al,%eax
ret
cmp    $0x3,%esi
setae  %al
movzbl %al,%eax
ret
push   %rax
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"Error: Unsupported Eclass/f combination in get_IndFType.\0A\00"
define i32 @get_IndFType(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
switch i32 %6, label %18 [
i32 0, label %7
i32 1, label %7
i32 2, label %8
i32 3, label %13
]
7: ; preds = %2, %2
store i32 0, i32* %3
br label %20
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp ult i32 %9, 4
br i1 %10, label %11, label %12
11: ; preds = %8
store i32 0, i32* %3
br label %20
12: ; preds = %8
store i32 1, i32* %3
br label %20
13: ; preds = %2
%14 = load i32, i32* %5
%15 = icmp ult i32 %14, 3
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 0, i32* %3
br label %20
17: ; preds = %13
store i32 1, i32* %3
br label %20
18: ; preds = %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
unreachable
20: ; preds = %17, %16, %12, %11, %7
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@str = [57 x i8] c"Error: Unsupported Eclass/f combination in get_IndFType.\00"
define i32 @get_IndFType(i32 %0, i32 %1) {
switch i32 %0, label %7 [
i32 0, label %9
i32 1, label %9
i32 2, label %3
i32 3, label %5
]
3: ; preds = %2
%4 = icmp ugt i32 %1, 3
br label %9
5: ; preds = %2
%6 = icmp ugt i32 %1, 2
br label %9
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
tail call void @exit(i32 1)
unreachable
9: ; preds = %5, %3, %2, %2
%10 = phi i1 [ false, %2 ], [ false, %2 ], [ %4, %3 ], [ %6, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}