int DistInitEDistList1(Schema, A, D)
struct univStruct *Schema;
struct EnrolledIn **A;
struct Course *D;
{
  if (AccessCourseEDistList1First(D) == 0)
    return (0);
  else
    (*A) = AccessCourseEDistList1First(D);
  return (1);
}


x86 assembly (clang, -O0):
<DistInitEDistList1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <AccessCourseEDistList1First@plt>
cmp    $0x0,%eax
jne    1144 <DistInitEDistList1+0x34>
movl   $0x0,-0x4(%rbp)
jmp    1160 <DistInitEDistList1+0x50>
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <AccessCourseEDistList1First@plt>
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DistInitEDistList1>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
xor    %ebp,%ebp
mov    %rdx,%rdi
xor    %eax,%eax
call   1030 <AccessCourseEDistList1First@plt>
test   %eax,%eax
je     113e <DistInitEDistList1+0x2e>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <AccessCourseEDistList1First@plt>
cltq
mov    %rax,(%r14)
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 @DistInitEDistList1(%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.Course*, %struct.Course** %7
%9 = call i32 (%struct.Course*, ...) bitcast (i32 (...)* @AccessCourseEDistList1First to i32 (%struct.Course*, ...)*)(%struct.Course* %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %3
store i32 0, i32* %4
br label %19
12: ; preds = %3
%13 = load %struct.Course*, %struct.Course** %7
%14 = call i32 (%struct.Course*, ...) bitcast (i32 (...)* @AccessCourseEDistList1First to i32 (%struct.Course*, ...)*)(%struct.Course* %13)
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to %struct.EnrolledIn*
%17 = load %struct.EnrolledIn**, %struct.EnrolledIn*** %6
store %struct.EnrolledIn* %16, %struct.EnrolledIn** %17
br label %18
18: ; preds = %12
store i32 1, i32* %4
br label %19
19: ; preds = %18, %11
%20 = load i32, i32* %4
ret i32 %20
}

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