long CANIntNumberGet(unsigned long ulBase, unsigned char ucNumber) {
  long lIntNumber;
  switch (ulBase) {
  case 0x40070000: {
    switch (ucNumber) {
    case 0: {
      lIntNumber = 80;
      break;
    }
    case 1: {
      lIntNumber = 81;
      break;
    }
    default: {
      lIntNumber = -1;
      break;
    }
    }
    break;
  }
  case 0x40074000: {
    switch (ucNumber) {
    case 0: {
      lIntNumber = 82;
      break;
    }
    case 1: {
      lIntNumber = 83;
      break;
    }
    default: {
      lIntNumber = -1;
      break;
    }
    }
    break;
  }
  default: {
    lIntNumber = -1;
  }
  }
  return (lIntNumber);
}


x86 assembly (clang, -O0):
<CANIntNumberGet>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
sub    $0x40070000,%rax
je     113c <CANIntNumberGet+0x3c>
jmp    1127 <CANIntNumberGet+0x27>
mov    -0x20(%rbp),%rax
sub    $0x40074000,%rax
je     1188 <CANIntNumberGet+0x88>
jmp    11d4 <CANIntNumberGet+0xd4>
movzbl -0x9(%rbp),%eax
mov    %eax,-0x24(%rbp)
test   %eax,%eax
je     1161 <CANIntNumberGet+0x61>
jmp    1150 <CANIntNumberGet+0x50>
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
je     116e <CANIntNumberGet+0x6e>
jmp    117b <CANIntNumberGet+0x7b>
movq   $0x50,-0x18(%rbp)
jmp    1183 <CANIntNumberGet+0x83>
movq   $0x51,-0x18(%rbp)
jmp    1183 <CANIntNumberGet+0x83>
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
jmp    11dc <CANIntNumberGet+0xdc>
movzbl -0x9(%rbp),%eax
mov    %eax,-0x28(%rbp)
test   %eax,%eax
je     11ad <CANIntNumberGet+0xad>
jmp    119c <CANIntNumberGet+0x9c>
mov    -0x28(%rbp),%eax
sub    $0x1,%eax
je     11ba <CANIntNumberGet+0xba>
jmp    11c7 <CANIntNumberGet+0xc7>
movq   $0x52,-0x18(%rbp)
jmp    11cf <CANIntNumberGet+0xcf>
movq   $0x53,-0x18(%rbp)
jmp    11cf <CANIntNumberGet+0xcf>
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
jmp    11dc <CANIntNumberGet+0xdc>
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CANIntNumberGet>:
cmp    $0x40074000,%rdi
je     1137 <CANIntNumberGet+0x37>
mov    $0xffffffffffffffff,%rax
cmp    $0x40070000,%rdi
jne    1157 <CANIntNumberGet+0x57>
cmp    $0x1,%sil
mov    $0x51,%eax
mov    $0xffffffffffffffff,%rcx
cmove  %rax,%rcx
test   %sil,%sil
mov    $0x50,%eax
jmp    1153 <CANIntNumberGet+0x53>
cmp    $0x1,%sil
mov    $0x53,%eax
mov    $0xffffffffffffffff,%rcx
cmove  %rax,%rcx
test   %sil,%sil
mov    $0x52,%eax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
define i64 @CANIntNumberGet(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
%5 = alloca i64
store i64 %0, i64* %3
store i8 %1, i8* %4
%6 = load i64, i64* %3
switch i64 %6, label %21 [
i64 1074200576, label %7
i64 1074216960, label %14
]
7: ; preds = %2
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
switch i32 %9, label %12 [
i32 0, label %10
i32 1, label %11
]
10: ; preds = %7
store i64 80, i64* %5
br label %13
11: ; preds = %7
store i64 81, i64* %5
br label %13
12: ; preds = %7
store i64 -1, i64* %5
br label %13
13: ; preds = %12, %11, %10
br label %22
14: ; preds = %2
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
switch i32 %16, label %19 [
i32 0, label %17
i32 1, label %18
]
17: ; preds = %14
store i64 82, i64* %5
br label %20
18: ; preds = %14
store i64 83, i64* %5
br label %20
19: ; preds = %14
store i64 -1, i64* %5
br label %20
20: ; preds = %19, %18, %17
br label %22
21: ; preds = %2
store i64 -1, i64* %5
br label %22
22: ; preds = %21, %20, %13
%23 = load i64, i64* %5
ret i64 %23
}

LLVM IR (-O2):
define i64 @CANIntNumberGet(i64 %0, i8 zeroext %1) {
switch i64 %0, label %13 [
i64 1074200576, label %3
i64 1074216960, label %8
]
3: ; preds = %2
%4 = icmp eq i8 %1, 1
%5 = select i1 %4, i64 81, i64 -1
%6 = icmp eq i8 %1, 0
%7 = select i1 %6, i64 80, i64 %5
br label %13
8: ; preds = %2
%9 = icmp eq i8 %1, 1
%10 = select i1 %9, i64 83, i64 -1
%11 = icmp eq i8 %1, 0
%12 = select i1 %11, i64 82, i64 %10
br label %13
13: ; preds = %2, %8, %3
%14 = phi i64 [ %7, %3 ], [ %12, %8 ], [ -1, %2 ]
ret i64 %14
}