#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((opt_backward_call_ind_dump))(struct ss7 *ss7, int messagetype,
                                  unsigned char *parm, int len) {
  unsigned char a, b, c, d;
  a = parm[0] & 1;
  b = (parm[0] >> 1) & 1;
  c = (parm[0] >> 2) & 1;
  d = (parm[0] >> 3) & 1;
  ss7_message(ss7, "\t\t\tIn-band information indicator: %d\n", a);
  ss7_message(ss7, "\t\t\tCall diversion may occur indicator: %d\n", b);
  ss7_message(ss7, "\t\t\tSimple segmentation indicator: %d\n", c);
  ss7_message(ss7, "\t\t\tMLPP user indicator: %d\n", d);
  return 1;
}


x86 assembly (clang, -O0):
<opt_backward_call_ind_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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    $0x1,%eax
mov    %al,-0x1d(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
sar    $0x1,%eax
and    $0x1,%eax
mov    %al,-0x1e(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
sar    $0x2,%eax
and    $0x1,%eax
mov    %al,-0x1f(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
sar    $0x3,%eax
and    $0x1,%eax
mov    %al,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe92(%rip),%rsi
movzbl -0x1d(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xea4(%rip),%rsi
movzbl -0x1e(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xebb(%rip),%rsi
movzbl -0x1f(%rbp),%edx
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
lea    0xecd(%rip),%rsi
movzbl -0x20(%rbp),%edx
call   1030 <ss7_message@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_backward_call_ind_dump>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movzbl (%rdx),%edx
mov    %edx,%ebx
shr    %bl
and    $0x1,%bl
mov    %edx,%r15d
shr    $0x2,%r15b
and    $0x1,%r15b
mov    %edx,%ebp
shr    $0x3,%ebp
and    $0x1,%ebp
and    $0x1,%edx
lea    0xebf(%rip),%rsi
call   1030 <ss7_message@plt>
movzbl %bl,%edx
lea    0xed6(%rip),%rsi
mov    %r14,%rdi
call   1030 <ss7_message@plt>
movzbl %r15b,%edx
lea    0xeee(%rip),%rsi
mov    %r14,%rdi
call   1030 <ss7_message@plt>
lea    0xf05(%rip),%rsi
mov    %r14,%rdi
mov    %ebp,%edx
call   1030 <ss7_message@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.ss7 = type { i32 }
@.str = [38 x i8] c"\09\09\09In-band information indicator: %d\0A\00"
@.str.1 = [43 x i8] c"\09\09\09Call diversion may occur indicator: %d\0A\00"
@.str.2 = [38 x i8] c"\09\09\09Simple segmentation indicator: %d\0A\00"
@.str.3 = [28 x i8] c"\09\09\09MLPP user indicator: %d\0A\00"
define i32 @opt_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
store %struct.ss7* %0, %struct.ss7** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%13 = load i8*, i8** %7
%14 = getelementptr inbounds i8, i8* %13, i64 0
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = and i32 %16, 1
%18 = trunc i32 %17 to i8
store i8 %18, i8* %9
%19 = load i8*, i8** %7
%20 = getelementptr inbounds i8, i8* %19, i64 0
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = ashr i32 %22, 1
%24 = and i32 %23, 1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %10
%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, 1
%32 = trunc i32 %31 to i8
store i8 %32, i8* %11
%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, 3
%38 = and i32 %37, 1
%39 = trunc i32 %38 to i8
store i8 %39, i8* %12
%40 = load %struct.ss7*, %struct.ss7** %5
%41 = load i8, i8* %9
%42 = call i32 @ss7_message(%struct.ss7* %40, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8 zeroext %41)
%43 = load %struct.ss7*, %struct.ss7** %5
%44 = load i8, i8* %10
%45 = call i32 @ss7_message(%struct.ss7* %43, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %44)
%46 = load %struct.ss7*, %struct.ss7** %5
%47 = load i8, i8* %11
%48 = call i32 @ss7_message(%struct.ss7* %46, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %47)
%49 = load %struct.ss7*, %struct.ss7** %5
%50 = load i8, i8* %12
%51 = call i32 @ss7_message(%struct.ss7* %49, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8 zeroext %50)
ret i32 1
}

LLVM IR (-O2):
%struct.ss7 = type { i32 }
@.str = [38 x i8] c"\09\09\09In-band information indicator: %d\0A\00"
@.str.1 = [43 x i8] c"\09\09\09Call diversion may occur indicator: %d\0A\00"
@.str.2 = [38 x i8] c"\09\09\09Simple segmentation indicator: %d\0A\00"
@.str.3 = [28 x i8] c"\09\09\09MLPP user indicator: %d\0A\00"
define i32 @opt_backward_call_ind_dump(%struct.ss7* %0, i32 %1, i8* nocapture %2, i32 %3) {
%5 = load i8, i8* %2
%6 = and i8 %5, 1
%7 = lshr i8 %5, 1
%8 = and i8 %7, 1
%9 = lshr i8 %5, 2
%10 = and i8 %9, 1
%11 = lshr i8 %5, 3
%12 = and i8 %11, 1
%13 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
%14 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %8)
%15 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8 zeroext %10)
%16 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8 zeroext %12)
ret i32 1
}