#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int marker;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned char);
char *get_marker_name(unsigned char marker) {
  switch (marker) {
  case (0xC8):
    return "JPG";
  case (0xC4):
    return "DHT";
  case (0xCC):
    return "DAC";
  case (0xD8):
    return "SOI";
  case (0xD9):
    return "EOI";
  case (0xDA):
    return "SOS";
  case (0xDB):
    return "DQT";
  case (0xDC):
    return "DNL";
  case (0xDD):
    return "DRI";
  case (0xDE):
    return "DHP";
  case (0xDF):
    return "EXP";
  case (0xFE):
    return "COM";
  case (0x01):
    return "TEM";
  default:
    if (((((marker) & (0xF0)) == (0xC0)) && ((marker) != (0xC8)) &&
         ((marker) != (0xC4)) && ((marker) != (0xCC)))) {
      static char name[] = "SOF\0\0";
      int nr = marker & (0x0F);
      if (nr < 10) {
        name[3] = '0' + nr;
        name[4] = '\0';
      } else {
        name[3] = '1';
        name[4] = '0' + nr - 10;
      }
      return name;
    } else if ((((marker) & (0xF0)) == (0xE0))) {
      static char name[] = "APP\0\0";
      int nr = marker & (0x0F);
      if (nr < 10) {
        name[3] = '0' + nr;
        name[4] = '\0';
      } else {
        name[3] = '1';
        name[4] = '0' + nr - 10;
      }
      return name;
    } else if ((((marker) & (0xF8)) == (0xD0))) {
      static char name[] = "RST\0";
      int nr = marker & (0x07);
      name[3] = '0' + nr;
      return name;
    } else if (((((marker) & (0xF0)) == (0xF0)) && ((marker) != (0xFE)) &&
                ((marker) != 0xFF))) {
      static char name[] = "JPG\0\0";
      int nr = marker & (0x0F);
      if (nr < 10) {
        name[3] = '0' + nr;
        name[4] = '\0';
      } else {
        name[3] = '1';
        name[4] = '0' + nr - 10;
      }
      return name;
    } else {
      static char name[] = "RES_\0\0";
      snprintf(name + 4, 3, "%02x", marker);
      return name;
    }
  }
}


x86 assembly (clang, -O0):
<get_marker_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
mov    %eax,-0x20(%rbp)
sub    $0x1,%eax
je     12d7 <get_marker_name+0x1c7>
jmp    1133 <get_marker_name+0x23>
mov    -0x20(%rbp),%eax
sub    $0xc4,%eax
je     1227 <get_marker_name+0x117>
jmp    1146 <get_marker_name+0x36>
mov    -0x20(%rbp),%eax
sub    $0xc8,%eax
je     1217 <get_marker_name+0x107>
jmp    1159 <get_marker_name+0x49>
mov    -0x20(%rbp),%eax
sub    $0xcc,%eax
je     1237 <get_marker_name+0x127>
jmp    116c <get_marker_name+0x5c>
mov    -0x20(%rbp),%eax
sub    $0xd8,%eax
je     1247 <get_marker_name+0x137>
jmp    117f <get_marker_name+0x6f>
mov    -0x20(%rbp),%eax
sub    $0xd9,%eax
je     1257 <get_marker_name+0x147>
jmp    1192 <get_marker_name+0x82>
mov    -0x20(%rbp),%eax
sub    $0xda,%eax
je     1267 <get_marker_name+0x157>
jmp    11a5 <get_marker_name+0x95>
mov    -0x20(%rbp),%eax
sub    $0xdb,%eax
je     1277 <get_marker_name+0x167>
jmp    11b8 <get_marker_name+0xa8>
mov    -0x20(%rbp),%eax
sub    $0xdc,%eax
je     1287 <get_marker_name+0x177>
jmp    11cb <get_marker_name+0xbb>
mov    -0x20(%rbp),%eax
sub    $0xdd,%eax
je     1297 <get_marker_name+0x187>
jmp    11de <get_marker_name+0xce>
mov    -0x20(%rbp),%eax
sub    $0xde,%eax
je     12a7 <get_marker_name+0x197>
jmp    11f1 <get_marker_name+0xe1>
mov    -0x20(%rbp),%eax
sub    $0xdf,%eax
je     12b7 <get_marker_name+0x1a7>
jmp    1204 <get_marker_name+0xf4>
mov    -0x20(%rbp),%eax
sub    $0xfe,%eax
je     12c7 <get_marker_name+0x1b7>
jmp    12e7 <get_marker_name+0x1d7>
lea    0xde2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xdd6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xdca(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xdbe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xdb2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xda6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xd9a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xd8e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xd82(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xd76(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xd6a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xd5e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0xd52(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
movzbl -0x9(%rbp),%eax
and    $0xf0,%eax
cmp    $0xc0,%eax
jne    137a <get_marker_name+0x26a>
movzbl -0x9(%rbp),%eax
cmp    $0xc8,%eax
je     137a <get_marker_name+0x26a>
movzbl -0x9(%rbp),%eax
cmp    $0xc4,%eax
je     137a <get_marker_name+0x26a>
movzbl -0x9(%rbp),%eax
cmp    $0xcc,%eax
je     137a <get_marker_name+0x26a>
movzbl -0x9(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    1354 <get_marker_name+0x244>
mov    -0x10(%rbp),%eax
add    $0x30,%eax
mov    %al,0x2ce3(%rip)
movb   $0x0,0x2cdd(%rip)
jmp    136a <get_marker_name+0x25a>
movb   $0x31,0x2cd0(%rip)
mov    -0x10(%rbp),%eax
add    $0x30,%eax
sub    $0xa,%eax
mov    %al,0x2cc2(%rip)
lea    0x2cb7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
movzbl -0x9(%rbp),%eax
and    $0xf0,%eax
cmp    $0xe0,%eax
jne    13e0 <get_marker_name+0x2d0>
movzbl -0x9(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    13ba <get_marker_name+0x2aa>
mov    -0x14(%rbp),%eax
add    $0x30,%eax
mov    %al,0x2c83(%rip)
movb   $0x0,0x2c7d(%rip)
jmp    13d0 <get_marker_name+0x2c0>
movb   $0x31,0x2c70(%rip)
mov    -0x14(%rbp),%eax
add    $0x30,%eax
sub    $0xa,%eax
mov    %al,0x2c62(%rip)
lea    0x2c57(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
movzbl -0x9(%rbp),%eax
and    $0xf8,%eax
cmp    $0xd0,%eax
jne    141a <get_marker_name+0x30a>
movzbl -0x9(%rbp),%eax
and    $0x7,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x30,%eax
mov    %al,0x2c2d(%rip)
lea    0x2c23(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
movzbl -0x9(%rbp),%eax
and    $0xf0,%eax
cmp    $0xf0,%eax
jne    149e <get_marker_name+0x38e>
movzbl -0x9(%rbp),%eax
cmp    $0xfe,%eax
je     149e <get_marker_name+0x38e>
movzbl -0x9(%rbp),%eax
cmp    $0xff,%eax
je     149e <get_marker_name+0x38e>
movzbl -0x9(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0xa,-0x1c(%rbp)
jge    1478 <get_marker_name+0x368>
mov    -0x1c(%rbp),%eax
add    $0x30,%eax
mov    %al,0x2bd0(%rip)
movb   $0x0,0x2bca(%rip)
jmp    148e <get_marker_name+0x37e>
movb   $0x31,0x2bbd(%rip)
mov    -0x1c(%rbp),%eax
add    $0x30,%eax
sub    $0xa,%eax
mov    %al,0x2baf(%rip)
lea    0x2ba4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    14c9 <get_marker_name+0x3b9>
lea    0x2b9a(%rip),%rdi
add    $0x4,%rdi
mov    $0x3,%esi
lea    0xb7f(%rip),%rdx
movzbl -0x9(%rbp),%ecx
call   1030 <snprintf@plt>
lea    0x2b7a(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_marker_name>:
push   %rax
lea    0x3c(%rdi),%r8d
movzbl %r8b,%ecx
cmp    $0x3d,%cl
ja     1174 <get_marker_name+0x64>
lea    0xfd3(%rip),%rax
lea    0xed4(%rip),%rsi
movslq (%rsi,%rcx,4),%rdx
add    %rsi,%rdx
jmp    *%rdx
lea    0xfc0(%rip),%rax
pop    %rcx
ret
lea    0xfbf(%rip),%rax
pop    %rcx
ret
lea    0xfba(%rip),%rax
pop    %rcx
ret
lea    0xfb5(%rip),%rax
pop    %rcx
ret
lea    0xfc0(%rip),%rax
pop    %rcx
ret
lea    0xfbb(%rip),%rax
pop    %rcx
ret
lea    0xfb6(%rip),%rax
pop    %rcx
ret
mov    %edi,%eax
and    $0xfffffff0,%eax
cmp    $0xe0,%al
je     11ec <get_marker_name+0xdc>
cmp    $0xc0,%al
jne    119a <get_marker_name+0x8a>
cmp    $0x8,%r8b
ja     1267 <get_marker_name+0x157>
mov    $0x111,%edx
bt     %rcx,%rdx
jae    1267 <get_marker_name+0x157>
mov    %edi,%ecx
and    $0xfffffff8,%ecx
cmp    $0xd0,%ecx
jne    1203 <get_marker_name+0xf3>
and    $0x7,%dil
or     $0x30,%dil
mov    %dil,0x2e81(%rip)
lea    0x2e77(%rip),%rax
pop    %rcx
ret
lea    0xf3a(%rip),%rax
pop    %rcx
ret
lea    0xf41(%rip),%rax
pop    %rcx
ret
lea    0xf3c(%rip),%rax
pop    %rcx
ret
lea    0xf37(%rip),%rax
pop    %rcx
ret
lea    0xf32(%rip),%rax
pop    %rcx
ret
and    $0xf,%edi
cmp    $0x9,%edi
ja     1227 <get_marker_name+0x117>
or     $0x30,%dil
mov    %dil,0x2e32(%rip)
xor    %edi,%edi
jmp    1232 <get_marker_name+0x122>
cmp    $0xfd,%dil
ja     1242 <get_marker_name+0x132>
cmp    $0xf0,%eax
jne    1242 <get_marker_name+0x132>
and    $0xf,%edi
cmp    $0x9,%edi
ja     127e <get_marker_name+0x16e>
or     $0x30,%dil
mov    %dil,0x2e19(%rip)
xor    %edi,%edi
jmp    1289 <get_marker_name+0x179>
movb   $0x31,0x2e03(%rip)
add    $0x26,%dil
mov    %dil,0x2df9(%rip)
lea    0x2dee(%rip),%rax
pop    %rcx
ret
movzbl %dil,%ecx
lea    0x2df6(%rip),%rdi
lea    0xed8(%rip),%rdx
mov    $0x3,%esi
call   1030 <snprintf@plt>
lea    0x2dda(%rip),%rax
pop    %rcx
ret
and    $0xf,%edi
cmp    $0x9,%edi
ja     1299 <get_marker_name+0x189>
or     $0x30,%dil
mov    %dil,0x2db1(%rip)
xor    %edi,%edi
jmp    12a4 <get_marker_name+0x194>
movb   $0x31,0x2db7(%rip)
add    $0x26,%dil
mov    %dil,0x2dad(%rip)
lea    0x2da2(%rip),%rax
pop    %rcx
ret
movb   $0x31,0x2d8b(%rip)
add    $0x26,%dil
mov    %dil,0x2d81(%rip)
lea    0x2d76(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"JPG\00"
@.str.1 = [4 x i8] c"DHT\00"
@.str.2 = [4 x i8] c"DAC\00"
@.str.3 = [4 x i8] c"SOI\00"
@.str.4 = [4 x i8] c"EOI\00"
@.str.5 = [4 x i8] c"SOS\00"
@.str.6 = [4 x i8] c"DQT\00"
@.str.7 = [4 x i8] c"DNL\00"
@.str.8 = [4 x i8] c"DRI\00"
@.str.9 = [4 x i8] c"DHP\00"
@.str.10 = [4 x i8] c"EXP\00"
@.str.11 = [4 x i8] c"COM\00"
@.str.12 = [4 x i8] c"TEM\00"
@get_marker_name.name = internal global [6 x i8] c"SOF\00\00\00"
@get_marker_name.name.13 = internal global [6 x i8] c"APP\00\00\00"
@get_marker_name.name.14 = internal global [5 x i8] c"RST\00\00"
@get_marker_name.name.15 = internal global [6 x i8] c"JPG\00\00\00"
@get_marker_name.name.16 = internal global [7 x i8] c"RES_\00\00\00"
@.str.17 = [5 x i8] c"%02x\00"
define i8* @get_marker_name(i8 zeroext %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %3
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
switch i32 %9, label %23 [
i32 200, label %10
i32 196, label %11
i32 204, label %12
i32 216, label %13
i32 217, label %14
i32 218, label %15
i32 219, label %16
i32 220, label %17
i32 221, label %18
i32 222, label %19
i32 223, label %20
i32 254, label %21
i32 1, label %22
]
10: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
br label %121
11: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %121
12: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %121
13: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %121
14: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %121
15: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %121
16: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %121
17: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %121
18: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %121
19: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %121
20: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %121
21: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %121
22: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %121
23: ; preds = %1
%24 = load i8, i8* %3
%25 = zext i8 %24 to i32
%26 = and i32 %25, 240
%27 = icmp eq i32 %26, 192
br i1 %27, label %28, label %56
28: ; preds = %23
%29 = load i8, i8* %3
%30 = zext i8 %29 to i32
%31 = icmp ne i32 %30, 200
br i1 %31, label %32, label %56
32: ; preds = %28
%33 = load i8, i8* %3
%34 = zext i8 %33 to i32
%35 = icmp ne i32 %34, 196
br i1 %35, label %36, label %56
36: ; preds = %32
%37 = load i8, i8* %3
%38 = zext i8 %37 to i32
%39 = icmp ne i32 %38, 204
br i1 %39, label %40, label %56
40: ; preds = %36
%41 = load i8, i8* %3
%42 = zext i8 %41 to i32
%43 = and i32 %42, 15
store i32 %43, i32* %4
%44 = load i32, i32* %4
%45 = icmp slt i32 %44, 10
br i1 %45, label %46, label %50
46: ; preds = %40
%47 = load i32, i32* %4
%48 = add nsw i32 48, %47
%49 = trunc i32 %48 to i8
store i8 %49, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name, i64 0, i64 3)
store i8 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name, i64 0, i64 4)
br label %55
50: ; preds = %40
store i8 49, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name, i64 0, i64 3)
%51 = load i32, i32* %4
%52 = add nsw i32 48, %51
%53 = sub nsw i32 %52, 10
%54 = trunc i32 %53 to i8
store i8 %54, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name, i64 0, i64 4)
br label %55
55: ; preds = %50, %46
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name, i64 0, i64 0), i8** %2
br label %121
56: ; preds = %36, %32, %28, %23
%57 = load i8, i8* %3
%58 = zext i8 %57 to i32
%59 = and i32 %58, 240
%60 = icmp eq i32 %59, 224
br i1 %60, label %61, label %77
61: ; preds = %56
%62 = load i8, i8* %3
%63 = zext i8 %62 to i32
%64 = and i32 %63, 15
store i32 %64, i32* %5
%65 = load i32, i32* %5
%66 = icmp slt i32 %65, 10
br i1 %66, label %67, label %71
67: ; preds = %61
%68 = load i32, i32* %5
%69 = add nsw i32 48, %68
%70 = trunc i32 %69 to i8
store i8 %70, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.13, i64 0, i64 3)
store i8 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.13, i64 0, i64 4)
br label %76
71: ; preds = %61
store i8 49, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.13, i64 0, i64 3)
%72 = load i32, i32* %5
%73 = add nsw i32 48, %72
%74 = sub nsw i32 %73, 10
%75 = trunc i32 %74 to i8
store i8 %75, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.13, i64 0, i64 4)
br label %76
76: ; preds = %71, %67
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.13, i64 0, i64 0), i8** %2
br label %121
77: ; preds = %56
%78 = load i8, i8* %3
%79 = zext i8 %78 to i32
%80 = and i32 %79, 248
%81 = icmp eq i32 %80, 208
br i1 %81, label %82, label %89
82: ; preds = %77
%83 = load i8, i8* %3
%84 = zext i8 %83 to i32
%85 = and i32 %84, 7
store i32 %85, i32* %6
%86 = load i32, i32* %6
%87 = add nsw i32 48, %86
%88 = trunc i32 %87 to i8
store i8 %88, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @get_marker_name.name.14, i64 0, i64 3)
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @get_marker_name.name.14, i64 0, i64 0), i8** %2
br label %121
89: ; preds = %77
%90 = load i8, i8* %3
%91 = zext i8 %90 to i32
%92 = and i32 %91, 240
%93 = icmp eq i32 %92, 240
br i1 %93, label %94, label %118
94: ; preds = %89
%95 = load i8, i8* %3
%96 = zext i8 %95 to i32
%97 = icmp ne i32 %96, 254
br i1 %97, label %98, label %118
98: ; preds = %94
%99 = load i8, i8* %3
%100 = zext i8 %99 to i32
%101 = icmp ne i32 %100, 255
br i1 %101, label %102, label %118
102: ; preds = %98
%103 = load i8, i8* %3
%104 = zext i8 %103 to i32
%105 = and i32 %104, 15
store i32 %105, i32* %7
%106 = load i32, i32* %7
%107 = icmp slt i32 %106, 10
br i1 %107, label %108, label %112
108: ; preds = %102
%109 = load i32, i32* %7
%110 = add nsw i32 48, %109
%111 = trunc i32 %110 to i8
store i8 %111, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.15, i64 0, i64 3)
store i8 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.15, i64 0, i64 4)
br label %117
112: ; preds = %102
store i8 49, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.15, i64 0, i64 3)
%113 = load i32, i32* %7
%114 = add nsw i32 48, %113
%115 = sub nsw i32 %114, 10
%116 = trunc i32 %115 to i8
store i8 %116, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.15, i64 0, i64 4)
br label %117
117: ; preds = %112, %108
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.15, i64 0, i64 0), i8** %2
br label %121
118: ; preds = %98, %94, %89
%119 = load i8, i8* %3
%120 = call i32 @snprintf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @get_marker_name.name.16, i64 0, i64 4), i32 3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8 zeroext %119)
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @get_marker_name.name.16, i64 0, i64 0), i8** %2
br label %121
121: ; preds = %118, %117, %82, %76, %55, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10
%122 = load i8*, i8** %2
ret i8* %122
}

LLVM IR (-O2):
@.str = [4 x i8] c"JPG\00"
@.str.1 = [4 x i8] c"DHT\00"
@.str.2 = [4 x i8] c"DAC\00"
@.str.3 = [4 x i8] c"SOI\00"
@.str.4 = [4 x i8] c"EOI\00"
@.str.5 = [4 x i8] c"SOS\00"
@.str.6 = [4 x i8] c"DQT\00"
@.str.7 = [4 x i8] c"DNL\00"
@.str.8 = [4 x i8] c"DRI\00"
@.str.9 = [4 x i8] c"DHP\00"
@.str.10 = [4 x i8] c"EXP\00"
@.str.11 = [4 x i8] c"COM\00"
@.str.12 = [4 x i8] c"TEM\00"
@get_marker_name.name = internal global [6 x i8] c"SOF\00\00\00"
@get_marker_name.name.13 = internal global [6 x i8] c"APP\00\00\00"
@get_marker_name.name.14 = internal global [5 x i8] c"RST\00\00"
@get_marker_name.name.15 = internal global [6 x i8] c"JPG\00\00\00"
@get_marker_name.name.16 = internal global [7 x i8] c"RES_\00\00\00"
@.str.17 = [5 x i8] c"%02x\00"
define i8* @get_marker_name(i8 zeroext %0) {
%2 = zext i8 %0 to i32
switch i8 %0, label %15 [
i8 -56, label %64
i8 -60, label %3
i8 -52, label %4
i8 -40, label %5
i8 -39, label %6
i8 -38, label %7
i8 -37, label %8
i8 -36, label %9
i8 -35, label %10
i8 -34, label %11
i8 -33, label %12
i8 -2, label %13
i8 1, label %14
]
3: ; preds = %1
br label %64
4: ; preds = %1
br label %64
5: ; preds = %1
br label %64
6: ; preds = %1
br label %64
7: ; preds = %1
br label %64
8: ; preds = %1
br label %64
9: ; preds = %1
br label %64
10: ; preds = %1
br label %64
11: ; preds = %1
br label %64
12: ; preds = %1
br label %64
13: ; preds = %1
br label %64
14: ; preds = %1
br label %64
15: ; preds = %1
%16 = and i32 %2, 240
%17 = trunc i32 %16 to i8
switch i8 %17, label %41 [
i8 -64, label %18
i8 -32, label %30
]
18: ; preds = %15
switch i8 %0, label %19 [
i8 -52, label %41
i8 -56, label %41
i8 -60, label %41
]
19: ; preds = %18
%20 = and i32 %2, 15
%21 = icmp ult i32 %20, 10
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = trunc i32 %20 to i8
%24 = or i8 %23, 48
store i8 %24, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name, i64 0, i64 3)
br label %28
25: ; preds = %19
store i8 49, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name, i64 0, i64 3)
%26 = trunc i32 %20 to i8
%27 = add nuw nsw i8 %26, 38
br label %28
28: ; preds = %25, %22
%29 = phi i8 [ %27, %25 ], [ 0, %22 ]
store i8 %29, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name, i64 0, i64 4)
br label %64
30: ; preds = %15
%31 = and i32 %2, 15
%32 = icmp ult i32 %31, 10
br i1 %32, label %33, label %36
33: ; preds = %30
%34 = trunc i32 %31 to i8
%35 = or i8 %34, 48
store i8 %35, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.13, i64 0, i64 3)
br label %39
36: ; preds = %30
store i8 49, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.13, i64 0, i64 3)
%37 = trunc i32 %31 to i8
%38 = add nuw nsw i8 %37, 38
br label %39
39: ; preds = %36, %33
%40 = phi i8 [ %38, %36 ], [ 0, %33 ]
store i8 %40, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.13, i64 0, i64 4)
br label %64
41: ; preds = %18, %18, %18, %15
%42 = and i32 %2, 248
%43 = icmp eq i32 %42, 208
br i1 %43, label %44, label %47
44: ; preds = %41
%45 = and i8 %0, 7
%46 = or i8 %45, 48
store i8 %46, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @get_marker_name.name.14, i64 0, i64 3)
br label %64
47: ; preds = %41
%48 = icmp eq i32 %16, 240
%49 = icmp ult i8 %0, -2
%50 = and i1 %49, %48
br i1 %50, label %51, label %62
51: ; preds = %47
%52 = and i32 %2, 15
%53 = icmp ult i32 %52, 10
br i1 %53, label %54, label %57
54: ; preds = %51
%55 = trunc i32 %52 to i8
%56 = or i8 %55, 48
store i8 %56, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.15, i64 0, i64 3)
br label %60
57: ; preds = %51
store i8 49, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.15, i64 0, i64 3)
%58 = trunc i32 %52 to i8
%59 = add nuw nsw i8 %58, 38
br label %60
60: ; preds = %57, %54
%61 = phi i8 [ %59, %57 ], [ 0, %54 ]
store i8 %61, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.15, i64 0, i64 4)
br label %64
62: ; preds = %47
%63 = tail call i32 @snprintf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @get_marker_name.name.16, i64 0, i64 4), i32 3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8 zeroext %0)
br label %64
64: ; preds = %1, %62, %60, %44, %39, %28, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3
%65 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name, i64 0, i64 0), %28 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.13, i64 0, i64 0), %39 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @get_marker_name.name.14, i64 0, i64 0), %44 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @get_marker_name.name.15, i64 0, i64 0), %60 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @get_marker_name.name.16, i64 0, i64 0), %62 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), %14 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), %13 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), %12 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), %11 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), %10 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), %9 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), %8 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), %6 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %65
}