#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 *, char *);
int((inr_ind_dump))(struct ss7 *ss7, int messagetype, unsigned char *parm,
                    int len) {
  ss7_message(ss7, "\t\t\tCalling party address %srequested\n",
              (parm[0] & 0x1) ? "" : "not ");
  ss7_message(ss7, "\t\t\tHolding %srequested\n",
              (parm[0] & 0x2) ? "" : "not ");
  ss7_message(ss7, "\t\t\tCalling party category %srequested\n",
              (parm[0] & 0x8) ? "" : "not ");
  ss7_message(ss7, "\t\t\tCharge information %srequested\n",
              (parm[0] & 0x10) ? "" : "not ");
  ss7_message(ss7, "\t\t\tMalicous call identification %srequested\n",
              (parm[0] & 0x80) ? "" : "not ");
  return 2;
}


x86 assembly (clang, -O0):
<inr_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    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    $0x1,%ecx
lea    0xeeb(%rip),%rdx
lea    0xf00(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xeb0(%rip),%rsi
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    $0x2,%ecx
lea    0xebc(%rip),%rdx
lea    0xed1(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xeac(%rip),%rsi
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    $0x8,%ecx
lea    0xe8d(%rip),%rdx
lea    0xea2(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe95(%rip),%rsi
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    $0x10,%ecx
lea    0xe5e(%rip),%rdx
lea    0xe73(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe8d(%rip),%rsi
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    $0x80,%ecx
lea    0xe2c(%rip),%rdx
lea    0xe41(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe7e(%rip),%rsi
call   1030 <ss7_message@plt>
mov    $0x2,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inr_ind_dump>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r15
mov    %rdi,%r14
testb  $0x1,(%rdx)
lea    0xefe(%rip),%r12
lea    0xf13(%rip),%rbx
mov    %rbx,%rdx
cmove  %r12,%rdx
lea    0xec3(%rip),%rsi
call   1030 <ss7_message@plt>
testb  $0x2,(%r15)
mov    %rbx,%rdx
cmove  %r12,%rdx
lea    0xed7(%rip),%rsi
mov    %r14,%rdi
call   1030 <ss7_message@plt>
testb  $0x8,(%r15)
mov    %rbx,%rdx
cmove  %r12,%rdx
lea    0xed5(%rip),%rsi
mov    %r14,%rdi
call   1030 <ss7_message@plt>
testb  $0x10,(%r15)
mov    %rbx,%rdx
cmove  %r12,%rdx
lea    0xee2(%rip),%rsi
mov    %r14,%rdi
call   1030 <ss7_message@plt>
cmpb   $0x0,(%r15)
cmovns %r12,%rbx
lea    0xeee(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1030 <ss7_message@plt>
mov    $0x2,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.ss7 = type { i32 }
@.str = [38 x i8] c"\09\09\09Calling party address %srequested\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c"not \00"
@.str.3 = [24 x i8] c"\09\09\09Holding %srequested\0A\00"
@.str.4 = [39 x i8] c"\09\09\09Calling party category %srequested\0A\00"
@.str.5 = [35 x i8] c"\09\09\09Charge information %srequested\0A\00"
@.str.6 = [45 x i8] c"\09\09\09Malicous call identification %srequested\0A\00"
define i32 @inr_ind_dump(%struct.ss7* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca %struct.ss7*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store %struct.ss7* %0, %struct.ss7** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load %struct.ss7*, %struct.ss7** %5
%10 = load i8*, i8** %7
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %13, 1
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%18 = call i32 @ss7_message(%struct.ss7* %9, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = load %struct.ss7*, %struct.ss7** %5
%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, 2
%25 = icmp ne i32 %24, 0
%26 = zext i1 %25 to i64
%27 = select i1 %25, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%28 = call i32 @ss7_message(%struct.ss7* %19, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %27)
%29 = load %struct.ss7*, %struct.ss7** %5
%30 = load i8*, i8** %7
%31 = getelementptr inbounds i8, i8* %30, i64 0
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = and i32 %33, 8
%35 = icmp ne i32 %34, 0
%36 = zext i1 %35 to i64
%37 = select i1 %35, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%38 = call i32 @ss7_message(%struct.ss7* %29, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i8* %37)
%39 = load %struct.ss7*, %struct.ss7** %5
%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 = and i32 %43, 16
%45 = icmp ne i32 %44, 0
%46 = zext i1 %45 to i64
%47 = select i1 %45, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%48 = call i32 @ss7_message(%struct.ss7* %39, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i8* %47)
%49 = load %struct.ss7*, %struct.ss7** %5
%50 = load i8*, i8** %7
%51 = getelementptr inbounds i8, i8* %50, i64 0
%52 = load i8, i8* %51
%53 = zext i8 %52 to i32
%54 = and i32 %53, 128
%55 = icmp ne i32 %54, 0
%56 = zext i1 %55 to i64
%57 = select i1 %55, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%58 = call i32 @ss7_message(%struct.ss7* %49, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i8* %57)
ret i32 2
}

LLVM IR (-O2):
%struct.ss7 = type { i32 }
@.str = [38 x i8] c"\09\09\09Calling party address %srequested\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c"not \00"
@.str.3 = [24 x i8] c"\09\09\09Holding %srequested\0A\00"
@.str.4 = [39 x i8] c"\09\09\09Calling party category %srequested\0A\00"
@.str.5 = [35 x i8] c"\09\09\09Charge information %srequested\0A\00"
@.str.6 = [45 x i8] c"\09\09\09Malicous call identification %srequested\0A\00"
define i32 @inr_ind_dump(%struct.ss7* %0, i32 %1, i8* nocapture %2, i32 %3) {
%5 = load i8, i8* %2
%6 = and i8 %5, 1
%7 = icmp eq i8 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%9 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i8, i8* %2
%11 = and i8 %10, 2
%12 = icmp eq i8 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%14 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %13)
%15 = load i8, i8* %2
%16 = and i8 %15, 8
%17 = icmp eq i8 %16, 0
%18 = select i1 %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%19 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0), i8* %18)
%20 = load i8, i8* %2
%21 = and i8 %20, 16
%22 = icmp eq i8 %21, 0
%23 = select i1 %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%24 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0), i8* %23)
%25 = load i8, i8* %2
%26 = icmp sgt i8 %25, -1
%27 = select i1 %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%28 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0), i8* %27)
ret i32 2
}