#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*/ __CrestClearStack(int);
int /*<<< orphan*/ __CrestLoad(int, unsigned long, long long);
int /*<<< orphan*/ __CrestReturn(int);
int /*<<< orphan*/ __CrestStore(int, unsigned long);
int /*<<< orphan*/ __globinit_heapsort();
int /*<<< orphan*/ heapSort(int *, int);
int /*<<< orphan*/ printf(char const *, ...);
int main(void) {
  int n;
  int i;
  int a[50];
  int __retres4;
  {
    __globinit_heapsort();
    __CrestCall(1, 1);
    printf((char const *__restrict)"\nEnter the limit:");
    __CrestClearStack(2);
    printf((char const *__restrict)"\nEnter the elements:");
    __CrestClearStack(3);
    __CrestLoad(4, (unsigned long)0, (long long)0);
    __CrestStore(5, (unsigned long)(&i));
    i = 0;
    __CrestLoad(8, (unsigned long)(&i), (long long)i);
    __CrestLoad(7, (unsigned long)(&n), (long long)n);
    __CrestApply2(6, 16, (long long)(i < n));
    if (i < n) {
      __CrestBranch(9, 4, 1);
      __CrestLoad(11, (unsigned long)(&n), (long long)n);
      heapSort(a, n);
      __CrestClearStack(12);
      __CrestLoad(15, (unsigned long)(&i), (long long)i);
      __CrestLoad(14, (unsigned long)0, (long long)1);
      __CrestApply2(13, 0, (long long)(i + 1));
      __CrestStore(16, (unsigned long)(&i));
      i++;
    } else {
      __CrestBranch(10, 5, 0);
    }
    __CrestLoad(19, (unsigned long)(&i), (long long)i);
    __CrestLoad(18, (unsigned long)(&n), (long long)n);
    __CrestApply2(17, 16, (long long)(i < n));
    if (i < n) {
      __CrestBranch(20, 7, 1);
      __CrestLoad(22, (unsigned long)(&n), (long long)n);
      heapSort(a, n);
      __CrestClearStack(23);
      __CrestLoad(26, (unsigned long)(&i), (long long)i);
      __CrestLoad(25, (unsigned long)0, (long long)1);
      __CrestApply2(24, 0, (long long)(i + 1));
      __CrestStore(27, (unsigned long)(&i));
      i++;
    } else {
      __CrestBranch(21, 8, 0);
    }
    printf((char const *__restrict)"\nThe Sorted Elements Are:\n");
    __CrestClearStack(28);
    __CrestLoad(29, (unsigned long)0, (long long)0);
    __CrestStore(30, (unsigned long)(&i));
    i = 0;
    __CrestLoad(33, (unsigned long)(&i), (long long)i);
    __CrestLoad(32, (unsigned long)(&n), (long long)n);
    __CrestApply2(31, 16, (long long)(i < n));
    if (i < n) {
      __CrestBranch(34, 12, 1);
      __CrestLoad(36, (unsigned long)(&a[i]), (long long)a[i]);
      printf((char const *__restrict)"\t%d", a[i]);
      __CrestClearStack(37);
      __CrestLoad(40, (unsigned long)(&i), (long long)i);
      __CrestLoad(39, (unsigned long)0, (long long)1);
      __CrestApply2(38, 0, (long long)(i + 1));
      __CrestStore(41, (unsigned long)(&i));
      i++;
    } else {
      __CrestBranch(35, 13, 0);
    }
    __CrestLoad(44, (unsigned long)(&i), (long long)i);
    __CrestLoad(43, (unsigned long)(&n), (long long)n);
    __CrestApply2(42, 16, (long long)(i < n));
    if (i < n) {
      __CrestBranch(45, 15, 1);
      __CrestLoad(47, (unsigned long)(&a[i]), (long long)a[i]);
      printf((char const *__restrict)"\t%d", a[i]);
      __CrestClearStack(48);
      __CrestLoad(51, (unsigned long)(&i), (long long)i);
      __CrestLoad(50, (unsigned long)0, (long long)1);
      __CrestApply2(49, 0, (long long)(i + 1));
      __CrestStore(52, (unsigned long)(&i));
      i++;
    } else {
      __CrestBranch(46, 16, 0);
    }
    printf((char const *__restrict)"\n");
    __CrestClearStack(53);
    __CrestLoad(54, (unsigned long)0, (long long)0);
    __CrestStore(55, (unsigned long)(&__retres4));
    __retres4 = 0;
    __CrestLoad(56, (unsigned long)(&__retres4), (long long)__retres4);
    __CrestReturn(57);
    return (__retres4);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__globinit_heapsort@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   10a0 <__CrestCall@plt>
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x2,%edi
call   10c0 <__CrestClearStack@plt>
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x3,%edi
call   10c0 <__CrestClearStack@plt>
mov    $0x4,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10b0 <__CrestLoad@plt>
lea    -0xc(%rbp),%rsi
mov    $0x5,%edi
call   1080 <__CrestStore@plt>
movl   $0x0,-0xc(%rbp)
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x8,%edi
call   10b0 <__CrestLoad@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x7,%edi
call   10b0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x6,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1300 <main+0x160>
mov    $0x9,%edi
mov    $0x4,%esi
mov    $0x1,%edx
call   1070 <__CrestBranch@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0xb,%edi
call   10b0 <__CrestLoad@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <heapSort@plt>
mov    $0xc,%edi
call   10c0 <__CrestClearStack@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0xf,%edi
call   10b0 <__CrestLoad@plt>
mov    $0xe,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   10b0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
mov    $0xd,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x10,%edi
call   1080 <__CrestStore@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1311 <main+0x171>
mov    $0xa,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1070 <__CrestBranch@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x13,%edi
call   10b0 <__CrestLoad@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x12,%edi
call   10b0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x11,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13f6 <main+0x256>
mov    $0x14,%edi
mov    $0x7,%esi
mov    $0x1,%edx
call   1070 <__CrestBranch@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x16,%edi
call   10b0 <__CrestLoad@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <heapSort@plt>
mov    $0x17,%edi
call   10c0 <__CrestClearStack@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x1a,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x19,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   10b0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
mov    $0x18,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x1b,%edi
call   1080 <__CrestStore@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1407 <main+0x267>
mov    $0x15,%edi
mov    $0x8,%esi
xor    %edx,%edx
call   1070 <__CrestBranch@plt>
lea    0xc19(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x1c,%edi
call   10c0 <__CrestClearStack@plt>
mov    $0x1d,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10b0 <__CrestLoad@plt>
lea    -0xc(%rbp),%rsi
mov    $0x1e,%edi
call   1080 <__CrestStore@plt>
movl   $0x0,-0xc(%rbp)
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x21,%edi
call   10b0 <__CrestLoad@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x20,%edi
call   10b0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x1f,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    154a <main+0x3aa>
mov    $0x22,%edi
mov    $0xc,%esi
mov    $0x1,%edx
call   1070 <__CrestBranch@plt>
movslq -0xc(%rbp),%rax
lea    -0xe0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
movslq -0xe0(%rbp,%rax,4),%rdx
ff
mov    $0x24,%edi
call   10b0 <__CrestLoad@plt>
movslq -0xc(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0xb5f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x25,%edi
call   10c0 <__CrestClearStack@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x28,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x27,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   10b0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
mov    $0x26,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x29,%edi
call   1080 <__CrestStore@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    155b <main+0x3bb>
mov    $0x23,%edi
mov    $0xd,%esi
xor    %edx,%edx
call   1070 <__CrestBranch@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x2c,%edi
call   10b0 <__CrestLoad@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x2b,%edi
call   10b0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x2a,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1660 <main+0x4c0>
mov    $0x2d,%edi
mov    $0xf,%esi
mov    $0x1,%edx
call   1070 <__CrestBranch@plt>
movslq -0xc(%rbp),%rax
lea    -0xe0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
movslq -0xe0(%rbp,%rax,4),%rdx
ff
mov    $0x2f,%edi
call   10b0 <__CrestLoad@plt>
movslq -0xc(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0xa49(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x30,%edi
call   10c0 <__CrestClearStack@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x33,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x32,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   10b0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
mov    $0x31,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x34,%edi
call   1080 <__CrestStore@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1671 <main+0x4d1>
mov    $0x2e,%edi
mov    $0x10,%esi
xor    %edx,%edx
call   1070 <__CrestBranch@plt>
lea    0x9c8(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x35,%edi
call   10c0 <__CrestClearStack@plt>
mov    $0x36,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10b0 <__CrestLoad@plt>
lea    -0xe4(%rbp),%rsi
mov    $0x37,%edi
call   1080 <__CrestStore@plt>
movl   $0x0,-0xe4(%rbp)
lea    -0xe4(%rbp),%rsi
movslq -0xe4(%rbp),%rdx
mov    $0x38,%edi
call   10b0 <__CrestLoad@plt>
mov    $0x39,%edi
call   1090 <__CrestReturn@plt>
mov    -0xe4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xe0,%rsp
xor    %eax,%eax
call   1050 <__globinit_heapsort@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   10c0 <__CrestCall@plt>
lea    0xe1b(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0x2,%edi
call   10e0 <__CrestClearStack@plt>
lea    0xe15(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0x3,%edi
call   10e0 <__CrestClearStack@plt>
mov    $0x4,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <__CrestLoad@plt>
lea    0x4(%rsp),%rbx
mov    $0x5,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
movl   $0x0,0x4(%rsp)
mov    $0x8,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   10d0 <__CrestLoad@plt>
lea    0x8(%rsp),%rsi
mov    $0x7,%edi
xor    %edx,%edx
call   10d0 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
xor    %edx,%edx
cmp    0x8(%rsp),%eax
setl   %dl
mov    $0x6,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    0x4(%rsp),%eax
cmp    0x8(%rsp),%eax
jge    1317 <main+0x157>
mov    $0x9,%edi
mov    $0x4,%esi
mov    $0x1,%edx
call   1090 <__CrestBranch@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0xb,%edi
call   10d0 <__CrestLoad@plt>
mov    0x8(%rsp),%esi
lea    0x10(%rsp),%rdi
call   1070 <heapSort@plt>
mov    $0xc,%edi
call   10e0 <__CrestClearStack@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rbx
mov    $0xf,%edi
mov    %rbx,%rsi
call   10d0 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0xe,%edi
xor    %esi,%esi
call   10d0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
add    $0x1,%rdx
mov    $0xd,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
mov    $0x10,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
mov    0x4(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x4(%rsp)
jmp    132c <main+0x16c>
mov    $0xa,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1090 <__CrestBranch@plt>
mov    0x4(%rsp),%eax
movslq %eax,%rdx
lea    0x4(%rsp),%rsi
mov    $0x13,%edi
call   10d0 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x12,%edi
call   10d0 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
xor    %edx,%edx
cmp    0x8(%rsp),%eax
setl   %dl
mov    $0x11,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    0x4(%rsp),%eax
cmp    0x8(%rsp),%eax
jge    140d <main+0x24d>
mov    $0x14,%edi
mov    $0x7,%esi
mov    $0x1,%edx
call   1090 <__CrestBranch@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x16,%edi
call   10d0 <__CrestLoad@plt>
mov    0x8(%rsp),%esi
lea    0x10(%rsp),%rdi
call   1070 <heapSort@plt>
mov    $0x17,%edi
call   10e0 <__CrestClearStack@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rbx
mov    $0x1a,%edi
mov    %rbx,%rsi
call   10d0 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x19,%edi
xor    %esi,%esi
call   10d0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
add    $0x1,%rdx
mov    $0x18,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
mov    $0x1b,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
addl   $0x1,0x4(%rsp)
jmp    141e <main+0x25e>
mov    $0x15,%edi
mov    $0x8,%esi
xor    %edx,%edx
call   1090 <__CrestBranch@plt>
lea    0xc06(%rip),%rdi
call   1060 <puts@plt>
mov    $0x1c,%edi
call   10e0 <__CrestClearStack@plt>
mov    $0x1d,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <__CrestLoad@plt>
lea    0x4(%rsp),%rbx
mov    $0x1e,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
movl   $0x0,0x4(%rsp)
mov    $0x21,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   10d0 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x20,%edi
call   10d0 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
xor    %edx,%edx
cmp    0x8(%rsp),%eax
setl   %dl
mov    $0x1f,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    0x4(%rsp),%eax
cmp    0x8(%rsp),%eax
jge    1551 <main+0x391>
mov    $0x22,%edi
mov    $0xc,%esi
mov    $0x1,%edx
call   1090 <__CrestBranch@plt>
movslq 0x4(%rsp),%rax
lea    (%rsp,%rax,4),%rsi
add    $0x10,%rsi
movslq 0x10(%rsp,%rax,4),%rdx
mov    $0x24,%edi
call   10d0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rax
mov    0x10(%rsp,%rax,4),%esi
lea    0xb3e(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0x25,%edi
call   10e0 <__CrestClearStack@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rbx
mov    $0x28,%edi
mov    %rbx,%rsi
call   10d0 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x27,%edi
xor    %esi,%esi
call   10d0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
add    $0x1,%rdx
mov    $0x26,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
mov    $0x29,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
mov    0x4(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x4(%rsp)
jmp    1566 <main+0x3a6>
mov    $0x23,%edi
mov    $0xd,%esi
xor    %edx,%edx
call   1090 <__CrestBranch@plt>
mov    0x4(%rsp),%eax
movslq %eax,%rdx
lea    0x4(%rsp),%rsi
mov    $0x2c,%edi
call   10d0 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x2b,%edi
call   10d0 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
xor    %edx,%edx
cmp    0x8(%rsp),%eax
setl   %dl
mov    $0x2a,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    0x4(%rsp),%eax
cmp    0x8(%rsp),%eax
jge    1658 <main+0x498>
mov    $0x2d,%edi
mov    $0xf,%esi
mov    $0x1,%edx
call   1090 <__CrestBranch@plt>
movslq 0x4(%rsp),%rax
lea    (%rsp,%rax,4),%rsi
add    $0x10,%rsi
movslq 0x10(%rsp,%rax,4),%rdx
mov    $0x2f,%edi
call   10d0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rax
mov    0x10(%rsp,%rax,4),%esi
lea    0xa31(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    $0x30,%edi
call   10e0 <__CrestClearStack@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rbx
mov    $0x33,%edi
mov    %rbx,%rsi
call   10d0 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x32,%edi
xor    %esi,%esi
call   10d0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
add    $0x1,%rdx
mov    $0x31,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
mov    $0x34,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
addl   $0x1,0x4(%rsp)
jmp    1669 <main+0x4a9>
mov    $0x2e,%edi
mov    $0x10,%esi
xor    %edx,%edx
call   1090 <__CrestBranch@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    $0x35,%edi
call   10e0 <__CrestClearStack@plt>
mov    $0x36,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <__CrestLoad@plt>
lea    0xc(%rsp),%rbx
mov    $0x37,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
movl   $0x0,0xc(%rsp)
mov    $0x38,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   10d0 <__CrestLoad@plt>
mov    $0x39,%edi
call   10b0 <__CrestReturn@plt>
mov    0xc(%rsp),%eax
add    $0xe0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"\0AEnter the limit:\00"
@.str.1 = [21 x i8] c"\0AEnter the elements:\00"
@.str.3 = [4 x i8] c"\09%d\00"
@str = [26 x i8] c"\0AThe Sorted Elements Are:\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [50 x i32]
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast [50 x i32]* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 (...) @__globinit_heapsort()
%10 = tail call i32 @__CrestCall(i32 1, i32 1)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%12 = tail call i32 @__CrestClearStack(i32 2)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%14 = tail call i32 @__CrestClearStack(i32 3)
%15 = tail call i32 @__CrestLoad(i32 4, i64 0, i64 0)
%16 = ptrtoint i32* %2 to i64
%17 = call i32 @__CrestStore(i32 5, i64 %16)
store i32 0, i32* %2
%18 = call i32 @__CrestLoad(i32 8, i64 %16, i64 0)
%19 = ptrtoint i32* %1 to i64
%20 = call i32 @__CrestLoad(i32 7, i64 %19, i64 0)
%21 = load i32, i32* %2
%22 = load i32, i32* %1
%23 = icmp slt i32 %21, %22
%24 = zext i1 %23 to i64
%25 = call i32 @__CrestApply2(i32 6, i32 16, i64 %24)
%26 = load i32, i32* %2
%27 = load i32, i32* %1
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %49
29: ; preds = %0
%30 = call i32 @__CrestBranch(i32 9, i32 4, i32 1)
%31 = load i32, i32* %1
%32 = sext i32 %31 to i64
%33 = call i32 @__CrestLoad(i32 11, i64 %19, i64 %32)
%34 = getelementptr inbounds [50 x i32], [50 x i32]* %3, i64 0, i64 0
%35 = load i32, i32* %1
%36 = call i32 @heapSort(i32* %34, i32 %35)
%37 = call i32 @__CrestClearStack(i32 12)
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = call i32 @__CrestLoad(i32 15, i64 %16, i64 %39)
%41 = call i32 @__CrestLoad(i32 14, i64 0, i64 1)
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
%44 = sext i32 %43 to i64
%45 = call i32 @__CrestApply2(i32 13, i32 0, i64 %44)
%46 = call i32 @__CrestStore(i32 16, i64 %16)
%47 = load i32, i32* %2
%48 = add nsw i32 %47, 1
store i32 %48, i32* %2
br label %52
49: ; preds = %0
%50 = call i32 @__CrestBranch(i32 10, i32 5, i32 0)
%51 = load i32, i32* %2
br label %52
52: ; preds = %49, %29
%53 = phi i32 [ %51, %49 ], [ %48, %29 ]
%54 = sext i32 %53 to i64
%55 = call i32 @__CrestLoad(i32 19, i64 %16, i64 %54)
%56 = load i32, i32* %1
%57 = sext i32 %56 to i64
%58 = call i32 @__CrestLoad(i32 18, i64 %19, i64 %57)
%59 = load i32, i32* %2
%60 = load i32, i32* %1
%61 = icmp slt i32 %59, %60
%62 = zext i1 %61 to i64
%63 = call i32 @__CrestApply2(i32 17, i32 16, i64 %62)
%64 = load i32, i32* %2
%65 = load i32, i32* %1
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %87
67: ; preds = %52
%68 = call i32 @__CrestBranch(i32 20, i32 7, i32 1)
%69 = load i32, i32* %1
%70 = sext i32 %69 to i64
%71 = call i32 @__CrestLoad(i32 22, i64 %19, i64 %70)
%72 = getelementptr inbounds [50 x i32], [50 x i32]* %3, i64 0, i64 0
%73 = load i32, i32* %1
%74 = call i32 @heapSort(i32* %72, i32 %73)
%75 = call i32 @__CrestClearStack(i32 23)
%76 = load i32, i32* %2
%77 = sext i32 %76 to i64
%78 = call i32 @__CrestLoad(i32 26, i64 %16, i64 %77)
%79 = call i32 @__CrestLoad(i32 25, i64 0, i64 1)
%80 = load i32, i32* %2
%81 = add nsw i32 %80, 1
%82 = sext i32 %81 to i64
%83 = call i32 @__CrestApply2(i32 24, i32 0, i64 %82)
%84 = call i32 @__CrestStore(i32 27, i64 %16)
%85 = load i32, i32* %2
%86 = add nsw i32 %85, 1
store i32 %86, i32* %2
br label %89
87: ; preds = %52
%88 = call i32 @__CrestBranch(i32 21, i32 8, i32 0)
br label %89
89: ; preds = %87, %67
%90 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%91 = call i32 @__CrestClearStack(i32 28)
%92 = call i32 @__CrestLoad(i32 29, i64 0, i64 0)
%93 = call i32 @__CrestStore(i32 30, i64 %16)
store i32 0, i32* %2
%94 = call i32 @__CrestLoad(i32 33, i64 %16, i64 0)
%95 = load i32, i32* %1
%96 = sext i32 %95 to i64
%97 = call i32 @__CrestLoad(i32 32, i64 %19, i64 %96)
%98 = load i32, i32* %2
%99 = load i32, i32* %1
%100 = icmp slt i32 %98, %99
%101 = zext i1 %100 to i64
%102 = call i32 @__CrestApply2(i32 31, i32 16, i64 %101)
%103 = load i32, i32* %2
%104 = load i32, i32* %1
%105 = icmp slt i32 %103, %104
br i1 %105, label %106, label %132
106: ; preds = %89
%107 = call i32 @__CrestBranch(i32 34, i32 12, i32 1)
%108 = load i32, i32* %2
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [50 x i32], [50 x i32]* %3, i64 0, i64 %109
%111 = ptrtoint i32* %110 to i64
%112 = load i32, i32* %110
%113 = sext i32 %112 to i64
%114 = call i32 @__CrestLoad(i32 36, i64 %111, i64 %113)
%115 = load i32, i32* %2
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [50 x i32], [50 x i32]* %3, i64 0, i64 %116
%118 = load i32, i32* %117
%119 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %118)
%120 = call i32 @__CrestClearStack(i32 37)
%121 = load i32, i32* %2
%122 = sext i32 %121 to i64
%123 = call i32 @__CrestLoad(i32 40, i64 %16, i64 %122)
%124 = call i32 @__CrestLoad(i32 39, i64 0, i64 1)
%125 = load i32, i32* %2
%126 = add nsw i32 %125, 1
%127 = sext i32 %126 to i64
%128 = call i32 @__CrestApply2(i32 38, i32 0, i64 %127)
%129 = call i32 @__CrestStore(i32 41, i64 %16)
%130 = load i32, i32* %2
%131 = add nsw i32 %130, 1
store i32 %131, i32* %2
br label %135
132: ; preds = %89
%133 = call i32 @__CrestBranch(i32 35, i32 13, i32 0)
%134 = load i32, i32* %2
br label %135
135: ; preds = %132, %106
%136 = phi i32 [ %134, %132 ], [ %131, %106 ]
%137 = sext i32 %136 to i64
%138 = call i32 @__CrestLoad(i32 44, i64 %16, i64 %137)
%139 = load i32, i32* %1
%140 = sext i32 %139 to i64
%141 = call i32 @__CrestLoad(i32 43, i64 %19, i64 %140)
%142 = load i32, i32* %2
%143 = load i32, i32* %1
%144 = icmp slt i32 %142, %143
%145 = zext i1 %144 to i64
%146 = call i32 @__CrestApply2(i32 42, i32 16, i64 %145)
%147 = load i32, i32* %2
%148 = load i32, i32* %1
%149 = icmp slt i32 %147, %148
br i1 %149, label %150, label %176
150: ; preds = %135
%151 = call i32 @__CrestBranch(i32 45, i32 15, i32 1)
%152 = load i32, i32* %2
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds [50 x i32], [50 x i32]* %3, i64 0, i64 %153
%155 = ptrtoint i32* %154 to i64
%156 = load i32, i32* %154
%157 = sext i32 %156 to i64
%158 = call i32 @__CrestLoad(i32 47, i64 %155, i64 %157)
%159 = load i32, i32* %2
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [50 x i32], [50 x i32]* %3, i64 0, i64 %160
%162 = load i32, i32* %161
%163 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %162)
%164 = call i32 @__CrestClearStack(i32 48)
%165 = load i32, i32* %2
%166 = sext i32 %165 to i64
%167 = call i32 @__CrestLoad(i32 51, i64 %16, i64 %166)
%168 = call i32 @__CrestLoad(i32 50, i64 0, i64 1)
%169 = load i32, i32* %2
%170 = add nsw i32 %169, 1
%171 = sext i32 %170 to i64
%172 = call i32 @__CrestApply2(i32 49, i32 0, i64 %171)
%173 = call i32 @__CrestStore(i32 52, i64 %16)
%174 = load i32, i32* %2
%175 = add nsw i32 %174, 1
store i32 %175, i32* %2
br label %178
176: ; preds = %135
%177 = call i32 @__CrestBranch(i32 46, i32 16, i32 0)
br label %178
178: ; preds = %176, %150
%179 = call i32 @putchar(i32 10)
%180 = call i32 @__CrestClearStack(i32 53)
%181 = call i32 @__CrestLoad(i32 54, i64 0, i64 0)
%182 = ptrtoint i32* %4 to i64
%183 = call i32 @__CrestStore(i32 55, i64 %182)
store i32 0, i32* %4
%184 = call i32 @__CrestLoad(i32 56, i64 %182, i64 0)
%185 = call i32 @__CrestReturn(i32 57)
%186 = load i32, i32* %4
ret i32 %186
}