// File: occivink[P]pyct/monocypher.cpp
// Function: fe_sq(int*, int const*)
static void fe_sq(fe h, const fe f)
{
    i32 f0 = f[0]; i32 f1 = f[1]; i32 f2 = f[2]; i32 f3 = f[3]; i32 f4 = f[4];
    i32 f5 = f[5]; i32 f6 = f[6]; i32 f7 = f[7]; i32 f8 = f[8]; i32 f9 = f[9];
    i32 f0_2  = f0*2;   i32 f1_2  = f1*2;   i32 f2_2  = f2*2;   i32 f3_2 = f3*2;
    i32 f4_2  = f4*2;   i32 f5_2  = f5*2;   i32 f6_2  = f6*2;   i32 f7_2 = f7*2;
    i32 f5_38 = f5*38;  i32 f6_19 = f6*19;  i32 f7_38 = f7*38;
    i32 f8_19 = f8*19;  i32 f9_38 = f9*38;
    // |f0_2| , |f2_2| , |f4_2| , |f6_2| , |f8_2|  <  1.65 * 2^27
    // |f1_2| , |f3_2| , |f5_2| , |f7_2| , |f9_2|  <  1.65 * 2^26
    // |f5_38|, |f6_19|, |f7_38|, |f8_19|, |f9_38| <  2^31

    i64 t0 = f0  *(i64)f0    + f1_2*(i64)f9_38 + f2_2*(i64)f8_19
        +    f3_2*(i64)f7_38 + f4_2*(i64)f6_19 + f5  *(i64)f5_38;
    i64 t1 = f0_2*(i64)f1    + f2  *(i64)f9_38 + f3_2*(i64)f8_19
        +    f4  *(i64)f7_38 + f5_2*(i64)f6_19;
    i64 t2 = f0_2*(i64)f2    + f1_2*(i64)f1    + f3_2*(i64)f9_38
        +    f4_2*(i64)f8_19 + f5_2*(i64)f7_38 + f6  *(i64)f6_19;
    i64 t3 = f0_2*(i64)f3    + f1_2*(i64)f2    + f4  *(i64)f9_38
        +    f5_2*(i64)f8_19 + f6  *(i64)f7_38;
    i64 t4 = f0_2*(i64)f4    + f1_2*(i64)f3_2  + f2  *(i64)f2
        +    f5_2*(i64)f9_38 + f6_2*(i64)f8_19 + f7  *(i64)f7_38;
    i64 t5 = f0_2*(i64)f5    + f1_2*(i64)f4    + f2_2*(i64)f3
        +    f6  *(i64)f9_38 + f7_2*(i64)f8_19;
    i64 t6 = f0_2*(i64)f6    + f1_2*(i64)f5_2  + f2_2*(i64)f4
        +    f3_2*(i64)f3    + f7_2*(i64)f9_38 + f8  *(i64)f8_19;
    i64 t7 = f0_2*(i64)f7    + f1_2*(i64)f6    + f2_2*(i64)f5
        +    f3_2*(i64)f4    + f8  *(i64)f9_38;
    i64 t8 = f0_2*(i64)f8    + f1_2*(i64)f7_2  + f2_2*(i64)f6
        +    f3_2*(i64)f5_2  + f4  *(i64)f4    + f9  *(i64)f9_38;
    i64 t9 = f0_2*(i64)f9    + f1_2*(i64)f8    + f2_2*(i64)f7
        +    f3_2*(i64)f6    + f4  *(i64)f5_2;
    // t0 < 0.67 * 2^61
    // t1 < 0.41 * 2^61
    // t2 < 0.52 * 2^61
    // t3 < 0.32 * 2^61
    // t4 < 0.38 * 2^61
    // t5 < 0.22 * 2^61
    // t6 < 0.23 * 2^61
    // t7 < 0.13 * 2^61
    // t8 < 0.09 * 2^61
    // t9 < 0.03 * 2^61

    FE_CARRY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x48, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x14(%rbp), %eax
shll %eax
movl %eax, -0x3c(%rbp)
movl -0x18(%rbp), %eax
shll %eax
movl %eax, -0x40(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x44(%rbp)
movl -0x20(%rbp), %eax
shll %eax
movl %eax, -0x48(%rbp)
movl -0x24(%rbp), %eax
shll %eax
movl %eax, -0x4c(%rbp)
movl -0x28(%rbp), %eax
shll %eax
movl %eax, -0x50(%rbp)
movl -0x2c(%rbp), %eax
shll %eax
movl %eax, -0x54(%rbp)
movl -0x30(%rbp), %eax
shll %eax
movl %eax, -0x58(%rbp)
imull $0x26, -0x28(%rbp), %eax
movl %eax, -0x5c(%rbp)
imull $0x13, -0x2c(%rbp), %eax
movl %eax, -0x60(%rbp)
imull $0x26, -0x30(%rbp), %eax
movl %eax, -0x64(%rbp)
imull $0x13, -0x34(%rbp), %eax
movl %eax, -0x68(%rbp)
imull $0x26, -0x38(%rbp), %eax
movl %eax, -0x6c(%rbp)
movslq -0x14(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq %rcx, %rax
movslq -0x40(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x44(%rbp), %rcx
movslq -0x68(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x48(%rbp), %rcx
movslq -0x64(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x4c(%rbp), %rcx
movslq -0x60(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x28(%rbp), %rcx
movslq -0x5c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x48(%rbp), %rcx
movslq -0x68(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x24(%rbp), %rcx
movslq -0x64(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x50(%rbp), %rcx
movslq -0x60(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq %rcx, %rax
movslq -0x40(%rbp), %rcx
movslq -0x18(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x48(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x4c(%rbp), %rcx
movslq -0x68(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x50(%rbp), %rcx
movslq -0x64(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
movslq -0x60(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x20(%rbp), %rcx
imulq %rcx, %rax
movslq -0x40(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x24(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x50(%rbp), %rcx
movslq -0x68(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
movslq -0x64(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq %rcx, %rax
movslq -0x40(%rbp), %rcx
movslq -0x48(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x50(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x54(%rbp), %rcx
movslq -0x68(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x30(%rbp), %rcx
movslq -0x64(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x28(%rbp), %rcx
imulq %rcx, %rax
movslq -0x40(%rbp), %rcx
movslq -0x24(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x44(%rbp), %rcx
movslq -0x20(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x2c(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x58(%rbp), %rcx
movslq -0x68(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq %rcx, %rax
movslq -0x40(%rbp), %rcx
movslq -0x50(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x44(%rbp), %rcx
movslq -0x24(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x48(%rbp), %rcx
movslq -0x20(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x58(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x34(%rbp), %rcx
movslq -0x68(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq %rcx, %rax
movslq -0x40(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x44(%rbp), %rcx
movslq -0x28(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x48(%rbp), %rcx
movslq -0x24(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x34(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq %rcx, %rax
movslq -0x40(%rbp), %rcx
movslq -0x58(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x44(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x48(%rbp), %rcx
movslq -0x50(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x24(%rbp), %rcx
movslq -0x24(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movslq -0x6c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
movslq -0x3c(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq %rcx, %rax
movslq -0x40(%rbp), %rcx
movslq -0x34(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x44(%rbp), %rcx
movslq -0x30(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x48(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movslq -0x24(%rbp), %rcx
movslq -0x50(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0x78(%rbp), %rax
addq $0x2000000, %rax        # imm = 0x2000000
sarq $0x1a, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x1a, %rcx
movq -0x78(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0xc8(%rbp), %rax
addq -0x80(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x98(%rbp), %rax
addq $0x2000000, %rax        # imm = 0x2000000
sarq $0x1a, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x1a, %rcx
movq -0x98(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0xc8(%rbp), %rax
addq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x80(%rbp), %rax
addq $0x1000000, %rax        # imm = 0x1000000
sarq $0x19, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x19, %rcx
movq -0x80(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0xc8(%rbp), %rax
addq -0x88(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0xa0(%rbp), %rax
addq $0x1000000, %rax        # imm = 0x1000000
sarq $0x19, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x19, %rcx
movq -0xa0(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0xc8(%rbp), %rax
addq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x88(%rbp), %rax
addq $0x2000000, %rax        # imm = 0x2000000
sarq $0x1a, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x1a, %rcx
movq -0x88(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0xc8(%rbp), %rax
addq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0xa8(%rbp), %rax
addq $0x2000000, %rax        # imm = 0x2000000
sarq $0x1a, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x1a, %rcx
movq -0xa8(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0xc8(%rbp), %rax
addq -0xb0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x90(%rbp), %rax
addq $0x1000000, %rax        # imm = 0x1000000
sarq $0x19, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x19, %rcx
movq -0x90(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0xc8(%rbp), %rax
addq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0xb0(%rbp), %rax
addq $0x1000000, %rax        # imm = 0x1000000
sarq $0x19, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x19, %rcx
movq -0xb0(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq -0xc8(%rbp), %rax
addq -0xb8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x98(%rbp), %rax
addq $0x2000000, %rax        # imm = 0x2000000
sarq $0x1a, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x1a, %rcx
movq -0x98(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0xc8(%rbp), %rax
addq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xb8(%rbp), %rax
addq $0x2000000, %rax        # imm = 0x2000000
sarq $0x1a, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x1a, %rcx
movq -0xb8(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xb8(%rbp)
movq -0xc8(%rbp), %rax
addq -0xc0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
addq $0x1000000, %rax        # imm = 0x1000000
sarq $0x19, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x19, %rcx
movq -0xc0(%rbp), %rax
subq %rcx, %rax
movq %rax, -0xc0(%rbp)
imulq $0x13, -0xc8(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
addq $0x2000000, %rax        # imm = 0x2000000
sarq $0x1a, %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
shlq $0x1a, %rcx
movq -0x78(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0xc8(%rbp), %rax
addq -0x80(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x80(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x88(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x90(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x98(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0xa0(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0xa8(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0xb0(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0xb8(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0xc0(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
addq $0x48, %rsp
popq %rbp
retq