int TopLevelImp(cc, cc_0)
int cc, cc_0;
{
  int cc_top, cc_top_0, loc_itr, cc_itr, another_level_found, ext, bb;
  cc_top = cc;
  another_level_found = 1;
  while (another_level_found) {
    another_level_found = 0;
    if (cc_top == cc)
      cc_top_0 = cc_0;
    else
      get_topabs(&cc_top_0, cc_top);
    first_Construct(&loc_itr, &cc_itr);
    while (loc_itr) {
      val_ext(&ext, cc_itr);
      if (ext == 3) {
        def_inc_ipt(&bb, cc_itr);
        if (bb) {
          member_inc_ipt(&bb, cc_itr, cc_top_0);
          if (bb) {
            cc_top = cc_itr;
            another_level_found = 1;
            break;
          }
        }
      }
      next_Construct(&loc_itr, &cc_itr, loc_itr, cc_itr);
    }
  }
  return (cc_top);
}


x86 assembly (clang, -O0):
<TopLevelImp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1250 <TopLevelImp+0xf0>
movl   $0x0,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    11a3 <TopLevelImp+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    11b1 <TopLevelImp+0x51>
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1060 <get_topabs@plt>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1070 <first_Construct@plt>
cmpl   $0x0,-0x14(%rbp)
je     124b <TopLevelImp+0xeb>
mov    -0x18(%rbp),%esi
lea    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1080 <val_ext@plt>
cmpl   $0x3,-0x20(%rbp)
jne    1231 <TopLevelImp+0xd1>
mov    -0x18(%rbp),%esi
lea    -0x24(%rbp),%rdi
mov    $0x0,%al
call   1050 <def_inc_ipt@plt>
cmpl   $0x0,-0x24(%rbp)
je     122c <TopLevelImp+0xcc>
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x24(%rbp),%rdi
mov    $0x0,%al
call   1040 <member_inc_ipt@plt>
cmpl   $0x0,-0x24(%rbp)
je     1227 <TopLevelImp+0xc7>
mov    -0x18(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x1c(%rbp)
jmp    124b <TopLevelImp+0xeb>
jmp    122c <TopLevelImp+0xcc>
jmp    1231 <TopLevelImp+0xd1>
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <next_Construct@plt>
jmp    11c0 <TopLevelImp+0x60>
jmp    117b <TopLevelImp+0x1b>
mov    -0xc(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TopLevelImp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edi,%r14d
lea    0x4(%rsp),%rbx
mov    %rsp,%rbp
lea    0x14(%rsp),%r12
lea    0xc(%rsp),%r13
lea    0x8(%rsp),%rdi
mov    %r14d,%r15d
mov    %esi,0x10(%rsp)
cmp    %r14d,%r15d
jne    11a0 <TopLevelImp+0x40>
mov    %esi,0x8(%rsp)
jmp    11aa <TopLevelImp+0x4a>
nopw   0x0(%rax,%rax,1)
mov    %r15d,%esi
xor    %eax,%eax
call   1060 <get_topabs@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1070 <first_Construct@plt>
jmp    11d4 <TopLevelImp+0x74>
nopl   0x0(%rax)
mov    0x4(%rsp),%edx
mov    (%rsp),%ecx
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1030 <next_Construct@plt>
cmpl   $0x0,0x4(%rsp)
je     1236 <TopLevelImp+0xd6>
mov    (%rsp),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1080 <val_ext@plt>
cmpl   $0x3,0x14(%rsp)
jne    11c0 <TopLevelImp+0x60>
mov    (%rsp),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <def_inc_ipt@plt>
cmpl   $0x0,0xc(%rsp)
je     11c0 <TopLevelImp+0x60>
mov    (%rsp),%esi
mov    0x8(%rsp),%edx
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <member_inc_ipt@plt>
cmpl   $0x0,0xc(%rsp)
je     11c0 <TopLevelImp+0x60>
mov    (%rsp),%r15d
mov    0x10(%rsp),%esi
lea    0x8(%rsp),%rdi
cmp    %r14d,%r15d
jne    11a0 <TopLevelImp+0x40>
jmp    1194 <TopLevelImp+0x34>
mov    %r15d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @TopLevelImp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%12 = load i32, i32* %3
store i32 %12, i32* %5
store i32 1, i32* %9
br label %13
13: ; preds = %54, %2
%14 = load i32, i32* %9
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %55
16: ; preds = %13
store i32 0, i32* %9
%17 = load i32, i32* %5
%18 = load i32, i32* %3
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = load i32, i32* %4
store i32 %21, i32* %6
br label %25
22: ; preds = %16
%23 = load i32, i32* %5
%24 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @get_topabs to i32 (i32*, i32, ...)*)(i32* %6, i32 %23)
br label %25
25: ; preds = %22, %20
%26 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @first_Construct to i32 (i32*, i32*, ...)*)(i32* %7, i32* %8)
br label %27
27: ; preds = %50, %25
%28 = load i32, i32* %7
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %54
30: ; preds = %27
%31 = load i32, i32* %8
%32 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @val_ext to i32 (i32*, i32, ...)*)(i32* %10, i32 %31)
%33 = load i32, i32* %10
%34 = icmp eq i32 %33, 3
br i1 %34, label %35, label %50
35: ; preds = %30
%36 = load i32, i32* %8
%37 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @def_inc_ipt to i32 (i32*, i32, ...)*)(i32* %11, i32 %36)
%38 = load i32, i32* %11
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %49
40: ; preds = %35
%41 = load i32, i32* %8
%42 = load i32, i32* %6
%43 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @member_inc_ipt to i32 (i32*, i32, i32, ...)*)(i32* %11, i32 %41, i32 %42)
%44 = load i32, i32* %11
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %40
%47 = load i32, i32* %8
store i32 %47, i32* %5
store i32 1, i32* %9
br label %54
48: ; preds = %40
br label %49
49: ; preds = %48, %35
br label %50
50: ; preds = %49, %30
%51 = load i32, i32* %7
%52 = load i32, i32* %8
%53 = call i32 (i32*, i32*, i32, i32, ...) bitcast (i32 (...)* @next_Construct to i32 (i32*, i32*, i32, i32, ...)*)(i32* %7, i32* %8, i32 %51, i32 %52)
br label %27
54: ; preds = %46, %27
br label %13
55: ; preds = %13
%56 = load i32, i32* %5
ret i32 %56
}

LLVM IR (-O2):
define i32 @TopLevelImp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = bitcast i32* %6 to i8*
%12 = bitcast i32* %7 to i8*
br label %13
13: ; preds = %45, %2
%14 = phi i32 [ %0, %2 ], [ %46, %45 ]
%15 = icmp eq i32 %14, %0
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 %1, i32* %3
br label %19
17: ; preds = %13
%18 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @get_topabs to i32 (i32*, i32, ...)*)(i32* %3, i32 %14)
br label %19
19: ; preds = %17, %16
%20 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @first_Construct to i32 (i32*, i32*, ...)*)(i32* %4, i32* %5)
%21 = load i32, i32* %4
%22 = icmp eq i32 %21, 0
br i1 %22, label %47, label %23
23: ; preds = %19, %39
%24 = load i32, i32* %5
%25 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @val_ext to i32 (i32*, i32, ...)*)(i32* %6, i32 %24)
%26 = load i32, i32* %6
%27 = icmp eq i32 %26, 3
br i1 %27, label %28, label %39
28: ; preds = %23
%29 = load i32, i32* %5
%30 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @def_inc_ipt to i32 (i32*, i32, ...)*)(i32* %7, i32 %29)
%31 = load i32, i32* %7
%32 = icmp eq i32 %31, 0
br i1 %32, label %39, label %33
33: ; preds = %28
%34 = load i32, i32* %5
%35 = load i32, i32* %3
%36 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @member_inc_ipt to i32 (i32*, i32, i32, ...)*)(i32* %7, i32 %34, i32 %35)
%37 = load i32, i32* %7
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %45
39: ; preds = %28, %33, %23
%40 = load i32, i32* %4
%41 = load i32, i32* %5
%42 = call i32 (i32*, i32*, i32, i32, ...) bitcast (i32 (...)* @next_Construct to i32 (i32*, i32*, i32, i32, ...)*)(i32* %4, i32* %5, i32 %40, i32 %41)
%43 = load i32, i32* %4
%44 = icmp eq i32 %43, 0
br i1 %44, label %47, label %23
45: ; preds = %33
%46 = load i32, i32* %5
br label %13
47: ; preds = %19, %39
ret i32 %14
}