#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 */

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
unsigned int fetch_int();
int /*<<< orphan*/ fetch_skip(int);
int /*<<< orphan*/ fetch_str(int);
int /*<<< orphan*/ logprintf(char *, unsigned int);
int prefetch_strlen();
void fetch_skip_message_media_encrypted(void) {
  unsigned x = fetch_int();
  int l;
  switch (x) {
  case 0x89f5c4a:
    break;
  case 0x32798a8c:
    l = prefetch_strlen();
    fetch_str(l);
    fetch_skip(5);
    l = prefetch_strlen();
    fetch_str(l);
    l = prefetch_strlen();
    fetch_str(l);
    break;
  case 0x4cee6ef3:
    l = prefetch_strlen();
    fetch_str(l);
    fetch_skip(6);
    l = prefetch_strlen();
    fetch_str(l);
    l = prefetch_strlen();
    fetch_str(l);
    break;
  case 0x6080758f:
    fetch_skip(2);
    l = prefetch_strlen();
    fetch_str(l);
    l = prefetch_strlen();
    fetch_str(l);
    break;
  case 0xb095434b:
    l = prefetch_strlen();
    fetch_str(l);
    fetch_skip(2);
    l = prefetch_strlen();
    fetch_str(l);
    l = prefetch_strlen();
    fetch_str(l);
    fetch_skip(1);
    l = prefetch_strlen();
    fetch_str(l);
    l = prefetch_strlen();
    fetch_str(l);
    break;
  case 0x35480a59:
    fetch_skip(4);
    break;
  case 0x588a0a97:
    l = prefetch_strlen();
    fetch_str(l);
    l = prefetch_strlen();
    fetch_str(l);
    l = prefetch_strlen();
    fetch_str(l);
    fetch_skip(1);
    break;
  default:
    logprintf("type = 0x%08x\n", x);
    assert(0);
  }
}


x86 assembly (clang, -O0):
<fetch_skip_message_media_encrypted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1060 <fetch_int@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xb095434b,%eax
je     12bc <fetch_skip_message_media_encrypted+0x15c>
jmp    1188 <fetch_skip_message_media_encrypted+0x28>
mov    -0xc(%rbp),%eax
sub    $0x89f5c4a,%eax
je     11fa <fetch_skip_message_media_encrypted+0x9a>
jmp    119b <fetch_skip_message_media_encrypted+0x3b>
mov    -0xc(%rbp),%eax
sub    $0x32798a8c,%eax
je     11ff <fetch_skip_message_media_encrypted+0x9f>
jmp    11ae <fetch_skip_message_media_encrypted+0x4e>
mov    -0xc(%rbp),%eax
sub    $0x35480a59,%eax
je     132f <fetch_skip_message_media_encrypted+0x1cf>
jmp    11c1 <fetch_skip_message_media_encrypted+0x61>
mov    -0xc(%rbp),%eax
sub    $0x4cee6ef3,%eax
je     1244 <fetch_skip_message_media_encrypted+0xe4>
jmp    11d4 <fetch_skip_message_media_encrypted+0x74>
mov    -0xc(%rbp),%eax
sub    $0x588a0a97,%eax
je     133e <fetch_skip_message_media_encrypted+0x1de>
jmp    11e7 <fetch_skip_message_media_encrypted+0x87>
mov    -0xc(%rbp),%eax
sub    $0x6080758f,%eax
je     1289 <fetch_skip_message_media_encrypted+0x129>
jmp    1383 <fetch_skip_message_media_encrypted+0x223>
jmp    1399 <fetch_skip_message_media_encrypted+0x239>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x5,%edi
call   1050 <fetch_skip@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
jmp    1399 <fetch_skip_message_media_encrypted+0x239>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x6,%edi
call   1050 <fetch_skip@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
jmp    1399 <fetch_skip_message_media_encrypted+0x239>
mov    $0x2,%edi
call   1050 <fetch_skip@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
jmp    1399 <fetch_skip_message_media_encrypted+0x239>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x2,%edi
call   1050 <fetch_skip@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x1,%edi
call   1050 <fetch_skip@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
jmp    1399 <fetch_skip_message_media_encrypted+0x239>
mov    $0x4,%edi
call   1050 <fetch_skip@plt>
jmp    1399 <fetch_skip_message_media_encrypted+0x239>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x0,%al
call   1030 <prefetch_strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <fetch_str@plt>
mov    $0x1,%edi
call   1050 <fetch_skip@plt>
jmp    1399 <fetch_skip_message_media_encrypted+0x239>
mov    -0x4(%rbp),%esi
lea    0xc73(%rip),%rdi
call   1080 <logprintf@plt>
xor    %edi,%edi
call   1070 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fetch_skip_message_media_encrypted>:
push   %rax
xor    %eax,%eax
call   1060 <fetch_int@plt>
cmp    $0x35480a58,%eax
jle    11a0 <fetch_skip_message_media_encrypted+0x40>
cmp    $0x588a0a96,%eax
jg     11d2 <fetch_skip_message_media_encrypted+0x72>
cmp    $0x35480a59,%eax
je     11eb <fetch_skip_message_media_encrypted+0x8b>
cmp    $0x4cee6ef3,%eax
jne    1286 <fetch_skip_message_media_encrypted+0x126>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
call   1040 <fetch_str@plt>
mov    $0x6,%edi
jmp    122f <fetch_skip_message_media_encrypted+0xcf>
cmp    $0xb095434b,%eax
je     11f6 <fetch_skip_message_media_encrypted+0x96>
cmp    $0x89f5c4a,%eax
je     129c <fetch_skip_message_media_encrypted+0x13c>
cmp    $0x32798a8c,%eax
jne    1286 <fetch_skip_message_media_encrypted+0x126>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
call   1040 <fetch_str@plt>
mov    $0x5,%edi
jmp    122f <fetch_skip_message_media_encrypted+0xcf>
cmp    $0x588a0a97,%eax
je     1251 <fetch_skip_message_media_encrypted+0xf1>
cmp    $0x6080758f,%eax
jne    1286 <fetch_skip_message_media_encrypted+0x126>
mov    $0x2,%edi
jmp    122f <fetch_skip_message_media_encrypted+0xcf>
mov    $0x4,%edi
pop    %rax
jmp    1050 <fetch_skip@plt>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
call   1040 <fetch_str@plt>
mov    $0x2,%edi
call   1050 <fetch_skip@plt>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
call   1040 <fetch_str@plt>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
call   1040 <fetch_str@plt>
mov    $0x1,%edi
call   1050 <fetch_skip@plt>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
call   1040 <fetch_str@plt>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <fetch_str@plt>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
call   1040 <fetch_str@plt>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
call   1040 <fetch_str@plt>
xor    %eax,%eax
call   1030 <prefetch_strlen@plt>
mov    %eax,%edi
call   1040 <fetch_str@plt>
mov    $0x1,%edi
pop    %rax
jmp    1050 <fetch_skip@plt>
lea    0xd73(%rip),%rdi
mov    %eax,%esi
call   1080 <logprintf@plt>
xor    %edi,%edi
pop    %rax
jmp    1070 <assert@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"type = 0x%08x\0A\00"
define void @fetch_skip_message_media_encrypted() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @fetch_int()
store i32 %3, i32* %1
%4 = load i32, i32* %1
switch i32 %4, label %67 [
i32 144661578, label %5
i32 846826124, label %6
i32 1290694387, label %17
i32 1619031439, label %28
i32 -1332395189, label %36
i32 893913689, label %54
i32 1485441687, label %56
]
5: ; preds = %0
br label %71
6: ; preds = %0
%7 = call i32 (...) @prefetch_strlen()
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @fetch_str(i32 %8)
%10 = call i32 @fetch_skip(i32 5)
%11 = call i32 (...) @prefetch_strlen()
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = call i32 @fetch_str(i32 %12)
%14 = call i32 (...) @prefetch_strlen()
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = call i32 @fetch_str(i32 %15)
br label %71
17: ; preds = %0
%18 = call i32 (...) @prefetch_strlen()
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = call i32 @fetch_str(i32 %19)
%21 = call i32 @fetch_skip(i32 6)
%22 = call i32 (...) @prefetch_strlen()
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = call i32 @fetch_str(i32 %23)
%25 = call i32 (...) @prefetch_strlen()
store i32 %25, i32* %2
%26 = load i32, i32* %2
%27 = call i32 @fetch_str(i32 %26)
br label %71
28: ; preds = %0
%29 = call i32 @fetch_skip(i32 2)
%30 = call i32 (...) @prefetch_strlen()
store i32 %30, i32* %2
%31 = load i32, i32* %2
%32 = call i32 @fetch_str(i32 %31)
%33 = call i32 (...) @prefetch_strlen()
store i32 %33, i32* %2
%34 = load i32, i32* %2
%35 = call i32 @fetch_str(i32 %34)
br label %71
36: ; preds = %0
%37 = call i32 (...) @prefetch_strlen()
store i32 %37, i32* %2
%38 = load i32, i32* %2
%39 = call i32 @fetch_str(i32 %38)
%40 = call i32 @fetch_skip(i32 2)
%41 = call i32 (...) @prefetch_strlen()
store i32 %41, i32* %2
%42 = load i32, i32* %2
%43 = call i32 @fetch_str(i32 %42)
%44 = call i32 (...) @prefetch_strlen()
store i32 %44, i32* %2
%45 = load i32, i32* %2
%46 = call i32 @fetch_str(i32 %45)
%47 = call i32 @fetch_skip(i32 1)
%48 = call i32 (...) @prefetch_strlen()
store i32 %48, i32* %2
%49 = load i32, i32* %2
%50 = call i32 @fetch_str(i32 %49)
%51 = call i32 (...) @prefetch_strlen()
store i32 %51, i32* %2
%52 = load i32, i32* %2
%53 = call i32 @fetch_str(i32 %52)
br label %71
54: ; preds = %0
%55 = call i32 @fetch_skip(i32 4)
br label %71
56: ; preds = %0
%57 = call i32 (...) @prefetch_strlen()
store i32 %57, i32* %2
%58 = load i32, i32* %2
%59 = call i32 @fetch_str(i32 %58)
%60 = call i32 (...) @prefetch_strlen()
store i32 %60, i32* %2
%61 = load i32, i32* %2
%62 = call i32 @fetch_str(i32 %61)
%63 = call i32 (...) @prefetch_strlen()
store i32 %63, i32* %2
%64 = load i32, i32* %2
%65 = call i32 @fetch_str(i32 %64)
%66 = call i32 @fetch_skip(i32 1)
br label %71
67: ; preds = %0
%68 = load i32, i32* %1
%69 = call i32 @logprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %68)
%70 = call i32 @assert(i32 0)
br label %71
71: ; preds = %67, %56, %54, %36, %28, %17, %6, %5
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"type = 0x%08x\0A\00"
define void @fetch_skip_message_media_encrypted() {
%1 = tail call i32 (...) @fetch_int()
switch i32 %1, label %47 [
i32 144661578, label %50
i32 846826124, label %2
i32 1290694387, label %10
i32 1619031439, label %18
i32 -1332395189, label %24
i32 893913689, label %37
i32 1485441687, label %39
]
2: ; preds = %0
%3 = tail call i32 (...) @prefetch_strlen()
%4 = tail call i32 @fetch_str(i32 %3)
%5 = tail call i32 @fetch_skip(i32 5)
%6 = tail call i32 (...) @prefetch_strlen()
%7 = tail call i32 @fetch_str(i32 %6)
%8 = tail call i32 (...) @prefetch_strlen()
%9 = tail call i32 @fetch_str(i32 %8)
br label %50
10: ; preds = %0
%11 = tail call i32 (...) @prefetch_strlen()
%12 = tail call i32 @fetch_str(i32 %11)
%13 = tail call i32 @fetch_skip(i32 6)
%14 = tail call i32 (...) @prefetch_strlen()
%15 = tail call i32 @fetch_str(i32 %14)
%16 = tail call i32 (...) @prefetch_strlen()
%17 = tail call i32 @fetch_str(i32 %16)
br label %50
18: ; preds = %0
%19 = tail call i32 @fetch_skip(i32 2)
%20 = tail call i32 (...) @prefetch_strlen()
%21 = tail call i32 @fetch_str(i32 %20)
%22 = tail call i32 (...) @prefetch_strlen()
%23 = tail call i32 @fetch_str(i32 %22)
br label %50
24: ; preds = %0
%25 = tail call i32 (...) @prefetch_strlen()
%26 = tail call i32 @fetch_str(i32 %25)
%27 = tail call i32 @fetch_skip(i32 2)
%28 = tail call i32 (...) @prefetch_strlen()
%29 = tail call i32 @fetch_str(i32 %28)
%30 = tail call i32 (...) @prefetch_strlen()
%31 = tail call i32 @fetch_str(i32 %30)
%32 = tail call i32 @fetch_skip(i32 1)
%33 = tail call i32 (...) @prefetch_strlen()
%34 = tail call i32 @fetch_str(i32 %33)
%35 = tail call i32 (...) @prefetch_strlen()
%36 = tail call i32 @fetch_str(i32 %35)
br label %50
37: ; preds = %0
%38 = tail call i32 @fetch_skip(i32 4)
br label %50
39: ; preds = %0
%40 = tail call i32 (...) @prefetch_strlen()
%41 = tail call i32 @fetch_str(i32 %40)
%42 = tail call i32 (...) @prefetch_strlen()
%43 = tail call i32 @fetch_str(i32 %42)
%44 = tail call i32 (...) @prefetch_strlen()
%45 = tail call i32 @fetch_str(i32 %44)
%46 = tail call i32 @fetch_skip(i32 1)
br label %50
47: ; preds = %0
%48 = tail call i32 @logprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
%49 = tail call i32 @assert(i32 0)
br label %50
50: ; preds = %47, %39, %37, %24, %18, %10, %2, %0
ret void
}