#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 */
typedef int *mp_srcptr;
typedef int mp_size_t;
typedef int *mp_ptr;
typedef int mp_limb_t;

/* Variables and functions */
int /*<<< orphan*/ __mpn_add_1(int *, int *, int, int);
int __mpn_add_n(int *, int *, int *, int);
int __mpn_addmul_1(int *, int *, int, int);
scalar_t__ __mpn_cmp(int /*<<< orphan*/, int *, int);
int /*<<< orphan*/ __mpn_impn_sqr_n_basecase(int *, int *, int);
int __mpn_sub_n(int *, int *, int *, int);
void __mpn_impn_sqr_n(mp_ptr prodp, mp_srcptr up, mp_size_t size,
                      mp_ptr tspace) {
  if ((size & 1) != 0) {
    mp_size_t esize = size - 1;
    mp_limb_t cy_limb;
    do {
      if ((esize) < 32)
        __mpn_impn_sqr_n_basecase(prodp, up, esize);
      else
        __mpn_impn_sqr_n(prodp, up, esize, tspace);
    } while (0);
    ;
    cy_limb = __mpn_addmul_1(prodp + esize, up, esize, up[esize]);
    prodp[esize + esize] = cy_limb;
    cy_limb = __mpn_addmul_1(prodp + esize, up, size, up[esize]);
    prodp[esize + size] = cy_limb;
  } else {
    mp_size_t hsize = size >> 1;
    mp_limb_t cy;
    do {
      if ((hsize) < 32)
        __mpn_impn_sqr_n_basecase(prodp + size, up + hsize, hsize);
      else
        __mpn_impn_sqr_n(prodp + size, up + hsize, hsize, tspace);
    } while (0);
    ;
    if (__mpn_cmp(up + hsize, up, hsize) >= 0) {
      __mpn_sub_n(prodp, up + hsize, up, hsize);
    } else {
      __mpn_sub_n(prodp, up, up + hsize, hsize);
    }
    do {
      if ((hsize) < 32)
        __mpn_impn_sqr_n_basecase(tspace, prodp, hsize);
      else
        __mpn_impn_sqr_n(tspace, prodp, hsize, tspace + size);
    } while (0);
    ;
    do {
      mp_size_t __i;
      for (__i = 0; __i < (hsize); __i++)
        (prodp + hsize)[__i] = (prodp + size)[__i];
    } while (0);
    cy = __mpn_add_n(prodp + size, prodp + size, prodp + size + hsize, hsize);
    cy -= __mpn_sub_n(prodp + hsize, prodp + hsize, tspace, size);
    do {
      if ((hsize) < 32)
        __mpn_impn_sqr_n_basecase(tspace, up, hsize);
      else
        __mpn_impn_sqr_n(tspace, up, hsize, tspace + size);
    } while (0);
    ;
    cy += __mpn_add_n(prodp + hsize, prodp + hsize, tspace, size);
    if (cy)
      __mpn_add_1(prodp + hsize + size, prodp + hsize + size, hsize, cy);
    do {
      mp_size_t __i;
      for (__i = 0; __i < (hsize); __i++)
        (prodp)[__i] = (tspace)[__i];
    } while (0);
    cy = __mpn_add_n(prodp + hsize, prodp + hsize, tspace + hsize, hsize);
    if (cy)
      __mpn_add_1(prodp + size, prodp + size, size, 1);
  }
}


x86 assembly (clang, -O0):
<__mpn_impn_sqr_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x14(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1254 <__mpn_impn_sqr_n+0xe4>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x20,-0x24(%rbp)
jge    11be <__mpn_impn_sqr_n+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1050 <__mpn_impn_sqr_n_basecase@plt>
jmp    11d2 <__mpn_impn_sqr_n+0x62>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1070 <__mpn_impn_sqr_n@plt>
jmp    11d7 <__mpn_impn_sqr_n+0x67>
mov    -0x8(%rbp),%rdi
movslq -0x24(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
call   1090 <__mpn_addmul_1@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%rdi
movslq -0x24(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
call   1090 <__mpn_addmul_1@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
jmp    15b0 <__mpn_impn_sqr_n+0x440>
mov    -0x14(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x20,-0x2c(%rbp)
jge    1292 <__mpn_impn_sqr_n+0x122>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x2c(%rbp),%edx
call   1050 <__mpn_impn_sqr_n_basecase@plt>
jmp    12bc <__mpn_impn_sqr_n+0x14c>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x2c(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1070 <__mpn_impn_sqr_n@plt>
jmp    12c1 <__mpn_impn_sqr_n+0x151>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1040 <__mpn_cmp@plt>
cmp    $0x0,%rax
jl     130c <__mpn_impn_sqr_n+0x19c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
call   1060 <__mpn_sub_n@plt>
jmp    132b <__mpn_impn_sqr_n+0x1bb>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x2c(%rbp),%ecx
call   1060 <__mpn_sub_n@plt>
jmp    1330 <__mpn_impn_sqr_n+0x1c0>
cmpl   $0x20,-0x2c(%rbp)
jge    134f <__mpn_impn_sqr_n+0x1df>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1050 <__mpn_impn_sqr_n_basecase@plt>
jmp    136e <__mpn_impn_sqr_n+0x1fe>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    -0x20(%rbp),%rcx
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rcx
call   1070 <__mpn_impn_sqr_n@plt>
jmp    1373 <__mpn_impn_sqr_n+0x203>
jmp    1378 <__mpn_impn_sqr_n+0x208>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13c5 <__mpn_impn_sqr_n+0x255>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x34(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    137f <__mpn_impn_sqr_n+0x20f>
jmp    13ca <__mpn_impn_sqr_n+0x25a>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x8(%rbp),%rdx
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x2c(%rbp),%ecx
call   1030 <__mpn_add_n@plt>
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1060 <__mpn_sub_n@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x30(%rbp)
cmpl   $0x20,-0x2c(%rbp)
jge    1460 <__mpn_impn_sqr_n+0x2f0>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1050 <__mpn_impn_sqr_n_basecase@plt>
jmp    147f <__mpn_impn_sqr_n+0x30f>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    -0x20(%rbp),%rcx
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rcx
call   1070 <__mpn_impn_sqr_n@plt>
jmp    1484 <__mpn_impn_sqr_n+0x314>
mov    -0x8(%rbp),%rdi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <__mpn_add_n@plt>
add    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x30(%rbp)
je     14fd <__mpn_impn_sqr_n+0x38d>
mov    -0x8(%rbp),%rdi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x2c(%rbp),%edx
mov    -0x30(%rbp),%ecx
call   1080 <__mpn_add_1@plt>
jmp    1502 <__mpn_impn_sqr_n+0x392>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1539 <__mpn_impn_sqr_n+0x3c9>
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1509 <__mpn_impn_sqr_n+0x399>
jmp    153e <__mpn_impn_sqr_n+0x3ce>
mov    -0x8(%rbp),%rdi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x2c(%rbp),%ecx
call   1030 <__mpn_add_n@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x30(%rbp)
je     15ab <__mpn_impn_sqr_n+0x43b>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
mov    $0x1,%ecx
call   1080 <__mpn_add_1@plt>
jmp    15b0 <__mpn_impn_sqr_n+0x440>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mpn_impn_sqr_n>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rcx,%r15
mov    %edx,%r14d
mov    %rsi,%r13
mov    %rdi,%rbx
test   $0x1,%r14b
jne    11c3 <__mpn_impn_sqr_n+0x53>
mov    %r14d,%r12d
sar    %r12d
mov    %r14d,%eax
cmp    $0x3f,%r14d
mov    %rax,0x18(%rsp)
jg     11dc <__mpn_impn_sqr_n+0x6c>
movslq %r14d,%rax
lea    (%rbx,%rax,4),%rdi
movslq %r12d,%rbp
lea    0x0(,%rbp,4),%rsi
add    %r13,%rsi
mov    %r12d,%edx
call   1050 <__mpn_impn_sqr_n_basecase@plt>
jmp    11f8 <__mpn_impn_sqr_n+0x88>
lea    -0x1(%r14),%ebp
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %ebp,%edx
cmp    $0x20,%r14d
jg     122a <__mpn_impn_sqr_n+0xba>
call   1050 <__mpn_impn_sqr_n_basecase@plt>
jmp    1232 <__mpn_impn_sqr_n+0xc2>
lea    (%rbx,%rax,4),%rdi
movslq %r12d,%rbp
lea    0x0(,%rbp,4),%rsi
add    %r13,%rsi
mov    %ebp,%edx
mov    %r15,%rcx
call   1070 <__mpn_impn_sqr_n@plt>
mov    %rbp,0x10(%rsp)
lea    0x0(,%rbp,4),%rbp
add    %r13,%rbp
mov    %ebp,%edi
mov    %r13,%rsi
mov    %r12d,%edx
call   1040 <__mpn_cmp@plt>
test   %rax,%rax
mov    %r13,0x28(%rsp)
mov    %rbx,%rdi
js     1276 <__mpn_impn_sqr_n+0x106>
mov    %rbp,%rsi
mov    %r13,%rdx
jmp    127c <__mpn_impn_sqr_n+0x10c>
mov    %r15,%rcx
call   1070 <__mpn_impn_sqr_n@plt>
movslq %ebp,%r12
lea    (%rbx,%r12,4),%r15
mov    0x0(%r13,%r12,4),%ecx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %ebp,%edx
call   1090 <__mpn_addmul_1@plt>
lea    0x0(%rbp,%rbp,1),%ecx
movslq %ecx,%rcx
mov    %eax,(%rbx,%rcx,4)
mov    0x0(%r13,%r12,4),%ecx
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r14d,%edx
call   1090 <__mpn_addmul_1@plt>
add    %r14d,%ebp
movslq %ebp,%rcx
mov    %eax,(%rbx,%rcx,4)
jmp    16e4 <__mpn_impn_sqr_n+0x574>
mov    %r13,%rsi
mov    %rbp,%rdx
mov    %r12d,%ecx
call   1060 <__mpn_sub_n@plt>
mov    0x10(%rsp),%r13
cmp    $0x40,%r14d
mov    %r14,0x20(%rsp)
jge    12bd <__mpn_impn_sqr_n+0x14d>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12d,%edx
call   1050 <__mpn_impn_sqr_n_basecase@plt>
cmp    $0x1,%r14d
mov    0x18(%rsp),%rbp
jg     12d4 <__mpn_impn_sqr_n+0x164>
movslq %r14d,%r14
movl   $0x0,0xc(%rsp)
jmp    148f <__mpn_impn_sqr_n+0x31f>
mov    0x18(%rsp),%rbp
lea    (%r15,%rbp,4),%rcx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12d,%edx
call   1070 <__mpn_impn_sqr_n@plt>
lea    (%rbx,%rbp,4),%r10
lea    (%rbx,%r13,4),%rsi
cmp    $0x2,%r12d
mov    $0x1,%r9d
cmovge %r12d,%r9d
cmp    $0x8,%r9d
mov    %rbp,%r14
jb     1315 <__mpn_impn_sqr_n+0x1a5>
lea    (%r14,%r9,1),%rax
lea    (%rbx,%rax,4),%rax
cmp    %rax,%rsi
jae    139c <__mpn_impn_sqr_n+0x22c>
lea    (%r9,%r13,1),%rax
lea    (%rbx,%rax,4),%rax
cmp    %rax,%r10
jae    139c <__mpn_impn_sqr_n+0x22c>
xor    %ecx,%ecx
mov    %rcx,%rax
not    %rax
add    %r9,%rax
mov    %r9,%rdx
and    $0x3,%rdx
je     1341 <__mpn_impn_sqr_n+0x1d1>
nopl   0x0(%rax)
mov    (%r10,%rcx,4),%edi
mov    %edi,(%rsi,%rcx,4)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rdx
jne    1330 <__mpn_impn_sqr_n+0x1c0>
cmp    $0x3,%rax
jb     1489 <__mpn_impn_sqr_n+0x319>
mov    $0x1,%al
mov    %eax,0xc(%rsp)
lea    (%rbx,%r13,4),%rax
add    $0xc,%rax
lea    (%rbx,%r14,4),%rdx
add    $0xc,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    -0xc(%rdx,%rcx,4),%esi
mov    %esi,-0xc(%rax,%rcx,4)
mov    -0x8(%rdx,%rcx,4),%esi
mov    %esi,-0x8(%rax,%rcx,4)
mov    -0x4(%rdx,%rcx,4),%esi
mov    %esi,-0x4(%rax,%rcx,4)
mov    (%rdx,%rcx,4),%esi
mov    %esi,(%rax,%rcx,4)
add    $0x4,%rcx
cmp    %rcx,%r9
jne    1370 <__mpn_impn_sqr_n+0x200>
jmp    148f <__mpn_impn_sqr_n+0x31f>
mov    %r9d,%ecx
and    $0x7ffffff8,%ecx
lea    -0x8(%rcx),%rax
mov    %rax,%rdi
shr    $0x3,%rdi
add    $0x1,%rdi
mov    %edi,%r8d
and    $0x3,%r8d
cmp    $0x18,%rax
jae    13c5 <__mpn_impn_sqr_n+0x255>
xor    %ebp,%ebp
jmp    1438 <__mpn_impn_sqr_n+0x2c8>
and    $0xfffffffffffffffc,%rdi
lea    (%rbx,%r14,4),%rax
add    $0x70,%rax
lea    (%rbx,%r13,4),%rdx
add    $0x70,%rdx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movups -0x70(%rax,%rbp,4),%xmm0
movups -0x60(%rax,%rbp,4),%xmm1
movups %xmm0,-0x70(%rdx,%rbp,4)
movups %xmm1,-0x60(%rdx,%rbp,4)
movups -0x50(%rax,%rbp,4),%xmm0
movups -0x40(%rax,%rbp,4),%xmm1
movups %xmm0,-0x50(%rdx,%rbp,4)
movups %xmm1,-0x40(%rdx,%rbp,4)
movups -0x30(%rax,%rbp,4),%xmm0
movups -0x20(%rax,%rbp,4),%xmm1
movups %xmm0,-0x30(%rdx,%rbp,4)
movups %xmm1,-0x20(%rdx,%rbp,4)
movups -0x10(%rax,%rbp,4),%xmm0
movups (%rax,%rbp,4),%xmm1
movups %xmm0,-0x10(%rdx,%rbp,4)
movups %xmm1,(%rdx,%rbp,4)
add    $0x20,%rbp
add    $0xfffffffffffffffc,%rdi
jne    13e0 <__mpn_impn_sqr_n+0x270>
test   %r8,%r8
je     147b <__mpn_impn_sqr_n+0x30b>
mov    0x10(%rsp),%rax
add    %rbp,%rax
lea    (%rbx,%rax,4),%rax
add    $0x10,%rax
add    %r14,%rbp
lea    (%rbx,%rbp,4),%rdx
add    $0x10,%rdx
shl    $0x5,%r8
xor    %edi,%edi
xchg   %ax,%ax
movups -0x10(%rdx,%rdi,1),%xmm0
movups (%rdx,%rdi,1),%xmm1
movups %xmm0,-0x10(%rax,%rdi,1)
movups %xmm1,(%rax,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%r8
jne    1460 <__mpn_impn_sqr_n+0x2f0>
cmp    %r9,%rcx
mov    0x10(%rsp),%r13
jne    1317 <__mpn_impn_sqr_n+0x1a7>
mov    $0x1,%al
mov    %eax,0xc(%rsp)
lea    (%rbx,%r14,4),%rdi
lea    (%rdi,%r13,4),%rdx
mov    %rdi,0x30(%rsp)
mov    %rdi,%rsi
mov    %r12d,%ecx
call   1030 <__mpn_add_n@plt>
mov    %eax,%ebp
lea    (%rbx,%r13,4),%rdi
mov    %rdi,0x18(%rsp)
mov    %rdi,%rsi
mov    %r15,%rdx
mov    %r14,%r13
mov    0x20(%rsp),%r14
mov    %r14d,%ecx
call   1060 <__mpn_sub_n@plt>
sub    %eax,%ebp
cmp    $0x3f,%r14d
jg     14e5 <__mpn_impn_sqr_n+0x375>
mov    %r15,%rdi
mov    0x28(%rsp),%rsi
mov    %r12d,%r14d
mov    %r12d,%edx
call   1050 <__mpn_impn_sqr_n_basecase@plt>
jmp    14fc <__mpn_impn_sqr_n+0x38c>
lea    (%r15,%r13,4),%rcx
mov    %r15,%rdi
mov    0x28(%rsp),%rsi
mov    %r12d,%r14d
mov    %r12d,%edx
call   1070 <__mpn_impn_sqr_n@plt>
mov    0x18(%rsp),%r12
mov    %r12,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    0x20(%rsp),%rcx
call   1030 <__mpn_add_n@plt>
add    %ebp,%eax
je     1529 <__mpn_impn_sqr_n+0x3b9>
lea    (%r12,%r13,4),%rdi
mov    %rdi,%rsi
mov    %r14d,%edx
mov    %eax,%ecx
call   1080 <__mpn_add_1@plt>
cmpb   $0x0,0xc(%rsp)
mov    0x10(%rsp),%rbp
je     16a9 <__mpn_impn_sqr_n+0x539>
mov    %r14d,%ecx
cmp    $0x2,%r14d
mov    $0x1,%eax
cmovge %r14d,%eax
cmp    $0x8,%eax
jb     1560 <__mpn_impn_sqr_n+0x3f0>
lea    (%r15,%rax,4),%rcx
cmp    %rbx,%rcx
jbe    15d0 <__mpn_impn_sqr_n+0x460>
lea    (%rbx,%rax,4),%rcx
cmp    %r15,%rcx
jbe    15d0 <__mpn_impn_sqr_n+0x460>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %rax,%rdx
mov    %rax,%rsi
and    $0x3,%rsi
je     1591 <__mpn_impn_sqr_n+0x421>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%r15,%rcx,4),%edi
mov    %edi,(%rbx,%rcx,4)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    1580 <__mpn_impn_sqr_n+0x410>
cmp    $0x3,%rdx
jb     16a9 <__mpn_impn_sqr_n+0x539>
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rcx,4),%edx
mov    %edx,(%rbx,%rcx,4)
mov    0x4(%r15,%rcx,4),%edx
mov    %edx,0x4(%rbx,%rcx,4)
mov    0x8(%r15,%rcx,4),%edx
mov    %edx,0x8(%rbx,%rcx,4)
mov    0xc(%r15,%rcx,4),%edx
mov    %edx,0xc(%rbx,%rcx,4)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    15a0 <__mpn_impn_sqr_n+0x430>
jmp    16a9 <__mpn_impn_sqr_n+0x539>
mov    %eax,%ecx
and    $0x7ffffff8,%ecx
lea    -0x8(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0x18,%rdi
jae    15f6 <__mpn_impn_sqr_n+0x486>
xor    %edi,%edi
jmp    1660 <__mpn_impn_sqr_n+0x4f0>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
nopl   0x0(%rax)
movups (%r15,%rdi,4),%xmm0
movups 0x10(%r15,%rdi,4),%xmm1
movups %xmm0,(%rbx,%rdi,4)
movups %xmm1,0x10(%rbx,%rdi,4)
movups 0x20(%r15,%rdi,4),%xmm0
movups 0x30(%r15,%rdi,4),%xmm1
movups %xmm0,0x20(%rbx,%rdi,4)
movups %xmm1,0x30(%rbx,%rdi,4)
movups 0x40(%r15,%rdi,4),%xmm0
movups 0x50(%r15,%rdi,4),%xmm1
movups %xmm0,0x40(%rbx,%rdi,4)
movups %xmm1,0x50(%rbx,%rdi,4)
movups 0x60(%r15,%rdi,4),%xmm0
movups 0x70(%r15,%rdi,4),%xmm1
movups %xmm0,0x60(%rbx,%rdi,4)
movups %xmm1,0x70(%rbx,%rdi,4)
add    $0x20,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1600 <__mpn_impn_sqr_n+0x490>
test   %rdx,%rdx
je     169b <__mpn_impn_sqr_n+0x52b>
lea    (%rbx,%rdi,4),%rsi
add    $0x10,%rsi
lea    (%r15,%rdi,4),%rdi
add    $0x10,%rdi
shl    $0x5,%rdx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movups -0x10(%rdi,%rbp,1),%xmm0
movups (%rdi,%rbp,1),%xmm1
movups %xmm0,-0x10(%rsi,%rbp,1)
movups %xmm1,(%rsi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%rdx
jne    1680 <__mpn_impn_sqr_n+0x510>
cmp    %rax,%rcx
mov    0x10(%rsp),%rbp
jne    1562 <__mpn_impn_sqr_n+0x3f2>
lea    (%r15,%rbp,4),%rdx
mov    %r12,%rdi
mov    %r12,%rsi
mov    %r14d,%ecx
call   1030 <__mpn_add_n@plt>
test   %eax,%eax
je     16e4 <__mpn_impn_sqr_n+0x574>
mov    0x30(%rsp),%rdi
mov    %rdi,%rsi
mov    0x20(%rsp),%rdx
mov    $0x1,%ecx
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <__mpn_add_1@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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