#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 */
typedef struct TYPE_6__ TYPE_2__;
typedef struct TYPE_5__ TYPE_1__;

/* Type definitions */
struct TYPE_6__ {
  char *protocol_name;
  char *network_id;
  char *auth_name;
};
struct TYPE_5__ {
  char *protocol_name;
  char *network_id;
  char *auth_name;
};
typedef TYPE_1__ IceAuthFileEntry;
typedef TYPE_2__ IceAuthDataEntry;

/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int fileEntryInDataEntries(int nEntries, IceAuthDataEntry *entries,
                           IceAuthFileEntry *fileEntry) {
  int i;
  for (i = 0; i < nEntries; i++, entries++) {
    if (((entries->protocol_name != (char *)NULL) &&
         (fileEntry->protocol_name != (char *)NULL) &&
         (strcmp(entries->protocol_name, fileEntry->protocol_name) == 0)) &&
        ((entries->network_id != (char *)NULL) &&
         (fileEntry->network_id != (char *)NULL) &&
         (strcmp(entries->network_id, fileEntry->network_id) == 0)) &&
        ((entries->auth_name != (char *)NULL) &&
         (fileEntry->auth_name != (char *)NULL) &&
         (strcmp(entries->auth_name, fileEntry->auth_name) == 0)))
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<fileEntryInDataEntries>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1214 <fileEntryInDataEntries+0x104>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     11f5 <fileEntryInDataEntries+0xe5>
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     11f5 <fileEntryInDataEntries+0xe5>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11f5 <fileEntryInDataEntries+0xe5>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     11f5 <fileEntryInDataEntries+0xe5>
mov    -0x18(%rbp),%rax
cmpq   $0x0,0x8(%rax)
je     11f5 <fileEntryInDataEntries+0xe5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11f5 <fileEntryInDataEntries+0xe5>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x10(%rax)
je     11f5 <fileEntryInDataEntries+0xe5>
mov    -0x18(%rbp),%rax
cmpq   $0x0,0x10(%rax)
je     11f5 <fileEntryInDataEntries+0xe5>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11f5 <fileEntryInDataEntries+0xe5>
movl   $0x1,-0x4(%rbp)
jmp    121b <fileEntryInDataEntries+0x10b>
jmp    11fa <fileEntryInDataEntries+0xea>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
add    $0x18,%rax
mov    %rax,-0x10(%rbp)
jmp    112a <fileEntryInDataEntries+0x1a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileEntryInDataEntries>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
test   %edi,%edi
jle    1192 <fileEntryInDataEntries+0x82>
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %edi,%ebx
add    $0x10,%rbp
jmp    1139 <fileEntryInDataEntries+0x29>
nopl   0x0(%rax)
add    $0x18,%rbp
add    $0xffffffff,%ebx
je     1192 <fileEntryInDataEntries+0x82>
mov    -0x10(%rbp),%rdi
test   %rdi,%rdi
je     1130 <fileEntryInDataEntries+0x20>
mov    (%r15),%rsi
test   %rsi,%rsi
je     1130 <fileEntryInDataEntries+0x20>
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1130 <fileEntryInDataEntries+0x20>
mov    -0x8(%rbp),%rdi
test   %rdi,%rdi
je     1130 <fileEntryInDataEntries+0x20>
mov    0x8(%r15),%rsi
test   %rsi,%rsi
je     1130 <fileEntryInDataEntries+0x20>
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1130 <fileEntryInDataEntries+0x20>
mov    0x0(%rbp),%rdi
test   %rdi,%rdi
je     1130 <fileEntryInDataEntries+0x20>
mov    0x10(%r15),%rsi
test   %rsi,%rsi
je     1130 <fileEntryInDataEntries+0x20>
call   1030 <strcmp@plt>
test   %rax,%rax
jne    1130 <fileEntryInDataEntries+0x20>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_6__ = type { i8*, i8*, i8* }
%struct.TYPE_5__ = type { i8*, i8*, i8* }
define i32 @fileEntryInDataEntries(i32 %0, %struct.TYPE_6__* %1, %struct.TYPE_5__* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.TYPE_6__*
%7 = alloca %struct.TYPE_5__*
%8 = alloca i32
store i32 %0, i32* %5
store %struct.TYPE_6__* %1, %struct.TYPE_6__** %6
store %struct.TYPE_5__* %2, %struct.TYPE_5__** %7
store i32 0, i32* %8
br label %9
9: ; preds = %72, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %5
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %77
13: ; preds = %9
%14 = load %struct.TYPE_6__*, %struct.TYPE_6__** %6
%15 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %14, i32 0, i32 0
%16 = load i8*, i8** %15
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %71
18: ; preds = %13
%19 = load %struct.TYPE_5__*, %struct.TYPE_5__** %7
%20 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %19, i32 0, i32 0
%21 = load i8*, i8** %20
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %71
23: ; preds = %18
%24 = load %struct.TYPE_6__*, %struct.TYPE_6__** %6
%25 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %24, i32 0, i32 0
%26 = load i8*, i8** %25
%27 = load %struct.TYPE_5__*, %struct.TYPE_5__** %7
%28 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %27, i32 0, i32 0
%29 = load i8*, i8** %28
%30 = call i64 @strcmp(i8* %26, i8* %29)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %71
32: ; preds = %23
%33 = load %struct.TYPE_6__*, %struct.TYPE_6__** %6
%34 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %33, i32 0, i32 1
%35 = load i8*, i8** %34
%36 = icmp ne i8* %35, null
br i1 %36, label %37, label %71
37: ; preds = %32
%38 = load %struct.TYPE_5__*, %struct.TYPE_5__** %7
%39 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %38, i32 0, i32 1
%40 = load i8*, i8** %39
%41 = icmp ne i8* %40, null
br i1 %41, label %42, label %71
42: ; preds = %37
%43 = load %struct.TYPE_6__*, %struct.TYPE_6__** %6
%44 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %43, i32 0, i32 1
%45 = load i8*, i8** %44
%46 = load %struct.TYPE_5__*, %struct.TYPE_5__** %7
%47 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %46, i32 0, i32 1
%48 = load i8*, i8** %47
%49 = call i64 @strcmp(i8* %45, i8* %48)
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %71
51: ; preds = %42
%52 = load %struct.TYPE_6__*, %struct.TYPE_6__** %6
%53 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %52, i32 0, i32 2
%54 = load i8*, i8** %53
%55 = icmp ne i8* %54, null
br i1 %55, label %56, label %71
56: ; preds = %51
%57 = load %struct.TYPE_5__*, %struct.TYPE_5__** %7
%58 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %57, i32 0, i32 2
%59 = load i8*, i8** %58
%60 = icmp ne i8* %59, null
br i1 %60, label %61, label %71
61: ; preds = %56
%62 = load %struct.TYPE_6__*, %struct.TYPE_6__** %6
%63 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %62, i32 0, i32 2
%64 = load i8*, i8** %63
%65 = load %struct.TYPE_5__*, %struct.TYPE_5__** %7
%66 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %65, i32 0, i32 2
%67 = load i8*, i8** %66
%68 = call i64 @strcmp(i8* %64, i8* %67)
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %71
70: ; preds = %61
store i32 1, i32* %4
br label %78
71: ; preds = %61, %56, %51, %42, %37, %32, %23, %18, %13
br label %72
72: ; preds = %71
%73 = load i32, i32* %8
%74 = add nsw i32 %73, 1
store i32 %74, i32* %8
%75 = load %struct.TYPE_6__*, %struct.TYPE_6__** %6
%76 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %75, i32 1
store %struct.TYPE_6__* %76, %struct.TYPE_6__** %6
br label %9
77: ; preds = %9
store i32 0, i32* %4
br label %78
78: ; preds = %77, %70
%79 = load i32, i32* %4
ret i32 %79
}

LLVM IR (-O2):
%struct.TYPE_6__ = type { i8*, i8*, i8* }
%struct.TYPE_5__ = type { i8*, i8*, i8* }
define i32 @fileEntryInDataEntries(i32 %0, %struct.TYPE_6__* nocapture %1, %struct.TYPE_5__* nocapture %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %45
5: ; preds = %3
%6 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %2, i64 0, i32 0
%7 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %2, i64 0, i32 1
%8 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %2, i64 0, i32 2
br label %9
9: ; preds = %5, %41
%10 = phi i32 [ 0, %5 ], [ %42, %41 ]
%11 = phi %struct.TYPE_6__* [ %1, %5 ], [ %43, %41 ]
%12 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %11, i64 0, i32 0
%13 = load i8*, i8** %12
%14 = icmp eq i8* %13, null
br i1 %14, label %41, label %15
15: ; preds = %9
%16 = load i8*, i8** %6
%17 = icmp eq i8* %16, null
br i1 %17, label %41, label %18
18: ; preds = %15
%19 = tail call i64 @strcmp(i8* %13, i8* %16)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %41
21: ; preds = %18
%22 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %11, i64 0, i32 1
%23 = load i8*, i8** %22
%24 = icmp eq i8* %23, null
br i1 %24, label %41, label %25
25: ; preds = %21
%26 = load i8*, i8** %7
%27 = icmp eq i8* %26, null
br i1 %27, label %41, label %28
28: ; preds = %25
%29 = tail call i64 @strcmp(i8* %23, i8* %26)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %41
31: ; preds = %28
%32 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %11, i64 0, i32 2
%33 = load i8*, i8** %32
%34 = icmp eq i8* %33, null
br i1 %34, label %41, label %35
35: ; preds = %31
%36 = load i8*, i8** %8
%37 = icmp eq i8* %36, null
br i1 %37, label %41, label %38
38: ; preds = %35
%39 = tail call i64 @strcmp(i8* %33, i8* %36)
%40 = icmp eq i64 %39, 0
br i1 %40, label %45, label %41
41: ; preds = %9, %15, %18, %21, %25, %28, %31, %35, %38
%42 = add nuw nsw i32 %10, 1
%43 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %11, i64 1
%44 = icmp eq i32 %42, %0
br i1 %44, label %45, label %9
45: ; preds = %38, %41, %3
%46 = phi i32 [ 0, %3 ], [ 0, %41 ], [ 1, %38 ]
ret i32 %46
}