#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*/ __CrestLoad(int, unsigned long, long long);
int /*<<< orphan*/ __CrestReturn(int);
int /*<<< orphan*/ __CrestStore(int, unsigned long);
void b(int *A, int l, int r, int key) {
  int m;
  int *mem_6;
  int *mem_7;
  int *mem_8;
  int *mem_9;
  {
    __CrestCall(13, 2);
    __CrestStore(12, (unsigned long)(&key));
    __CrestStore(11, (unsigned long)(&r));
    __CrestStore(10, (unsigned long)(&l));
    {
      {
        __CrestLoad(16, (unsigned long)(&l), (long long)l);
        __CrestLoad(15, (unsigned long)(&r), (long long)r);
        __CrestApply2(14, 15, (long long)(l <= r));
        if (l <= r) {
          __CrestBranch(17, 6, 1);
          __CrestLoad(25, (unsigned long)(&l), (long long)l);
          __CrestLoad(24, (unsigned long)(&r), (long long)r);
          __CrestLoad(23, (unsigned long)(&l), (long long)l);
          __CrestApply2(22, 1, (long long)(r - l));
          __CrestLoad(21, (unsigned long)0, (long long)2);
          __CrestApply2(20, 3, (long long)((r - l) / 2));
          __CrestApply2(19, 0, (long long)(l + (r - l) / 2));
          __CrestStore(26, (unsigned long)(&m));
          m = l + (r - l) / 2;
          {
            mem_6 = A + m;
            {
              __CrestLoad(29, (unsigned long)mem_6, (long long)*mem_6);
              __CrestLoad(28, (unsigned long)(&key), (long long)key);
              __CrestApply2(27, 12, (long long)(*mem_6 == key));
              if (*mem_6 == key) {
                __CrestBranch(30, 10, 1);
                goto return_label;
              } else {
                __CrestBranch(31, 12, 0);
              }
            }
          }
          {
            mem_7 = A + m;
            {
              __CrestLoad(34, (unsigned long)mem_7, (long long)*mem_7);
              __CrestLoad(33, (unsigned long)(&key), (long long)key);
              __CrestApply2(32, 16, (long long)(*mem_7 < key));
              if (*mem_7 < key) {
                __CrestBranch(35, 16, 1);
                __CrestLoad(39, (unsigned long)(&m), (long long)m);
                __CrestLoad(38, (unsigned long)0, (long long)1);
                __CrestApply2(37, 0, (long long)(m + 1));
                __CrestStore(40, (unsigned long)(&l));
                l = m + 1;
              } else {
                __CrestBranch(36, 17, 0);
                __CrestLoad(43, (unsigned long)(&m), (long long)m);
                __CrestLoad(42, (unsigned long)0, (long long)1);
                __CrestApply2(41, 1, (long long)(m - 1));
                __CrestStore(44, (unsigned long)(&r));
                r = m - 1;
              }
            }
          }
        } else {
          __CrestBranch(18, 18, 0);
        }
      }
      {
        __CrestLoad(47, (unsigned long)(&l), (long long)l);
        __CrestLoad(46, (unsigned long)(&r), (long long)r);
        __CrestApply2(45, 15, (long long)(l <= r));
        if (l <= r) {
          __CrestBranch(48, 20, 1);
          __CrestLoad(56, (unsigned long)(&l), (long long)l);
          __CrestLoad(55, (unsigned long)(&r), (long long)r);
          __CrestLoad(54, (unsigned long)(&l), (long long)l);
          __CrestApply2(53, 1, (long long)(r - l));
          __CrestLoad(52, (unsigned long)0, (long long)2);
          __CrestApply2(51, 3, (long long)((r - l) / 2));
          __CrestApply2(50, 0, (long long)(l + (r - l) / 2));
          __CrestStore(57, (unsigned long)(&m));
          m = l + (r - l) / 2;
          {
            mem_8 = A + m;
            {
              __CrestLoad(60, (unsigned long)mem_8, (long long)*mem_8);
              __CrestLoad(59, (unsigned long)(&key), (long long)key);
              __CrestApply2(58, 12, (long long)(*mem_8 == key));
              if (*mem_8 == key) {
                __CrestBranch(61, 24, 1);
                goto return_label;
              } else {
                __CrestBranch(62, 26, 0);
              }
            }
          }
          {
            mem_9 = A + m;
            {
              __CrestLoad(65, (unsigned long)mem_9, (long long)*mem_9);
              __CrestLoad(64, (unsigned long)(&key), (long long)key);
              __CrestApply2(63, 16, (long long)(*mem_9 < key));
              if (*mem_9 < key) {
                __CrestBranch(66, 30, 1);
                __CrestLoad(70, (unsigned long)(&m), (long long)m);
                __CrestLoad(69, (unsigned long)0, (long long)1);
                __CrestApply2(68, 0, (long long)(m + 1));
                __CrestStore(71, (unsigned long)(&l));
                l = m + 1;
              } else {
                __CrestBranch(67, 31, 0);
                __CrestLoad(74, (unsigned long)(&m), (long long)m);
                __CrestLoad(73, (unsigned long)0, (long long)1);
                __CrestApply2(72, 1, (long long)(m - 1));
                __CrestStore(75, (unsigned long)(&r));
                r = m - 1;
              }
            }
          }
        } else {
          __CrestBranch(49, 32, 0);
        }
      }
    }
  return_label : {
    __CrestReturn(76);
    return;
  }
  }
}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    $0xd,%edi
mov    $0x2,%esi
call   1070 <__CrestCall@plt>
lea    -0x14(%rbp),%rsi
mov    $0xc,%edi
call   1050 <__CrestStore@plt>
lea    -0x10(%rbp),%rsi
mov    $0xb,%edi
call   1050 <__CrestStore@plt>
lea    -0xc(%rbp),%rsi
mov    $0xa,%edi
call   1050 <__CrestStore@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x10,%edi
call   1080 <__CrestLoad@plt>
lea    -0x10(%rbp),%rsi
movslq -0x10(%rbp),%rdx
mov    $0xf,%edi
call   1080 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0xe,%edi
mov    $0xf,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     14bf <b+0x35f>
mov    $0x11,%edi
mov    $0x6,%esi
mov    $0x1,%edx
call   1040 <__CrestBranch@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x19,%edi
call   1080 <__CrestLoad@plt>
lea    -0x10(%rbp),%rsi
movslq -0x10(%rbp),%rdx
mov    $0x18,%edi
call   1080 <__CrestLoad@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x17,%edi
call   1080 <__CrestLoad@plt>
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
movslq %eax,%rdx
mov    $0x16,%edi
mov    $0x1,%esi
call   1030 <__CrestApply2@plt>
mov    $0x15,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x2,%edx
call   1080 <__CrestLoad@plt>
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
movslq %eax,%rdx
mov    $0x14,%edi
mov    $0x3,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x40(%rbp),%eax
add    %ecx,%eax
movslq %eax,%rdx
mov    $0x13,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0x18(%rbp),%rsi
mov    $0x1a,%edi
call   1050 <__CrestStore@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x20(%rbp),%rax
movslq (%rax),%rdx
mov    $0x1d,%edi
call   1080 <__CrestLoad@plt>
lea    -0x14(%rbp),%rsi
movslq -0x14(%rbp),%rdx
mov    $0x1c,%edi
call   1080 <__CrestLoad@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x1b,%edi
mov    $0xc,%esi
call   1030 <__CrestApply2@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    136e <b+0x20e>
mov    $0x1e,%edi
mov    $0xa,%esi
mov    $0x1,%edx
call   1040 <__CrestBranch@plt>
jmp    17f4 <b+0x694>
mov    $0x1f,%edi
mov    $0xc,%esi
xor    %edx,%edx
call   1040 <__CrestBranch@plt>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
mov    -0x28(%rbp),%rax
movslq (%rax),%rdx
mov    $0x22,%edi
call   1080 <__CrestLoad@plt>
lea    -0x14(%rbp),%rsi
movslq -0x14(%rbp),%rdx
mov    $0x21,%edi
call   1080 <__CrestLoad@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x20,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
jge    1455 <b+0x2f5>
mov    $0x23,%edi
mov    $0x10,%esi
mov    $0x1,%edx
call   1040 <__CrestBranch@plt>
lea    -0x18(%rbp),%rsi
movslq -0x18(%rbp),%rdx
mov    $0x27,%edi
call   1080 <__CrestLoad@plt>
mov    $0x26,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   1080 <__CrestLoad@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
mov    $0x25,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x28,%edi
call   1050 <__CrestStore@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    14ba <b+0x35a>
mov    $0x24,%edi
mov    $0x11,%esi
xor    %edx,%edx
call   1040 <__CrestBranch@plt>
lea    -0x18(%rbp),%rsi
movslq -0x18(%rbp),%rdx
mov    $0x2b,%edi
call   1080 <__CrestLoad@plt>
mov    $0x2a,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   1080 <__CrestLoad@plt>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rdx
mov    $0x29,%edi
mov    $0x1,%esi
call   1030 <__CrestApply2@plt>
lea    -0x10(%rbp),%rsi
mov    $0x2c,%edi
call   1050 <__CrestStore@plt>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    14cd <b+0x36d>
mov    $0x12,%esi
xor    %edx,%edx
mov    %esi,%edi
call   1040 <__CrestBranch@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x2f,%edi
call   1080 <__CrestLoad@plt>
lea    -0x10(%rbp),%rsi
movslq -0x10(%rbp),%rdx
mov    $0x2e,%edi
call   1080 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x2d,%edi
mov    $0xf,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     17de <b+0x67e>
mov    $0x30,%edi
mov    $0x14,%esi
mov    $0x1,%edx
call   1040 <__CrestBranch@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x38,%edi
call   1080 <__CrestLoad@plt>
lea    -0x10(%rbp),%rsi
movslq -0x10(%rbp),%rdx
mov    $0x37,%edi
call   1080 <__CrestLoad@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x36,%edi
call   1080 <__CrestLoad@plt>
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
movslq %eax,%rdx
mov    $0x35,%edi
mov    $0x1,%esi
call   1030 <__CrestApply2@plt>
mov    $0x34,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x2,%edx
call   1080 <__CrestLoad@plt>
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
movslq %eax,%rdx
mov    $0x33,%edi
mov    $0x3,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x48(%rbp),%eax
add    %ecx,%eax
movslq %eax,%rdx
mov    $0x32,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0x18(%rbp),%rsi
mov    $0x39,%edi
call   1050 <__CrestStore@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x44(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
mov    -0x30(%rbp),%rax
movslq (%rax),%rdx
mov    $0x3c,%edi
call   1080 <__CrestLoad@plt>
lea    -0x14(%rbp),%rsi
movslq -0x14(%rbp),%rdx
mov    $0x3b,%edi
call   1080 <__CrestLoad@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x3a,%edi
mov    $0xc,%esi
call   1030 <__CrestApply2@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    168d <b+0x52d>
mov    $0x3d,%edi
mov    $0x18,%esi
mov    $0x1,%edx
call   1040 <__CrestBranch@plt>
jmp    17f4 <b+0x694>
mov    $0x3e,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1040 <__CrestBranch@plt>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rsi
mov    -0x38(%rbp),%rax
movslq (%rax),%rdx
mov    $0x41,%edi
call   1080 <__CrestLoad@plt>
lea    -0x14(%rbp),%rsi
movslq -0x14(%rbp),%rdx
mov    $0x40,%edi
call   1080 <__CrestLoad@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x3f,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    -0x38(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
jge    1774 <b+0x614>
mov    $0x42,%edi
mov    $0x1e,%esi
mov    $0x1,%edx
call   1040 <__CrestBranch@plt>
lea    -0x18(%rbp),%rsi
movslq -0x18(%rbp),%rdx
mov    $0x46,%edi
call   1080 <__CrestLoad@plt>
mov    $0x45,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   1080 <__CrestLoad@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
mov    $0x44,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x47,%edi
call   1050 <__CrestStore@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    17d9 <b+0x679>
mov    $0x43,%edi
mov    $0x1f,%esi
xor    %edx,%edx
call   1040 <__CrestBranch@plt>
lea    -0x18(%rbp),%rsi
movslq -0x18(%rbp),%rdx
mov    $0x4a,%edi
call   1080 <__CrestLoad@plt>
mov    $0x49,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   1080 <__CrestLoad@plt>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rdx
mov    $0x48,%edi
mov    $0x1,%esi
call   1030 <__CrestApply2@plt>
lea    -0x10(%rbp),%rsi
mov    $0x4b,%edi
call   1050 <__CrestStore@plt>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    17ef <b+0x68f>
mov    $0x31,%edi
mov    $0x20,%esi
xor    %edx,%edx
call   1040 <__CrestBranch@plt>
jmp    17f4 <b+0x694>
mov    $0x4c,%edi
call   1060 <__CrestReturn@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
mov    %esi,(%rsp)
mov    %edx,0x4(%rsp)
mov    %ecx,0xc(%rsp)
mov    $0xd,%edi
mov    $0x2,%esi
call   1070 <__CrestCall@plt>
lea    0xc(%rsp),%rsi
mov    $0xc,%edi
call   1050 <__CrestStore@plt>
lea    0x4(%rsp),%r15
mov    $0xb,%edi
mov    %r15,%rsi
call   1050 <__CrestStore@plt>
mov    %rsp,%rbx
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <__CrestStore@plt>
movslq (%rsp),%rdx
mov    $0x10,%edi
mov    %rbx,%rsi
call   1080 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
mov    $0xf,%edi
mov    %r15,%rsi
call   1080 <__CrestLoad@plt>
mov    (%rsp),%eax
xor    %edx,%edx
cmp    0x4(%rsp),%eax
setle  %dl
mov    $0xe,%edi
mov    $0xf,%esi
call   1030 <__CrestApply2@plt>
mov    (%rsp),%eax
cmp    0x4(%rsp),%eax
jle    126d <b+0x10d>
mov    $0x12,%edi
mov    $0x12,%esi
xor    %edx,%edx
call   1040 <__CrestBranch@plt>
movslq (%rsp),%rdx
mov    %rsp,%rsi
mov    $0x2f,%edi
call   1080 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rsi
mov    $0x2e,%edi
call   1080 <__CrestLoad@plt>
mov    (%rsp),%eax
xor    %edx,%edx
cmp    0x4(%rsp),%eax
setle  %dl
mov    $0x2d,%edi
mov    $0xf,%esi
call   1030 <__CrestApply2@plt>
mov    (%rsp),%eax
cmp    0x4(%rsp),%eax
jle    13b4 <b+0x254>
mov    $0x31,%edi
mov    $0x20,%esi
xor    %edx,%edx
jmp    14fb <b+0x39b>
mov    $0x11,%edi
mov    $0x6,%esi
mov    $0x1,%edx
call   1040 <__CrestBranch@plt>
movslq (%rsp),%rdx
mov    %rsp,%rbx
mov    $0x19,%edi
mov    %rbx,%rsi
call   1080 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rsi
mov    $0x18,%edi
call   1080 <__CrestLoad@plt>
movslq (%rsp),%rdx
mov    $0x17,%edi
mov    %rbx,%rsi
call   1080 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
movslq (%rsp),%rax
sub    %rax,%rdx
mov    $0x16,%edi
mov    $0x1,%esi
call   1030 <__CrestApply2@plt>
mov    $0x2,%edx
mov    $0x15,%edi
xor    %esi,%esi
call   1080 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
sub    (%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rdx
mov    $0x14,%edi
mov    $0x3,%esi
call   1030 <__CrestApply2@plt>
mov    (%rsp),%eax
mov    0x4(%rsp),%ecx
sub    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
add    %ecx,%edx
sar    %edx
add    %eax,%edx
movslq %edx,%rdx
mov    $0x13,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    0x8(%rsp),%rsi
mov    $0x1a,%edi
call   1050 <__CrestStore@plt>
mov    (%rsp),%eax
mov    0x4(%rsp),%ecx
sub    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
add    %ecx,%edx
sar    %edx
add    %eax,%edx
mov    %edx,0x8(%rsp)
movslq %edx,%rbx
lea    (%r14,%rbx,4),%rsi
movslq (%r14,%rbx,4),%rdx
mov    $0x1d,%edi
call   1080 <__CrestLoad@plt>
movslq 0xc(%rsp),%rdx
lea    0xc(%rsp),%rsi
mov    $0x1c,%edi
call   1080 <__CrestLoad@plt>
mov    (%r14,%rbx,4),%eax
xor    %edx,%edx
cmp    0xc(%rsp),%eax
sete   %dl
mov    $0x1b,%edi
mov    $0xc,%esi
call   1030 <__CrestApply2@plt>
mov    (%r14,%rbx,4),%eax
cmp    0xc(%rsp),%eax
jne    1514 <b+0x3b4>
mov    $0x1e,%edi
mov    $0xa,%esi
jmp    14f6 <b+0x396>
mov    $0x30,%edi
mov    $0x14,%esi
mov    $0x1,%edx
call   1040 <__CrestBranch@plt>
movslq (%rsp),%rdx
mov    %rsp,%rbx
mov    $0x38,%edi
mov    %rbx,%rsi
call   1080 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rsi
mov    $0x37,%edi
call   1080 <__CrestLoad@plt>
movslq (%rsp),%rdx
mov    $0x36,%edi
mov    %rbx,%rsi
call   1080 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
movslq (%rsp),%rax
sub    %rax,%rdx
mov    $0x35,%edi
mov    $0x1,%esi
call   1030 <__CrestApply2@plt>
mov    $0x2,%edx
mov    $0x34,%edi
xor    %esi,%esi
call   1080 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
sub    (%rsp),%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rdx
mov    $0x33,%edi
mov    $0x3,%esi
call   1030 <__CrestApply2@plt>
mov    (%rsp),%eax
mov    0x4(%rsp),%ecx
sub    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
add    %ecx,%edx
sar    %edx
add    %eax,%edx
movslq %edx,%rdx
mov    $0x32,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    0x8(%rsp),%rsi
mov    $0x39,%edi
call   1050 <__CrestStore@plt>
mov    (%rsp),%eax
mov    0x4(%rsp),%ecx
sub    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
add    %ecx,%edx
sar    %edx
add    %eax,%edx
mov    %edx,0x8(%rsp)
movslq %edx,%rbx
lea    (%r14,%rbx,4),%rsi
movslq (%r14,%rbx,4),%rdx
mov    $0x3c,%edi
call   1080 <__CrestLoad@plt>
movslq 0xc(%rsp),%rdx
lea    0xc(%rsp),%rsi
mov    $0x3b,%edi
call   1080 <__CrestLoad@plt>
mov    (%r14,%rbx,4),%eax
xor    %edx,%edx
cmp    0xc(%rsp),%eax
sete   %dl
mov    $0x3a,%edi
mov    $0xc,%esi
call   1030 <__CrestApply2@plt>
mov    (%r14,%rbx,4),%eax
cmp    0xc(%rsp),%eax
jne    15e4 <b+0x484>
mov    $0x3d,%edi
mov    $0x18,%esi
mov    $0x1,%edx
call   1040 <__CrestBranch@plt>
mov    $0x4c,%edi
call   1060 <__CrestReturn@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
mov    $0x1f,%edi
mov    $0xc,%esi
xor    %edx,%edx
call   1040 <__CrestBranch@plt>
movslq 0x8(%rsp),%rbx
lea    (%r14,%rbx,4),%rsi
movslq (%r14,%rbx,4),%rdx
mov    $0x22,%edi
call   1080 <__CrestLoad@plt>
movslq 0xc(%rsp),%rdx
lea    0xc(%rsp),%rsi
mov    $0x21,%edi
call   1080 <__CrestLoad@plt>
mov    (%r14,%rbx,4),%eax
xor    %edx,%edx
cmp    0xc(%rsp),%eax
setl   %dl
mov    $0x20,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    (%r14,%rbx,4),%eax
cmp    0xc(%rsp),%eax
jge    16b4 <b+0x554>
mov    $0x23,%edi
mov    $0x10,%esi
mov    $0x1,%edx
call   1040 <__CrestBranch@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x27,%edi
call   1080 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x26,%edi
xor    %esi,%esi
call   1080 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
add    $0x1,%rdx
mov    $0x25,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
mov    %rsp,%rsi
mov    $0x28,%edi
call   1050 <__CrestStore@plt>
mov    0x8(%rsp),%eax
add    $0x1,%eax
mov    %eax,(%rsp)
jmp    120f <b+0xaf>
mov    $0x3e,%edi
mov    $0x1a,%esi
xor    %edx,%edx
call   1040 <__CrestBranch@plt>
movslq 0x8(%rsp),%rbx
lea    (%r14,%rbx,4),%rsi
movslq (%r14,%rbx,4),%rdx
mov    $0x41,%edi
call   1080 <__CrestLoad@plt>
movslq 0xc(%rsp),%rdx
lea    0xc(%rsp),%rsi
mov    $0x40,%edi
call   1080 <__CrestLoad@plt>
mov    (%r14,%rbx,4),%eax
xor    %edx,%edx
cmp    0xc(%rsp),%eax
setl   %dl
mov    $0x3f,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    (%r14,%rbx,4),%eax
cmp    0xc(%rsp),%eax
jge    1721 <b+0x5c1>
mov    $0x42,%edi
mov    $0x1e,%esi
mov    $0x1,%edx
call   1040 <__CrestBranch@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x46,%edi
call   1080 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x45,%edi
xor    %esi,%esi
call   1080 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
add    $0x1,%rdx
mov    $0x44,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
mov    %rsp,%rsi
mov    $0x47,%edi
call   1050 <__CrestStore@plt>
mov    0x8(%rsp),%eax
add    $0x1,%eax
mov    %eax,(%rsp)
jmp    1500 <b+0x3a0>
mov    $0x24,%edi
mov    $0x11,%esi
xor    %edx,%edx
call   1040 <__CrestBranch@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x2b,%edi
call   1080 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x2a,%edi
xor    %esi,%esi
call   1080 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
add    $0xffffffffffffffff,%rdx
mov    $0x29,%edi
mov    $0x1,%esi
call   1030 <__CrestApply2@plt>
lea    0x4(%rsp),%rsi
mov    $0x2c,%edi
call   1050 <__CrestStore@plt>
mov    0x8(%rsp),%eax
add    $0xffffffff,%eax
mov    %eax,0x4(%rsp)
jmp    120f <b+0xaf>
mov    $0x43,%edi
mov    $0x1f,%esi
xor    %edx,%edx
call   1040 <__CrestBranch@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x4a,%edi
call   1080 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x49,%edi
xor    %esi,%esi
call   1080 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
add    $0xffffffffffffffff,%rdx
mov    $0x48,%edi
mov    $0x1,%esi
call   1030 <__CrestApply2@plt>
lea    0x4(%rsp),%rsi
mov    $0x4b,%edi
call   1050 <__CrestStore@plt>
mov    0x8(%rsp),%eax
add    $0xffffffff,%eax
mov    %eax,0x4(%rsp)
jmp    1500 <b+0x3a0>

LLVM IR (-O0):
define void @b(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%14 = call i32 @__CrestCall(i32 13, i32 2)
%15 = ptrtoint i32* %8 to i64
%16 = call i32 @__CrestStore(i32 12, i64 %15)
%17 = ptrtoint i32* %7 to i64
%18 = call i32 @__CrestStore(i32 11, i64 %17)
%19 = ptrtoint i32* %6 to i64
%20 = call i32 @__CrestStore(i32 10, i64 %19)
%21 = ptrtoint i32* %6 to i64
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = call i32 @__CrestLoad(i32 16, i64 %21, i64 %23)
%25 = ptrtoint i32* %7 to i64
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = call i32 @__CrestLoad(i32 15, i64 %25, i64 %27)
%29 = load i32, i32* %6
%30 = load i32, i32* %7
%31 = icmp sle i32 %29, %30
%32 = zext i1 %31 to i32
%33 = sext i32 %32 to i64
%34 = call i32 @__CrestApply2(i32 14, i32 15, i64 %33)
%35 = load i32, i32* %6
%36 = load i32, i32* %7
%37 = icmp sle i32 %35, %36
br i1 %37, label %38, label %166
38: ; preds = %4
%39 = call i32 @__CrestBranch(i32 17, i32 6, i32 1)
%40 = ptrtoint i32* %6 to i64
%41 = load i32, i32* %6
%42 = sext i32 %41 to i64
%43 = call i32 @__CrestLoad(i32 25, i64 %40, i64 %42)
%44 = ptrtoint i32* %7 to i64
%45 = load i32, i32* %7
%46 = sext i32 %45 to i64
%47 = call i32 @__CrestLoad(i32 24, i64 %44, i64 %46)
%48 = ptrtoint i32* %6 to i64
%49 = load i32, i32* %6
%50 = sext i32 %49 to i64
%51 = call i32 @__CrestLoad(i32 23, i64 %48, i64 %50)
%52 = load i32, i32* %7
%53 = load i32, i32* %6
%54 = sub nsw i32 %52, %53
%55 = sext i32 %54 to i64
%56 = call i32 @__CrestApply2(i32 22, i32 1, i64 %55)
%57 = call i32 @__CrestLoad(i32 21, i64 0, i64 2)
%58 = load i32, i32* %7
%59 = load i32, i32* %6
%60 = sub nsw i32 %58, %59
%61 = sdiv i32 %60, 2
%62 = sext i32 %61 to i64
%63 = call i32 @__CrestApply2(i32 20, i32 3, i64 %62)
%64 = load i32, i32* %6
%65 = load i32, i32* %7
%66 = load i32, i32* %6
%67 = sub nsw i32 %65, %66
%68 = sdiv i32 %67, 2
%69 = add nsw i32 %64, %68
%70 = sext i32 %69 to i64
%71 = call i32 @__CrestApply2(i32 19, i32 0, i64 %70)
%72 = ptrtoint i32* %9 to i64
%73 = call i32 @__CrestStore(i32 26, i64 %72)
%74 = load i32, i32* %6
%75 = load i32, i32* %7
%76 = load i32, i32* %6
%77 = sub nsw i32 %75, %76
%78 = sdiv i32 %77, 2
%79 = add nsw i32 %74, %78
store i32 %79, i32* %9
%80 = load i32*, i32** %5
%81 = load i32, i32* %9
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i32, i32* %80, i64 %82
store i32* %83, i32** %10
%84 = load i32*, i32** %10
%85 = ptrtoint i32* %84 to i64
%86 = load i32*, i32** %10
%87 = load i32, i32* %86
%88 = sext i32 %87 to i64
%89 = call i32 @__CrestLoad(i32 29, i64 %85, i64 %88)
%90 = ptrtoint i32* %8 to i64
%91 = load i32, i32* %8
%92 = sext i32 %91 to i64
%93 = call i32 @__CrestLoad(i32 28, i64 %90, i64 %92)
%94 = load i32*, i32** %10
%95 = load i32, i32* %94
%96 = load i32, i32* %8
%97 = icmp eq i32 %95, %96
%98 = zext i1 %97 to i32
%99 = sext i32 %98 to i64
%100 = call i32 @__CrestApply2(i32 27, i32 12, i64 %99)
%101 = load i32*, i32** %10
%102 = load i32, i32* %101
%103 = load i32, i32* %8
%104 = icmp eq i32 %102, %103
br i1 %104, label %105, label %107
105: ; preds = %38
%106 = call i32 @__CrestBranch(i32 30, i32 10, i32 1)
br label %317
107: ; preds = %38
%108 = call i32 @__CrestBranch(i32 31, i32 12, i32 0)
br label %109
109: ; preds = %107
%110 = load i32*, i32** %5
%111 = load i32, i32* %9
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i32, i32* %110, i64 %112
store i32* %113, i32** %11
%114 = load i32*, i32** %11
%115 = ptrtoint i32* %114 to i64
%116 = load i32*, i32** %11
%117 = load i32, i32* %116
%118 = sext i32 %117 to i64
%119 = call i32 @__CrestLoad(i32 34, i64 %115, i64 %118)
%120 = ptrtoint i32* %8 to i64
%121 = load i32, i32* %8
%122 = sext i32 %121 to i64
%123 = call i32 @__CrestLoad(i32 33, i64 %120, i64 %122)
%124 = load i32*, i32** %11
%125 = load i32, i32* %124
%126 = load i32, i32* %8
%127 = icmp slt i32 %125, %126
%128 = zext i1 %127 to i32
%129 = sext i32 %128 to i64
%130 = call i32 @__CrestApply2(i32 32, i32 16, i64 %129)
%131 = load i32*, i32** %11
%132 = load i32, i32* %131
%133 = load i32, i32* %8
%134 = icmp slt i32 %132, %133
br i1 %134, label %135, label %150
135: ; preds = %109
%136 = call i32 @__CrestBranch(i32 35, i32 16, i32 1)
%137 = ptrtoint i32* %9 to i64
%138 = load i32, i32* %9
%139 = sext i32 %138 to i64
%140 = call i32 @__CrestLoad(i32 39, i64 %137, i64 %139)
%141 = call i32 @__CrestLoad(i32 38, i64 0, i64 1)
%142 = load i32, i32* %9
%143 = add nsw i32 %142, 1
%144 = sext i32 %143 to i64
%145 = call i32 @__CrestApply2(i32 37, i32 0, i64 %144)
%146 = ptrtoint i32* %6 to i64
%147 = call i32 @__CrestStore(i32 40, i64 %146)
%148 = load i32, i32* %9
%149 = add nsw i32 %148, 1
store i32 %149, i32* %6
br label %165
150: ; preds = %109
%151 = call i32 @__CrestBranch(i32 36, i32 17, i32 0)
%152 = ptrtoint i32* %9 to i64
%153 = load i32, i32* %9
%154 = sext i32 %153 to i64
%155 = call i32 @__CrestLoad(i32 43, i64 %152, i64 %154)
%156 = call i32 @__CrestLoad(i32 42, i64 0, i64 1)
%157 = load i32, i32* %9
%158 = sub nsw i32 %157, 1
%159 = sext i32 %158 to i64
%160 = call i32 @__CrestApply2(i32 41, i32 1, i64 %159)
%161 = ptrtoint i32* %7 to i64
%162 = call i32 @__CrestStore(i32 44, i64 %161)
%163 = load i32, i32* %9
%164 = sub nsw i32 %163, 1
store i32 %164, i32* %7
br label %165
165: ; preds = %150, %135
br label %168
166: ; preds = %4
%167 = call i32 @__CrestBranch(i32 18, i32 18, i32 0)
br label %168
168: ; preds = %166, %165
%169 = ptrtoint i32* %6 to i64
%170 = load i32, i32* %6
%171 = sext i32 %170 to i64
%172 = call i32 @__CrestLoad(i32 47, i64 %169, i64 %171)
%173 = ptrtoint i32* %7 to i64
%174 = load i32, i32* %7
%175 = sext i32 %174 to i64
%176 = call i32 @__CrestLoad(i32 46, i64 %173, i64 %175)
%177 = load i32, i32* %6
%178 = load i32, i32* %7
%179 = icmp sle i32 %177, %178
%180 = zext i1 %179 to i32
%181 = sext i32 %180 to i64
%182 = call i32 @__CrestApply2(i32 45, i32 15, i64 %181)
%183 = load i32, i32* %6
%184 = load i32, i32* %7
%185 = icmp sle i32 %183, %184
br i1 %185, label %186, label %314
186: ; preds = %168
%187 = call i32 @__CrestBranch(i32 48, i32 20, i32 1)
%188 = ptrtoint i32* %6 to i64
%189 = load i32, i32* %6
%190 = sext i32 %189 to i64
%191 = call i32 @__CrestLoad(i32 56, i64 %188, i64 %190)
%192 = ptrtoint i32* %7 to i64
%193 = load i32, i32* %7
%194 = sext i32 %193 to i64
%195 = call i32 @__CrestLoad(i32 55, i64 %192, i64 %194)
%196 = ptrtoint i32* %6 to i64
%197 = load i32, i32* %6
%198 = sext i32 %197 to i64
%199 = call i32 @__CrestLoad(i32 54, i64 %196, i64 %198)
%200 = load i32, i32* %7
%201 = load i32, i32* %6
%202 = sub nsw i32 %200, %201
%203 = sext i32 %202 to i64
%204 = call i32 @__CrestApply2(i32 53, i32 1, i64 %203)
%205 = call i32 @__CrestLoad(i32 52, i64 0, i64 2)
%206 = load i32, i32* %7
%207 = load i32, i32* %6
%208 = sub nsw i32 %206, %207
%209 = sdiv i32 %208, 2
%210 = sext i32 %209 to i64
%211 = call i32 @__CrestApply2(i32 51, i32 3, i64 %210)
%212 = load i32, i32* %6
%213 = load i32, i32* %7
%214 = load i32, i32* %6
%215 = sub nsw i32 %213, %214
%216 = sdiv i32 %215, 2
%217 = add nsw i32 %212, %216
%218 = sext i32 %217 to i64
%219 = call i32 @__CrestApply2(i32 50, i32 0, i64 %218)
%220 = ptrtoint i32* %9 to i64
%221 = call i32 @__CrestStore(i32 57, i64 %220)
%222 = load i32, i32* %6
%223 = load i32, i32* %7
%224 = load i32, i32* %6
%225 = sub nsw i32 %223, %224
%226 = sdiv i32 %225, 2
%227 = add nsw i32 %222, %226
store i32 %227, i32* %9
%228 = load i32*, i32** %5
%229 = load i32, i32* %9
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds i32, i32* %228, i64 %230
store i32* %231, i32** %12
%232 = load i32*, i32** %12
%233 = ptrtoint i32* %232 to i64
%234 = load i32*, i32** %12
%235 = load i32, i32* %234
%236 = sext i32 %235 to i64
%237 = call i32 @__CrestLoad(i32 60, i64 %233, i64 %236)
%238 = ptrtoint i32* %8 to i64
%239 = load i32, i32* %8
%240 = sext i32 %239 to i64
%241 = call i32 @__CrestLoad(i32 59, i64 %238, i64 %240)
%242 = load i32*, i32** %12
%243 = load i32, i32* %242
%244 = load i32, i32* %8
%245 = icmp eq i32 %243, %244
%246 = zext i1 %245 to i32
%247 = sext i32 %246 to i64
%248 = call i32 @__CrestApply2(i32 58, i32 12, i64 %247)
%249 = load i32*, i32** %12
%250 = load i32, i32* %249
%251 = load i32, i32* %8
%252 = icmp eq i32 %250, %251
br i1 %252, label %253, label %255
253: ; preds = %186
%254 = call i32 @__CrestBranch(i32 61, i32 24, i32 1)
br label %317
255: ; preds = %186
%256 = call i32 @__CrestBranch(i32 62, i32 26, i32 0)
br label %257
257: ; preds = %255
%258 = load i32*, i32** %5
%259 = load i32, i32* %9
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds i32, i32* %258, i64 %260
store i32* %261, i32** %13
%262 = load i32*, i32** %13
%263 = ptrtoint i32* %262 to i64
%264 = load i32*, i32** %13
%265 = load i32, i32* %264
%266 = sext i32 %265 to i64
%267 = call i32 @__CrestLoad(i32 65, i64 %263, i64 %266)
%268 = ptrtoint i32* %8 to i64
%269 = load i32, i32* %8
%270 = sext i32 %269 to i64
%271 = call i32 @__CrestLoad(i32 64, i64 %268, i64 %270)
%272 = load i32*, i32** %13
%273 = load i32, i32* %272
%274 = load i32, i32* %8
%275 = icmp slt i32 %273, %274
%276 = zext i1 %275 to i32
%277 = sext i32 %276 to i64
%278 = call i32 @__CrestApply2(i32 63, i32 16, i64 %277)
%279 = load i32*, i32** %13
%280 = load i32, i32* %279
%281 = load i32, i32* %8
%282 = icmp slt i32 %280, %281
br i1 %282, label %283, label %298
283: ; preds = %257
%284 = call i32 @__CrestBranch(i32 66, i32 30, i32 1)
%285 = ptrtoint i32* %9 to i64
%286 = load i32, i32* %9
%287 = sext i32 %286 to i64
%288 = call i32 @__CrestLoad(i32 70, i64 %285, i64 %287)
%289 = call i32 @__CrestLoad(i32 69, i64 0, i64 1)
%290 = load i32, i32* %9
%291 = add nsw i32 %290, 1
%292 = sext i32 %291 to i64
%293 = call i32 @__CrestApply2(i32 68, i32 0, i64 %292)
%294 = ptrtoint i32* %6 to i64
%295 = call i32 @__CrestStore(i32 71, i64 %294)
%296 = load i32, i32* %9
%297 = add nsw i32 %296, 1
store i32 %297, i32* %6
br label %313
298: ; preds = %257
%299 = call i32 @__CrestBranch(i32 67, i32 31, i32 0)
%300 = ptrtoint i32* %9 to i64
%301 = load i32, i32* %9
%302 = sext i32 %301 to i64
%303 = call i32 @__CrestLoad(i32 74, i64 %300, i64 %302)
%304 = call i32 @__CrestLoad(i32 73, i64 0, i64 1)
%305 = load i32, i32* %9
%306 = sub nsw i32 %305, 1
%307 = sext i32 %306 to i64
%308 = call i32 @__CrestApply2(i32 72, i32 1, i64 %307)
%309 = ptrtoint i32* %7 to i64
%310 = call i32 @__CrestStore(i32 75, i64 %309)
%311 = load i32, i32* %9
%312 = sub nsw i32 %311, 1
store i32 %312, i32* %7
br label %313
313: ; preds = %298, %283
br label %316
314: ; preds = %168
%315 = call i32 @__CrestBranch(i32 49, i32 32, i32 0)
br label %316
316: ; preds = %314, %313
br label %317
317: ; preds = %316, %253, %105
%318 = call i32 @__CrestReturn(i32 76)
ret void
}

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