int DistNextCDistList(Schema, A, D)
struct univStruct *Schema;
struct Course **A;
struct Teacher **D;
{
  (*A) = AccessCourseCDistListNext(*A);
  if ((*A) != 0 && AccessCourseTaughtBy(*A) == D)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<DistNextCDistList>:
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 <AccessCourseCDistListNext@plt>
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1180 <DistNextCDistList+0x60>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1040 <AccessCourseTaughtBy@plt>
cltq
cmp    -0x20(%rbp),%rax
jne    1180 <DistNextCDistList+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1187 <DistNextCDistList+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.univStruct = type opaque
%struct.Course = type opaque
%struct.Teacher = type opaque
define i32 @DistNextCDistList(%struct.univStruct* %0, %struct.Course** %1, %struct.Teacher** %2) {
%4 = alloca i32
%5 = alloca %struct.univStruct*
%6 = alloca %struct.Course**
%7 = alloca %struct.Teacher**
store %struct.univStruct* %0, %struct.univStruct** %5
store %struct.Course** %1, %struct.Course*** %6
store %struct.Teacher** %2, %struct.Teacher*** %7
%8 = load %struct.Course**, %struct.Course*** %6
%9 = load %struct.Course*, %struct.Course** %8
%10 = call i32 (%struct.Course*, ...) bitcast (i32 (...)* @AccessCourseCDistListNext to i32 (%struct.Course*, ...)*)(%struct.Course* %9)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to %struct.Course*
%13 = load %struct.Course**, %struct.Course*** %6
store %struct.Course* %12, %struct.Course** %13
%14 = load %struct.Course**, %struct.Course*** %6
%15 = load %struct.Course*, %struct.Course** %14
%16 = icmp ne %struct.Course* %15, null
br i1 %16, label %17, label %26
17: ; preds = %3
%18 = load %struct.Course**, %struct.Course*** %6
%19 = load %struct.Course*, %struct.Course** %18
%20 = call i32 (%struct.Course*, ...) bitcast (i32 (...)* @AccessCourseTaughtBy to i32 (%struct.Course*, ...)*)(%struct.Course* %19)
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to %struct.Teacher**
%23 = load %struct.Teacher**, %struct.Teacher*** %7
%24 = icmp eq %struct.Teacher** %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.Course = type opaque
%struct.Teacher = type opaque
define i32 @DistNextCDistList(%struct.univStruct* nocapture readnone %0, %struct.Course** nocapture %1, %struct.Teacher** readnone %2) {
%4 = load %struct.Course*, %struct.Course** %1
%5 = tail call i32 (%struct.Course*, ...) bitcast (i32 (...)* @AccessCourseCDistListNext to i32 (%struct.Course*, ...)*)(%struct.Course* %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to %struct.Course*
store %struct.Course* %7, %struct.Course** %1
%8 = icmp eq i32 %5, 0
br i1 %8, label %14, label %9
9: ; preds = %3
%10 = tail call i32 (%struct.Course*, ...) bitcast (i32 (...)* @AccessCourseTaughtBy to i32 (%struct.Course*, ...)*)(%struct.Course* %7)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to %struct.Teacher**
%13 = icmp eq %struct.Teacher** %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
}