#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 *, unsigned char);
int((backward_call_ind_dump))(struct ss7 *ss7, int messagetype,
                              unsigned char *parm, int len) {
  unsigned char ba = parm[0] & 0x3;
  unsigned char dc = (parm[0] >> 2) & 0x3;
  unsigned char fe = (parm[0] >> 4) & 0x3;
  unsigned char hg = (parm[0] >> 6) & 0x3;
  unsigned char i = parm[1] & 0x1;
  unsigned char j = (parm[1] >> 1) & 0x1;
  unsigned char k = (parm[1] >> 2) & 0x1;
  unsigned char l = (parm[1] >> 3) & 0x1;
  unsigned char m = (parm[1] >> 4) & 0x1;
  unsigned char n = (parm[1] >> 5) & 0x1;
  unsigned char pq = (parm[1] >> 7) & 0x3;
  ss7_message(ss7, "\t\t\tCharge indicator: %d\n", ba);
  ss7_message(ss7, "\t\t\tCalled party's status indicator: %d\n", dc);
  ss7_message(ss7, "\t\t\tCalled party's category indicator: %d\n", fe);
  ss7_message(ss7, "\t\t\tEnd to End method indicator: %d\n", hg);
  ss7_message(ss7, "\t\t\tInterworking indicator: %d\n", i);
  ss7_message(ss7, "\t\t\tEnd to End information indicator: %d\n", j);
  ss7_message(ss7, "\t\t\tISDN user part indicator: %d\n", k);
  ss7_message(ss7, "\t\t\tHolding indicator: %d\n", l);
  ss7_message(ss7, "\t\t\tISDN access indicator: %d\n", m);
  ss7_message(ss7, "\t\t\tEcho control device indicator: %d\n", n);
  ss7_message(ss7, "\t\t\tSCCP method indicator: %d\n", pq);
  return 2;
}


x86 assembly (clang, -O0):
<backward_call_ind_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
and    $0x3,%eax
mov    %al,-0x1d(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
sar    $0x2,%eax
and    $0x3,%eax
mov    %al,-0x1e(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
sar    $0x4,%eax
and    $0x3,%eax
mov    %al,-0x1f(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
sar    $0x6,%eax
and    $0x3,%eax
mov    %al,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
and    $0x1,%eax
mov    %al,-0x21(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
sar    $0x1,%eax
and    $0x1,%eax
mov    %al,-0x22(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
sar    $0x2,%eax
and    $0x1,%eax
mov    %al,-0x23(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
sar    $0x3,%eax
and    $0x1,%eax
mov    %al,-0x24(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
sar    $0x4,%eax
and    $0x1,%eax
mov    %al,-0x25(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
sar    $0x5,%eax
and    $0x1,%eax
mov    %al,-0x26(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x1(%rax),%eax
sar    $0x7,%eax
and    $0x3,%eax
mov    %al,-0x27(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe1e(%rip),%rsi
movzbl -0x1d(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xe23(%rip),%rsi
movzbl -0x1e(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xe37(%rip),%rsi
movzbl -0x1f(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xe4d(%rip),%rsi
movzbl -0x20(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xe5d(%rip),%rsi
movzbl -0x21(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xe68(%rip),%rsi
movzbl -0x22(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xe7d(%rip),%rsi
movzbl -0x23(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xe8a(%rip),%rsi
movzbl -0x24(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xe90(%rip),%rsi
movzbl -0x25(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xe9a(%rip),%rsi
movzbl -0x26(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xeac(%rip),%rsi
movzbl -0x27(%rbp),%edx
call   1030 <ss7_message@plt>
mov    $0x2,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backward_call_ind_dump>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%rax
mov    %rdi,%rbx
movzbl (%rdx),%edx
mov    %edx,%r12d
shr    $0x2,%r12b
and    $0x3,%r12b
mov    %edx,%r15d
shr    $0x4,%r15d
and    $0x3,%r15d
mov    %edx,%ecx
shr    $0x6,%cl
mov    %cl,(%rsp)
movzbl 0x1(%rax),%ebp
mov    %ebp,%r13d
shr    %r13b
and    $0x1,%r13b
mov    %ebp,%r14d
shr    $0x2,%r14b
and    $0x1,%r14b
mov    %ebp,%eax
shr    $0x3,%al
and    $0x1,%al
mov    %al,0x1(%rsp)
mov    %ebp,%eax
shr    $0x4,%al
and    $0x1,%al
mov    %al,0x2(%rsp)
mov    %ebp,%eax
shr    $0x5,%eax
and    $0x1,%eax
mov    %eax,0x4(%rsp)
mov    %ebp,%eax
shr    $0x7,%al
mov    %al,0x3(%rsp)
and    $0x3,%edx
lea    0xe70(%rip),%rsi
call   1030 <ss7_message@plt>
movzbl %r12b,%edx
lea    0xe79(%rip),%rsi
mov    %rbx,%rdi
call   1030 <ss7_message@plt>
lea    0xe92(%rip),%rsi
mov    %rbx,%rdi
mov    %r15d,%edx
call   1030 <ss7_message@plt>
movzbl (%rsp),%edx
lea    0xea6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <ss7_message@plt>
and    $0x1,%ebp
lea    0xeb8(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <ss7_message@plt>
movzbl %r13b,%edx
lea    0xec2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <ss7_message@plt>
movzbl %r14b,%edx
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <ss7_message@plt>
movzbl 0x1(%rsp),%edx
lea    0xee5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <ss7_message@plt>
movzbl 0x2(%rsp),%edx
lea    0xeeb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <ss7_message@plt>
lea    0xefa(%rip),%rsi
mov    %rbx,%rdi
mov    0x4(%rsp),%edx
call   1030 <ss7_message@plt>
movzbl 0x3(%rsp),%edx
lea    0xf08(%rip),%rsi
mov    %rbx,%rdi
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 = [25 x i8] c"\09\09\09Charge indicator: %d\0A\00"
@.str.1 = [40 x i8] c"\09\09\09Called party's status indicator: %d\0A\00"
@.str.2 = [42 x i8] c"\09\09\09Called party's category indicator: %d\0A\00"
@.str.3 = [36 x i8] c"\09\09\09End to End method indicator: %d\0A\00"
@.str.4 = [31 x i8] c"\09\09\09Interworking indicator: %d\0A\00"
@.str.5 = [41 x i8] c"\09\09\09End to End information indicator: %d\0A\00"
@.str.6 = [33 x i8] c"\09\09\09ISDN user part indicator: %d\0A\00"
@.str.7 = [26 x i8] c"\09\09\09Holding indicator: %d\0A\00"
@.str.8 = [30 x i8] c"\09\09\09ISDN access indicator: %d\0A\00"
@.str.9 = [38 x i8] c"\09\09\09Echo control device indicator: %d\0A\00"
@.str.10 = [30 x i8] c"\09\09\09SCCP method indicator: %d\0A\00"
define i32 @backward_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
%12 = alloca i8
%13 = alloca i8
%14 = alloca i8
%15 = alloca i8
%16 = alloca i8
%17 = alloca i8
%18 = alloca i8
%19 = alloca i8
store %struct.ss7* %0, %struct.ss7** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%20 = load i8*, i8** %7
%21 = getelementptr inbounds i8, i8* %20, i64 0
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = and i32 %23, 3
%25 = trunc i32 %24 to i8
store i8 %25, i8* %9
%26 = load i8*, i8** %7
%27 = getelementptr inbounds i8, i8* %26, i64 0
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = ashr i32 %29, 2
%31 = and i32 %30, 3
%32 = trunc i32 %31 to i8
store i8 %32, i8* %10
%33 = load i8*, i8** %7
%34 = getelementptr inbounds i8, i8* %33, i64 0
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = ashr i32 %36, 4
%38 = and i32 %37, 3
%39 = trunc i32 %38 to i8
store i8 %39, i8* %11
%40 = load i8*, i8** %7
%41 = getelementptr inbounds i8, i8* %40, i64 0
%42 = load i8, i8* %41
%43 = zext i8 %42 to i32
%44 = ashr i32 %43, 6
%45 = and i32 %44, 3
%46 = trunc i32 %45 to i8
store i8 %46, i8* %12
%47 = load i8*, i8** %7
%48 = getelementptr inbounds i8, i8* %47, i64 1
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = and i32 %50, 1
%52 = trunc i32 %51 to i8
store i8 %52, i8* %13
%53 = load i8*, i8** %7
%54 = getelementptr inbounds i8, i8* %53, i64 1
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = ashr i32 %56, 1
%58 = and i32 %57, 1
%59 = trunc i32 %58 to i8
store i8 %59, i8* %14
%60 = load i8*, i8** %7
%61 = getelementptr inbounds i8, i8* %60, i64 1
%62 = load i8, i8* %61
%63 = zext i8 %62 to i32
%64 = ashr i32 %63, 2
%65 = and i32 %64, 1
%66 = trunc i32 %65 to i8
store i8 %66, i8* %15
%67 = load i8*, i8** %7
%68 = getelementptr inbounds i8, i8* %67, i64 1
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = ashr i32 %70, 3
%72 = and i32 %71, 1
%73 = trunc i32 %72 to i8
store i8 %73, i8* %16
%74 = load i8*, i8** %7
%75 = getelementptr inbounds i8, i8* %74, i64 1
%76 = load i8, i8* %75
%77 = zext i8 %76 to i32
%78 = ashr i32 %77, 4
%79 = and i32 %78, 1
%80 = trunc i32 %79 to i8
store i8 %80, i8* %17
%81 = load i8*, i8** %7
%82 = getelementptr inbounds i8, i8* %81, i64 1
%83 = load i8, i8* %82
%84 = zext i8 %83 to i32
%85 = ashr i32 %84, 5
%86 = and i32 %85, 1
%87 = trunc i32 %86 to i8
store i8 %87, i8* %18
%88 = load i8*, i8** %7
%89 = getelementptr inbounds i8, i8* %88, i64 1
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = ashr i32 %91, 7
%93 = and i32 %92, 3
%94 = trunc i32 %93 to i8
store i8 %94, i8* %19
%95 = load %struct.ss7*, %struct.ss7** %5
%96 = load i8, i8* %9
%97 = call i32 @ss7_message(%struct.ss7* %95, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8 zeroext %96)
%98 = load %struct.ss7*, %struct.ss7** %5
%99 = load i8, i8* %10
%100 = call i32 @ss7_message(%struct.ss7* %98, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %99)
%101 = load %struct.ss7*, %struct.ss7** %5
%102 = load i8, i8* %11
%103 = call i32 @ss7_message(%struct.ss7* %101, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %102)
%104 = load %struct.ss7*, %struct.ss7** %5
%105 = load i8, i8* %12
%106 = call i32 @ss7_message(%struct.ss7* %104, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8 zeroext %105)
%107 = load %struct.ss7*, %struct.ss7** %5
%108 = load i8, i8* %13
%109 = call i32 @ss7_message(%struct.ss7* %107, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8 zeroext %108)
%110 = load %struct.ss7*, %struct.ss7** %5
%111 = load i8, i8* %14
%112 = call i32 @ss7_message(%struct.ss7* %110, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8 zeroext %111)
%113 = load %struct.ss7*, %struct.ss7** %5
%114 = load i8, i8* %15
%115 = call i32 @ss7_message(%struct.ss7* %113, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8 zeroext %114)
%116 = load %struct.ss7*, %struct.ss7** %5
%117 = load i8, i8* %16
%118 = call i32 @ss7_message(%struct.ss7* %116, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i8 zeroext %117)
%119 = load %struct.ss7*, %struct.ss7** %5
%120 = load i8, i8* %17
%121 = call i32 @ss7_message(%struct.ss7* %119, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i8 zeroext %120)
%122 = load %struct.ss7*, %struct.ss7** %5
%123 = load i8, i8* %18
%124 = call i32 @ss7_message(%struct.ss7* %122, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0), i8 zeroext %123)
%125 = load %struct.ss7*, %struct.ss7** %5
%126 = load i8, i8* %19
%127 = call i32 @ss7_message(%struct.ss7* %125, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), i8 zeroext %126)
ret i32 2
}

LLVM IR (-O2):
%struct.ss7 = type { i32 }
@.str = [25 x i8] c"\09\09\09Charge indicator: %d\0A\00"
@.str.1 = [40 x i8] c"\09\09\09Called party's status indicator: %d\0A\00"
@.str.2 = [42 x i8] c"\09\09\09Called party's category indicator: %d\0A\00"
@.str.3 = [36 x i8] c"\09\09\09End to End method indicator: %d\0A\00"
@.str.4 = [31 x i8] c"\09\09\09Interworking indicator: %d\0A\00"
@.str.5 = [41 x i8] c"\09\09\09End to End information indicator: %d\0A\00"
@.str.6 = [33 x i8] c"\09\09\09ISDN user part indicator: %d\0A\00"
@.str.7 = [26 x i8] c"\09\09\09Holding indicator: %d\0A\00"
@.str.8 = [30 x i8] c"\09\09\09ISDN access indicator: %d\0A\00"
@.str.9 = [38 x i8] c"\09\09\09Echo control device indicator: %d\0A\00"
@.str.10 = [30 x i8] c"\09\09\09SCCP method indicator: %d\0A\00"
define i32 @backward_call_ind_dump(%struct.ss7* %0, i32 %1, i8* nocapture %2, i32 %3) {
%5 = load i8, i8* %2
%6 = and i8 %5, 3
%7 = lshr i8 %5, 2
%8 = and i8 %7, 3
%9 = lshr i8 %5, 4
%10 = and i8 %9, 3
%11 = lshr i8 %5, 6
%12 = getelementptr inbounds i8, i8* %2, i64 1
%13 = load i8, i8* %12
%14 = and i8 %13, 1
%15 = lshr i8 %13, 1
%16 = and i8 %15, 1
%17 = lshr i8 %13, 2
%18 = and i8 %17, 1
%19 = lshr i8 %13, 3
%20 = and i8 %19, 1
%21 = lshr i8 %13, 4
%22 = and i8 %21, 1
%23 = lshr i8 %13, 5
%24 = and i8 %23, 1
%25 = lshr i8 %13, 7
%26 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
%27 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %8)
%28 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %10)
%29 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8 zeroext %11)
%30 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8 zeroext %14)
%31 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i8 zeroext %16)
%32 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8 zeroext %18)
%33 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i8 zeroext %20)
%34 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i8 zeroext %22)
%35 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0), i8 zeroext %24)
%36 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), i8 zeroext %25)
ret i32 2
}