#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 tmp;
  int tmp___0;
  int __retres5;
  {
    __CrestCall(21, 3);
    __CrestStore(20, (unsigned long)(&n));
    __CrestInt(&n);
    __CrestLoad(22, (unsigned long)(&n), (long long)n);
    tmp = even(n);
    __CrestHandleReturn(24, (long long)tmp);
    __CrestStore(23, (unsigned long)(&tmp));
    {
      __CrestLoad(27, (unsigned long)(&tmp), (long long)tmp);
      __CrestLoad(26, (unsigned long)0, (long long)0);
      __CrestApply2(25, 13, (long long)(tmp != 0));
      if (tmp != 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)(&__retres5));
        __retres5 = n == 2;
        goto return_label;
      } else {
        __CrestBranch(29, 9, 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, 13, 1);
          __CrestLoad(43, (unsigned long)(&i), (long long)i);
          __CrestLoad(44, (unsigned long)(&n), (long long)n);
          tmp___0 = _divides(i, n);
          __CrestHandleReturn(46, (long long)tmp___0);
          __CrestStore(45, (unsigned long)(&tmp___0));
          {
            __CrestLoad(49, (unsigned long)(&tmp___0), (long long)tmp___0);
            __CrestLoad(48, (unsigned long)0, (long long)0);
            __CrestApply2(47, 13, (long long)(tmp___0 != 0));
            if (tmp___0 != 0) {
              __CrestBranch(50, 15, 1);
              __CrestLoad(52, (unsigned long)0, (long long)0);
              __CrestStore(53, (unsigned long)(&__retres5));
              __retres5 = 0;
              goto return_label;
            } else {
              __CrestBranch(51, 17, 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, 19, 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, 21, 1);
          __CrestLoad(65, (unsigned long)(&i), (long long)i);
          __CrestLoad(66, (unsigned long)(&n), (long long)n);
          tmp___0 = _divides(i, n);
          __CrestHandleReturn(68, (long long)tmp___0);
          __CrestStore(67, (unsigned long)(&tmp___0));
          {
            __CrestLoad(71, (unsigned long)(&tmp___0), (long long)tmp___0);
            __CrestLoad(70, (unsigned long)0, (long long)0);
            __CrestApply2(69, 13, (long long)(tmp___0 != 0));
            if (tmp___0 != 0) {
              __CrestBranch(72, 23, 1);
              __CrestLoad(74, (unsigned long)0, (long long)0);
              __CrestStore(75, (unsigned long)(&__retres5));
              __retres5 = 0;
              goto return_label;
            } else {
              __CrestBranch(73, 25, 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, 27, 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)(&__retres5));
    __retres5 = n > 1;
  return_label : {
    __CrestLoad(84, (unsigned long)(&__retres5), (long long)__retres5);
    __CrestReturn(85);
    return (__retres5);
  }
  }
}


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,-0xc(%rbp)
movslq -0xc(%rbp),%rsi
mov    $0x18,%edi
call   10c0 <__CrestHandleReturn@plt>
lea    -0xc(%rbp),%rsi
mov    $0x17,%edi
call   1060 <__CrestStore@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%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,-0xc(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x19,%edi
mov    $0xd,%esi
call   1040 <__CrestApply2@plt>
cmpl   $0x0,-0xc(%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    -0x14(%rbp),%rsi
mov    $0x21,%edi
call   1060 <__CrestStore@plt>
cmpl   $0x2,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
jmp    1735 <prime+0x595>
mov    $0x1d,%edi
mov    $0x9,%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    $0xd,%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    $0xf,%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    -0x14(%rbp),%rsi
mov    $0x35,%edi
call   1060 <__CrestStore@plt>
movl   $0x0,-0x14(%rbp)
jmp    1735 <prime+0x595>
mov    $0x33,%edi
mov    $0x11,%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    $0x13,%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    $0x15,%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    $0x17,%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    -0x14(%rbp),%rsi
mov    $0x4b,%edi
call   1060 <__CrestStore@plt>
movl   $0x0,-0x14(%rbp)
jmp    1735 <prime+0x595>
mov    $0x49,%edi
mov    $0x19,%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    $0x1b,%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    -0x14(%rbp),%rsi
mov    $0x53,%edi
call   1060 <__CrestStore@plt>
cmpl   $0x1,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rsi
movslq -0x14(%rbp),%rdx
mov    $0x54,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x55,%edi
call   1070 <__CrestReturn@plt>
mov    -0x14(%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     12c7 <prime+0x127>
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    0x10(%rsp),%rbx
mov    $0x21,%edi
mov    %rbx,%rsi
call   1060 <__CrestStore@plt>
xor    %r14d,%r14d
cmpl   $0x2,0x8(%rsp)
sete   %r14b
jmp    171c <prime+0x57c>
mov    $0x1d,%edi
mov    $0x9,%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    1397 <prime+0x1f7>
mov    $0x2a,%edi
mov    $0x13,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
mov    0x4(%rsp),%eax
jmp    14dd <prime+0x33d>
mov    $0x29,%edi
mov    $0xd,%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     1477 <prime+0x2d7>
mov    $0x32,%edi
mov    $0xf,%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    164b <prime+0x4ab>
mov    $0x33,%edi
mov    $0x11,%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    1570 <prime+0x3d0>
mov    $0x40,%edi
mov    $0x1b,%esi
xor    %edx,%edx
call   1050 <__CrestBranch@plt>
jmp    16c0 <prime+0x520>
mov    $0x3f,%edi
mov    $0x15,%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     1660 <prime+0x4c0>
mov    $0x48,%edi
mov    $0x17,%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    1721 <prime+0x581>
mov    $0x49,%edi
mov    $0x19,%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)
mov    %r14d,%edx
mov    $0x54,%edi
mov    %rbx,%rsi
call   10b0 <__CrestLoad@plt>
mov    $0x55,%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
store i32 %0, i32* %2
%7 = call i32 @__CrestCall(i32 21, i32 3)
%8 = ptrtoint i32* %2 to i64
%9 = call i32 @__CrestStore(i32 20, i64 %8)
%10 = call i32 @__CrestInt(i32* %2)
%11 = ptrtoint i32* %2 to i64
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = call i32 @__CrestLoad(i32 22, i64 %11, i64 %13)
%15 = load i32, i32* %2
%16 = call i32 @even(i32 %15)
store i32 %16, i32* %4
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = call i32 @__CrestHandleReturn(i32 24, i64 %18)
%20 = ptrtoint i32* %4 to i64
%21 = call i32 @__CrestStore(i32 23, i64 %20)
%22 = ptrtoint i32* %4 to i64
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = call i32 @__CrestLoad(i32 27, i64 %22, i64 %24)
%26 = call i32 @__CrestLoad(i32 26, i64 0, i64 0)
%27 = load i32, i32* %4
%28 = icmp ne i32 %27, 0
%29 = zext i1 %28 to i32
%30 = sext i32 %29 to i64
%31 = call i32 @__CrestApply2(i32 25, i32 13, i64 %30)
%32 = load i32, i32* %4
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %51
34: ; preds = %1
%35 = call i32 @__CrestBranch(i32 28, i32 7, i32 1)
%36 = ptrtoint i32* %2 to i64
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = call i32 @__CrestLoad(i32 32, i64 %36, i64 %38)
%40 = call i32 @__CrestLoad(i32 31, i64 0, i64 2)
%41 = load i32, i32* %2
%42 = icmp eq i32 %41, 2
%43 = zext i1 %42 to i32
%44 = sext i32 %43 to i64
%45 = call i32 @__CrestApply2(i32 30, i32 12, i64 %44)
%46 = ptrtoint i32* %6 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* %6
br label %240
51: ; preds = %1
%52 = call i32 @__CrestBranch(i32 29, i32 9, i32 0)
br label %53
53: ; preds = %51
%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 = %53
%88 = call i32 @__CrestBranch(i32 41, i32 13, 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 15, i32 1)
%119 = call i32 @__CrestLoad(i32 52, i64 0, i64 0)
%120 = ptrtoint i32* %6 to i64
%121 = call i32 @__CrestStore(i32 53, i64 %120)
store i32 0, i32* %6
br label %240
122: ; preds = %87
%123 = call i32 @__CrestBranch(i32 51, i32 17, 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 = %53
%139 = call i32 @__CrestBranch(i32 42, i32 19, 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 21, 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 23, i32 1)
%203 = call i32 @__CrestLoad(i32 74, i64 0, i64 0)
%204 = ptrtoint i32* %6 to i64
%205 = call i32 @__CrestStore(i32 75, i64 %204)
store i32 0, i32* %6
br label %240
206: ; preds = %171
%207 = call i32 @__CrestBranch(i32 73, i32 25, 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 27, 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* %6 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* %6
br label %240
240: ; preds = %224, %201, %117, %34
%241 = ptrtoint i32* %6 to i64
%242 = load i32, i32* %6
%243 = sext i32 %242 to i64
%244 = call i32 @__CrestLoad(i32 84, i64 %241, i64 %243)
%245 = call i32 @__CrestReturn(i32 85)
%246 = load i32, i32* %6
ret i32 %246
}

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