void print_command(int c) {
  switch (c) {
  case 192:
    printf("SOF0 - Start Of Frame (Baseline DCT)");
    break;
  case 194:
    printf("SOF2 - Start Of Frame (Progressive DCT)");
    break;
  case 196:
    printf("DHT - Define Huffman Tables");
    break;
  case 208 ... 215:
  case 216:
    printf("SOI - Start of image");
    break;
  case 217:
    printf("EOI - End Of Image");
  case 218:
    printf("SOS - Start of Scan");
    break;
  case 219:
    printf("DQT - Define Quantization Table(s)");
    break;
  case 221:
    printf("DRI - Define Restart Interval");
    break;
  case 224 ... 239:
    printf("APPn - Applicationspecific");
    break;
  case 254:
    break;
  }
}


x86 assembly (clang, -O0):
<print_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff40,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3e,%eax
ja     11f6 <print_command+0xe6>
mov    -0x10(%rbp),%rax
lea    0xec3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f6 <print_command+0xe6>
lea    0xfc1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f6 <print_command+0xe6>
lea    0xfd6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f6 <print_command+0xe6>
jmp    1184 <print_command+0x74>
lea    0xfda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f6 <print_command+0xe6>
lea    0xfdc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f6 <print_command+0xe6>
lea    0xfe2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f6 <print_command+0xe6>
lea    0xff2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f6 <print_command+0xe6>
lea    0xffd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11f6 <print_command+0xe6>
jmp    11f6 <print_command+0xe6>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_command>:
push   %rax
mov    %edi,%eax
add    $0xffffff40,%eax
cmp    $0x2f,%eax
ja     114c <print_command+0x3c>
lea    0xf9c(%rip),%rdi
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x106b(%rip),%rdi
jmp    1144 <print_command+0x34>
lea    0xfe5(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>
pop    %rax
ret
lea    0xfb8(%rip),%rdi
jmp    1144 <print_command+0x34>
lea    0xfe0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfe5(%rip),%rdi
jmp    1144 <print_command+0x34>
lea    0xff0(%rip),%rdi
jmp    1144 <print_command+0x34>
lea    0x100a(%rip),%rdi
jmp    1144 <print_command+0x34>
lea    0xf5e(%rip),%rdi
jmp    1144 <print_command+0x34>

LLVM IR (-O0):
@.str = [37 x i8] c"SOF0 - Start Of Frame (Baseline DCT)\00"
@.str.1 = [40 x i8] c"SOF2 - Start Of Frame (Progressive DCT)\00"
@.str.2 = [28 x i8] c"DHT - Define Huffman Tables\00"
@.str.3 = [21 x i8] c"SOI - Start of image\00"
@.str.4 = [19 x i8] c"EOI - End Of Image\00"
@.str.5 = [20 x i8] c"SOS - Start of Scan\00"
@.str.6 = [35 x i8] c"DQT - Define Quantization Table(s)\00"
@.str.7 = [30 x i8] c"DRI - Define Restart Interval\00"
@.str.8 = [27 x i8] c"APPn - Applicationspecific\00"
define void @print_command(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %24 [
i32 192, label %4
i32 194, label %6
i32 196, label %8
i32 216, label %11
i32 208, label %10
i32 209, label %10
i32 210, label %10
i32 211, label %10
i32 212, label %10
i32 213, label %10
i32 214, label %10
i32 215, label %10
i32 217, label %13
i32 218, label %15
i32 219, label %17
i32 221, label %19
i32 224, label %21
i32 225, label %21
i32 226, label %21
i32 227, label %21
i32 228, label %21
i32 229, label %21
i32 230, label %21
i32 231, label %21
i32 232, label %21
i32 233, label %21
i32 234, label %21
i32 235, label %21
i32 236, label %21
i32 237, label %21
i32 238, label %21
i32 239, label %21
i32 254, label %23
]
4: ; preds = %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
br label %24
6: ; preds = %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
br label %24
8: ; preds = %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %24
10: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
br label %11
11: ; preds = %1, %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %24
13: ; preds = %1
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
br label %15
15: ; preds = %1, %13
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
br label %24
17: ; preds = %1
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0))
br label %24
19: ; preds = %1
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
br label %24
21: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0))
br label %24
23: ; preds = %1
br label %24
24: ; preds = %1, %23, %21, %19, %17, %15, %11, %8, %6, %4
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"SOF0 - Start Of Frame (Baseline DCT)\00"
@.str.1 = [40 x i8] c"SOF2 - Start Of Frame (Progressive DCT)\00"
@.str.2 = [28 x i8] c"DHT - Define Huffman Tables\00"
@.str.3 = [21 x i8] c"SOI - Start of image\00"
@.str.4 = [19 x i8] c"EOI - End Of Image\00"
@.str.5 = [20 x i8] c"SOS - Start of Scan\00"
@.str.6 = [35 x i8] c"DQT - Define Quantization Table(s)\00"
@.str.7 = [30 x i8] c"DRI - Define Restart Interval\00"
@.str.8 = [27 x i8] c"APPn - Applicationspecific\00"
define void @print_command(i32 %0) {
switch i32 %0, label %14 [
i32 192, label %11
i32 194, label %2
i32 196, label %3
i32 216, label %4
i32 208, label %4
i32 209, label %4
i32 210, label %4
i32 211, label %4
i32 212, label %4
i32 213, label %4
i32 214, label %4
i32 215, label %4
i32 217, label %5
i32 218, label %7
i32 219, label %8
i32 221, label %9
i32 224, label %10
i32 225, label %10
i32 226, label %10
i32 227, label %10
i32 228, label %10
i32 229, label %10
i32 230, label %10
i32 231, label %10
i32 232, label %10
i32 233, label %10
i32 234, label %10
i32 235, label %10
i32 236, label %10
i32 237, label %10
i32 238, label %10
i32 239, label %10
]
2: ; preds = %1
br label %11
3: ; preds = %1
br label %11
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1
br label %11
5: ; preds = %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
br label %7
7: ; preds = %1, %5
br label %11
8: ; preds = %1
br label %11
9: ; preds = %1
br label %11
10: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
br label %11
11: ; preds = %1, %2, %3, %4, %7, %8, %9, %10
%12 = phi i8* [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), %10 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), %9 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), %8 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), %1 ]
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %12)
br label %14
14: ; preds = %11, %1
ret void
}