#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((inf_ind_dump))(struct ss7 *ss7, int messagetype, unsigned char *parm,
                    int len) {
  ss7_message(ss7, "\t\t\tCalling party address: %s\n",
              (parm[0] & 0x2)
                  ? ((parm[0] & 0x1) ? "included" : "spare")
                  : ((parm[0] & 0x1) ? "not available" : "not included"));
  ss7_message(ss7, "\t\t\tHold: %sprovided\n", (parm[0] & 0x4) ? "" : "not ");
  ss7_message(ss7, "\t\t\tCalling party's category %sincluded\n",
              (parm[0] & 0x20) ? "" : "not ");
  ss7_message(ss7, "\t\t\tCharge information %sincluded\n",
              (parm[0] & 0x40) ? "" : "not ");
  ss7_message(ss7, "\t\t\t%s\n",
              (parm[0] & 0x80) ? "Unsolicated" : "Solicated");
  return 2;
}


x86 assembly (clang, -O0):
<inf_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    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1169 <inf_ind_dump+0x59>
mov    -0x18(%rbp),%rax
movzbl (%rax),%edx
and    $0x1,%edx
lea    0xecc(%rip),%rax
lea    0xedd(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x30(%rbp)
jmp    118c <inf_ind_dump+0x7c>
mov    -0x18(%rbp),%rax
movzbl (%rax),%edx
and    $0x1,%edx
lea    0xeb8(%rip),%rax
lea    0xea3(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rdx
lea    0xe65(%rip),%rsi
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    $0x4,%ecx
lea    0xe9f(%rip),%rdx
lea    0xe97(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe75(%rip),%rsi
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    $0x20,%ecx
lea    0xe70(%rip),%rdx
lea    0xe68(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe60(%rip),%rsi
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    $0x40,%ecx
lea    0xe41(%rip),%rdx
lea    0xe39(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe59(%rip),%rsi
call   1030 <ss7_message@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%ecx
and    $0x80,%ecx
lea    0xe71(%rip),%rdx
lea    0xe5e(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe49(%rip),%rsi
call   1030 <ss7_message@plt>
mov    $0x2,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inf_ind_dump>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
movzbl (%rdx),%eax
test   $0x1,%al
lea    0xef7(%rip),%rcx
lea    0xf08(%rip),%rsi
cmove  %rcx,%rsi
lea    0xef9(%rip),%rcx
lea    0xee4(%rip),%rdx
cmove  %rcx,%rdx
mov    %rdi,%r15
test   $0x2,%al
cmovne %rsi,%rdx
lea    0xeac(%rip),%rsi
call   1030 <ss7_message@plt>
testb  $0x4,(%r14)
lea    0xef0(%rip),%r12
lea    0xee8(%rip),%rbx
mov    %rbx,%rdx
cmove  %r12,%rdx
lea    0xec6(%rip),%rsi
mov    %r15,%rdi
call   1030 <ss7_message@plt>
testb  $0x20,(%r14)
mov    %rbx,%rdx
cmove  %r12,%rdx
lea    0xec6(%rip),%rsi
mov    %r15,%rdi
call   1030 <ss7_message@plt>
testb  $0x40,(%r14)
cmove  %r12,%rbx
lea    0xed7(%rip),%rsi
mov    %r15,%rdi
mov    %rbx,%rdx
call   1030 <ss7_message@plt>
cmpb   $0x0,(%r14)
lea    0xef6(%rip),%rax
lea    0xee3(%rip),%rdx
cmovns %rax,%rdx
lea    0xed1(%rip),%rsi
mov    %r15,%rdi
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 = [30 x i8] c"\09\09\09Calling party address: %s\0A\00"
@.str.1 = [9 x i8] c"included\00"
@.str.2 = [6 x i8] c"spare\00"
@.str.3 = [14 x i8] c"not available\00"
@.str.4 = [13 x i8] c"not included\00"
@.str.5 = [21 x i8] c"\09\09\09Hold: %sprovided\0A\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [5 x i8] c"not \00"
@.str.8 = [40 x i8] c"\09\09\09Calling party's category %sincluded\0A\00"
@.str.9 = [34 x i8] c"\09\09\09Charge information %sincluded\0A\00"
@.str.10 = [7 x i8] c"\09\09\09%s\0A\00"
@.str.11 = [12 x i8] c"Unsolicated\00"
@.str.12 = [10 x i8] c"Solicated\00"
define i32 @inf_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, 2
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %25
16: ; preds = %4
%17 = load i8*, i8** %7
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = and i32 %20, 1
%22 = icmp ne i32 %21, 0
%23 = zext i1 %22 to i64
%24 = select i1 %22, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
br label %34
25: ; preds = %4
%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 = and i32 %29, 1
%31 = icmp ne i32 %30, 0
%32 = zext i1 %31 to i64
%33 = select i1 %31, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0)
br label %34
34: ; preds = %25, %16
%35 = phi i8* [ %24, %16 ], [ %33, %25 ]
%36 = call i32 @ss7_message(%struct.ss7* %9, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %35)
%37 = load %struct.ss7*, %struct.ss7** %5
%38 = load i8*, i8** %7
%39 = getelementptr inbounds i8, i8* %38, i64 0
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = and i32 %41, 4
%43 = icmp ne i32 %42, 0
%44 = zext i1 %43 to i64
%45 = select i1 %43, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0)
%46 = call i32 @ss7_message(%struct.ss7* %37, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* %45)
%47 = load %struct.ss7*, %struct.ss7** %5
%48 = load i8*, i8** %7
%49 = getelementptr inbounds i8, i8* %48, i64 0
%50 = load i8, i8* %49
%51 = zext i8 %50 to i32
%52 = and i32 %51, 32
%53 = icmp ne i32 %52, 0
%54 = zext i1 %53 to i64
%55 = select i1 %53, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0)
%56 = call i32 @ss7_message(%struct.ss7* %47, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* %55)
%57 = load %struct.ss7*, %struct.ss7** %5
%58 = load i8*, i8** %7
%59 = getelementptr inbounds i8, i8* %58, i64 0
%60 = load i8, i8* %59
%61 = zext i8 %60 to i32
%62 = and i32 %61, 64
%63 = icmp ne i32 %62, 0
%64 = zext i1 %63 to i64
%65 = select i1 %63, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0)
%66 = call i32 @ss7_message(%struct.ss7* %57, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i8* %65)
%67 = load %struct.ss7*, %struct.ss7** %5
%68 = load i8*, i8** %7
%69 = getelementptr inbounds i8, i8* %68, i64 0
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = and i32 %71, 128
%73 = icmp ne i32 %72, 0
%74 = zext i1 %73 to i64
%75 = select i1 %73, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0)
%76 = call i32 @ss7_message(%struct.ss7* %67, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8* %75)
ret i32 2
}

LLVM IR (-O2):
%struct.ss7 = type { i32 }
@.str = [30 x i8] c"\09\09\09Calling party address: %s\0A\00"
@.str.1 = [9 x i8] c"included\00"
@.str.2 = [6 x i8] c"spare\00"
@.str.3 = [14 x i8] c"not available\00"
@.str.4 = [13 x i8] c"not included\00"
@.str.5 = [21 x i8] c"\09\09\09Hold: %sprovided\0A\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [5 x i8] c"not \00"
@.str.8 = [40 x i8] c"\09\09\09Calling party's category %sincluded\0A\00"
@.str.9 = [34 x i8] c"\09\09\09Charge information %sincluded\0A\00"
@.str.10 = [7 x i8] c"\09\09\09%s\0A\00"
@.str.11 = [12 x i8] c"Unsolicated\00"
@.str.12 = [10 x i8] c"Solicated\00"
define i32 @inf_ind_dump(%struct.ss7* %0, i32 %1, i8* nocapture %2, i32 %3) {
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = and i32 %6, 2
%8 = icmp eq i32 %7, 0
%9 = and i32 %6, 1
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0)
%12 = select i1 %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0)
%13 = select i1 %8, i8* %12, i8* %11
%14 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = load i8, i8* %2
%16 = and i8 %15, 4
%17 = icmp eq i8 %16, 0
%18 = select i1 %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%19 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* %18)
%20 = load i8, i8* %2
%21 = and i8 %20, 32
%22 = icmp eq i8 %21, 0
%23 = select i1 %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%24 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i8* %23)
%25 = load i8, i8* %2
%26 = and i8 %25, 64
%27 = icmp eq i8 %26, 0
%28 = select i1 %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%29 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i8* %28)
%30 = load i8, i8* %2
%31 = icmp sgt i8 %30, -1
%32 = select i1 %31, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0)
%33 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8* %32)
ret i32 2
}