int DistNextEDistList1(Schema, A, D)
struct univStruct *Schema;
struct EnrolledIn **A;
struct Course *D;
{
  (*A) = AccessEnrolledInEDistList1Next(*A);
  if ((*A) != 0 && AccessEnrolledInCourse(*A) == D)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<DistNextEDistList1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1030 <AccessEnrolledInEDistList1Next@plt>
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1180 <DistNextEDistList1+0x60>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1040 <AccessEnrolledInCourse@plt>
cltq
cmp    -0x20(%rbp),%rax
jne    1180 <DistNextEDistList1+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1187 <DistNextEDistList1+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DistNextEDistList1>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    (%rsi),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <AccessEnrolledInEDistList1Next@plt>
movslq %eax,%rdi
mov    %rdi,(%rbx)
test   %edi,%edi
je     1153 <DistNextEDistList1+0x33>
xor    %eax,%eax
call   1040 <AccessEnrolledInCourse@plt>
cltq
cmp    %r14,%rax
jne    1153 <DistNextEDistList1+0x33>
mov    $0x1,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.univStruct = type opaque
%struct.EnrolledIn = type opaque
%struct.Course = type opaque
define i32 @DistNextEDistList1(%struct.univStruct* %0, %struct.EnrolledIn** %1, %struct.Course* %2) {
%4 = alloca i32
%5 = alloca %struct.univStruct*
%6 = alloca %struct.EnrolledIn**
%7 = alloca %struct.Course*
store %struct.univStruct* %0, %struct.univStruct** %5
store %struct.EnrolledIn** %1, %struct.EnrolledIn*** %6
store %struct.Course* %2, %struct.Course** %7
%8 = load %struct.EnrolledIn**, %struct.EnrolledIn*** %6
%9 = load %struct.EnrolledIn*, %struct.EnrolledIn** %8
%10 = call i32 (%struct.EnrolledIn*, ...) bitcast (i32 (...)* @AccessEnrolledInEDistList1Next to i32 (%struct.EnrolledIn*, ...)*)(%struct.EnrolledIn* %9)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to %struct.EnrolledIn*
%13 = load %struct.EnrolledIn**, %struct.EnrolledIn*** %6
store %struct.EnrolledIn* %12, %struct.EnrolledIn** %13
%14 = load %struct.EnrolledIn**, %struct.EnrolledIn*** %6
%15 = load %struct.EnrolledIn*, %struct.EnrolledIn** %14
%16 = icmp ne %struct.EnrolledIn* %15, null
br i1 %16, label %17, label %26
17: ; preds = %3
%18 = load %struct.EnrolledIn**, %struct.EnrolledIn*** %6
%19 = load %struct.EnrolledIn*, %struct.EnrolledIn** %18
%20 = call i32 (%struct.EnrolledIn*, ...) bitcast (i32 (...)* @AccessEnrolledInCourse to i32 (%struct.EnrolledIn*, ...)*)(%struct.EnrolledIn* %19)
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to %struct.Course*
%23 = load %struct.Course*, %struct.Course** %7
%24 = icmp eq %struct.Course* %22, %23
br i1 %24, label %25, label %26
25: ; preds = %17
store i32 1, i32* %4
br label %27
26: ; preds = %17, %3
store i32 0, i32* %4
br label %27
27: ; preds = %26, %25
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
%struct.univStruct = type opaque
%struct.EnrolledIn = type opaque
%struct.Course = type opaque
define i32 @DistNextEDistList1(%struct.univStruct* nocapture readnone %0, %struct.EnrolledIn** nocapture %1, %struct.Course* readnone %2) {
%4 = load %struct.EnrolledIn*, %struct.EnrolledIn** %1
%5 = tail call i32 (%struct.EnrolledIn*, ...) bitcast (i32 (...)* @AccessEnrolledInEDistList1Next to i32 (%struct.EnrolledIn*, ...)*)(%struct.EnrolledIn* %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to %struct.EnrolledIn*
store %struct.EnrolledIn* %7, %struct.EnrolledIn** %1
%8 = icmp eq i32 %5, 0
br i1 %8, label %14, label %9
9: ; preds = %3
%10 = tail call i32 (%struct.EnrolledIn*, ...) bitcast (i32 (...)* @AccessEnrolledInCourse to i32 (%struct.EnrolledIn*, ...)*)(%struct.EnrolledIn* %7)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to %struct.Course*
%13 = icmp eq %struct.Course* %12, %2
br i1 %13, label %15, label %14
14: ; preds = %9, %3
br label %15
15: ; preds = %9, %14
%16 = phi i32 [ 0, %14 ], [ 1, %9 ]
ret i32 %16
}