#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 */
struct ss7 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ss7_message(struct ss7 *, char *, ...);
int((forward_call_ind_dump))(struct ss7 *ss7, int messagetype,
                             unsigned char *parm, int len) {
  char *cb_str, *hg_str, *kj_str;
  cb_str = hg_str = kj_str = "";
  switch ((parm[0] >> 1) & 3) {
  case 0:
    cb_str = "no end-to-end";
    break;
  case 1:
    cb_str = "pass-along";
    break;
  case 2:
    cb_str = "SCCP";
    break;
  case 3:
    cb_str = "pass-along and SCCP";
    break;
  }
  switch ((parm[0] >> 6) & 3) {
  case 0:
    hg_str = "ISDN user part preferred all the way";
    break;
  case 1:
    hg_str = "ISDN user part not preferred all the way";
    break;
  case 2:
    hg_str = "ISDN user part required all the way";
    break;
  case 3:
    hg_str = "spare";
    break;
  }
  switch ((parm[1] >> 1) & 3) {
  case 0:
    kj_str = "no indication";
    break;
  case 1:
    kj_str = "connectionless method available";
    break;
  case 2:
    kj_str = "connection oriented method available";
    break;
  case 3:
    kj_str = "connectionless and connection oriented method available";
    break;
  }
  ss7_message(ss7,
              "\t\t\tNat/Intl Call Ind: call to be treated as a %s call (%d)\n",
              (parm[0] & 1) ? "international" : "national", parm[0] & 1);
  ss7_message(ss7, "\t\t\tEnd to End Method Ind: %s method(s) available (%d)\n",
              cb_str, (parm[0] >> 1) & 3);
  ss7_message(ss7, "\t\t\tInterworking Ind: %sinterworking encountered (%d)\n",
              ((parm[0] >> 3) & 1) ? "" : "no ", (parm[0] >> 3) & 1);
  ss7_message(
      ss7,
      "\t\t\tEnd to End Info Ind: %send-to-end information available (%d)\n",
      ((parm[0] >> 4) & 1) ? "" : "no ", (parm[0] >> 4) & 1);
  ss7_message(
      ss7, "\t\t\tISDN User Part Ind: ISDN user part %sused all the way (%d)\n",
      ((parm[0] >> 5) & 1) ? "" : "not ", (parm[0] >> 5) & 1);
  ss7_message(ss7, "\t\t\tISDN User Part Pref Ind: %s (%d)\n", hg_str,
              (parm[0] >> 6) & 3);
  ss7_message(ss7, "\t\t\tISDN Access Ind: originating access %s (%d)\n",
              (parm[1] & 1) ? "ISDN" : "non-ISDN", parm[1] & 1);
  ss7_message(ss7, "\t\t\tSCCP Method Ind: %s (%d)\n", kj_str,
              (parm[1] >> 1) & 3);
  ss7_message(ss7, "\t\t\tP-M bits(%d) P: %d O: %d N: %d M: %d\n",
              (parm[1] & 0xf0), ((parm[1] >> 7) & 0x1), ((parm[1] >> 6) & 0x1),
              ((parm[1] >> 5) & 0x1), ((parm[1] >> 4) & 0x1));
  return 2;
}


x86 assembly (clang, -O0):
<forward_call_ind_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0x10c4(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    %rax,-0x30(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
shr    %eax
and    $0x3,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0x3,%eax
ja     11a3 <forward_call_ind_dump+0x93>
mov    -0x40(%rbp),%rax
lea    0xea1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec1(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    11a3 <forward_call_ind_dump+0x93>
lea    0xebf(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    11a3 <forward_call_ind_dump+0x93>
lea    0xec9(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    11a3 <forward_call_ind_dump+0x93>
lea    0xeaa(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
shr    $0x6,%eax
mov    %eax,%ecx
mov    %rcx,-0x48(%rbp)
sub    $0x3,%eax
ja     120b <forward_call_ind_dump+0xfb>
mov    -0x48(%rbp),%rax
lea    0xe49(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe86(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    120b <forward_call_ind_dump+0xfb>
lea    0xe9b(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    120b <forward_call_ind_dump+0xfb>
lea    0xeb4(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    120b <forward_call_ind_dump+0xfb>
lea    0xec8(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
shr    %eax
and    $0x3,%eax
mov    %eax,%ecx
mov    %rcx,-0x50(%rbp)
sub    $0x3,%eax
ja     1276 <forward_call_ind_dump+0x166>
mov    -0x50(%rbp),%rax
lea    0xdee(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe93(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    1276 <forward_call_ind_dump+0x166>
lea    0xe91(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    1276 <forward_call_ind_dump+0x166>
lea    0xeb4(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    1276 <forward_call_ind_dump+0x166>
lea    0xe91(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    $0x1,%ecx
lea    0xef1(%rip),%rdx
lea    0xee5(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    $0x1,%ecx
lea    0xe91(%rip),%rsi
mov    $0x0,%al
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
sar    $0x1,%ecx
and    $0x3,%ecx
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
sar    $0x3,%ecx
and    $0x1,%ecx
lea    0xf06(%rip),%rdx
lea    0xefe(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
sar    $0x3,%ecx
and    $0x1,%ecx
lea    0xeae(%rip),%rsi
mov    $0x0,%al
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
sar    $0x4,%ecx
and    $0x1,%ecx
lea    0xec5(%rip),%rdx
lea    0xebd(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
sar    $0x4,%ecx
and    $0x1,%ecx
lea    0xea7(%rip),%rsi
mov    $0x0,%al
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
sar    $0x5,%ecx
and    $0x1,%ecx
lea    0xf08(%rip),%rdx
lea    0xe7c(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
sar    $0x5,%ecx
and    $0x1,%ecx
lea    0xea7(%rip),%rsi
mov    $0x0,%al
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
sar    $0x6,%ecx
and    $0x3,%ecx
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%ecx
and    $0x1,%ecx
lea    0xf00(%rip),%rdx
lea    0xefd(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%ecx
and    $0x1,%ecx
lea    0xeb0(%rip),%rsi
mov    $0x0,%al
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%ecx
sar    $0x1,%ecx
and    $0x3,%ecx
lea    0xec5(%rip),%rsi
mov    $0x0,%al
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%edx
and    $0xf0,%edx
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%ecx
sar    $0x7,%ecx
and    $0x1,%ecx
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%r8d
sar    $0x6,%r8d
and    $0x1,%r8d
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%r9d
sar    $0x5,%r9d
and    $0x1,%r9d
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
sar    $0x4,%eax
and    $0x1,%eax
lea    0xe84(%rip),%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <ss7_message@plt>
mov    $0x2,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forward_call_ind_dump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%rbp
mov    %rdi,%r14
movzbl (%rdx),%ecx
mov    %ecx,%eax
shr    $0x4,%eax
mov    %ecx,%edx
and    $0x6,%edx
lea    0x11bb(%rip),%rsi
movslq (%rsi,%rdx,2),%r13
add    %rsi,%r13
and    $0xfffffffc,%eax
lea    0x11ca(%rip),%rdx
movslq (%rax,%rdx,1),%r12
add    %rdx,%r12
movzbl 0x1(%rbp),%eax
and    $0x6,%eax
lea    0x11a5(%rip),%rdx
movslq (%rdx,%rax,2),%r15
add    %rdx,%r15
and    $0x1,%ecx
lea    0xfe0(%rip),%rax
lea    0xfd4(%rip),%rdx
cmove  %rax,%rdx
lea    0xf8d(%rip),%rsi
xor    %eax,%eax
call   1030 <ss7_message@plt>
movzbl 0x0(%rbp),%ecx
shr    %ecx
and    $0x3,%ecx
lea    0xfc0(%rip),%rsi
mov    %r14,%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   1030 <ss7_message@plt>
movzbl 0x0(%rbp),%ecx
shr    $0x3,%ecx
and    $0x1,%ecx
lea    0x100f(%rip),%rbx
lea    0x1007(%rip),%r13
mov    %r13,%rdx
cmove  %rbx,%rdx
lea    0xfc4(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <ss7_message@plt>
movzbl 0x0(%rbp),%ecx
shr    $0x4,%ecx
and    $0x1,%ecx
cmovne %r13,%rbx
lea    0xfdf(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <ss7_message@plt>
movzbl 0x0(%rbp),%ecx
shr    $0x5,%ecx
and    $0x1,%ecx
lea    0x1041(%rip),%rdx
cmovne %r13,%rdx
lea    0xff7(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <ss7_message@plt>
movzbl 0x0(%rbp),%ecx
shr    $0x6,%ecx
lea    0x1023(%rip),%rsi
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1030 <ss7_message@plt>
movzbl 0x1(%rbp),%ecx
and    $0x1,%ecx
lea    0x105d(%rip),%rax
lea    0x105a(%rip),%rdx
cmove  %rax,%rdx
lea    0x101b(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <ss7_message@plt>
movzbl 0x1(%rbp),%ecx
shr    %ecx
and    $0x3,%ecx
lea    0x103a(%rip),%rsi
mov    %r14,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <ss7_message@plt>
movzbl 0x1(%rbp),%eax
mov    %eax,%edx
and    $0xfffffff0,%edx
mov    %eax,%ecx
shr    $0x7,%ecx
mov    %eax,%r8d
shr    $0x6,%r8d
and    $0x1,%r8d
mov    %eax,%r9d
shr    $0x5,%r9d
and    $0x1,%r9d
shr    $0x4,%eax
and    $0x1,%eax
mov    %eax,(%rsp)
lea    0x1016(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <ss7_message@plt>
mov    $0x2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.ss7 = type { i32 }
@.str = [1 x i8] zeroinitializer
@.str.1 = [14 x i8] c"no end-to-end\00"
@.str.2 = [11 x i8] c"pass-along\00"
@.str.3 = [5 x i8] c"SCCP\00"
@.str.4 = [20 x i8] c"pass-along and SCCP\00"
@.str.5 = [37 x i8] c"ISDN user part preferred all the way\00"
@.str.6 = [41 x i8] c"ISDN user part not preferred all the way\00"
@.str.7 = [36 x i8] c"ISDN user part required all the way\00"
@.str.8 = [6 x i8] c"spare\00"
@.str.9 = [14 x i8] c"no indication\00"
@.str.10 = [32 x i8] c"connectionless method available\00"
@.str.11 = [37 x i8] c"connection oriented method available\00"
@.str.12 = [56 x i8] c"connectionless and connection oriented method available\00"
@.str.13 = [60 x i8] c"\09\09\09Nat/Intl Call Ind: call to be treated as a %s call (%d)\0A\00"
@.str.14 = [14 x i8] c"international\00"
@.str.15 = [9 x i8] c"national\00"
@.str.16 = [55 x i8] c"\09\09\09End to End Method Ind: %s method(s) available (%d)\0A\00"
@.str.17 = [54 x i8] c"\09\09\09Interworking Ind: %sinterworking encountered (%d)\0A\00"
@.str.18 = [4 x i8] c"no \00"
@.str.19 = [65 x i8] c"\09\09\09End to End Info Ind: %send-to-end information available (%d)\0A\00"
@.str.20 = [63 x i8] c"\09\09\09ISDN User Part Ind: ISDN user part %sused all the way (%d)\0A\00"
@.str.21 = [5 x i8] c"not \00"
@.str.22 = [37 x i8] c"\09\09\09ISDN User Part Pref Ind: %s (%d)\0A\00"
@.str.23 = [48 x i8] c"\09\09\09ISDN Access Ind: originating access %s (%d)\0A\00"
@.str.24 = [5 x i8] c"ISDN\00"
@.str.25 = [9 x i8] c"non-ISDN\00"
@.str.26 = [29 x i8] c"\09\09\09SCCP Method Ind: %s (%d)\0A\00"
@.str.27 = [41 x i8] c"\09\09\09P-M bits(%d) P: %d O: %d N: %d M: %d\0A\00"
define i32 @forward_call_ind_dump(%struct.ss7* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca %struct.ss7*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
store %struct.ss7* %0, %struct.ss7** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %11
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %10
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %9
%12 = load i8*, i8** %7
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = ashr i32 %15, 1
%17 = and i32 %16, 3
switch i32 %17, label %22 [
i32 0, label %18
i32 1, label %19
i32 2, label %20
i32 3, label %21
]
18: ; preds = %4
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8** %9
br label %22
19: ; preds = %4
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8** %9
br label %22
20: ; preds = %4
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %9
br label %22
21: ; preds = %4
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8** %9
br label %22
22: ; preds = %4, %21, %20, %19, %18
%23 = load i8*, i8** %7
%24 = getelementptr inbounds i8, i8* %23, i64 0
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = ashr i32 %26, 6
%28 = and i32 %27, 3
switch i32 %28, label %33 [
i32 0, label %29
i32 1, label %30
i32 2, label %31
i32 3, label %32
]
29: ; preds = %22
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i8** %10
br label %33
30: ; preds = %22
store i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), i8** %10
br label %33
31: ; preds = %22
store i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0), i8** %10
br label %33
32: ; preds = %22
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8** %10
br label %33
33: ; preds = %22, %32, %31, %30, %29
%34 = load i8*, i8** %7
%35 = getelementptr inbounds i8, i8* %34, i64 1
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = ashr i32 %37, 1
%39 = and i32 %38, 3
switch i32 %39, label %44 [
i32 0, label %40
i32 1, label %41
i32 2, label %42
i32 3, label %43
]
40: ; preds = %33
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i8** %11
br label %44
41: ; preds = %33
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i8** %11
br label %44
42: ; preds = %33
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.11, i64 0, i64 0), i8** %11
br label %44
43: ; preds = %33
store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.12, i64 0, i64 0), i8** %11
br label %44
44: ; preds = %33, %43, %42, %41, %40
%45 = load %struct.ss7*, %struct.ss7** %5
%46 = load i8*, i8** %7
%47 = getelementptr inbounds i8, i8* %46, i64 0
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = and i32 %49, 1
%51 = icmp ne i32 %50, 0
%52 = zext i1 %51 to i64
%53 = select i1 %51, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0)
%54 = load i8*, i8** %7
%55 = getelementptr inbounds i8, i8* %54, i64 0
%56 = load i8, i8* %55
%57 = zext i8 %56 to i32
%58 = and i32 %57, 1
%59 = call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %45, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.13, i64 0, i64 0), i8* %53, i32 %58)
%60 = load %struct.ss7*, %struct.ss7** %5
%61 = load i8*, i8** %9
%62 = load i8*, i8** %7
%63 = getelementptr inbounds i8, i8* %62, i64 0
%64 = load i8, i8* %63
%65 = zext i8 %64 to i32
%66 = ashr i32 %65, 1
%67 = and i32 %66, 3
%68 = call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %60, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.16, i64 0, i64 0), i8* %61, i32 %67)
%69 = load %struct.ss7*, %struct.ss7** %5
%70 = load i8*, i8** %7
%71 = getelementptr inbounds i8, i8* %70, i64 0
%72 = load i8, i8* %71
%73 = zext i8 %72 to i32
%74 = ashr i32 %73, 3
%75 = and i32 %74, 1
%76 = icmp ne i32 %75, 0
%77 = zext i1 %76 to i64
%78 = select i1 %76, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0)
%79 = load i8*, i8** %7
%80 = getelementptr inbounds i8, i8* %79, i64 0
%81 = load i8, i8* %80
%82 = zext i8 %81 to i32
%83 = ashr i32 %82, 3
%84 = and i32 %83, 1
%85 = call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %69, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.17, i64 0, i64 0), i8* %78, i32 %84)
%86 = load %struct.ss7*, %struct.ss7** %5
%87 = load i8*, i8** %7
%88 = getelementptr inbounds i8, i8* %87, i64 0
%89 = load i8, i8* %88
%90 = zext i8 %89 to i32
%91 = ashr i32 %90, 4
%92 = and i32 %91, 1
%93 = icmp ne i32 %92, 0
%94 = zext i1 %93 to i64
%95 = select i1 %93, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0)
%96 = load i8*, i8** %7
%97 = getelementptr inbounds i8, i8* %96, i64 0
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = ashr i32 %99, 4
%101 = and i32 %100, 1
%102 = call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %86, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.19, i64 0, i64 0), i8* %95, i32 %101)
%103 = load %struct.ss7*, %struct.ss7** %5
%104 = load i8*, i8** %7
%105 = getelementptr inbounds i8, i8* %104, i64 0
%106 = load i8, i8* %105
%107 = zext i8 %106 to i32
%108 = ashr i32 %107, 5
%109 = and i32 %108, 1
%110 = icmp ne i32 %109, 0
%111 = zext i1 %110 to i64
%112 = select i1 %110, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0)
%113 = load i8*, i8** %7
%114 = getelementptr inbounds i8, i8* %113, i64 0
%115 = load i8, i8* %114
%116 = zext i8 %115 to i32
%117 = ashr i32 %116, 5
%118 = and i32 %117, 1
%119 = call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %103, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.20, i64 0, i64 0), i8* %112, i32 %118)
%120 = load %struct.ss7*, %struct.ss7** %5
%121 = load i8*, i8** %10
%122 = load i8*, i8** %7
%123 = getelementptr inbounds i8, i8* %122, i64 0
%124 = load i8, i8* %123
%125 = zext i8 %124 to i32
%126 = ashr i32 %125, 6
%127 = and i32 %126, 3
%128 = call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %120, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.22, i64 0, i64 0), i8* %121, i32 %127)
%129 = load %struct.ss7*, %struct.ss7** %5
%130 = load i8*, i8** %7
%131 = getelementptr inbounds i8, i8* %130, i64 1
%132 = load i8, i8* %131
%133 = zext i8 %132 to i32
%134 = and i32 %133, 1
%135 = icmp ne i32 %134, 0
%136 = zext i1 %135 to i64
%137 = select i1 %135, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.25, i64 0, i64 0)
%138 = load i8*, i8** %7
%139 = getelementptr inbounds i8, i8* %138, i64 1
%140 = load i8, i8* %139
%141 = zext i8 %140 to i32
%142 = and i32 %141, 1
%143 = call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %129, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.23, i64 0, i64 0), i8* %137, i32 %142)
%144 = load %struct.ss7*, %struct.ss7** %5
%145 = load i8*, i8** %11
%146 = load i8*, i8** %7
%147 = getelementptr inbounds i8, i8* %146, i64 1
%148 = load i8, i8* %147
%149 = zext i8 %148 to i32
%150 = ashr i32 %149, 1
%151 = and i32 %150, 3
%152 = call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %144, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.26, i64 0, i64 0), i8* %145, i32 %151)
%153 = load %struct.ss7*, %struct.ss7** %5
%154 = load i8*, i8** %7
%155 = getelementptr inbounds i8, i8* %154, i64 1
%156 = load i8, i8* %155
%157 = zext i8 %156 to i32
%158 = and i32 %157, 240
%159 = load i8*, i8** %7
%160 = getelementptr inbounds i8, i8* %159, i64 1
%161 = load i8, i8* %160
%162 = zext i8 %161 to i32
%163 = ashr i32 %162, 7
%164 = and i32 %163, 1
%165 = load i8*, i8** %7
%166 = getelementptr inbounds i8, i8* %165, i64 1
%167 = load i8, i8* %166
%168 = zext i8 %167 to i32
%169 = ashr i32 %168, 6
%170 = and i32 %169, 1
%171 = load i8*, i8** %7
%172 = getelementptr inbounds i8, i8* %171, i64 1
%173 = load i8, i8* %172
%174 = zext i8 %173 to i32
%175 = ashr i32 %174, 5
%176 = and i32 %175, 1
%177 = load i8*, i8** %7
%178 = getelementptr inbounds i8, i8* %177, i64 1
%179 = load i8, i8* %178
%180 = zext i8 %179 to i32
%181 = ashr i32 %180, 4
%182 = and i32 %181, 1
%183 = call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %153, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.27, i64 0, i64 0), i32 %158, i32 %164, i32 %170, i32 %176, i32 %182)
ret i32 2
}

LLVM IR (-O2):
%struct.ss7 = type { i32 }
@.str = [1 x i8] zeroinitializer
@.str.1 = [14 x i8] c"no end-to-end\00"
@.str.2 = [11 x i8] c"pass-along\00"
@.str.3 = [5 x i8] c"SCCP\00"
@.str.4 = [20 x i8] c"pass-along and SCCP\00"
@.str.5 = [37 x i8] c"ISDN user part preferred all the way\00"
@.str.6 = [41 x i8] c"ISDN user part not preferred all the way\00"
@.str.7 = [36 x i8] c"ISDN user part required all the way\00"
@.str.8 = [6 x i8] c"spare\00"
@.str.9 = [14 x i8] c"no indication\00"
@.str.10 = [32 x i8] c"connectionless method available\00"
@.str.11 = [37 x i8] c"connection oriented method available\00"
@.str.12 = [56 x i8] c"connectionless and connection oriented method available\00"
@.str.13 = [60 x i8] c"\09\09\09Nat/Intl Call Ind: call to be treated as a %s call (%d)\0A\00"
@.str.14 = [14 x i8] c"international\00"
@.str.15 = [9 x i8] c"national\00"
@.str.16 = [55 x i8] c"\09\09\09End to End Method Ind: %s method(s) available (%d)\0A\00"
@.str.17 = [54 x i8] c"\09\09\09Interworking Ind: %sinterworking encountered (%d)\0A\00"
@.str.18 = [4 x i8] c"no \00"
@.str.19 = [65 x i8] c"\09\09\09End to End Info Ind: %send-to-end information available (%d)\0A\00"
@.str.20 = [63 x i8] c"\09\09\09ISDN User Part Ind: ISDN user part %sused all the way (%d)\0A\00"
@.str.21 = [5 x i8] c"not \00"
@.str.22 = [37 x i8] c"\09\09\09ISDN User Part Pref Ind: %s (%d)\0A\00"
@.str.23 = [48 x i8] c"\09\09\09ISDN Access Ind: originating access %s (%d)\0A\00"
@.str.24 = [5 x i8] c"ISDN\00"
@.str.25 = [9 x i8] c"non-ISDN\00"
@.str.26 = [29 x i8] c"\09\09\09SCCP Method Ind: %s (%d)\0A\00"
@.str.27 = [41 x i8] c"\09\09\09P-M bits(%d) P: %d O: %d N: %d M: %d\0A\00"
@reltable.forward_call_ind_dump = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.4 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump to i64)) to i32)]
@reltable.forward_call_ind_dump.30 = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.9 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump.30 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([32 x i8]* @.str.10 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump.30 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([37 x i8]* @.str.11 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump.30 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([56 x i8]* @.str.12 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump.30 to i64)) to i32)]
@reltable.forward_call_ind_dump.31 = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([37 x i8]* @.str.5 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump.31 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([41 x i8]* @.str.6 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump.31 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([36 x i8]* @.str.7 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump.31 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.8 to i64), i64 ptrtoint ([4 x i32]* @reltable.forward_call_ind_dump.31 to i64)) to i32)]
define i32 @forward_call_ind_dump(%struct.ss7* %0, i32 %1, i8* nocapture %2, i32 %3) {
%5 = load i8, i8* %2
%6 = lshr i8 %5, 1
%7 = and i8 %6, 3
%8 = zext i8 %7 to i64
%9 = shl i64 %8, 2
%10 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.forward_call_ind_dump to i8*), i64 %9)
%11 = lshr i8 %5, 6
%12 = zext i8 %11 to i64
%13 = shl i64 %12, 2
%14 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.forward_call_ind_dump.31 to i8*), i64 %13)
%15 = getelementptr inbounds i8, i8* %2, i64 1
%16 = load i8, i8* %15
%17 = lshr i8 %16, 1
%18 = and i8 %17, 3
%19 = zext i8 %18 to i64
%20 = shl i64 %19, 2
%21 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.forward_call_ind_dump.30 to i8*), i64 %20)
%22 = and i8 %5, 1
%23 = zext i8 %22 to i32
%24 = icmp eq i8 %22, 0
%25 = select i1 %24, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0)
%26 = tail call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.13, i64 0, i64 0), i8* %25, i32 %23)
%27 = load i8, i8* %2
%28 = lshr i8 %27, 1
%29 = and i8 %28, 3
%30 = zext i8 %29 to i32
%31 = tail call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.16, i64 0, i64 0), i8* %10, i32 %30)
%32 = load i8, i8* %2
%33 = lshr i8 %32, 3
%34 = and i8 %33, 1
%35 = zext i8 %34 to i32
%36 = icmp eq i8 %34, 0
%37 = select i1 %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
%38 = tail call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.17, i64 0, i64 0), i8* %37, i32 %35)
%39 = load i8, i8* %2
%40 = lshr i8 %39, 4
%41 = and i8 %40, 1
%42 = zext i8 %41 to i32
%43 = icmp eq i8 %41, 0
%44 = select i1 %43, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
%45 = tail call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.19, i64 0, i64 0), i8* %44, i32 %42)
%46 = load i8, i8* %2
%47 = lshr i8 %46, 5
%48 = and i8 %47, 1
%49 = zext i8 %48 to i32
%50 = icmp eq i8 %48, 0
%51 = select i1 %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
%52 = tail call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.20, i64 0, i64 0), i8* %51, i32 %49)
%53 = load i8, i8* %2
%54 = lshr i8 %53, 6
%55 = zext i8 %54 to i32
%56 = tail call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.22, i64 0, i64 0), i8* %14, i32 %55)
%57 = load i8, i8* %15
%58 = and i8 %57, 1
%59 = zext i8 %58 to i32
%60 = icmp eq i8 %58, 0
%61 = select i1 %60, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0)
%62 = tail call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.23, i64 0, i64 0), i8* %61, i32 %59)
%63 = load i8, i8* %15
%64 = lshr i8 %63, 1
%65 = and i8 %64, 3
%66 = zext i8 %65 to i32
%67 = tail call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.26, i64 0, i64 0), i8* %21, i32 %66)
%68 = load i8, i8* %15
%69 = zext i8 %68 to i32
%70 = and i32 %69, 240
%71 = lshr i32 %69, 7
%72 = lshr i32 %69, 6
%73 = and i32 %72, 1
%74 = lshr i32 %69, 5
%75 = and i32 %74, 1
%76 = lshr i32 %69, 4
%77 = and i32 %76, 1
%78 = tail call i32 (%struct.ss7*, i8*, ...) @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.27, i64 0, i64 0), i32 %70, i32 %71, i32 %73, i32 %75, i32 %77)
ret i32 2
}