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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <__globinit_heapSort@plt>
mov    $0x5,%edi
mov    $0x3,%esi
call   10a0 <__CrestCall@plt>
lea    -0xe0(%rbp),%rdi
call   10b0 <__CrestInt@plt>
lea    -0x8(%rbp),%rdi
call   10b0 <__CrestInt@plt>
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x6,%edi
call   10d0 <__CrestClearStack@plt>
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x7,%edi
call   10d0 <__CrestClearStack@plt>
mov    $0x8,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10c0 <__CrestLoad@plt>
lea    -0xc(%rbp),%rsi
mov    $0x9,%edi
call   1080 <__CrestStore@plt>
movl   $0x0,-0xc(%rbp)
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0xc,%edi
call   10c0 <__CrestLoad@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0xb,%edi
call   10c0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0xa,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1328 <main+0x178>
mov    $0xd,%edi
mov    $0x6,%esi
mov    $0x1,%edx
call   1060 <__CrestBranch@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0xf,%edi
call   10c0 <__CrestLoad@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <heapSort@plt>
mov    $0x10,%edi
call   10d0 <__CrestClearStack@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x13,%edi
call   10c0 <__CrestLoad@plt>
mov    $0x12,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   10c0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
mov    $0x11,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x14,%edi
call   1080 <__CrestStore@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1339 <main+0x189>
mov    $0xe,%edi
mov    $0x7,%esi
xor    %edx,%edx
call   1060 <__CrestBranch@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x17,%edi
call   10c0 <__CrestLoad@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x16,%edi
call   10c0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x15,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    141e <main+0x26e>
mov    $0x18,%edi
mov    $0x9,%esi
mov    $0x1,%edx
call   1060 <__CrestBranch@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x1a,%edi
call   10c0 <__CrestLoad@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <heapSort@plt>
mov    $0x1b,%edi
call   10d0 <__CrestClearStack@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x1e,%edi
call   10c0 <__CrestLoad@plt>
mov    $0x1d,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   10c0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
mov    $0x1c,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x1f,%edi
call   1080 <__CrestStore@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    142f <main+0x27f>
mov    $0x19,%edi
mov    $0xa,%esi
xor    %edx,%edx
call   1060 <__CrestBranch@plt>
lea    0xbf1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x20,%edi
call   10d0 <__CrestClearStack@plt>
mov    $0x21,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10c0 <__CrestLoad@plt>
lea    -0xc(%rbp),%rsi
mov    $0x22,%edi
call   1080 <__CrestStore@plt>
movl   $0x0,-0xc(%rbp)
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x25,%edi
call   10c0 <__CrestLoad@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x24,%edi
call   10c0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x23,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1572 <main+0x3c2>
mov    $0x26,%edi
mov    $0xe,%esi
mov    $0x1,%edx
call   1060 <__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    $0x28,%edi
call   10c0 <__CrestLoad@plt>
movslq -0xc(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0xb37(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x29,%edi
call   10d0 <__CrestClearStack@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x2c,%edi
call   10c0 <__CrestLoad@plt>
mov    $0x2b,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   10c0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
mov    $0x2a,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x2d,%edi
call   1080 <__CrestStore@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1583 <main+0x3d3>
mov    $0x27,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1060 <__CrestBranch@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x30,%edi
call   10c0 <__CrestLoad@plt>
lea    -0x8(%rbp),%rsi
movslq -0x8(%rbp),%rdx
mov    $0x2f,%edi
call   10c0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rdx
mov    $0x2e,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1688 <main+0x4d8>
mov    $0x31,%edi
mov    $0x11,%esi
mov    $0x1,%edx
call   1060 <__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    $0x33,%edi
call   10c0 <__CrestLoad@plt>
movslq -0xc(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0xa21(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x34,%edi
call   10d0 <__CrestClearStack@plt>
lea    -0xc(%rbp),%rsi
movslq -0xc(%rbp),%rdx
mov    $0x37,%edi
call   10c0 <__CrestLoad@plt>
mov    $0x36,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   10c0 <__CrestLoad@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdx
mov    $0x35,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
lea    -0xc(%rbp),%rsi
mov    $0x38,%edi
call   1080 <__CrestStore@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1699 <main+0x4e9>
mov    $0x32,%edi
mov    $0x12,%esi
xor    %edx,%edx
call   1060 <__CrestBranch@plt>
lea    0x9a0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x39,%edi
call   10d0 <__CrestClearStack@plt>
mov    $0x3a,%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   10c0 <__CrestLoad@plt>
lea    -0xe4(%rbp),%rsi
mov    $0x3b,%edi
call   1080 <__CrestStore@plt>
movl   $0x0,-0xe4(%rbp)
lea    -0xe4(%rbp),%rsi
movslq -0xe4(%rbp),%rdx
mov    $0x3c,%edi
call   10c0 <__CrestLoad@plt>
mov    $0x3d,%edi
call   1090 <__CrestReturn@plt>
mov    -0xe4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
xor    %eax,%eax
call   1090 <__globinit_heapSort@plt>
mov    $0x5,%edi
mov    $0x3,%esi
call   10c0 <__CrestCall@plt>
lea    0x10(%rsp),%rdi
call   10d0 <__CrestInt@plt>
lea    0x8(%rsp),%r14
mov    %r14,%rdi
call   10d0 <__CrestInt@plt>
lea    0xdf2(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x6,%edi
call   10f0 <__CrestClearStack@plt>
lea    0xdec(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x7,%edi
call   10f0 <__CrestClearStack@plt>
mov    $0x8,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10e0 <__CrestLoad@plt>
lea    0x4(%rsp),%rbx
mov    $0x9,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
movl   $0x0,0x4(%rsp)
mov    $0xc,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   10e0 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
mov    $0xb,%edi
mov    %r14,%rsi
call   10e0 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
xor    %edx,%edx
cmp    0x8(%rsp),%eax
setl   %dl
mov    $0xa,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    0x4(%rsp),%eax
cmp    0x8(%rsp),%eax
jge    1341 <main+0x171>
mov    $0xd,%edi
mov    $0x6,%esi
mov    $0x1,%edx
call   1080 <__CrestBranch@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0xf,%edi
call   10e0 <__CrestLoad@plt>
mov    0x8(%rsp),%esi
lea    0x10(%rsp),%rdi
call   1060 <heapSort@plt>
mov    $0x10,%edi
call   10f0 <__CrestClearStack@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rbx
mov    $0x13,%edi
mov    %rbx,%rsi
call   10e0 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x12,%edi
xor    %esi,%esi
call   10e0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
add    $0x1,%rdx
mov    $0x11,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
mov    $0x14,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
mov    0x4(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x4(%rsp)
jmp    1356 <main+0x186>
mov    $0xe,%edi
mov    $0x7,%esi
xor    %edx,%edx
call   1080 <__CrestBranch@plt>
mov    0x4(%rsp),%eax
movslq %eax,%rdx
lea    0x4(%rsp),%rsi
mov    $0x17,%edi
call   10e0 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x16,%edi
call   10e0 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
xor    %edx,%edx
cmp    0x8(%rsp),%eax
setl   %dl
mov    $0x15,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    0x4(%rsp),%eax
cmp    0x8(%rsp),%eax
jge    1437 <main+0x267>
mov    $0x18,%edi
mov    $0x9,%esi
mov    $0x1,%edx
call   1080 <__CrestBranch@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x1a,%edi
call   10e0 <__CrestLoad@plt>
mov    0x8(%rsp),%esi
lea    0x10(%rsp),%rdi
call   1060 <heapSort@plt>
mov    $0x1b,%edi
call   10f0 <__CrestClearStack@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rbx
mov    $0x1e,%edi
mov    %rbx,%rsi
call   10e0 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x1d,%edi
xor    %esi,%esi
call   10e0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
add    $0x1,%rdx
mov    $0x1c,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
mov    $0x1f,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
addl   $0x1,0x4(%rsp)
jmp    1448 <main+0x278>
mov    $0x19,%edi
mov    $0xa,%esi
xor    %edx,%edx
call   1080 <__CrestBranch@plt>
lea    0xbdc(%rip),%rdi
call   1050 <puts@plt>
mov    $0x20,%edi
call   10f0 <__CrestClearStack@plt>
mov    $0x21,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10e0 <__CrestLoad@plt>
lea    0x4(%rsp),%rbx
mov    $0x22,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
movl   $0x0,0x4(%rsp)
mov    $0x25,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   10e0 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x24,%edi
call   10e0 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
xor    %edx,%edx
cmp    0x8(%rsp),%eax
setl   %dl
mov    $0x23,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    0x4(%rsp),%eax
cmp    0x8(%rsp),%eax
jge    157b <main+0x3ab>
mov    $0x26,%edi
mov    $0xe,%esi
mov    $0x1,%edx
call   1080 <__CrestBranch@plt>
movslq 0x4(%rsp),%rax
lea    (%rsp,%rax,4),%rsi
add    $0x10,%rsi
movslq 0x10(%rsp,%rax,4),%rdx
mov    $0x28,%edi
call   10e0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rax
mov    0x10(%rsp,%rax,4),%esi
lea    0xb14(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x29,%edi
call   10f0 <__CrestClearStack@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rbx
mov    $0x2c,%edi
mov    %rbx,%rsi
call   10e0 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x2b,%edi
xor    %esi,%esi
call   10e0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
add    $0x1,%rdx
mov    $0x2a,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
mov    $0x2d,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
mov    0x4(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x4(%rsp)
jmp    1590 <main+0x3c0>
mov    $0x27,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1080 <__CrestBranch@plt>
mov    0x4(%rsp),%eax
movslq %eax,%rdx
lea    0x4(%rsp),%rsi
mov    $0x30,%edi
call   10e0 <__CrestLoad@plt>
movslq 0x8(%rsp),%rdx
lea    0x8(%rsp),%rsi
mov    $0x2f,%edi
call   10e0 <__CrestLoad@plt>
mov    0x4(%rsp),%eax
xor    %edx,%edx
cmp    0x8(%rsp),%eax
setl   %dl
mov    $0x2e,%edi
mov    $0x10,%esi
call   1030 <__CrestApply2@plt>
mov    0x4(%rsp),%eax
cmp    0x8(%rsp),%eax
jge    1682 <main+0x4b2>
mov    $0x31,%edi
mov    $0x11,%esi
mov    $0x1,%edx
call   1080 <__CrestBranch@plt>
movslq 0x4(%rsp),%rax
lea    (%rsp,%rax,4),%rsi
add    $0x10,%rsi
movslq 0x10(%rsp,%rax,4),%rdx
mov    $0x33,%edi
call   10e0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rax
mov    0x10(%rsp,%rax,4),%esi
lea    0xa07(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x34,%edi
call   10f0 <__CrestClearStack@plt>
movslq 0x4(%rsp),%rdx
lea    0x4(%rsp),%rbx
mov    $0x37,%edi
mov    %rbx,%rsi
call   10e0 <__CrestLoad@plt>
mov    $0x1,%edx
mov    $0x36,%edi
xor    %esi,%esi
call   10e0 <__CrestLoad@plt>
movslq 0x4(%rsp),%rdx
add    $0x1,%rdx
mov    $0x35,%edi
xor    %esi,%esi
call   1030 <__CrestApply2@plt>
mov    $0x38,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
addl   $0x1,0x4(%rsp)
jmp    1693 <main+0x4c3>
mov    $0x32,%edi
mov    $0x12,%esi
xor    %edx,%edx
call   1080 <__CrestBranch@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    $0x39,%edi
call   10f0 <__CrestClearStack@plt>
mov    $0x3a,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10e0 <__CrestLoad@plt>
lea    0xc(%rsp),%rbx
mov    $0x3b,%edi
mov    %rbx,%rsi
call   10a0 <__CrestStore@plt>
movl   $0x0,0xc(%rsp)
mov    $0x3c,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   10e0 <__CrestLoad@plt>
mov    $0x3d,%edi
call   10b0 <__CrestReturn@plt>
mov    0xc(%rsp),%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r14
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 5, i32 3)
%8 = bitcast [50 x i32]* %4 to i32*
%9 = call i32 @__CrestInt(i32* %8)
%10 = call i32 @__CrestInt(i32* %2)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @__CrestClearStack(i32 6)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @__CrestClearStack(i32 7)
%15 = call i32 @__CrestLoad(i32 8, i64 0, i64 0)
%16 = ptrtoint i32* %3 to i64
%17 = call i32 @__CrestStore(i32 9, i64 %16)
store i32 0, i32* %3
%18 = ptrtoint i32* %3 to i64
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = call i32 @__CrestLoad(i32 12, i64 %18, i64 %20)
%22 = ptrtoint i32* %2 to i64
%23 = load i32, i32* %2
%24 = sext i32 %23 to i64
%25 = call i32 @__CrestLoad(i32 11, i64 %22, i64 %24)
%26 = load i32, i32* %3
%27 = load i32, i32* %2
%28 = icmp slt i32 %26, %27
%29 = zext i1 %28 to i32
%30 = sext i32 %29 to i64
%31 = call i32 @__CrestApply2(i32 10, i32 16, i64 %30)
%32 = load i32, i32* %3
%33 = load i32, i32* %2
%34 = icmp slt i32 %32, %33
br i1 %34, label %35, label %58
35: ; preds = %0
%36 = call i32 @__CrestBranch(i32 13, i32 6, i32 1)
%37 = ptrtoint i32* %2 to i64
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = call i32 @__CrestLoad(i32 15, i64 %37, i64 %39)
%41 = getelementptr inbounds [50 x i32], [50 x i32]* %4, i64 0, i64 0
%42 = load i32, i32* %2
%43 = call i32 @heapSort(i32* %41, i32 %42)
%44 = call i32 @__CrestClearStack(i32 16)
%45 = ptrtoint i32* %3 to i64
%46 = load i32, i32* %3
%47 = sext i32 %46 to i64
%48 = call i32 @__CrestLoad(i32 19, i64 %45, i64 %47)
%49 = call i32 @__CrestLoad(i32 18, i64 0, i64 1)
%50 = load i32, i32* %3
%51 = add nsw i32 %50, 1
%52 = sext i32 %51 to i64
%53 = call i32 @__CrestApply2(i32 17, i32 0, i64 %52)
%54 = ptrtoint i32* %3 to i64
%55 = call i32 @__CrestStore(i32 20, i64 %54)
%56 = load i32, i32* %3
%57 = add nsw i32 %56, 1
store i32 %57, i32* %3
br label %60
58: ; preds = %0
%59 = call i32 @__CrestBranch(i32 14, i32 7, i32 0)
br label %60
60: ; preds = %58, %35
%61 = ptrtoint i32* %3 to i64
%62 = load i32, i32* %3
%63 = sext i32 %62 to i64
%64 = call i32 @__CrestLoad(i32 23, i64 %61, i64 %63)
%65 = ptrtoint i32* %2 to i64
%66 = load i32, i32* %2
%67 = sext i32 %66 to i64
%68 = call i32 @__CrestLoad(i32 22, i64 %65, i64 %67)
%69 = load i32, i32* %3
%70 = load i32, i32* %2
%71 = icmp slt i32 %69, %70
%72 = zext i1 %71 to i32
%73 = sext i32 %72 to i64
%74 = call i32 @__CrestApply2(i32 21, i32 16, i64 %73)
%75 = load i32, i32* %3
%76 = load i32, i32* %2
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %101
78: ; preds = %60
%79 = call i32 @__CrestBranch(i32 24, i32 9, i32 1)
%80 = ptrtoint i32* %2 to i64
%81 = load i32, i32* %2
%82 = sext i32 %81 to i64
%83 = call i32 @__CrestLoad(i32 26, i64 %80, i64 %82)
%84 = getelementptr inbounds [50 x i32], [50 x i32]* %4, i64 0, i64 0
%85 = load i32, i32* %2
%86 = call i32 @heapSort(i32* %84, i32 %85)
%87 = call i32 @__CrestClearStack(i32 27)
%88 = ptrtoint i32* %3 to i64
%89 = load i32, i32* %3
%90 = sext i32 %89 to i64
%91 = call i32 @__CrestLoad(i32 30, i64 %88, i64 %90)
%92 = call i32 @__CrestLoad(i32 29, i64 0, i64 1)
%93 = load i32, i32* %3
%94 = add nsw i32 %93, 1
%95 = sext i32 %94 to i64
%96 = call i32 @__CrestApply2(i32 28, i32 0, i64 %95)
%97 = ptrtoint i32* %3 to i64
%98 = call i32 @__CrestStore(i32 31, i64 %97)
%99 = load i32, i32* %3
%100 = add nsw i32 %99, 1
store i32 %100, i32* %3
br label %103
101: ; preds = %60
%102 = call i32 @__CrestBranch(i32 25, i32 10, i32 0)
br label %103
103: ; preds = %101, %78
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%105 = call i32 @__CrestClearStack(i32 32)
%106 = call i32 @__CrestLoad(i32 33, i64 0, i64 0)
%107 = ptrtoint i32* %3 to i64
%108 = call i32 @__CrestStore(i32 34, i64 %107)
store i32 0, i32* %3
%109 = ptrtoint i32* %3 to i64
%110 = load i32, i32* %3
%111 = sext i32 %110 to i64
%112 = call i32 @__CrestLoad(i32 37, i64 %109, i64 %111)
%113 = ptrtoint i32* %2 to i64
%114 = load i32, i32* %2
%115 = sext i32 %114 to i64
%116 = call i32 @__CrestLoad(i32 36, i64 %113, i64 %115)
%117 = load i32, i32* %3
%118 = load i32, i32* %2
%119 = icmp slt i32 %117, %118
%120 = zext i1 %119 to i32
%121 = sext i32 %120 to i64
%122 = call i32 @__CrestApply2(i32 35, i32 16, i64 %121)
%123 = load i32, i32* %3
%124 = load i32, i32* %2
%125 = icmp slt i32 %123, %124
br i1 %125, label %126, label %157
126: ; preds = %103
%127 = call i32 @__CrestBranch(i32 38, i32 14, i32 1)
%128 = load i32, i32* %3
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds [50 x i32], [50 x i32]* %4, i64 0, i64 %129
%131 = ptrtoint i32* %130 to i64
%132 = load i32, i32* %3
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [50 x i32], [50 x i32]* %4, i64 0, i64 %133
%135 = load i32, i32* %134
%136 = sext i32 %135 to i64
%137 = call i32 @__CrestLoad(i32 40, i64 %131, i64 %136)
%138 = load i32, i32* %3
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds [50 x i32], [50 x i32]* %4, i64 0, i64 %139
%141 = load i32, i32* %140
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %141)
%143 = call i32 @__CrestClearStack(i32 41)
%144 = ptrtoint i32* %3 to i64
%145 = load i32, i32* %3
%146 = sext i32 %145 to i64
%147 = call i32 @__CrestLoad(i32 44, i64 %144, i64 %146)
%148 = call i32 @__CrestLoad(i32 43, i64 0, i64 1)
%149 = load i32, i32* %3
%150 = add nsw i32 %149, 1
%151 = sext i32 %150 to i64
%152 = call i32 @__CrestApply2(i32 42, i32 0, i64 %151)
%153 = ptrtoint i32* %3 to i64
%154 = call i32 @__CrestStore(i32 45, i64 %153)
%155 = load i32, i32* %3
%156 = add nsw i32 %155, 1
store i32 %156, i32* %3
br label %159
157: ; preds = %103
%158 = call i32 @__CrestBranch(i32 39, i32 15, i32 0)
br label %159
159: ; preds = %157, %126
%160 = ptrtoint i32* %3 to i64
%161 = load i32, i32* %3
%162 = sext i32 %161 to i64
%163 = call i32 @__CrestLoad(i32 48, i64 %160, i64 %162)
%164 = ptrtoint i32* %2 to i64
%165 = load i32, i32* %2
%166 = sext i32 %165 to i64
%167 = call i32 @__CrestLoad(i32 47, i64 %164, i64 %166)
%168 = load i32, i32* %3
%169 = load i32, i32* %2
%170 = icmp slt i32 %168, %169
%171 = zext i1 %170 to i32
%172 = sext i32 %171 to i64
%173 = call i32 @__CrestApply2(i32 46, i32 16, i64 %172)
%174 = load i32, i32* %3
%175 = load i32, i32* %2
%176 = icmp slt i32 %174, %175
br i1 %176, label %177, label %208
177: ; preds = %159
%178 = call i32 @__CrestBranch(i32 49, i32 17, i32 1)
%179 = load i32, i32* %3
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [50 x i32], [50 x i32]* %4, i64 0, i64 %180
%182 = ptrtoint i32* %181 to i64
%183 = load i32, i32* %3
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [50 x i32], [50 x i32]* %4, i64 0, i64 %184
%186 = load i32, i32* %185
%187 = sext i32 %186 to i64
%188 = call i32 @__CrestLoad(i32 51, i64 %182, i64 %187)
%189 = load i32, i32* %3
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds [50 x i32], [50 x i32]* %4, i64 0, i64 %190
%192 = load i32, i32* %191
%193 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %192)
%194 = call i32 @__CrestClearStack(i32 52)
%195 = ptrtoint i32* %3 to i64
%196 = load i32, i32* %3
%197 = sext i32 %196 to i64
%198 = call i32 @__CrestLoad(i32 55, i64 %195, i64 %197)
%199 = call i32 @__CrestLoad(i32 54, i64 0, i64 1)
%200 = load i32, i32* %3
%201 = add nsw i32 %200, 1
%202 = sext i32 %201 to i64
%203 = call i32 @__CrestApply2(i32 53, i32 0, i64 %202)
%204 = ptrtoint i32* %3 to i64
%205 = call i32 @__CrestStore(i32 56, i64 %204)
%206 = load i32, i32* %3
%207 = add nsw i32 %206, 1
store i32 %207, i32* %3
br label %210
208: ; preds = %159
%209 = call i32 @__CrestBranch(i32 50, i32 18, i32 0)
br label %210
210: ; preds = %208, %177
%211 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%212 = call i32 @__CrestClearStack(i32 57)
%213 = call i32 @__CrestLoad(i32 58, i64 0, i64 0)
%214 = ptrtoint i32* %5 to i64
%215 = call i32 @__CrestStore(i32 59, i64 %214)
store i32 0, i32* %5
%216 = ptrtoint i32* %5 to i64
%217 = load i32, i32* %5
%218 = sext i32 %217 to i64
%219 = call i32 @__CrestLoad(i32 60, i64 %216, i64 %218)
%220 = call i32 @__CrestReturn(i32 61)
%221 = load i32, i32* %5
ret i32 %221
}

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