pogenerate(rep, cc, nn) int *rep, cc, nn;
{
  int st, rr, ll;
  val_curMRIState(&st, cc);
  push_pob(&rr, st, nn);
  if (rr == 1) {
    val_cptMRIState(&st, cc);
    length_pob(&ll, st);
    if (ll == 0) {
      push_pob(&rr, st, nn);
    }
    val_cptMRIState(&st, cc);
    modIth_pob(st, 1, nn);
  }
  *rep = rr;
}


x86 assembly (clang, -O0):
<pogenerate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%esi
lea    -0x1c(%rbp),%rdi
mov    $0x0,%al
call   1040 <val_curMRIState@plt>
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1050 <push_pob@plt>
cmpl   $0x1,-0x20(%rbp)
jne    11e2 <pogenerate+0x92>
mov    -0x14(%rbp),%esi
lea    -0x1c(%rbp),%rdi
mov    $0x0,%al
call   1060 <val_cptMRIState@plt>
mov    -0x1c(%rbp),%esi
lea    -0x24(%rbp),%rdi
mov    $0x0,%al
call   1070 <length_pob@plt>
cmpl   $0x0,-0x24(%rbp)
jne    11c2 <pogenerate+0x72>
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1050 <push_pob@plt>
mov    -0x14(%rbp),%esi
lea    -0x1c(%rbp),%rdi
mov    $0x0,%al
call   1060 <val_cptMRIState@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <modIth_pob@plt>
mov    -0x20(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pogenerate>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebp
mov    %esi,%ebx
mov    %rdi,%r14
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   1040 <val_curMRIState@plt>
mov    0x4(%rsp),%esi
lea    0x8(%rsp),%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <push_pob@plt>
mov    0x8(%rsp),%eax
cmp    $0x1,%eax
jne    11e1 <pogenerate+0x91>
lea    0x4(%rsp),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <val_cptMRIState@plt>
mov    0x4(%rsp),%esi
lea    0xc(%rsp),%rdi
xor    %eax,%eax
call   1070 <length_pob@plt>
cmpl   $0x0,0xc(%rsp)
jne    11bd <pogenerate+0x6d>
mov    0x4(%rsp),%esi
lea    0x8(%rsp),%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <push_pob@plt>
lea    0x4(%rsp),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <val_cptMRIState@plt>
mov    0x4(%rsp),%edi
mov    $0x1,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <modIth_pob@plt>
mov    0x8(%rsp),%eax
mov    %eax,(%r14)
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pogenerate(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%11 = load i32, i32* %6
%12 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @val_curMRIState to i32 (i32*, i32, ...)*)(i32* %8, i32 %11)
%13 = load i32, i32* %8
%14 = load i32, i32* %7
%15 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @push_pob to i32 (i32*, i32, i32, ...)*)(i32* %9, i32 %13, i32 %14)
%16 = load i32, i32* %9
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %35
18: ; preds = %3
%19 = load i32, i32* %6
%20 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @val_cptMRIState to i32 (i32*, i32, ...)*)(i32* %8, i32 %19)
%21 = load i32, i32* %8
%22 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @length_pob to i32 (i32*, i32, ...)*)(i32* %10, i32 %21)
%23 = load i32, i32* %10
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %29
25: ; preds = %18
%26 = load i32, i32* %8
%27 = load i32, i32* %7
%28 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @push_pob to i32 (i32*, i32, i32, ...)*)(i32* %9, i32 %26, i32 %27)
br label %29
29: ; preds = %25, %18
%30 = load i32, i32* %6
%31 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @val_cptMRIState to i32 (i32*, i32, ...)*)(i32* %8, i32 %30)
%32 = load i32, i32* %8
%33 = load i32, i32* %7
%34 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @modIth_pob to i32 (i32, i32, i32, ...)*)(i32 %32, i32 1, i32 %33)
br label %35
35: ; preds = %29, %3
%36 = load i32, i32* %9
%37 = load i32*, i32** %5
store i32 %36, i32* %37
%38 = load i32, i32* %4
ret i32 %38
}

LLVM IR (-O2):
define i32 @pogenerate(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = bitcast i32* %6 to i8*
%10 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @val_curMRIState to i32 (i32*, i32, ...)*)(i32* %4, i32 %1)
%11 = load i32, i32* %4
%12 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @push_pob to i32 (i32*, i32, i32, ...)*)(i32* %5, i32 %11, i32 %2)
%13 = load i32, i32* %5
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %29
15: ; preds = %3
%16 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @val_cptMRIState to i32 (i32*, i32, ...)*)(i32* %4, i32 %1)
%17 = load i32, i32* %4
%18 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @length_pob to i32 (i32*, i32, ...)*)(i32* %6, i32 %17)
%19 = load i32, i32* %6
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %15
%22 = load i32, i32* %4
%23 = call i32 (i32*, i32, i32, ...) bitcast (i32 (...)* @push_pob to i32 (i32*, i32, i32, ...)*)(i32* %5, i32 %22, i32 %2)
br label %24
24: ; preds = %21, %15
%25 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @val_cptMRIState to i32 (i32*, i32, ...)*)(i32* %4, i32 %1)
%26 = load i32, i32* %4
%27 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @modIth_pob to i32 (i32, i32, i32, ...)*)(i32 %26, i32 1, i32 %2)
%28 = load i32, i32* %5
br label %29
29: ; preds = %24, %3
%30 = phi i32 [ %28, %24 ], [ %13, %3 ]
store i32 %30, i32* %0
ret i32 undef
}