char CI_get_response(char command) {
  static const char *LookupTable[] = {"HH", "Help",
                                      "P1", "PWM enable",
                                      "P0", "PWM disable",
                                      "RF", "Right Wheel Forward",
                                      "RR", "Right Wheel Reverse",
                                      "LF", "Left Wheel Forward",
                                      "LR", "Left Wheel Reverse",
                                      "LG", "Light Get",
                                      "GO", "PID initiated",
                                      "R0", "Read Front Distance Sensor",
                                      "R1", "Read Right Distance Sensor",
                                      "TD", "Toggle Data Acquisition",
                                      "DS", "Post Drive Semaphore",
                                      "ES", "Emergency Stop",
                                      "DC", "Drive Clock Start",
                                      "ER", "Error"};
  return (char)command;
}


x86 assembly (clang, -O0):
<CI_get_response>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CI_get_response>:
mov    %edi,%eax
ret

LLVM IR (-O0):
@CI_get_response.LookupTable = internal global [32 x i8*] [i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.30, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.31, i32 0, i32 0)]
@.str = [3 x i8] c"HH\00"
@.str.1 = [5 x i8] c"Help\00"
@.str.2 = [3 x i8] c"P1\00"
@.str.3 = [11 x i8] c"PWM enable\00"
@.str.4 = [3 x i8] c"P0\00"
@.str.5 = [12 x i8] c"PWM disable\00"
@.str.6 = [3 x i8] c"RF\00"
@.str.7 = [20 x i8] c"Right Wheel Forward\00"
@.str.8 = [3 x i8] c"RR\00"
@.str.9 = [20 x i8] c"Right Wheel Reverse\00"
@.str.10 = [3 x i8] c"LF\00"
@.str.11 = [19 x i8] c"Left Wheel Forward\00"
@.str.12 = [3 x i8] c"LR\00"
@.str.13 = [19 x i8] c"Left Wheel Reverse\00"
@.str.14 = [3 x i8] c"LG\00"
@.str.15 = [10 x i8] c"Light Get\00"
@.str.16 = [3 x i8] c"GO\00"
@.str.17 = [14 x i8] c"PID initiated\00"
@.str.18 = [3 x i8] c"R0\00"
@.str.19 = [27 x i8] c"Read Front Distance Sensor\00"
@.str.20 = [3 x i8] c"R1\00"
@.str.21 = [27 x i8] c"Read Right Distance Sensor\00"
@.str.22 = [3 x i8] c"TD\00"
@.str.23 = [24 x i8] c"Toggle Data Acquisition\00"
@.str.24 = [3 x i8] c"DS\00"
@.str.25 = [21 x i8] c"Post Drive Semaphore\00"
@.str.26 = [3 x i8] c"ES\00"
@.str.27 = [15 x i8] c"Emergency Stop\00"
@.str.28 = [3 x i8] c"DC\00"
@.str.29 = [18 x i8] c"Drive Clock Start\00"
@.str.30 = [3 x i8] c"ER\00"
@.str.31 = [6 x i8] c"Error\00"
define signext i8 @CI_get_response(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
ret i8 %3
}

LLVM IR (-O2):
define signext i8 @CI_get_response(i8 returned signext %0) {
ret i8 %0
}