#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 */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, ...);
void gcd(signed short llvm_cbe_a, signed short llvm_cbe_b,
         signed short *llvm_cbe_pResult) {
  static unsigned long long aesl_llvm_cbe_1_count = 0;
  static unsigned long long aesl_llvm_cbe_2_count = 0;
  static unsigned long long aesl_llvm_cbe_3_count = 0;
  static unsigned long long aesl_llvm_cbe_4_count = 0;
  static unsigned long long aesl_llvm_cbe_5_count = 0;
  static unsigned long long aesl_llvm_cbe_6_count = 0;
  static unsigned long long aesl_llvm_cbe_7_count = 0;
  static unsigned long long aesl_llvm_cbe_8_count = 0;
  static unsigned long long aesl_llvm_cbe_9_count = 0;
  static unsigned long long aesl_llvm_cbe_10_count = 0;
  static unsigned long long aesl_llvm_cbe_11_count = 0;
  static unsigned long long aesl_llvm_cbe_12_count = 0;
  static unsigned long long aesl_llvm_cbe_13_count = 0;
  static unsigned long long aesl_llvm_cbe_14_count = 0;
  static unsigned long long aesl_llvm_cbe_15_count = 0;
  static unsigned long long aesl_llvm_cbe_16_count = 0;
  static unsigned long long aesl_llvm_cbe_17_count = 0;
  static unsigned long long aesl_llvm_cbe_18_count = 0;
  unsigned short llvm_cbe_tmp__1;
  unsigned short llvm_cbe_tmp__1__PHI_TEMPORARY;
  static unsigned long long aesl_llvm_cbe_19_count = 0;
  unsigned short llvm_cbe_tmp__2;
  unsigned short llvm_cbe_tmp__2__PHI_TEMPORARY;
  static unsigned long long aesl_llvm_cbe_20_count = 0;
  static unsigned long long aesl_llvm_cbe_21_count = 0;
  unsigned short llvm_cbe_tmp__3;
  static unsigned long long aesl_llvm_cbe_22_count = 0;
  static unsigned long long aesl_llvm_cbe_23_count = 0;
  static unsigned long long aesl_llvm_cbe_24_count = 0;
  static unsigned long long aesl_llvm_cbe_25_count = 0;
  static unsigned long long aesl_llvm_cbe_26_count = 0;
  static unsigned long long aesl_llvm_cbe_27_count = 0;
  unsigned short llvm_cbe_tmp__4;
  static unsigned long long aesl_llvm_cbe_28_count = 0;
  static unsigned long long aesl_llvm_cbe_29_count = 0;
  static unsigned long long aesl_llvm_cbe_30_count = 0;
  static unsigned long long aesl_llvm_cbe_31_count = 0;
  static unsigned long long aesl_llvm_cbe_32_count = 0;
  static unsigned long long aesl_llvm_cbe_33_count = 0;
  static unsigned long long aesl_llvm_cbe_34_count = 0;
  static unsigned long long aesl_llvm_cbe__2e_be_count = 0;
  unsigned short llvm_cbe__2e_be;
  static unsigned long long aesl_llvm_cbe_35_count = 0;
  static unsigned long long aesl_llvm_cbe__2e_be1_count = 0;
  unsigned short llvm_cbe__2e_be1;
  static unsigned long long aesl_llvm_cbe_36_count = 0;
  static unsigned long long aesl_llvm_cbe_37_count = 0;
  static unsigned long long aesl_llvm_cbe_38_count = 0;
  static unsigned long long aesl_llvm_cbe__2e_lcssa_count = 0;
  unsigned short llvm_cbe__2e_lcssa;
  unsigned short llvm_cbe__2e_lcssa__PHI_TEMPORARY;
  static unsigned long long aesl_llvm_cbe_39_count = 0;
  static unsigned long long aesl_llvm_cbe_40_count = 0;
  static unsigned long long aesl_llvm_cbe_41_count = 0;
  static unsigned long long aesl_llvm_cbe_42_count = 0;
  const char *AESL_DEBUG_TRACE = getenv("DEBUG_TRACE");
  if (AESL_DEBUG_TRACE)
    printf("\n\{ BEGIN @gcd\n");
  if (((llvm_cbe_a & 65535U) == (llvm_cbe_b & 65535U))) {
    llvm_cbe__2e_lcssa__PHI_TEMPORARY = (unsigned short)llvm_cbe_a;
    goto llvm_cbe__2e__crit_edge;
  } else {
    llvm_cbe_tmp__1__PHI_TEMPORARY = (unsigned short)llvm_cbe_a;
    llvm_cbe_tmp__2__PHI_TEMPORARY = (unsigned short)llvm_cbe_b;
    goto llvm_cbe__2e_lr_2e_ph;
  }
  do {
  llvm_cbe__2e_lr_2e_ph:
    if (AESL_DEBUG_TRACE)
      printf("\n  %%2 = phi i16 [ %%.be1, %%.lr.ph ], [ %%a, %%0  for "
             "0x%I64xth hint within @gcd  --> \n",
             ++aesl_llvm_cbe_18_count);
    llvm_cbe_tmp__1 = (unsigned short)llvm_cbe_tmp__1__PHI_TEMPORARY;
    if (AESL_DEBUG_TRACE) {
      printf("\n = 0x%X", llvm_cbe_tmp__1);
      printf("\n.be1 = 0x%X", llvm_cbe__2e_be1);
      printf("\na = 0x%X", llvm_cbe_a);
    }
    if (AESL_DEBUG_TRACE)
      printf("\n  %%3 = phi i16 [ %%.be, %%.lr.ph ], [ %%b, %%0  for 0x%I64xth "
             "hint within @gcd  --> \n",
             ++aesl_llvm_cbe_19_count);
    llvm_cbe_tmp__2 = (unsigned short)llvm_cbe_tmp__2__PHI_TEMPORARY;
    if (AESL_DEBUG_TRACE) {
      printf("\n = 0x%X", llvm_cbe_tmp__2);
      printf("\n.be = 0x%X", llvm_cbe__2e_be);
      printf("\nb = 0x%X", llvm_cbe_b);
    }
    if (AESL_DEBUG_TRACE)
      printf("\n  %%5 = sub i16 %%3, %%2, !dbg !3 for 0x%I64xth hint within "
             "@gcd  --> \n",
             ++aesl_llvm_cbe_21_count);
    llvm_cbe_tmp__3 = (unsigned short)((
        unsigned short)(((unsigned short)(llvm_cbe_tmp__2 & 65535ull)) -
                        ((unsigned short)(llvm_cbe_tmp__1 & 65535ull))));
    if (AESL_DEBUG_TRACE)
      printf("\n = 0x%X\n", ((unsigned short)(llvm_cbe_tmp__3 & 65535ull)));
    if (AESL_DEBUG_TRACE)
      printf("\n  %%6 = sub i16 %%2, %%3, !dbg !3 for 0x%I64xth hint within "
             "@gcd  --> \n",
             ++aesl_llvm_cbe_27_count);
    llvm_cbe_tmp__4 = (unsigned short)((
        unsigned short)(((unsigned short)(llvm_cbe_tmp__1 & 65535ull)) -
                        ((unsigned short)(llvm_cbe_tmp__2 & 65535ull))));
    if (AESL_DEBUG_TRACE)
      printf("\n = 0x%X\n", ((unsigned short)(llvm_cbe_tmp__4 & 65535ull)));
    if (AESL_DEBUG_TRACE)
      printf("\n  %%.be = select i1 %%4, i16 %%3, i16 %%5, !dbg !3 for "
             "0x%I64xth hint within @gcd  --> \n",
             ++aesl_llvm_cbe__2e_be_count);
    llvm_cbe__2e_be = (unsigned short)(((((signed short)llvm_cbe_tmp__1) >
                                         ((signed short)llvm_cbe_tmp__2)))
                                           ? ((unsigned short)llvm_cbe_tmp__2)
                                           : ((unsigned short)llvm_cbe_tmp__3));
    if (AESL_DEBUG_TRACE)
      printf("\n.be = 0x%X\n", llvm_cbe__2e_be);
    if (AESL_DEBUG_TRACE)
      printf("\n  %%.be1 = select i1 %%4, i16 %%6, i16 %%2, !dbg !3 for "
             "0x%I64xth hint within @gcd  --> \n",
             ++aesl_llvm_cbe__2e_be1_count);
    llvm_cbe__2e_be1 =
        (unsigned short)(((((signed short)llvm_cbe_tmp__1) >
                           ((signed short)llvm_cbe_tmp__2)))
                             ? ((unsigned short)llvm_cbe_tmp__4)
                             : ((unsigned short)llvm_cbe_tmp__1));
    if (AESL_DEBUG_TRACE)
      printf("\n.be1 = 0x%X\n", llvm_cbe__2e_be1);
    if (((llvm_cbe__2e_be1 & 65535U) == (llvm_cbe__2e_be & 65535U))) {
      llvm_cbe__2e_lcssa__PHI_TEMPORARY = (unsigned short)llvm_cbe__2e_be;
      goto llvm_cbe__2e__crit_edge;
    } else {
      llvm_cbe_tmp__1__PHI_TEMPORARY = (unsigned short)llvm_cbe__2e_be1;
      llvm_cbe_tmp__2__PHI_TEMPORARY = (unsigned short)llvm_cbe__2e_be;
      goto llvm_cbe__2e_lr_2e_ph;
    }
  } while (1);
llvm_cbe__2e__crit_edge:
  if (AESL_DEBUG_TRACE)
    printf("\n  %%.lcssa = phi i16 [ %%a, %%0 ], [ %%.be, %%.lr.ph  for "
           "0x%I64xth hint within @gcd  --> \n",
           ++aesl_llvm_cbe__2e_lcssa_count);
  llvm_cbe__2e_lcssa = (unsigned short)llvm_cbe__2e_lcssa__PHI_TEMPORARY;
  if (AESL_DEBUG_TRACE) {
    printf("\n.lcssa = 0x%X", llvm_cbe__2e_lcssa);
    printf("\na = 0x%X", llvm_cbe_a);
    printf("\n.be = 0x%X", llvm_cbe__2e_be);
  }
  if (AESL_DEBUG_TRACE)
    printf("\n  store i16 %%.lcssa, i16* %%pResult, align 2, !dbg !4 for "
           "0x%I64xth hint within @gcd  --> \n",
           ++aesl_llvm_cbe_41_count);
  *llvm_cbe_pResult = llvm_cbe__2e_lcssa;
  if (AESL_DEBUG_TRACE)
    printf("\n.lcssa = 0x%X\n", llvm_cbe__2e_lcssa);
  if (AESL_DEBUG_TRACE)
    printf("\nEND @gcd}\n");
  return;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
lea    0xebf(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1163 <gcd+0x43>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movswl -0x2(%rbp),%eax
and    $0xffff,%eax
movswl -0x4(%rbp),%ecx
and    $0xffff,%ecx
cmp    %ecx,%eax
jne    118b <gcd+0x6b>
mov    -0x2(%rbp),%ax
mov    %ax,-0x24(%rbp)
jmp    1488 <gcd+0x368>
mov    -0x2(%rbp),%ax
mov    %ax,-0x14(%rbp)
mov    -0x4(%rbp),%ax
mov    %ax,-0x18(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     11c6 <gcd+0xa6>
mov    0x2f13(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2f08(%rip)
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%ax
mov    %ax,-0x12(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     120f <gcd+0xef>
movzwl -0x12(%rbp),%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzwl -0x20(%rbp),%esi
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movswl -0x2(%rbp),%esi
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x30(%rbp)
je     123a <gcd+0x11a>
mov    0x2ea7(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2e9c(%rip)
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%ax
mov    %ax,-0x16(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1283 <gcd+0x163>
movzwl -0x16(%rbp),%esi
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzwl -0x1e(%rbp),%esi
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movswl -0x4(%rbp),%esi
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x30(%rbp)
je     12ae <gcd+0x18e>
mov    0x2e43(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2e38(%rip)
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzwl -0x16(%rbp),%eax
and    $0xffff,%rax
movzwl %ax,%eax
movzwl -0x12(%rbp),%ecx
and    $0xffff,%rcx
movzwl %cx,%ecx
sub    %ecx,%eax
mov    %ax,-0x1a(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     12f5 <gcd+0x1d5>
movzwl -0x1a(%rbp),%eax
and    $0xffff,%rax
movzwl %ax,%esi
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x30(%rbp)
je     1320 <gcd+0x200>
mov    0x2e01(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2df6(%rip)
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzwl -0x12(%rbp),%eax
and    $0xffff,%rax
movzwl %ax,%eax
movzwl -0x16(%rbp),%ecx
and    $0xffff,%rcx
movzwl %cx,%ecx
sub    %ecx,%eax
mov    %ax,-0x1c(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1367 <gcd+0x247>
movzwl -0x1c(%rbp),%eax
and    $0xffff,%rax
movzwl %ax,%esi
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x30(%rbp)
je     1392 <gcd+0x272>
mov    0x2dcf(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2dc4(%rip)
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movswl -0x12(%rbp),%eax
movswl -0x16(%rbp),%ecx
cmp    %ecx,%eax
jle    13ae <gcd+0x28e>
movzwl -0x16(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    13b5 <gcd+0x295>
movzwl -0x1a(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %ax,-0x1e(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     13d9 <gcd+0x2b9>
movzwl -0x1e(%rbp),%esi
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x30(%rbp)
je     1404 <gcd+0x2e4>
mov    0x2d6d(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2d62(%rip)
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movswl -0x12(%rbp),%eax
movswl -0x16(%rbp),%ecx
cmp    %ecx,%eax
jle    1420 <gcd+0x300>
movzwl -0x1c(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    1427 <gcd+0x307>
movzwl -0x12(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %ax,-0x20(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     144b <gcd+0x32b>
movzwl -0x20(%rbp),%esi
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzwl -0x20(%rbp),%eax
and    $0xffff,%eax
movzwl -0x1e(%rbp),%ecx
and    $0xffff,%ecx
cmp    %ecx,%eax
jne    1473 <gcd+0x353>
mov    -0x1e(%rbp),%ax
mov    %ax,-0x24(%rbp)
jmp    1488 <gcd+0x368>
mov    -0x20(%rbp),%ax
mov    %ax,-0x14(%rbp)
mov    -0x1e(%rbp),%ax
mov    %ax,-0x18(%rbp)
jmp    119b <gcd+0x7b>
cmpq   $0x0,-0x30(%rbp)
je     14b3 <gcd+0x393>
mov    0x2cde(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2cd3(%rip)
lea    0xdc2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%ax
mov    %ax,-0x22(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     14fc <gcd+0x3dc>
movzwl -0x22(%rbp),%esi
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movswl -0x2(%rbp),%esi
lea    0xba7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzwl -0x1e(%rbp),%esi
lea    0xbf7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x30(%rbp)
je     1527 <gcd+0x407>
mov    0x2c82(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2c77(%rip)
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x22(%rbp),%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
cmpq   $0x0,-0x30(%rbp)
je     154f <gcd+0x42f>
movzwl -0x22(%rbp),%esi
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpq   $0x0,-0x30(%rbp)
je     1568 <gcd+0x448>
lea    0xde7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,0x18(%rsp)
mov    %esi,%r12d
mov    %edi,%ebx
lea    0xeb1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,0x20(%rsp)
test   %rax,%rax
je     116a <gcd+0x3a>
lea    0x11df(%rip),%rdi
call   1040 <puts@plt>
movswl %bx,%eax
xor    %ebp,%ebp
mov    %eax,0x8(%rsp)
cmp    %r12w,%ax
je     1376 <gcd+0x246>
movswl %r12w,%eax
mov    %eax,0xc(%rsp)
jmp    1345 <gcd+0x215>
nopw   0x0(%rax,%rax,1)
mov    %ebx,%r13d
sub    %r12w,%r13w
mov    %ebx,%eax
cmovg  %r13d,%eax
mov    %eax,0x14(%rsp)
neg    %r13d
movzwl %bx,%r15d
mov    %ebx,%r14d
sub    %r12w,%r14w
mov    %r12d,%eax
cmovle %r13d,%eax
mov    %eax,0x10(%rsp)
mov    0x2e7f(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2e74(%rip)
movzwl %bx,%ebp
lea    0xe36(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe81(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe79(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe76(%rip),%rdi
mov    0x8(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e31(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2e26(%rip)
movzwl %r12w,%ebp
movzwl %r12w,%ebx
lea    0xe54(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe26(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe8e(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe8a(%rip),%rdi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2ddf(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2dd4(%rip)
movzwl %r13w,%ebx
lea    0xe6c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea7(%rip),%rbp
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2db0(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2da5(%rip)
movzwl %r14w,%ebx
lea    0xe88(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d88(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2d7d(%rip)
mov    0x10(%rsp),%r12d
movzwl %r12w,%ebx
lea    0xe9c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xee8(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2d57(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2d4c(%rip)
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rsp),%ebx
movzwl %bx,%esi
lea    0xf19(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    %r12w,%bx
je     1373 <gcd+0x243>
cmpq   $0x0,0x20(%rsp)
jne    1190 <gcd+0x60>
cmp    %r12w,%bx
mov    %ebx,%eax
mov    $0x0,%ecx
cmovg  %ecx,%eax
mov    $0x0,%ecx
cmovg  %r12d,%ecx
sub    %eax,%r12d
sub    %ecx,%ebx
cmp    %r12w,%bx
jne    1345 <gcd+0x215>
movzwl %bx,%ebp
mov    0x18(%rsp),%r14
cmpq   $0x0,0x20(%rsp)
je     142a <gcd+0x2fa>
mov    0x2ce2(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2cd7(%rip)
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movzwl %bx,%ebx
lea    0xf0b(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcba(%rip),%rdi
mov    0x8(%rsp),%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd0a(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2c95(%rip),%rsi
add    $0x1,%rsi
mov    %rsi,0x2c8a(%rip)
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %bx,(%r14)
lea    0xf22(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf22(%rip),%rdi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>
mov    %bx,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@gcd.aesl_llvm_cbe_1_count = internal global i64 0
@gcd.aesl_llvm_cbe_2_count = internal global i64 0
@gcd.aesl_llvm_cbe_3_count = internal global i64 0
@gcd.aesl_llvm_cbe_4_count = internal global i64 0
@gcd.aesl_llvm_cbe_5_count = internal global i64 0
@gcd.aesl_llvm_cbe_6_count = internal global i64 0
@gcd.aesl_llvm_cbe_7_count = internal global i64 0
@gcd.aesl_llvm_cbe_8_count = internal global i64 0
@gcd.aesl_llvm_cbe_9_count = internal global i64 0
@gcd.aesl_llvm_cbe_10_count = internal global i64 0
@gcd.aesl_llvm_cbe_11_count = internal global i64 0
@gcd.aesl_llvm_cbe_12_count = internal global i64 0
@gcd.aesl_llvm_cbe_13_count = internal global i64 0
@gcd.aesl_llvm_cbe_14_count = internal global i64 0
@gcd.aesl_llvm_cbe_15_count = internal global i64 0
@gcd.aesl_llvm_cbe_16_count = internal global i64 0
@gcd.aesl_llvm_cbe_17_count = internal global i64 0
@gcd.aesl_llvm_cbe_18_count = internal global i64 0
@gcd.aesl_llvm_cbe_19_count = internal global i64 0
@gcd.aesl_llvm_cbe_20_count = internal global i64 0
@gcd.aesl_llvm_cbe_21_count = internal global i64 0
@gcd.aesl_llvm_cbe_22_count = internal global i64 0
@gcd.aesl_llvm_cbe_23_count = internal global i64 0
@gcd.aesl_llvm_cbe_24_count = internal global i64 0
@gcd.aesl_llvm_cbe_25_count = internal global i64 0
@gcd.aesl_llvm_cbe_26_count = internal global i64 0
@gcd.aesl_llvm_cbe_27_count = internal global i64 0
@gcd.aesl_llvm_cbe_28_count = internal global i64 0
@gcd.aesl_llvm_cbe_29_count = internal global i64 0
@gcd.aesl_llvm_cbe_30_count = internal global i64 0
@gcd.aesl_llvm_cbe_31_count = internal global i64 0
@gcd.aesl_llvm_cbe_32_count = internal global i64 0
@gcd.aesl_llvm_cbe_33_count = internal global i64 0
@gcd.aesl_llvm_cbe_34_count = internal global i64 0
@gcd.aesl_llvm_cbe__2e_be_count = internal global i64 0
@gcd.aesl_llvm_cbe_35_count = internal global i64 0
@gcd.aesl_llvm_cbe__2e_be1_count = internal global i64 0
@gcd.aesl_llvm_cbe_36_count = internal global i64 0
@gcd.aesl_llvm_cbe_37_count = internal global i64 0
@gcd.aesl_llvm_cbe_38_count = internal global i64 0
@gcd.aesl_llvm_cbe__2e_lcssa_count = internal global i64 0
@gcd.aesl_llvm_cbe_39_count = internal global i64 0
@gcd.aesl_llvm_cbe_40_count = internal global i64 0
@gcd.aesl_llvm_cbe_41_count = internal global i64 0
@gcd.aesl_llvm_cbe_42_count = internal global i64 0
@.str = [12 x i8] c"DEBUG_TRACE\00"
@.str.1 = [15 x i8] c"\0A{ BEGIN @gcd\0A\00"
@.str.2 = [89 x i8] c"\0A %%2 = phi i16 [ %%.be1, %%.lr.ph ], [ %%a, %%0 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.3 = [9 x i8] c"\0A = 0x%X\00"
@.str.4 = [13 x i8] c"\0A.be1 = 0x%X\00"
@.str.5 = [10 x i8] c"\0Aa = 0x%X\00"
@.str.6 = [88 x i8] c"\0A %%3 = phi i16 [ %%.be, %%.lr.ph ], [ %%b, %%0 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.7 = [12 x i8] c"\0A.be = 0x%X\00"
@.str.8 = [10 x i8] c"\0Ab = 0x%X\00"
@.str.9 = [73 x i8] c"\0A %%5 = sub i16 %%3, %%2 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.10 = [10 x i8] c"\0A = 0x%X\0A\00"
@.str.11 = [73 x i8] c"\0A %%6 = sub i16 %%2, %%3 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.12 = [90 x i8] c"\0A %%.be = select i1 %%4, i16 %%3, i16 %%5 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.13 = [13 x i8] c"\0A.be = 0x%X\0A\00"
@.str.14 = [91 x i8] c"\0A %%.be1 = select i1 %%4, i16 %%6, i16 %%2 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.15 = [14 x i8] c"\0A.be1 = 0x%X\0A\00"
@.str.16 = [93 x i8] c"\0A %%.lcssa = phi i16 [ %%a, %%0 ], [ %%.be, %%.lr.ph for 0x%I64xth hint within @gcd --> \0A\00"
@.str.17 = [15 x i8] c"\0A.lcssa = 0x%X\00"
@.str.18 = [94 x i8] c"\0A store i16 %%.lcssa, i16* %%pResult for 0x%I64xth hint within @gcd --> \0A\00"
@.str.19 = [16 x i8] c"\0A.lcssa = 0x%X\0A\00"
@.str.20 = [12 x i8] c"\0AEND @gcd}\0A\00"
define void @gcd(i16 signext %0, i16 signext %1, i16* %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16*
%7 = alloca i16
%8 = alloca i16
%9 = alloca i16
%10 = alloca i16
%11 = alloca i16
%12 = alloca i16
%13 = alloca i16
%14 = alloca i16
%15 = alloca i16
%16 = alloca i16
%17 = alloca i8*
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16* %2, i16** %6
%18 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %18, i8** %17
%19 = load i8*, i8** %17
%20 = icmp ne i8* %19, null
br i1 %20, label %21, label %23
21: ; preds = %3
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %21, %3
%24 = load i16, i16* %4
%25 = sext i16 %24 to i32
%26 = and i32 %25, 65535
%27 = load i16, i16* %5
%28 = sext i16 %27 to i32
%29 = and i32 %28, 65535
%30 = icmp eq i32 %26, %29
br i1 %30, label %31, label %33
31: ; preds = %23
%32 = load i16, i16* %4
store i16 %32, i16* %16
br label %209
33: ; preds = %23
%34 = load i16, i16* %4
store i16 %34, i16* %8
%35 = load i16, i16* %5
store i16 %35, i16* %10
br label %38
36: ; No predecessors!
br label %37
37: ; preds = %207, %36
br label %38
38: ; preds = %204, %37, %33
%39 = load i8*, i8** %17
%40 = icmp ne i8* %39, null
br i1 %40, label %41, label %45
41: ; preds = %38
%42 = load i64, i64* @gcd.aesl_llvm_cbe_18_count
%43 = add i64 %42, 1
store i64 %43, i64* @gcd.aesl_llvm_cbe_18_count
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.2, i64 0, i64 0), i64 %43)
br label %45
45: ; preds = %41, %38
%46 = load i16, i16* %8
store i16 %46, i16* %7
%47 = load i8*, i8** %17
%48 = icmp ne i8* %47, null
br i1 %48, label %49, label %59
49: ; preds = %45
%50 = load i16, i16* %7
%51 = zext i16 %50 to i32
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %51)
%53 = load i16, i16* %14
%54 = zext i16 %53 to i32
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %54)
%56 = load i16, i16* %4
%57 = sext i16 %56 to i32
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %57)
br label %59
59: ; preds = %49, %45
%60 = load i8*, i8** %17
%61 = icmp ne i8* %60, null
br i1 %61, label %62, label %66
62: ; preds = %59
%63 = load i64, i64* @gcd.aesl_llvm_cbe_19_count
%64 = add i64 %63, 1
store i64 %64, i64* @gcd.aesl_llvm_cbe_19_count
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.6, i64 0, i64 0), i64 %64)
br label %66
66: ; preds = %62, %59
%67 = load i16, i16* %10
store i16 %67, i16* %9
%68 = load i8*, i8** %17
%69 = icmp ne i8* %68, null
br i1 %69, label %70, label %80
70: ; preds = %66
%71 = load i16, i16* %9
%72 = zext i16 %71 to i32
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %72)
%74 = load i16, i16* %13
%75 = zext i16 %74 to i32
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %75)
%77 = load i16, i16* %5
%78 = sext i16 %77 to i32
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %78)
br label %80
80: ; preds = %70, %66
%81 = load i8*, i8** %17
%82 = icmp ne i8* %81, null
br i1 %82, label %83, label %87
83: ; preds = %80
%84 = load i64, i64* @gcd.aesl_llvm_cbe_21_count
%85 = add i64 %84, 1
store i64 %85, i64* @gcd.aesl_llvm_cbe_21_count
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.9, i64 0, i64 0), i64 %85)
br label %87
87: ; preds = %83, %80
%88 = load i16, i16* %9
%89 = zext i16 %88 to i64
%90 = and i64 %89, 65535
%91 = trunc i64 %90 to i16
%92 = zext i16 %91 to i32
%93 = load i16, i16* %7
%94 = zext i16 %93 to i64
%95 = and i64 %94, 65535
%96 = trunc i64 %95 to i16
%97 = zext i16 %96 to i32
%98 = sub nsw i32 %92, %97
%99 = trunc i32 %98 to i16
store i16 %99, i16* %11
%100 = load i8*, i8** %17
%101 = icmp ne i8* %100, null
br i1 %101, label %102, label %109
102: ; preds = %87
%103 = load i16, i16* %11
%104 = zext i16 %103 to i64
%105 = and i64 %104, 65535
%106 = trunc i64 %105 to i16
%107 = zext i16 %106 to i32
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 %107)
br label %109
109: ; preds = %102, %87
%110 = load i8*, i8** %17
%111 = icmp ne i8* %110, null
br i1 %111, label %112, label %116
112: ; preds = %109
%113 = load i64, i64* @gcd.aesl_llvm_cbe_27_count
%114 = add i64 %113, 1
store i64 %114, i64* @gcd.aesl_llvm_cbe_27_count
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.11, i64 0, i64 0), i64 %114)
br label %116
116: ; preds = %112, %109
%117 = load i16, i16* %7
%118 = zext i16 %117 to i64
%119 = and i64 %118, 65535
%120 = trunc i64 %119 to i16
%121 = zext i16 %120 to i32
%122 = load i16, i16* %9
%123 = zext i16 %122 to i64
%124 = and i64 %123, 65535
%125 = trunc i64 %124 to i16
%126 = zext i16 %125 to i32
%127 = sub nsw i32 %121, %126
%128 = trunc i32 %127 to i16
store i16 %128, i16* %12
%129 = load i8*, i8** %17
%130 = icmp ne i8* %129, null
br i1 %130, label %131, label %138
131: ; preds = %116
%132 = load i16, i16* %12
%133 = zext i16 %132 to i64
%134 = and i64 %133, 65535
%135 = trunc i64 %134 to i16
%136 = zext i16 %135 to i32
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 %136)
br label %138
138: ; preds = %131, %116
%139 = load i8*, i8** %17
%140 = icmp ne i8* %139, null
br i1 %140, label %141, label %145
141: ; preds = %138
%142 = load i64, i64* @gcd.aesl_llvm_cbe__2e_be_count
%143 = add i64 %142, 1
store i64 %143, i64* @gcd.aesl_llvm_cbe__2e_be_count
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.12, i64 0, i64 0), i64 %143)
br label %145
145: ; preds = %141, %138
%146 = load i16, i16* %7
%147 = sext i16 %146 to i32
%148 = load i16, i16* %9
%149 = sext i16 %148 to i32
%150 = icmp sgt i32 %147, %149
br i1 %150, label %151, label %154
151: ; preds = %145
%152 = load i16, i16* %9
%153 = zext i16 %152 to i32
br label %157
154: ; preds = %145
%155 = load i16, i16* %11
%156 = zext i16 %155 to i32
br label %157
157: ; preds = %154, %151
%158 = phi i32 [ %153, %151 ], [ %156, %154 ]
%159 = trunc i32 %158 to i16
store i16 %159, i16* %13
%160 = load i8*, i8** %17
%161 = icmp ne i8* %160, null
br i1 %161, label %162, label %166
162: ; preds = %157
%163 = load i16, i16* %13
%164 = zext i16 %163 to i32
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i32 %164)
br label %166
166: ; preds = %162, %157
%167 = load i8*, i8** %17
%168 = icmp ne i8* %167, null
br i1 %168, label %169, label %173
169: ; preds = %166
%170 = load i64, i64* @gcd.aesl_llvm_cbe__2e_be1_count
%171 = add i64 %170, 1
store i64 %171, i64* @gcd.aesl_llvm_cbe__2e_be1_count
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.14, i64 0, i64 0), i64 %171)
br label %173
173: ; preds = %169, %166
%174 = load i16, i16* %7
%175 = sext i16 %174 to i32
%176 = load i16, i16* %9
%177 = sext i16 %176 to i32
%178 = icmp sgt i32 %175, %177
br i1 %178, label %179, label %182
179: ; preds = %173
%180 = load i16, i16* %12
%181 = zext i16 %180 to i32
br label %185
182: ; preds = %173
%183 = load i16, i16* %7
%184 = zext i16 %183 to i32
br label %185
185: ; preds = %182, %179
%186 = phi i32 [ %181, %179 ], [ %184, %182 ]
%187 = trunc i32 %186 to i16
store i16 %187, i16* %14
%188 = load i8*, i8** %17
%189 = icmp ne i8* %188, null
br i1 %189, label %190, label %194
190: ; preds = %185
%191 = load i16, i16* %14
%192 = zext i16 %191 to i32
%193 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i32 %192)
br label %194
194: ; preds = %190, %185
%195 = load i16, i16* %14
%196 = zext i16 %195 to i32
%197 = and i32 %196, 65535
%198 = load i16, i16* %13
%199 = zext i16 %198 to i32
%200 = and i32 %199, 65535
%201 = icmp eq i32 %197, %200
br i1 %201, label %202, label %204
202: ; preds = %194
%203 = load i16, i16* %13
store i16 %203, i16* %16
br label %209
204: ; preds = %194
%205 = load i16, i16* %14
store i16 %205, i16* %8
%206 = load i16, i16* %13
store i16 %206, i16* %10
br label %38
207: ; No predecessors!
br i1 true, label %37, label %208
208: ; preds = %207
br label %209
209: ; preds = %208, %202, %31
%210 = load i8*, i8** %17
%211 = icmp ne i8* %210, null
br i1 %211, label %212, label %216
212: ; preds = %209
%213 = load i64, i64* @gcd.aesl_llvm_cbe__2e_lcssa_count
%214 = add i64 %213, 1
store i64 %214, i64* @gcd.aesl_llvm_cbe__2e_lcssa_count
%215 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.16, i64 0, i64 0), i64 %214)
br label %216
216: ; preds = %212, %209
%217 = load i16, i16* %16
store i16 %217, i16* %15
%218 = load i8*, i8** %17
%219 = icmp ne i8* %218, null
br i1 %219, label %220, label %230
220: ; preds = %216
%221 = load i16, i16* %15
%222 = zext i16 %221 to i32
%223 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0), i32 %222)
%224 = load i16, i16* %4
%225 = sext i16 %224 to i32
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %225)
%227 = load i16, i16* %13
%228 = zext i16 %227 to i32
%229 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %228)
br label %230
230: ; preds = %220, %216
%231 = load i8*, i8** %17
%232 = icmp ne i8* %231, null
br i1 %232, label %233, label %237
233: ; preds = %230
%234 = load i64, i64* @gcd.aesl_llvm_cbe_41_count
%235 = add i64 %234, 1
store i64 %235, i64* @gcd.aesl_llvm_cbe_41_count
%236 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.18, i64 0, i64 0), i64 %235)
br label %237
237: ; preds = %233, %230
%238 = load i16, i16* %15
%239 = load i16*, i16** %6
store i16 %238, i16* %239
%240 = load i8*, i8** %17
%241 = icmp ne i8* %240, null
br i1 %241, label %242, label %246
242: ; preds = %237
%243 = load i16, i16* %15
%244 = zext i16 %243 to i32
%245 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.19, i64 0, i64 0), i32 %244)
br label %246
246: ; preds = %242, %237
%247 = load i8*, i8** %17
%248 = icmp ne i8* %247, null
br i1 %248, label %249, label %251
249: ; preds = %246
%250 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0))
br label %251
251: ; preds = %249, %246
ret void
}

LLVM IR (-O2):
@gcd.aesl_llvm_cbe_18_count = internal unnamed_addr global i64 0
@gcd.aesl_llvm_cbe_19_count = internal unnamed_addr global i64 0
@gcd.aesl_llvm_cbe_21_count = internal unnamed_addr global i64 0
@gcd.aesl_llvm_cbe_27_count = internal unnamed_addr global i64 0
@gcd.aesl_llvm_cbe__2e_be_count = internal unnamed_addr global i64 0
@gcd.aesl_llvm_cbe__2e_be1_count = internal unnamed_addr global i64 0
@gcd.aesl_llvm_cbe__2e_lcssa_count = internal unnamed_addr global i64 0
@gcd.aesl_llvm_cbe_41_count = internal unnamed_addr global i64 0
@.str = [12 x i8] c"DEBUG_TRACE\00"
@.str.2 = [89 x i8] c"\0A %%2 = phi i16 [ %%.be1, %%.lr.ph ], [ %%a, %%0 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.3 = [9 x i8] c"\0A = 0x%X\00"
@.str.4 = [13 x i8] c"\0A.be1 = 0x%X\00"
@.str.5 = [10 x i8] c"\0Aa = 0x%X\00"
@.str.6 = [88 x i8] c"\0A %%3 = phi i16 [ %%.be, %%.lr.ph ], [ %%b, %%0 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.7 = [12 x i8] c"\0A.be = 0x%X\00"
@.str.8 = [10 x i8] c"\0Ab = 0x%X\00"
@.str.9 = [73 x i8] c"\0A %%5 = sub i16 %%3, %%2 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.10 = [10 x i8] c"\0A = 0x%X\0A\00"
@.str.11 = [73 x i8] c"\0A %%6 = sub i16 %%2, %%3 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.12 = [90 x i8] c"\0A %%.be = select i1 %%4, i16 %%3, i16 %%5 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.13 = [13 x i8] c"\0A.be = 0x%X\0A\00"
@.str.14 = [91 x i8] c"\0A %%.be1 = select i1 %%4, i16 %%6, i16 %%2 for 0x%I64xth hint within @gcd --> \0A\00"
@.str.15 = [14 x i8] c"\0A.be1 = 0x%X\0A\00"
@.str.16 = [93 x i8] c"\0A %%.lcssa = phi i16 [ %%a, %%0 ], [ %%.be, %%.lr.ph for 0x%I64xth hint within @gcd --> \0A\00"
@.str.17 = [15 x i8] c"\0A.lcssa = 0x%X\00"
@.str.18 = [94 x i8] c"\0A store i16 %%.lcssa, i16* %%pResult for 0x%I64xth hint within @gcd --> \0A\00"
@.str.19 = [16 x i8] c"\0A.lcssa = 0x%X\0A\00"
@str = [11 x i8] c"\0AEND @gcd}\00"
@str.21 = [14 x i8] c"\0A{ BEGIN @gcd\00"
define void @gcd(i16 signext %0, i16 signext %1, i16* nocapture writeonly %2) {
%4 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.21, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
%9 = sext i16 %0 to i32
%10 = sext i16 %1 to i32
%11 = icmp eq i16 %0, %1
br i1 %11, label %71, label %12
12: ; preds = %8, %65
%13 = phi i16 [ %67, %65 ], [ undef, %8 ]
%14 = phi i16 [ %66, %65 ], [ undef, %8 ]
%15 = phi i16 [ %67, %65 ], [ %1, %8 ]
%16 = phi i16 [ %66, %65 ], [ %0, %8 ]
br i1 %5, label %17, label %23
17: ; preds = %12
%18 = icmp sgt i16 %16, %15
%19 = select i1 %18, i16 0, i16 %16
%20 = sub i16 %15, %19
%21 = select i1 %18, i16 %15, i16 0
%22 = sub i16 %16, %21
br label %65
23: ; preds = %12
%24 = load i64, i64* @gcd.aesl_llvm_cbe_18_count
%25 = add i64 %24, 1
store i64 %25, i64* @gcd.aesl_llvm_cbe_18_count
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @.str.2, i64 0, i64 0), i64 %25)
%27 = zext i16 %16 to i32
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %27)
%29 = zext i16 %14 to i32
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i32 %29)
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %9)
%32 = load i64, i64* @gcd.aesl_llvm_cbe_19_count
%33 = add i64 %32, 1
store i64 %33, i64* @gcd.aesl_llvm_cbe_19_count
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([88 x i8], [88 x i8]* @.str.6, i64 0, i64 0), i64 %33)
%35 = zext i16 %15 to i32
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %35)
%37 = zext i16 %13 to i32
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %37)
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i32 %10)
%40 = load i64, i64* @gcd.aesl_llvm_cbe_21_count
%41 = add i64 %40, 1
store i64 %41, i64* @gcd.aesl_llvm_cbe_21_count
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @.str.9, i64 0, i64 0), i64 %41)
%43 = sub i16 %15, %16
%44 = zext i16 %43 to i32
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 %44)
%46 = load i64, i64* @gcd.aesl_llvm_cbe_27_count
%47 = add i64 %46, 1
store i64 %47, i64* @gcd.aesl_llvm_cbe_27_count
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @.str.11, i64 0, i64 0), i64 %47)
%49 = sub i16 %16, %15
%50 = zext i16 %49 to i32
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 %50)
%52 = load i64, i64* @gcd.aesl_llvm_cbe__2e_be_count
%53 = add i64 %52, 1
store i64 %53, i64* @gcd.aesl_llvm_cbe__2e_be_count
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([90 x i8], [90 x i8]* @.str.12, i64 0, i64 0), i64 %53)
%55 = icmp sgt i16 %16, %15
%56 = select i1 %55, i16 %15, i16 %43
%57 = zext i16 %56 to i32
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i32 %57)
%59 = load i64, i64* @gcd.aesl_llvm_cbe__2e_be1_count
%60 = add i64 %59, 1
store i64 %60, i64* @gcd.aesl_llvm_cbe__2e_be1_count
%61 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([91 x i8], [91 x i8]* @.str.14, i64 0, i64 0), i64 %60)
%62 = select i1 %55, i16 %49, i16 %16
%63 = zext i16 %62 to i32
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i32 %63)
br label %65
65: ; preds = %17, %23
%66 = phi i16 [ %22, %17 ], [ %62, %23 ]
%67 = phi i16 [ %20, %17 ], [ %56, %23 ]
%68 = icmp eq i16 %66, %67
br i1 %68, label %69, label %12
69: ; preds = %65
%70 = zext i16 %66 to i32
br label %71
71: ; preds = %8, %69
%72 = phi i32 [ %70, %69 ], [ 0, %8 ]
%73 = phi i16 [ %66, %69 ], [ %0, %8 ]
br i1 %5, label %74, label %75
74: ; preds = %71
store i16 %73, i16* %2
br label %88
75: ; preds = %71
%76 = load i64, i64* @gcd.aesl_llvm_cbe__2e_lcssa_count
%77 = add i64 %76, 1
store i64 %77, i64* @gcd.aesl_llvm_cbe__2e_lcssa_count
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @.str.16, i64 0, i64 0), i64 %77)
%79 = zext i16 %73 to i32
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0), i32 %79)
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %9)
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %72)
%83 = load i64, i64* @gcd.aesl_llvm_cbe_41_count
%84 = add i64 %83, 1
store i64 %84, i64* @gcd.aesl_llvm_cbe_41_count
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([94 x i8], [94 x i8]* @.str.18, i64 0, i64 0), i64 %84)
store i16 %73, i16* %2
%86 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.19, i64 0, i64 0), i32 %79)
%87 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %88
88: ; preds = %74, %75
ret void
}