void intr_usr_lib(rep, cc, ex, nm, tt) int *rep, *cc, ex, *nm, tt;
{
  int rr, curMRI, cptMRI, curGEN, cptGEN;
  make_Construct(&rr, cc, ex, tt);
  if (rr == 1) {
    mod_name(&rr, *cc, nm);
    if (rr == 1) {
      switch (ex) {
      case 1:
      case 2:
      case 3:
      case 7:
      case 12:
        if (tt == 2) {
          make_MRIState(&rr, &curMRI, 1, 0, 1, 0);
        } else {
          make_MRIState(&rr, &curMRI, 0, 0, 0, 0);
        }
        if (rr == 1) {
          if (tt == 2) {
            make_MRIState(&rr, &cptMRI, 1, 0, 1, 0);
          } else {
            make_MRIState(&rr, &cptMRI, 0, 0, 0, 0);
          }
          if (rr == 1) {
            cre_curMRIState(*cc, curMRI);
            cre_cptMRIState(*cc, cptMRI);
          }
        }
        break;
      case 4:
      case 6:
      case 5:
        make_GENState(&rr, &curGEN, 0, 0, 0);
        if (rr == 1) {
          make_GENState(&rr, &cptGEN, 0, 0, 0);
          if (rr == 1) {
            cre_curGENState(*cc, curGEN);
            cre_cptGENState(*cc, cptGEN);
          }
        }
        break;
      }
    }
    if (rr == 0) {
      kill_Construct(*cc);
    }
  }
  *rep = rr;
}


x86 assembly (clang, -O0):
<intr_usr_lib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x24(%rbp),%ecx
lea    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1060 <make_Construct@plt>
cmpl   $0x1,-0x28(%rbp)
jne    1393 <intr_usr_lib+0x203>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rdi
mov    $0x0,%al
call   1040 <mod_name@plt>
cmpl   $0x1,-0x28(%rbp)
jne    1377 <intr_usr_lib+0x1e7>
mov    -0x14(%rbp),%eax
mov    %eax,-0x3c(%rbp)
add    $0xffffffff,%eax
sub    $0x3,%eax
jb     1236 <intr_usr_lib+0xa6>
jmp    1200 <intr_usr_lib+0x70>
mov    -0x3c(%rbp),%eax
add    $0xfffffffc,%eax
sub    $0x3,%eax
jb     1304 <intr_usr_lib+0x174>
jmp    1214 <intr_usr_lib+0x84>
mov    -0x3c(%rbp),%eax
sub    $0x7,%eax
je     1236 <intr_usr_lib+0xa6>
jmp    1225 <intr_usr_lib+0x95>
mov    -0x3c(%rbp),%eax
sub    $0xc,%eax
jne    1372 <intr_usr_lib+0x1e2>
jmp    1236 <intr_usr_lib+0xa6>
cmpl   $0x2,-0x24(%rbp)
jne    1263 <intr_usr_lib+0xd3>
lea    -0x28(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x1,%r8d
xor    %r9d,%r9d
mov    %r8d,%edx
mov    %r9d,%ecx
mov    $0x0,%al
call   1090 <make_MRIState@plt>
jmp    127e <intr_usr_lib+0xee>
lea    -0x28(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    $0x0,%al
call   1090 <make_MRIState@plt>
cmpl   $0x1,-0x28(%rbp)
jne    12ff <intr_usr_lib+0x16f>
cmpl   $0x2,-0x24(%rbp)
jne    12b5 <intr_usr_lib+0x125>
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x1,%r8d
xor    %r9d,%r9d
mov    %r8d,%edx
mov    %r9d,%ecx
mov    $0x0,%al
call   1090 <make_MRIState@plt>
jmp    12d0 <intr_usr_lib+0x140>
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    $0x0,%al
call   1090 <make_MRIState@plt>
cmpl   $0x1,-0x28(%rbp)
jne    12fa <intr_usr_lib+0x16a>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x2c(%rbp),%esi
mov    $0x0,%al
call   10a0 <cre_curMRIState@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%esi
mov    $0x0,%al
call   10b0 <cre_cptMRIState@plt>
jmp    12ff <intr_usr_lib+0x16f>
jmp    1372 <intr_usr_lib+0x1e2>
lea    -0x28(%rbp),%rdi
lea    -0x34(%rbp),%rsi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
mov    $0x0,%al
call   1070 <make_GENState@plt>
cmpl   $0x1,-0x28(%rbp)
jne    136d <intr_usr_lib+0x1dd>
lea    -0x28(%rbp),%rdi
lea    -0x38(%rbp),%rsi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
mov    $0x0,%al
call   1070 <make_GENState@plt>
cmpl   $0x1,-0x28(%rbp)
jne    1368 <intr_usr_lib+0x1d8>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x34(%rbp),%esi
mov    $0x0,%al
call   1080 <cre_curGENState@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%esi
mov    $0x0,%al
call   1050 <cre_cptGENState@plt>
jmp    136d <intr_usr_lib+0x1dd>
jmp    1372 <intr_usr_lib+0x1e2>
jmp    1377 <intr_usr_lib+0x1e7>
cmpl   $0x0,-0x28(%rbp)
jne    138e <intr_usr_lib+0x1fe>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    $0x0,%al
call   1030 <kill_Construct@plt>
jmp    1393 <intr_usr_lib+0x203>
mov    -0x28(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_usr_lib>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r8d,%ebp
mov    %rcx,%r12
mov    %edx,%ebx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x4(%rsp),%rdi
mov    %r8d,%ecx
xor    %eax,%eax
call   1060 <make_Construct@plt>
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
jne    1332 <intr_usr_lib+0x1a2>
mov    (%r15),%esi
lea    0x4(%rsp),%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <mod_name@plt>
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
jne    1320 <intr_usr_lib+0x190>
mov    $0x1,%eax
cmp    $0xc,%ebx
ja     1332 <intr_usr_lib+0x1a2>
mov    $0x108e,%ecx
bt     %ebx,%ecx
jae    1250 <intr_usr_lib+0xc0>
lea    0x4(%rsp),%rdi
lea    0xc(%rsp),%rsi
cmp    $0x2,%ebp
jne    12c2 <intr_usr_lib+0x132>
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
call   1090 <make_MRIState@plt>
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
jne    1320 <intr_usr_lib+0x190>
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    12ed <intr_usr_lib+0x15d>
mov    $0x70,%ecx
bt     %ebx,%ecx
jae    1332 <intr_usr_lib+0x1a2>
lea    0x4(%rsp),%rdi
lea    0xc(%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <make_GENState@plt>
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
jne    1320 <intr_usr_lib+0x190>
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1070 <make_GENState@plt>
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
jne    1320 <intr_usr_lib+0x190>
mov    (%r15),%edi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   1080 <cre_curGENState@plt>
mov    (%r15),%edi
mov    0x8(%rsp),%esi
xor    %eax,%eax
call   1050 <cre_cptGENState@plt>
jmp    131c <intr_usr_lib+0x18c>
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
call   1090 <make_MRIState@plt>
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
jne    1320 <intr_usr_lib+0x190>
lea    0x4(%rsp),%rdi
lea    0x8(%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %eax,%eax
call   1090 <make_MRIState@plt>
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
jne    1320 <intr_usr_lib+0x190>
mov    (%r15),%edi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   10a0 <cre_curMRIState@plt>
mov    (%r15),%edi
mov    0x8(%rsp),%esi
xor    %eax,%eax
call   10b0 <cre_cptMRIState@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jne    1332 <intr_usr_lib+0x1a2>
mov    (%r15),%edi
xor    %eax,%eax
call   1030 <kill_Construct@plt>
mov    0x4(%rsp),%eax
mov    %eax,(%r14)
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @intr_usr_lib(i32* %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%16 = load i32*, i32** %7
%17 = load i32, i32* %8
%18 = load i32, i32* %10
%19 = call i32 (i32*, i32*, i32, i32, ...) bitcast (i32 (...)* @make_Construct to i32 (i32*, i32*, i32, i32, ...)*)(i32* %11, i32* %16, i32 %17, i32 %18)
%20 = load i32, i32* %11
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %90
22: ; preds = %5
%23 = load i32*, i32** %7
%24 = load i32, i32* %23
%25 = load i32*, i32** %9
%26 = call i32 (i32*, i32, i32*, ...) bitcast (i32 (...)* @mod_name to i32 (i32*, i32, i32*, ...)*)(i32* %11, i32 %24, i32* %25)
%27 = load i32, i32* %11
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %82
29: ; preds = %22
%30 = load i32, i32* %8
switch i32 %30, label %81 [
i32 1, label %31
i32 2, label %31
i32 3, label %31
i32 7, label %31
i32 12, label %31
i32 4, label %62
i32 6, label %62
i32 5, label %62
]
31: ; preds = %29, %29, %29, %29, %29
%32 = load i32, i32* %10
%33 = icmp eq i32 %32, 2
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (i32*, i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @make_MRIState to i32 (i32*, i32*, i32, i32, i32, i32, ...)*)(i32* %11, i32* %12, i32 1, i32 0, i32 1, i32 0)
br label %38
36: ; preds = %31
%37 = call i32 (i32*, i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @make_MRIState to i32 (i32*, i32*, i32, i32, i32, i32, ...)*)(i32* %11, i32* %12, i32 0, i32 0, i32 0, i32 0)
br label %38
38: ; preds = %36, %34
%39 = load i32, i32* %11
%40 = icmp eq i32 %39, 1
br i1 %40, label %41, label %61
41: ; preds = %38
%42 = load i32, i32* %10
%43 = icmp eq i32 %42, 2
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 (i32*, i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @make_MRIState to i32 (i32*, i32*, i32, i32, i32, i32, ...)*)(i32* %11, i32* %13, i32 1, i32 0, i32 1, i32 0)
br label %48
46: ; preds = %41
%47 = call i32 (i32*, i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @make_MRIState to i32 (i32*, i32*, i32, i32, i32, i32, ...)*)(i32* %11, i32* %13, i32 0, i32 0, i32 0, i32 0)
br label %48
48: ; preds = %46, %44
%49 = load i32, i32* %11
%50 = icmp eq i32 %49, 1
br i1 %50, label %51, label %60
51: ; preds = %48
%52 = load i32*, i32** %7
%53 = load i32, i32* %52
%54 = load i32, i32* %12
%55 = call i32 (i32, i32, ...) bitcast (i32 (...)* @cre_curMRIState to i32 (i32, i32, ...)*)(i32 %53, i32 %54)
%56 = load i32*, i32** %7
%57 = load i32, i32* %56
%58 = load i32, i32* %13
%59 = call i32 (i32, i32, ...) bitcast (i32 (...)* @cre_cptMRIState to i32 (i32, i32, ...)*)(i32 %57, i32 %58)
br label %60
60: ; preds = %51, %48
br label %61
61: ; preds = %60, %38
br label %81
62: ; preds = %29, %29, %29
%63 = call i32 (i32*, i32*, i32, i32, i32, ...) bitcast (i32 (...)* @make_GENState to i32 (i32*, i32*, i32, i32, i32, ...)*)(i32* %11, i32* %14, i32 0, i32 0, i32 0)
%64 = load i32, i32* %11
%65 = icmp eq i32 %64, 1
br i1 %65, label %66, label %80
66: ; preds = %62
%67 = call i32 (i32*, i32*, i32, i32, i32, ...) bitcast (i32 (...)* @make_GENState to i32 (i32*, i32*, i32, i32, i32, ...)*)(i32* %11, i32* %15, i32 0, i32 0, i32 0)
%68 = load i32, i32* %11
%69 = icmp eq i32 %68, 1
br i1 %69, label %70, label %79
70: ; preds = %66
%71 = load i32*, i32** %7
%72 = load i32, i32* %71
%73 = load i32, i32* %14
%74 = call i32 (i32, i32, ...) bitcast (i32 (...)* @cre_curGENState to i32 (i32, i32, ...)*)(i32 %72, i32 %73)
%75 = load i32*, i32** %7
%76 = load i32, i32* %75
%77 = load i32, i32* %15
%78 = call i32 (i32, i32, ...) bitcast (i32 (...)* @cre_cptGENState to i32 (i32, i32, ...)*)(i32 %76, i32 %77)
br label %79
79: ; preds = %70, %66
br label %80
80: ; preds = %79, %62
br label %81
81: ; preds = %29, %80, %61
br label %82
82: ; preds = %81, %22
%83 = load i32, i32* %11
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %89
85: ; preds = %82
%86 = load i32*, i32** %7
%87 = load i32, i32* %86
%88 = call i32 (i32, ...) bitcast (i32 (...)* @kill_Construct to i32 (i32, ...)*)(i32 %87)
br label %89
89: ; preds = %85, %82
br label %90
90: ; preds = %89, %5
%91 = load i32, i32* %11
%92 = load i32*, i32** %6
store i32 %91, i32* %92
ret void
}

LLVM IR (-O2):
define void @intr_usr_lib(i32* nocapture writeonly %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = bitcast i32* %6 to i8*
%12 = bitcast i32* %7 to i8*
%13 = bitcast i32* %8 to i8*
%14 = bitcast i32* %9 to i8*
%15 = bitcast i32* %10 to i8*
%16 = call i32 (i32*, i32*, i32, i32, ...) bitcast (i32 (...)* @make_Construct to i32 (i32*, i32*, i32, i32, ...)*)(i32* %6, i32* %1, i32 %2, i32 %4)
%17 = load i32, i32* %6
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %73
19: ; preds = %5
%20 = load i32, i32* %1
%21 = call i32 (i32*, i32, i32*, ...) bitcast (i32 (...)* @mod_name to i32 (i32*, i32, i32*, ...)*)(i32* %6, i32 %20, i32* %3)
%22 = load i32, i32* %6
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %66
24: ; preds = %19
switch i32 %2, label %73 [
i32 1, label %25
i32 2, label %25
i32 3, label %25
i32 7, label %25
i32 12, label %25
i32 4, label %49
i32 6, label %49
i32 5, label %49
]
25: ; preds = %24, %24, %24, %24, %24
%26 = icmp eq i32 %4, 2
br i1 %26, label %27, label %31
27: ; preds = %25
%28 = call i32 (i32*, i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @make_MRIState to i32 (i32*, i32*, i32, i32, i32, i32, ...)*)(i32* %6, i32* %7, i32 1, i32 0, i32 1, i32 0)
%29 = load i32, i32* %6
%30 = icmp eq i32 %29, 1
br i1 %30, label %35, label %66
31: ; preds = %25
%32 = call i32 (i32*, i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @make_MRIState to i32 (i32*, i32*, i32, i32, i32, i32, ...)*)(i32* %6, i32* %7, i32 0, i32 0, i32 0, i32 0)
%33 = load i32, i32* %6
%34 = icmp eq i32 %33, 1
br i1 %34, label %37, label %66
35: ; preds = %27
%36 = call i32 (i32*, i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @make_MRIState to i32 (i32*, i32*, i32, i32, i32, i32, ...)*)(i32* %6, i32* %8, i32 1, i32 0, i32 1, i32 0)
br label %39
37: ; preds = %31
%38 = call i32 (i32*, i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @make_MRIState to i32 (i32*, i32*, i32, i32, i32, i32, ...)*)(i32* %6, i32* %8, i32 0, i32 0, i32 0, i32 0)
br label %39
39: ; preds = %37, %35
%40 = load i32, i32* %6
%41 = icmp eq i32 %40, 1
br i1 %41, label %42, label %66
42: ; preds = %39
%43 = load i32, i32* %1
%44 = load i32, i32* %7
%45 = call i32 (i32, i32, ...) bitcast (i32 (...)* @cre_curMRIState to i32 (i32, i32, ...)*)(i32 %43, i32 %44)
%46 = load i32, i32* %1
%47 = load i32, i32* %8
%48 = call i32 (i32, i32, ...) bitcast (i32 (...)* @cre_cptMRIState to i32 (i32, i32, ...)*)(i32 %46, i32 %47)
br label %64
49: ; preds = %24, %24, %24
%50 = call i32 (i32*, i32*, i32, i32, i32, ...) bitcast (i32 (...)* @make_GENState to i32 (i32*, i32*, i32, i32, i32, ...)*)(i32* %6, i32* %9, i32 0, i32 0, i32 0)
%51 = load i32, i32* %6
%52 = icmp eq i32 %51, 1
br i1 %52, label %53, label %66
53: ; preds = %49
%54 = call i32 (i32*, i32*, i32, i32, i32, ...) bitcast (i32 (...)* @make_GENState to i32 (i32*, i32*, i32, i32, i32, ...)*)(i32* %6, i32* %10, i32 0, i32 0, i32 0)
%55 = load i32, i32* %6
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %66
57: ; preds = %53
%58 = load i32, i32* %1
%59 = load i32, i32* %9
%60 = call i32 (i32, i32, ...) bitcast (i32 (...)* @cre_curGENState to i32 (i32, i32, ...)*)(i32 %58, i32 %59)
%61 = load i32, i32* %1
%62 = load i32, i32* %10
%63 = call i32 (i32, i32, ...) bitcast (i32 (...)* @cre_cptGENState to i32 (i32, i32, ...)*)(i32 %61, i32 %62)
br label %64
64: ; preds = %57, %42
%65 = load i32, i32* %6
br label %66
66: ; preds = %64, %31, %39, %27, %53, %49, %19
%67 = phi i32 [ %65, %64 ], [ %33, %31 ], [ %40, %39 ], [ %29, %27 ], [ %55, %53 ], [ %51, %49 ], [ %22, %19 ]
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %73
69: ; preds = %66
%70 = load i32, i32* %1
%71 = call i32 (i32, ...) bitcast (i32 (...)* @kill_Construct to i32 (i32, ...)*)(i32 %70)
%72 = load i32, i32* %6
br label %73
73: ; preds = %24, %66, %69, %5
%74 = phi i32 [ 1, %24 ], [ %67, %66 ], [ %72, %69 ], [ %17, %5 ]
store i32 %74, i32* %0
ret void
}