void _KDE_IceGetPoValidAuthIndices(protocol_name, num_indices_ret,
                                   indices_ret) const char *protocol_name;
int *num_indices_ret;
int *indices_ret;
{
  int auth_file;
  char *filename;
  int index_ret, i;
  if (!(filename = foocp()))
    return;
  if (access(filename))
    return;
  if (auth_file = access(filename))
    return;
  for (;;) {
    if (strcmp(protocol_name, protocol_name) == 0) {
      for (i = 0; i < *num_indices_ret; i++)
        if (index_ret == indices_ret[i])
          break;
    }
  }
}


x86 assembly (clang, -O0):
<_KDE_IceGetPoValidAuthIndices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1040 <foocp@plt>
cltq
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    1160 <_KDE_IceGetPoValidAuthIndices+0x30>
jmp    11fc <_KDE_IceGetPoValidAuthIndices+0xcc>
mov    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1050 <access@plt>
cmp    $0x0,%eax
je     1179 <_KDE_IceGetPoValidAuthIndices+0x49>
jmp    11fc <_KDE_IceGetPoValidAuthIndices+0xcc>
mov    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1050 <access@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     1195 <_KDE_IceGetPoValidAuthIndices+0x65>
jmp    11fc <_KDE_IceGetPoValidAuthIndices+0xcc>
jmp    119a <_KDE_IceGetPoValidAuthIndices+0x6a>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11f7 <_KDE_IceGetPoValidAuthIndices+0xc7>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    11f2 <_KDE_IceGetPoValidAuthIndices+0xc2>
mov    -0x2c(%rbp),%eax
mov    -0x18(%rbp),%rcx
movslq -0x30(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jne    11df <_KDE_IceGetPoValidAuthIndices+0xaf>
jmp    11f2 <_KDE_IceGetPoValidAuthIndices+0xc2>
jmp    11e4 <_KDE_IceGetPoValidAuthIndices+0xb4>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11b7 <_KDE_IceGetPoValidAuthIndices+0x87>
jmp    11f7 <_KDE_IceGetPoValidAuthIndices+0xc7>
jmp    119a <_KDE_IceGetPoValidAuthIndices+0x6a>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_KDE_IceGetPoValidAuthIndices>:
push   %rbx
xor    %eax,%eax
call   1030 <foocp@plt>
test   %eax,%eax
je     114b <_KDE_IceGetPoValidAuthIndices+0x2b>
movslq %eax,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <access@plt>
test   %eax,%eax
jne    114b <_KDE_IceGetPoValidAuthIndices+0x2b>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <access@plt>
test   %eax,%eax
je     1150 <_KDE_IceGetPoValidAuthIndices+0x30>
pop    %rbx
ret
nopl   (%rax)
jmp    1150 <_KDE_IceGetPoValidAuthIndices+0x30>

LLVM IR (-O0):
define void @_KDE_IceGetPoValidAuthIndices(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%11 = call i32 (...) @foocp()
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %8
%14 = icmp ne i8* %13, null
br i1 %14, label %16, label %15
15: ; preds = %3
br label %53
16: ; preds = %3
%17 = load i8*, i8** %8
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @access to i32 (i8*, ...)*)(i8* %17)
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %16
br label %53
21: ; preds = %16
%22 = load i8*, i8** %8
%23 = call i32 (i8*, ...) bitcast (i32 (...)* @access to i32 (i8*, ...)*)(i8* %22)
store i32 %23, i32* %7
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %21
br label %53
26: ; preds = %21
br label %27
27: ; preds = %52, %26
%28 = load i8*, i8** %4
%29 = load i8*, i8** %4
%30 = call i32 @strcmp(i8* %28, i8* %29)
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %52
32: ; preds = %27
store i32 0, i32* %10
br label %33
33: ; preds = %48, %32
%34 = load i32, i32* %10
%35 = load i32*, i32** %5
%36 = load i32, i32* %35
%37 = icmp slt i32 %34, %36
br i1 %37, label %38, label %51
38: ; preds = %33
%39 = load i32, i32* %9
%40 = load i32*, i32** %6
%41 = load i32, i32* %10
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i32, i32* %40, i64 %42
%44 = load i32, i32* %43
%45 = icmp eq i32 %39, %44
br i1 %45, label %46, label %47
46: ; preds = %38
br label %51
47: ; preds = %38
br label %48
48: ; preds = %47
%49 = load i32, i32* %10
%50 = add nsw i32 %49, 1
store i32 %50, i32* %10
br label %33
51: ; preds = %46, %33
br label %52
52: ; preds = %51, %27
br label %27
53: ; preds = %25, %20, %15
ret void
}

LLVM IR (-O2):
define void @_KDE_IceGetPoValidAuthIndices(i8* nocapture readnone %0, i32* nocapture %1, i32* nocapture readnone %2) {
%4 = tail call i32 (...) @foocp()
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = icmp eq i32 %4, 0
br i1 %7, label %15, label %8
8: ; preds = %3
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @access to i32 (i8*, ...)*)(i8* %6)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = tail call i32 (i8*, ...) bitcast (i32 (...)* @access to i32 (i8*, ...)*)(i8* %6)
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %11, %14
br label %14
15: ; preds = %11, %8, %3
ret void
}