#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ __CrestApply2(int, int, long long);
int /*<<< orphan*/ __CrestBranch(int, int, int);
int /*<<< orphan*/ __CrestCall(int, int);
int /*<<< orphan*/ __CrestHandleReturn(int, long long);
int /*<<< orphan*/ __CrestInt(int *);
int /*<<< orphan*/ __CrestLoad(int, unsigned long, long long);
int /*<<< orphan*/ __CrestReturn(int);
int /*<<< orphan*/ __CrestStore(int, unsigned long);
int _divides(int, int);
int even(int);
int prime(int n) {
  int i;
  int ret;
  int tmp;
  int tmp___0;
  int __retres6;
  {
    __CrestCall(21, 3);
    __CrestStore(20, (unsigned long)(&n));
    __CrestInt(&n);
    __CrestLoad(22, (unsigned long)(&n), (long long)n);
    tmp___0 = even(n);
    __CrestHandleReturn(24, (long long)tmp___0);
    __CrestStore(23, (unsigned long)(&tmp___0));
    {
      __CrestLoad(27, (unsigned long)(&tmp___0), (long long)tmp___0);
      __CrestLoad(26, (unsigned long)0, (long long)0);
      __CrestApply2(25, 13, (long long)(tmp___0 != 0));
      if (tmp___0 != 0) {
        __CrestBranch(28, 7, 1);
        __CrestLoad(32, (unsigned long)(&n), (long long)n);
        __CrestLoad(31, (unsigned long)0, (long long)2);
        __CrestApply2(30, 12, (long long)(n == 2));
        __CrestStore(33, (unsigned long)(&ret));
        ret = n == 2;
      } else {
        __CrestBranch(29, 8, 0);
        __CrestLoad(34, (unsigned long)0, (long long)3);
        __CrestStore(35, (unsigned long)(&i));
        i = 3;
        {
          {
            __CrestLoad(40, (unsigned long)(&i), (long long)i);
            __CrestLoad(39, (unsigned long)(&i), (long long)i);
            __CrestApply2(38, 2, (long long)(i * i));
            __CrestLoad(37, (unsigned long)(&n), (long long)n);
            __CrestApply2(36, 15, (long long)(i * i <= n));
            if (i * i <= n) {
              __CrestBranch(41, 11, 1);
              __CrestLoad(43, (unsigned long)(&i), (long long)i);
              __CrestLoad(44, (unsigned long)(&n), (long long)n);
              tmp = _divides(i, n);
              __CrestHandleReturn(46, (long long)tmp);
              __CrestStore(45, (unsigned long)(&tmp));
              {
                __CrestLoad(49, (unsigned long)(&tmp), (long long)tmp);
                __CrestLoad(48, (unsigned long)0, (long long)0);
                __CrestApply2(47, 13, (long long)(tmp != 0));
                if (tmp != 0) {
                  __CrestBranch(50, 13, 1);
                  __CrestLoad(52, (unsigned long)0, (long long)0);
                  __CrestStore(53, (unsigned long)(&__retres6));
                  __retres6 = 0;
                  goto return_label;
                } else {
                  __CrestBranch(51, 15, 0);
                }
              }
              __CrestLoad(56, (unsigned long)(&i), (long long)i);
              __CrestLoad(55, (unsigned long)0, (long long)2);
              __CrestApply2(54, 0, (long long)(i + 2));
              __CrestStore(57, (unsigned long)(&i));
              i += 2;
            } else {
              __CrestBranch(42, 17, 0);
            }
          }
          {
            __CrestLoad(62, (unsigned long)(&i), (long long)i);
            __CrestLoad(61, (unsigned long)(&i), (long long)i);
            __CrestApply2(60, 2, (long long)(i * i));
            __CrestLoad(59, (unsigned long)(&n), (long long)n);
            __CrestApply2(58, 15, (long long)(i * i <= n));
            if (i * i <= n) {
              __CrestBranch(63, 19, 1);
              __CrestLoad(65, (unsigned long)(&i), (long long)i);
              __CrestLoad(66, (unsigned long)(&n), (long long)n);
              tmp = _divides(i, n);
              __CrestHandleReturn(68, (long long)tmp);
              __CrestStore(67, (unsigned long)(&tmp));
              {
                __CrestLoad(71, (unsigned long)(&tmp), (long long)tmp);
                __CrestLoad(70, (unsigned long)0, (long long)0);
                __CrestApply2(69, 13, (long long)(tmp != 0));
                if (tmp != 0) {
                  __CrestBranch(72, 21, 1);
                  __CrestLoad(74, (unsigned long)0, (long long)0);
                  __CrestStore(75, (unsigned long)(&__retres6));
                  __retres6 = 0;
                  goto return_label;
                } else {
                  __CrestBranch(73, 23, 0);
                }
              }
              __CrestLoad(78, (unsigned long)(&i), (long long)i);
              __CrestLoad(77, (unsigned long)0, (long long)2);
              __CrestApply2(76, 0, (long long)(i + 2));
              __CrestStore(79, (unsigned long)(&i));
              i += 2;
            } else {
              __CrestBranch(64, 25, 0);
            }
          }
        }
        __CrestLoad(82, (unsigned long)(&n), (long long)n);
        __CrestLoad(81, (unsigned long)0, (long long)1);
        __CrestApply2(80, 14, (long long)(n > 1));
        __CrestStore(83, (unsigned long)(&__retres6));
        __retres6 = n > 1;
        goto return_label;
      }
    }
    __CrestLoad(84, (unsigned long)(&ret), (long long)ret);
    __CrestStore(85, (unsigned long)(&__retres6));
    __retres6 = ret;
  return_label : {
    __CrestLoad(86, (unsigned long)(&__retres6), (long long)__retres6);
    __CrestReturn(87);
    return (__retres6);
  }
  }
}


x86 assembly (clang, -O0):
<prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x15,%edi
mov    $0x3,%esi
call   1090 <__CrestCall@plt>
lea    -0x4(%rbp),%rsi
mov    $0x14,%edi
call   1060 <__CrestStore@plt>
lea    -0x4(%rbp),%rdi
call   10a0 <__CrestInt@plt>
lea    -0x4(%rbp),%rsi
movslq -0x4(%rbp),%rdx
mov    $0x16,%edi
call   10b0 <__CrestLoad@plt>
mov    -0x4(%rbp),%edi
call   1080 <even@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rsi
mov    $0x18,%edi
call   10c0 <__CrestHandleReturn@plt>
lea    -0x14(%rbp),%rsi
mov    $0x17,%edi
call   1060 <__CrestStore@plt>
lea    -0x14(%rbp),%rsi
movslq -0x14(%rbp),%rdx
mov    $0x1b,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x1a,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10b0 <__CrestLoad@plt>
cmpl   $0x0,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x19,%edi
mov    $0xd,%esi
call   1040 <__CrestApply2@plt>
cmpl   $0x0,-0x14(%rbp)
je     12ce <prime+0x12e>
mov    $0x1c,%edi
mov    $0x7,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
lea    -0x4(%rbp),%rsi
movslq -0x4(%rbp),%rdx
mov    $0x20,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x1f,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x2,%edx
call   10b0 <__CrestLoad@plt>
cmpl   $0x2,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x1e,%edi
mov    $0xc,%esi
call   1040 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x21,%edi
call   1060 <__CrestStore@plt>
cmpl   $0x2,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    173a <prime+0x59a>
mov    $0x1d,%edi
mov    $0x8,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
mov    $0x22,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x3,%edx
call   10b0 <__CrestLoad@plt>
lea    -0x8(%rbp),%rsi
mov    $0x23,%edi
call   1060 <__CrestStore@plt>
movl   $0x3,-0x8(%rbp)
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x28,%edi
call   10b0 <__CrestLoad@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x27,%edi
call   10b0 <__CrestLoad@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
movslq %eax,%rdx
mov    $0x26,%edi
mov    $0x2,%esi
call   1040 <__CrestApply2@plt>
lea    -0x4(%rbp),%rsi
movslq -0x4(%rbp),%rdx
mov    $0x25,%edi
call   10b0 <__CrestLoad@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x24,%edi
mov    $0xf,%esi
call   1040 <__CrestApply2@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     14dd <prime+0x33d>
mov    $0x29,%edi
mov    $0xb,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x2b,%edi
call   10b0 <__CrestLoad@plt>
lea    -0x4(%rbp),%rsi
movslq -0x4(%rbp),%rdx
mov    $0x2c,%edi
call   10b0 <__CrestLoad@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <_divides@plt>
mov    %eax,-0x10(%rbp)
movslq -0x10(%rbp),%rsi
mov    $0x2e,%edi
call   10c0 <__CrestHandleReturn@plt>
lea    -0x10(%rbp),%rsi
mov    $0x2d,%edi
call   1060 <__CrestStore@plt>
lea    -0x10(%rbp),%rsi
movslq -0x10(%rbp),%rdx
mov    $0x31,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x30,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10b0 <__CrestLoad@plt>
cmpl   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x2f,%edi
mov    $0xd,%esi
call   1040 <__CrestApply2@plt>
cmpl   $0x0,-0x10(%rbp)
je     1476 <prime+0x2d6>
mov    $0x32,%edi
mov    $0xd,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
mov    $0x34,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10b0 <__CrestLoad@plt>
lea    -0x18(%rbp),%rsi
mov    $0x35,%edi
call   1060 <__CrestStore@plt>
movl   $0x0,-0x18(%rbp)
jmp    1760 <prime+0x5c0>
mov    $0x33,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x38,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x37,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x2,%edx
call   10b0 <__CrestLoad@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
movslq %eax,%rdx
mov    $0x36,%edi
xor    %esi,%esi
call   1040 <__CrestApply2@plt>
lea    -0x8(%rbp),%rsi
mov    $0x39,%edi
call   1060 <__CrestStore@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    14ee <prime+0x34e>
mov    $0x2a,%edi
mov    $0x11,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x3e,%edi
call   10b0 <__CrestLoad@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x3d,%edi
call   10b0 <__CrestLoad@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
movslq %eax,%rdx
mov    $0x3c,%edi
mov    $0x2,%esi
call   1040 <__CrestApply2@plt>
lea    -0x4(%rbp),%rsi
movslq -0x4(%rbp),%rdx
mov    $0x3b,%edi
call   10b0 <__CrestLoad@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x3a,%edi
mov    $0xf,%esi
call   1040 <__CrestApply2@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     16c4 <prime+0x524>
mov    $0x3f,%edi
mov    $0x13,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x41,%edi
call   10b0 <__CrestLoad@plt>
lea    -0x4(%rbp),%rsi
movslq -0x4(%rbp),%rdx
mov    $0x42,%edi
call   10b0 <__CrestLoad@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <_divides@plt>
mov    %eax,-0x10(%rbp)
movslq -0x10(%rbp),%rsi
mov    $0x44,%edi
call   10c0 <__CrestHandleReturn@plt>
lea    -0x10(%rbp),%rsi
mov    $0x43,%edi
call   1060 <__CrestStore@plt>
lea    -0x10(%rbp),%rsi
movslq -0x10(%rbp),%rdx
mov    $0x47,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x46,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10b0 <__CrestLoad@plt>
cmpl   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x45,%edi
mov    $0xd,%esi
call   1040 <__CrestApply2@plt>
cmpl   $0x0,-0x10(%rbp)
je     165d <prime+0x4bd>
mov    $0x48,%edi
mov    $0x15,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
mov    $0x4a,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10b0 <__CrestLoad@plt>
lea    -0x18(%rbp),%rsi
mov    $0x4b,%edi
call   1060 <__CrestStore@plt>
movl   $0x0,-0x18(%rbp)
jmp    1760 <prime+0x5c0>
mov    $0x49,%edi
mov    $0x17,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x4e,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x4d,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x2,%edx
call   10b0 <__CrestLoad@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
movslq %eax,%rdx
mov    $0x4c,%edi
xor    %esi,%esi
call   1040 <__CrestApply2@plt>
lea    -0x8(%rbp),%rsi
mov    $0x4f,%edi
call   1060 <__CrestStore@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    16d5 <prime+0x535>
mov    $0x40,%edi
mov    $0x19,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
lea    -0x4(%rbp),%rsi
movslq -0x4(%rbp),%rdx
mov    $0x52,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x51,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   10b0 <__CrestLoad@plt>
cmpl   $0x1,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x50,%edi
mov    $0xe,%esi
call   1040 <__CrestApply2@plt>
lea    -0x18(%rbp),%rsi
mov    $0x53,%edi
call   1060 <__CrestStore@plt>
cmpl   $0x1,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
jmp    1760 <prime+0x5c0>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x54,%edi
call   10b0 <__CrestLoad@plt>
lea    -0x18(%rbp),%rsi
mov    $0x55,%edi
call   1060 <__CrestStore@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    -0x18(%rbp),%rsi
movslq -0x18(%rbp),%rdx
mov    $0x56,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x57,%edi
call   1070 <__CrestReturn@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prime>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,0x8(%rsp)
mov    $0x15,%edi
mov    $0x3,%esi
call   1090 <__CrestCall@plt>
lea    0x8(%rsp),%rbx
mov    $0x14,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
mov    %rbx,%rdi
call   10a0 <__CrestInt@plt>
movslq 0x8(%rsp),%rdx
mov    $0x16,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    0x8(%rsp),%edi
call   1080 <even@plt>
mov    %eax,0x14(%rsp)
movslq %eax,%rsi
mov    $0x18,%edi
call   10c0 <__CrestHandleReturn@plt>
lea    0x14(%rsp),%rbx
mov    $0x17,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
movslq 0x14(%rsp),%rdx
mov    $0x1b,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    $0x1a,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10b0 <__CrestLoad@plt>
xor    %edx,%edx
cmpl   $0x0,0x14(%rsp)
setne  %dl
mov    $0x19,%edi
mov    $0xd,%esi
call   1040 <__CrestApply2@plt>
cmpl   $0x0,0x14(%rsp)
je     12f1 <prime+0x151>
mov    $0x1c,%edi
mov    $0x7,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x20,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x2,%edx
mov    $0x1f,%edi
xor    %esi,%esi
call   10b0 <__CrestLoad@plt>
xor    %edx,%edx
cmpl   $0x2,0x8(%rsp)
sete   %dl
mov    $0x1e,%edi
mov    $0xc,%esi
call   1040 <__CrestApply2@plt>
lea    0x4(%rsp),%rbx
mov    $0x21,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
xor    %edx,%edx
cmpl   $0x2,0x8(%rsp)
sete   %dl
mov    %edx,0x4(%rsp)
mov    $0x54,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
lea    0x10(%rsp),%rbx
mov    $0x55,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
mov    0x4(%rsp),%r14d
jmp    1746 <prime+0x5a6>
mov    $0x1d,%edi
mov    $0x8,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
mov    $0x3,%edx
mov    $0x22,%edi
xor    %esi,%esi
call   10b0 <__CrestLoad@plt>
lea    0x4(%rsp),%rbx
mov    $0x23,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
movl   $0x3,0x4(%rsp)
mov    $0x3,%edx
mov    $0x28,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
mov    $0x27,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    0x4(%rsp),%edx
imul   %edx,%edx
mov    $0x26,%edi
mov    $0x2,%esi
call   1040 <__CrestApply2@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x25,%edi
call   10b0 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
imul   %eax,%eax
xor    %edx,%edx
cmp    0x8(%rsp),%eax
setle  %dl
mov    $0x24,%edi
mov    $0xf,%esi
call   1040 <__CrestApply2@plt>
mov    0x4(%rsp),%eax
imul   %eax,%eax
cmp    0x8(%rsp),%eax
jle    13c1 <prime+0x221>
mov    $0x2a,%edi
mov    $0x11,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
mov    0x4(%rsp),%eax
jmp    1507 <prime+0x367>
mov    $0x29,%edi
mov    $0xb,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rsi
mov    $0x2b,%edi
call   10b0 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x2c,%edi
call   10b0 <__CrestLoad@plt>
mov    0x4(%rsp),%edi
mov    0x8(%rsp),%esi
call   1030 <_divides@plt>
mov    %eax,0xc(%rsp)
movslq %eax,%rsi
mov    $0x2e,%edi
call   10c0 <__CrestHandleReturn@plt>
lea    0xc(%rsp),%rbx
mov    $0x2d,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
movslq 0xc(%rsp),%rdx
mov    $0x31,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
xor    %r14d,%r14d
mov    $0x30,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10b0 <__CrestLoad@plt>
xor    %edx,%edx
cmpl   $0x0,0xc(%rsp)
setne  %dl
mov    $0x2f,%edi
mov    $0xd,%esi
call   1040 <__CrestApply2@plt>
cmpl   $0x0,0xc(%rsp)
je     14a1 <prime+0x301>
mov    $0x32,%edi
mov    $0xd,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
mov    $0x34,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10b0 <__CrestLoad@plt>
lea    0x10(%rsp),%rbx
mov    $0x35,%edi
jmp    1675 <prime+0x4d5>
mov    $0x33,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rbx
mov    $0x38,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    $0x2,%edx
mov    $0x37,%edi
xor    %esi,%esi
call   10b0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
add    $0x2,%rdx
mov    $0x36,%edi
xor    %esi,%esi
call   1040 <__CrestApply2@plt>
mov    $0x39,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
mov    0x4(%rsp),%eax
add    $0x2,%eax
mov    %eax,0x4(%rsp)
movslq %eax,%rdx
lea    0x4(%rsp),%rbx
mov    $0x3e,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
mov    $0x3d,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    0x4(%rsp),%edx
imul   %edx,%edx
mov    $0x3c,%edi
mov    $0x2,%esi
call   1040 <__CrestApply2@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x3b,%edi
call   10b0 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
imul   %eax,%eax
xor    %edx,%edx
cmp    0x8(%rsp),%eax
setle  %dl
mov    $0x3a,%edi
mov    $0xf,%esi
call   1040 <__CrestApply2@plt>
mov    0x4(%rsp),%eax
imul   %eax,%eax
cmp    0x8(%rsp),%eax
jle    159a <prime+0x3fa>
mov    $0x40,%edi
mov    $0x19,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
jmp    16ea <prime+0x54a>
mov    $0x3f,%edi
mov    $0x13,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rsi
mov    $0x41,%edi
call   10b0 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x42,%edi
call   10b0 <__CrestLoad@plt>
mov    0x4(%rsp),%edi
mov    0x8(%rsp),%esi
call   1030 <_divides@plt>
mov    %eax,0xc(%rsp)
movslq %eax,%rsi
mov    $0x44,%edi
call   10c0 <__CrestHandleReturn@plt>
lea    0xc(%rsp),%rbx
mov    $0x43,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
movslq 0xc(%rsp),%rdx
mov    $0x47,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
xor    %r14d,%r14d
mov    $0x46,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10b0 <__CrestLoad@plt>
xor    %edx,%edx
cmpl   $0x0,0xc(%rsp)
setne  %dl
mov    $0x45,%edi
mov    $0xd,%esi
call   1040 <__CrestApply2@plt>
cmpl   $0x0,0xc(%rsp)
je     168a <prime+0x4ea>
mov    $0x48,%edi
mov    $0x15,%esi
mov    $0x1,%edx
call   1050 <__CrestBranch@plt>
mov    $0x4a,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10b0 <__CrestLoad@plt>
lea    0x10(%rsp),%rbx
mov    $0x4b,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
movl   $0x0,0x10(%rsp)
jmp    174b <prime+0x5ab>
mov    $0x49,%edi
mov    $0x17,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rbx
mov    $0x4e,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    $0x2,%edx
mov    $0x4d,%edi
xor    %esi,%esi
call   10b0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
add    $0x2,%rdx
mov    $0x4c,%edi
xor    %esi,%esi
call   1040 <__CrestApply2@plt>
mov    $0x4f,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
addl   $0x2,0x4(%rsp)
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x52,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x51,%edi
xor    %esi,%esi
call   10b0 <__CrestLoad@plt>
xor    %edx,%edx
cmpl   $0x2,0x8(%rsp)
setge  %dl
mov    $0x50,%edi
mov    $0xe,%esi
call   1040 <__CrestApply2@plt>
lea    0x10(%rsp),%rbx
mov    $0x53,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
xor    %r14d,%r14d
cmpl   $0x2,0x8(%rsp)
setge  %r14b
mov    %r14d,0x10(%rsp)
movslq %r14d,%rdx
mov    $0x56,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    $0x57,%edi
call   1070 <__CrestReturn@plt>
mov    0x10(%rsp),%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @prime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %2
%8 = call i32 @__CrestCall(i32 21, i32 3)
%9 = ptrtoint i32* %2 to i64
%10 = call i32 @__CrestStore(i32 20, i64 %9)
%11 = call i32 @__CrestInt(i32* %2)
%12 = ptrtoint i32* %2 to i64
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = call i32 @__CrestLoad(i32 22, i64 %12, i64 %14)
%16 = load i32, i32* %2
%17 = call i32 @even(i32 %16)
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = call i32 @__CrestHandleReturn(i32 24, i64 %19)
%21 = ptrtoint i32* %6 to i64
%22 = call i32 @__CrestStore(i32 23, i64 %21)
%23 = ptrtoint i32* %6 to i64
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = call i32 @__CrestLoad(i32 27, i64 %23, i64 %25)
%27 = call i32 @__CrestLoad(i32 26, i64 0, i64 0)
%28 = load i32, i32* %6
%29 = icmp ne i32 %28, 0
%30 = zext i1 %29 to i32
%31 = sext i32 %30 to i64
%32 = call i32 @__CrestApply2(i32 25, i32 13, i64 %31)
%33 = load i32, i32* %6
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %52
35: ; preds = %1
%36 = call i32 @__CrestBranch(i32 28, i32 7, i32 1)
%37 = ptrtoint i32* %2 to i64
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = call i32 @__CrestLoad(i32 32, i64 %37, i64 %39)
%41 = call i32 @__CrestLoad(i32 31, i64 0, i64 2)
%42 = load i32, i32* %2
%43 = icmp eq i32 %42, 2
%44 = zext i1 %43 to i32
%45 = sext i32 %44 to i64
%46 = call i32 @__CrestApply2(i32 30, i32 12, i64 %45)
%47 = ptrtoint i32* %4 to i64
%48 = call i32 @__CrestStore(i32 33, i64 %47)
%49 = load i32, i32* %2
%50 = icmp eq i32 %49, 2
%51 = zext i1 %50 to i32
store i32 %51, i32* %4
br label %240
52: ; preds = %1
%53 = call i32 @__CrestBranch(i32 29, i32 8, i32 0)
%54 = call i32 @__CrestLoad(i32 34, i64 0, i64 3)
%55 = ptrtoint i32* %3 to i64
%56 = call i32 @__CrestStore(i32 35, i64 %55)
store i32 3, i32* %3
%57 = ptrtoint i32* %3 to i64
%58 = load i32, i32* %3
%59 = sext i32 %58 to i64
%60 = call i32 @__CrestLoad(i32 40, i64 %57, i64 %59)
%61 = ptrtoint i32* %3 to i64
%62 = load i32, i32* %3
%63 = sext i32 %62 to i64
%64 = call i32 @__CrestLoad(i32 39, i64 %61, i64 %63)
%65 = load i32, i32* %3
%66 = load i32, i32* %3
%67 = mul nsw i32 %65, %66
%68 = sext i32 %67 to i64
%69 = call i32 @__CrestApply2(i32 38, i32 2, i64 %68)
%70 = ptrtoint i32* %2 to i64
%71 = load i32, i32* %2
%72 = sext i32 %71 to i64
%73 = call i32 @__CrestLoad(i32 37, i64 %70, i64 %72)
%74 = load i32, i32* %3
%75 = load i32, i32* %3
%76 = mul nsw i32 %74, %75
%77 = load i32, i32* %2
%78 = icmp sle i32 %76, %77
%79 = zext i1 %78 to i32
%80 = sext i32 %79 to i64
%81 = call i32 @__CrestApply2(i32 36, i32 15, i64 %80)
%82 = load i32, i32* %3
%83 = load i32, i32* %3
%84 = mul nsw i32 %82, %83
%85 = load i32, i32* %2
%86 = icmp sle i32 %84, %85
br i1 %86, label %87, label %138
87: ; preds = %52
%88 = call i32 @__CrestBranch(i32 41, i32 11, i32 1)
%89 = ptrtoint i32* %3 to i64
%90 = load i32, i32* %3
%91 = sext i32 %90 to i64
%92 = call i32 @__CrestLoad(i32 43, i64 %89, i64 %91)
%93 = ptrtoint i32* %2 to i64
%94 = load i32, i32* %2
%95 = sext i32 %94 to i64
%96 = call i32 @__CrestLoad(i32 44, i64 %93, i64 %95)
%97 = load i32, i32* %3
%98 = load i32, i32* %2
%99 = call i32 @_divides(i32 %97, i32 %98)
store i32 %99, i32* %5
%100 = load i32, i32* %5
%101 = sext i32 %100 to i64
%102 = call i32 @__CrestHandleReturn(i32 46, i64 %101)
%103 = ptrtoint i32* %5 to i64
%104 = call i32 @__CrestStore(i32 45, i64 %103)
%105 = ptrtoint i32* %5 to i64
%106 = load i32, i32* %5
%107 = sext i32 %106 to i64
%108 = call i32 @__CrestLoad(i32 49, i64 %105, i64 %107)
%109 = call i32 @__CrestLoad(i32 48, i64 0, i64 0)
%110 = load i32, i32* %5
%111 = icmp ne i32 %110, 0
%112 = zext i1 %111 to i32
%113 = sext i32 %112 to i64
%114 = call i32 @__CrestApply2(i32 47, i32 13, i64 %113)
%115 = load i32, i32* %5
%116 = icmp ne i32 %115, 0
br i1 %116, label %117, label %122
117: ; preds = %87
%118 = call i32 @__CrestBranch(i32 50, i32 13, i32 1)
%119 = call i32 @__CrestLoad(i32 52, i64 0, i64 0)
%120 = ptrtoint i32* %7 to i64
%121 = call i32 @__CrestStore(i32 53, i64 %120)
store i32 0, i32* %7
br label %248
122: ; preds = %87
%123 = call i32 @__CrestBranch(i32 51, i32 15, i32 0)
br label %124
124: ; preds = %122
%125 = ptrtoint i32* %3 to i64
%126 = load i32, i32* %3
%127 = sext i32 %126 to i64
%128 = call i32 @__CrestLoad(i32 56, i64 %125, i64 %127)
%129 = call i32 @__CrestLoad(i32 55, i64 0, i64 2)
%130 = load i32, i32* %3
%131 = add nsw i32 %130, 2
%132 = sext i32 %131 to i64
%133 = call i32 @__CrestApply2(i32 54, i32 0, i64 %132)
%134 = ptrtoint i32* %3 to i64
%135 = call i32 @__CrestStore(i32 57, i64 %134)
%136 = load i32, i32* %3
%137 = add nsw i32 %136, 2
store i32 %137, i32* %3
br label %140
138: ; preds = %52
%139 = call i32 @__CrestBranch(i32 42, i32 17, i32 0)
br label %140
140: ; preds = %138, %124
%141 = ptrtoint i32* %3 to i64
%142 = load i32, i32* %3
%143 = sext i32 %142 to i64
%144 = call i32 @__CrestLoad(i32 62, i64 %141, i64 %143)
%145 = ptrtoint i32* %3 to i64
%146 = load i32, i32* %3
%147 = sext i32 %146 to i64
%148 = call i32 @__CrestLoad(i32 61, i64 %145, i64 %147)
%149 = load i32, i32* %3
%150 = load i32, i32* %3
%151 = mul nsw i32 %149, %150
%152 = sext i32 %151 to i64
%153 = call i32 @__CrestApply2(i32 60, i32 2, i64 %152)
%154 = ptrtoint i32* %2 to i64
%155 = load i32, i32* %2
%156 = sext i32 %155 to i64
%157 = call i32 @__CrestLoad(i32 59, i64 %154, i64 %156)
%158 = load i32, i32* %3
%159 = load i32, i32* %3
%160 = mul nsw i32 %158, %159
%161 = load i32, i32* %2
%162 = icmp sle i32 %160, %161
%163 = zext i1 %162 to i32
%164 = sext i32 %163 to i64
%165 = call i32 @__CrestApply2(i32 58, i32 15, i64 %164)
%166 = load i32, i32* %3
%167 = load i32, i32* %3
%168 = mul nsw i32 %166, %167
%169 = load i32, i32* %2
%170 = icmp sle i32 %168, %169
br i1 %170, label %171, label %222
171: ; preds = %140
%172 = call i32 @__CrestBranch(i32 63, i32 19, i32 1)
%173 = ptrtoint i32* %3 to i64
%174 = load i32, i32* %3
%175 = sext i32 %174 to i64
%176 = call i32 @__CrestLoad(i32 65, i64 %173, i64 %175)
%177 = ptrtoint i32* %2 to i64
%178 = load i32, i32* %2
%179 = sext i32 %178 to i64
%180 = call i32 @__CrestLoad(i32 66, i64 %177, i64 %179)
%181 = load i32, i32* %3
%182 = load i32, i32* %2
%183 = call i32 @_divides(i32 %181, i32 %182)
store i32 %183, i32* %5
%184 = load i32, i32* %5
%185 = sext i32 %184 to i64
%186 = call i32 @__CrestHandleReturn(i32 68, i64 %185)
%187 = ptrtoint i32* %5 to i64
%188 = call i32 @__CrestStore(i32 67, i64 %187)
%189 = ptrtoint i32* %5 to i64
%190 = load i32, i32* %5
%191 = sext i32 %190 to i64
%192 = call i32 @__CrestLoad(i32 71, i64 %189, i64 %191)
%193 = call i32 @__CrestLoad(i32 70, i64 0, i64 0)
%194 = load i32, i32* %5
%195 = icmp ne i32 %194, 0
%196 = zext i1 %195 to i32
%197 = sext i32 %196 to i64
%198 = call i32 @__CrestApply2(i32 69, i32 13, i64 %197)
%199 = load i32, i32* %5
%200 = icmp ne i32 %199, 0
br i1 %200, label %201, label %206
201: ; preds = %171
%202 = call i32 @__CrestBranch(i32 72, i32 21, i32 1)
%203 = call i32 @__CrestLoad(i32 74, i64 0, i64 0)
%204 = ptrtoint i32* %7 to i64
%205 = call i32 @__CrestStore(i32 75, i64 %204)
store i32 0, i32* %7
br label %248
206: ; preds = %171
%207 = call i32 @__CrestBranch(i32 73, i32 23, i32 0)
br label %208
208: ; preds = %206
%209 = ptrtoint i32* %3 to i64
%210 = load i32, i32* %3
%211 = sext i32 %210 to i64
%212 = call i32 @__CrestLoad(i32 78, i64 %209, i64 %211)
%213 = call i32 @__CrestLoad(i32 77, i64 0, i64 2)
%214 = load i32, i32* %3
%215 = add nsw i32 %214, 2
%216 = sext i32 %215 to i64
%217 = call i32 @__CrestApply2(i32 76, i32 0, i64 %216)
%218 = ptrtoint i32* %3 to i64
%219 = call i32 @__CrestStore(i32 79, i64 %218)
%220 = load i32, i32* %3
%221 = add nsw i32 %220, 2
store i32 %221, i32* %3
br label %224
222: ; preds = %140
%223 = call i32 @__CrestBranch(i32 64, i32 25, i32 0)
br label %224
224: ; preds = %222, %208
%225 = ptrtoint i32* %2 to i64
%226 = load i32, i32* %2
%227 = sext i32 %226 to i64
%228 = call i32 @__CrestLoad(i32 82, i64 %225, i64 %227)
%229 = call i32 @__CrestLoad(i32 81, i64 0, i64 1)
%230 = load i32, i32* %2
%231 = icmp sgt i32 %230, 1
%232 = zext i1 %231 to i32
%233 = sext i32 %232 to i64
%234 = call i32 @__CrestApply2(i32 80, i32 14, i64 %233)
%235 = ptrtoint i32* %7 to i64
%236 = call i32 @__CrestStore(i32 83, i64 %235)
%237 = load i32, i32* %2
%238 = icmp sgt i32 %237, 1
%239 = zext i1 %238 to i32
store i32 %239, i32* %7
br label %248
240: ; preds = %35
%241 = ptrtoint i32* %4 to i64
%242 = load i32, i32* %4
%243 = sext i32 %242 to i64
%244 = call i32 @__CrestLoad(i32 84, i64 %241, i64 %243)
%245 = ptrtoint i32* %7 to i64
%246 = call i32 @__CrestStore(i32 85, i64 %245)
%247 = load i32, i32* %4
store i32 %247, i32* %7
br label %248
248: ; preds = %240, %224, %201, %117
%249 = ptrtoint i32* %7 to i64
%250 = load i32, i32* %7
%251 = sext i32 %250 to i64
%252 = call i32 @__CrestLoad(i32 86, i64 %249, i64 %251)
%253 = call i32 @__CrestReturn(i32 87)
%254 = load i32, i32* %7
ret i32 %254
}

LLVM IR (-O2):
define i32 @prime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %2
%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*
%13 = tail call i32 @__CrestCall(i32 21, i32 3)
%14 = ptrtoint i32* %2 to i64
%15 = call i32 @__CrestStore(i32 20, i64 %14)
%16 = call i32 @__CrestInt(i32* %2)
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = call i32 @__CrestLoad(i32 22, i64 %14, i64 %18)
%20 = load i32, i32* %2
%21 = call i32 @even(i32 %20)
store i32 %21, i32* %6
%22 = sext i32 %21 to i64
%23 = call i32 @__CrestHandleReturn(i32 24, i64 %22)
%24 = ptrtoint i32* %6 to i64
%25 = call i32 @__CrestStore(i32 23, i64 %24)
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = call i32 @__CrestLoad(i32 27, i64 %24, i64 %27)
%29 = call i32 @__CrestLoad(i32 26, i64 0, i64 0)
%30 = load i32, i32* %6
%31 = icmp ne i32 %30, 0
%32 = zext i1 %31 to i64
%33 = call i32 @__CrestApply2(i32 25, i32 13, i64 %32)
%34 = load i32, i32* %6
%35 = icmp eq i32 %34, 0
br i1 %35, label %56, label %36
36: ; preds = %1
%37 = call i32 @__CrestBranch(i32 28, i32 7, i32 1)
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = call i32 @__CrestLoad(i32 32, i64 %14, i64 %39)
%41 = call i32 @__CrestLoad(i32 31, i64 0, i64 2)
%42 = load i32, i32* %2
%43 = icmp eq i32 %42, 2
%44 = zext i1 %43 to i64
%45 = call i32 @__CrestApply2(i32 30, i32 12, i64 %44)
%46 = ptrtoint i32* %4 to i64
%47 = call i32 @__CrestStore(i32 33, i64 %46)
%48 = load i32, i32* %2
%49 = icmp eq i32 %48, 2
%50 = zext i1 %49 to i32
store i32 %50, i32* %4
%51 = zext i1 %49 to i64
%52 = call i32 @__CrestLoad(i32 84, i64 %46, i64 %51)
%53 = ptrtoint i32* %7 to i64
%54 = call i32 @__CrestStore(i32 85, i64 %53)
%55 = load i32, i32* %4
store i32 %55, i32* %7
br label %211
56: ; preds = %1
%57 = call i32 @__CrestBranch(i32 29, i32 8, i32 0)
%58 = call i32 @__CrestLoad(i32 34, i64 0, i64 3)
%59 = ptrtoint i32* %3 to i64
%60 = call i32 @__CrestStore(i32 35, i64 %59)
store i32 3, i32* %3
%61 = call i32 @__CrestLoad(i32 40, i64 %59, i64 3)
%62 = load i32, i32* %3
%63 = sext i32 %62 to i64
%64 = call i32 @__CrestLoad(i32 39, i64 %59, i64 %63)
%65 = load i32, i32* %3
%66 = mul nsw i32 %65, %65
%67 = zext i32 %66 to i64
%68 = call i32 @__CrestApply2(i32 38, i32 2, i64 %67)
%69 = load i32, i32* %2
%70 = sext i32 %69 to i64
%71 = call i32 @__CrestLoad(i32 37, i64 %14, i64 %70)
%72 = load i32, i32* %3
%73 = mul nsw i32 %72, %72
%74 = load i32, i32* %2
%75 = icmp sle i32 %73, %74
%76 = zext i1 %75 to i64
%77 = call i32 @__CrestApply2(i32 36, i32 15, i64 %76)
%78 = load i32, i32* %3
%79 = mul nsw i32 %78, %78
%80 = load i32, i32* %2
%81 = icmp sgt i32 %79, %80
br i1 %81, label %125, label %82
82: ; preds = %56
%83 = call i32 @__CrestBranch(i32 41, i32 11, i32 1)
%84 = load i32, i32* %3
%85 = sext i32 %84 to i64
%86 = call i32 @__CrestLoad(i32 43, i64 %59, i64 %85)
%87 = load i32, i32* %2
%88 = sext i32 %87 to i64
%89 = call i32 @__CrestLoad(i32 44, i64 %14, i64 %88)
%90 = load i32, i32* %3
%91 = load i32, i32* %2
%92 = call i32 @_divides(i32 %90, i32 %91)
store i32 %92, i32* %5
%93 = sext i32 %92 to i64
%94 = call i32 @__CrestHandleReturn(i32 46, i64 %93)
%95 = ptrtoint i32* %5 to i64
%96 = call i32 @__CrestStore(i32 45, i64 %95)
%97 = load i32, i32* %5
%98 = sext i32 %97 to i64
%99 = call i32 @__CrestLoad(i32 49, i64 %95, i64 %98)
%100 = call i32 @__CrestLoad(i32 48, i64 0, i64 0)
%101 = load i32, i32* %5
%102 = icmp ne i32 %101, 0
%103 = zext i1 %102 to i64
%104 = call i32 @__CrestApply2(i32 47, i32 13, i64 %103)
%105 = load i32, i32* %5
%106 = icmp eq i32 %105, 0
br i1 %106, label %112, label %107
107: ; preds = %82
%108 = call i32 @__CrestBranch(i32 50, i32 13, i32 1)
%109 = call i32 @__CrestLoad(i32 52, i64 0, i64 0)
%110 = ptrtoint i32* %7 to i64
%111 = call i32 @__CrestStore(i32 53, i64 %110)
store i32 0, i32* %7
br label %211
112: ; preds = %82
%113 = call i32 @__CrestBranch(i32 51, i32 15, i32 0)
%114 = load i32, i32* %3
%115 = sext i32 %114 to i64
%116 = call i32 @__CrestLoad(i32 56, i64 %59, i64 %115)
%117 = call i32 @__CrestLoad(i32 55, i64 0, i64 2)
%118 = load i32, i32* %3
%119 = add nsw i32 %118, 2
%120 = sext i32 %119 to i64
%121 = call i32 @__CrestApply2(i32 54, i32 0, i64 %120)
%122 = call i32 @__CrestStore(i32 57, i64 %59)
%123 = load i32, i32* %3
%124 = add nsw i32 %123, 2
store i32 %124, i32* %3
br label %128
125: ; preds = %56
%126 = call i32 @__CrestBranch(i32 42, i32 17, i32 0)
%127 = load i32, i32* %3
br label %128
128: ; preds = %125, %112
%129 = phi i32 [ %127, %125 ], [ %124, %112 ]
%130 = sext i32 %129 to i64
%131 = call i32 @__CrestLoad(i32 62, i64 %59, i64 %130)
%132 = load i32, i32* %3
%133 = sext i32 %132 to i64
%134 = call i32 @__CrestLoad(i32 61, i64 %59, i64 %133)
%135 = load i32, i32* %3
%136 = mul nsw i32 %135, %135
%137 = zext i32 %136 to i64
%138 = call i32 @__CrestApply2(i32 60, i32 2, i64 %137)
%139 = load i32, i32* %2
%140 = sext i32 %139 to i64
%141 = call i32 @__CrestLoad(i32 59, i64 %14, i64 %140)
%142 = load i32, i32* %3
%143 = mul nsw i32 %142, %142
%144 = load i32, i32* %2
%145 = icmp sle i32 %143, %144
%146 = zext i1 %145 to i64
%147 = call i32 @__CrestApply2(i32 58, i32 15, i64 %146)
%148 = load i32, i32* %3
%149 = mul nsw i32 %148, %148
%150 = load i32, i32* %2
%151 = icmp sgt i32 %149, %150
br i1 %151, label %195, label %152
152: ; preds = %128
%153 = call i32 @__CrestBranch(i32 63, i32 19, i32 1)
%154 = load i32, i32* %3
%155 = sext i32 %154 to i64
%156 = call i32 @__CrestLoad(i32 65, i64 %59, i64 %155)
%157 = load i32, i32* %2
%158 = sext i32 %157 to i64
%159 = call i32 @__CrestLoad(i32 66, i64 %14, i64 %158)
%160 = load i32, i32* %3
%161 = load i32, i32* %2
%162 = call i32 @_divides(i32 %160, i32 %161)
store i32 %162, i32* %5
%163 = sext i32 %162 to i64
%164 = call i32 @__CrestHandleReturn(i32 68, i64 %163)
%165 = ptrtoint i32* %5 to i64
%166 = call i32 @__CrestStore(i32 67, i64 %165)
%167 = load i32, i32* %5
%168 = sext i32 %167 to i64
%169 = call i32 @__CrestLoad(i32 71, i64 %165, i64 %168)
%170 = call i32 @__CrestLoad(i32 70, i64 0, i64 0)
%171 = load i32, i32* %5
%172 = icmp ne i32 %171, 0
%173 = zext i1 %172 to i64
%174 = call i32 @__CrestApply2(i32 69, i32 13, i64 %173)
%175 = load i32, i32* %5
%176 = icmp eq i32 %175, 0
br i1 %176, label %182, label %177
177: ; preds = %152
%178 = call i32 @__CrestBranch(i32 72, i32 21, i32 1)
%179 = call i32 @__CrestLoad(i32 74, i64 0, i64 0)
%180 = ptrtoint i32* %7 to i64
%181 = call i32 @__CrestStore(i32 75, i64 %180)
store i32 0, i32* %7
br label %211
182: ; preds = %152
%183 = call i32 @__CrestBranch(i32 73, i32 23, i32 0)
%184 = load i32, i32* %3
%185 = sext i32 %184 to i64
%186 = call i32 @__CrestLoad(i32 78, i64 %59, i64 %185)
%187 = call i32 @__CrestLoad(i32 77, i64 0, i64 2)
%188 = load i32, i32* %3
%189 = add nsw i32 %188, 2
%190 = sext i32 %189 to i64
%191 = call i32 @__CrestApply2(i32 76, i32 0, i64 %190)
%192 = call i32 @__CrestStore(i32 79, i64 %59)
%193 = load i32, i32* %3
%194 = add nsw i32 %193, 2
store i32 %194, i32* %3
br label %197
195: ; preds = %128
%196 = call i32 @__CrestBranch(i32 64, i32 25, i32 0)
br label %197
197: ; preds = %195, %182
%198 = load i32, i32* %2
%199 = sext i32 %198 to i64
%200 = call i32 @__CrestLoad(i32 82, i64 %14, i64 %199)
%201 = call i32 @__CrestLoad(i32 81, i64 0, i64 1)
%202 = load i32, i32* %2
%203 = icmp sgt i32 %202, 1
%204 = zext i1 %203 to i64
%205 = call i32 @__CrestApply2(i32 80, i32 14, i64 %204)
%206 = ptrtoint i32* %7 to i64
%207 = call i32 @__CrestStore(i32 83, i64 %206)
%208 = load i32, i32* %2
%209 = icmp sgt i32 %208, 1
%210 = zext i1 %209 to i32
store i32 %210, i32* %7
br label %211
211: ; preds = %36, %197, %177, %107
%212 = phi i64 [ %53, %36 ], [ %206, %197 ], [ %180, %177 ], [ %110, %107 ]
%213 = phi i32 [ %55, %36 ], [ %210, %197 ], [ 0, %177 ], [ 0, %107 ]
%214 = sext i32 %213 to i64
%215 = call i32 @__CrestLoad(i32 86, i64 %212, i64 %214)
%216 = call i32 @__CrestReturn(i32 87)
%217 = load i32, i32* %7
ret i32 %217
}