// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movslq (%rsi), %rax
movslq 0x8(%rsi), %rbx
movslq 0xc(%rsi), %r11
movslq 0x18(%rsi), %r10
movslq 0x1c(%rsi), %r14
movq %r14, 0x28(%rsp)
movslq 0x20(%rsi), %rdi
movq %rdi, -0x70(%rsp)
leaq (%rax,%rax), %r15
leaq (%rbx,%rbx), %r8
movq %r8, 0x58(%rsp)
leaq (%r11,%r11), %r9
movq %r11, 0x50(%rsp)
imulq $0x26, %r14, %r12
movq %r12, -0x30(%rsp)
leaq (%rdi,%rdi,8), %rcx
leaq (%rdi,%rcx,2), %rdx
movq %rdx, %rcx
movq %rdx, -0x80(%rsp)
imulq %r8, %rcx
movq %r12, %rdi
imulq %r9, %rdi
movq %r9, -0x40(%rsp)
addq %rcx, %rdi
movq %r10, -0x58(%rsp)
leaq (%r10,%r10,8), %rcx
leaq (%r10,%rcx,2), %r14
movq %r14, -0x60(%rsp)
imulq %rax, %rax
movslq 0x10(%rsi), %r10
leaq (%r10,%r10), %r8
movq %r8, -0x68(%rsp)
movq %r10, -0x48(%rsp)
movq %r14, %rcx
imulq %r8, %rcx
addq %rax, %rcx
movslq 0x14(%rsi), %r8
movq %r8, %rax
movq %r8, %rbp
imulq %r8, %rax
imulq $0x26, %rax, %r8
addq %rcx, %r8
addq %rdi, %r8
movslq 0x4(%rsi), %r12
movslq 0x24(%rsi), %r13
leaq (%r12,%r12), %r14
imulq $0x26, %r13, %rsi
movq %rsi, %rax
imulq %r14, %rax
addq %rax, %r8
movq %r8, -0x50(%rsp)
movq %rsi, %rax
movq %rbx, 0x48(%rsp)
imulq %rbx, %rax
movq %rdx, %rcx
imulq %r9, %rcx
addq %rax, %rcx
movq %rbx, %r9
imulq %r15, %r9
imulq %r15, %r11
movq %r11, 0x40(%rsp)
imulq %r15, %r10
movq %r10, 0x38(%rsp)
movq %rbp, -0x20(%rsp)
movq %rbp, %rax
imulq %r15, %rax
movq %rax, 0x30(%rsp)
movq -0x58(%rsp), %r11
movq %r11, %rax
imulq %r15, %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rbx
movq %rbx, %rax
imulq %r15, %rax
movq %rax, 0x18(%rsp)
movq -0x70(%rsp), %rax
imulq %r15, %rax
movq %rax, 0x10(%rsp)
movq %rsi, %rax
movq %rsi, -0x10(%rsp)
movq %rsi, -0x8(%rsp)
movq %rsi, (%rsp)
movq %rsi, %rdi
movq %rsi, -0x78(%rsp)
imulq %r13, %rax
movq %rax, -0x38(%rsp)
imulq %r15, %r13
movq %r13, 0x8(%rsp)
imulq %r12, %r15
leaq (,%rbp,2), %r8
movq -0x60(%rsp), %r13
movq %r13, %r10
imulq %r8, %r10
addq %r15, %r10
movq -0x30(%rsp), %rax
movq %rax, %rdx
movq -0x48(%rsp), %rbp
imulq %rbp, %rdx
addq %rdx, %r10
addq %rcx, %r10
movq %r10, -0x18(%rsp)
imulq %r14, %r12
addq %r9, %r12
movq %r12, %r15
movq -0x40(%rsp), %rdx
imulq %rdx, %rsi
movq -0x68(%rsp), %rcx
movq -0x80(%rsp), %r9
imulq %r9, %rcx
addq %rsi, %rcx
movq %rcx, %rsi
movq %r13, %r12
imulq %r11, %r12
addq %r15, %r12
movq %rax, %rcx
imulq %r8, %rcx
addq %rcx, %r12
addq %rsi, %r12
movq %r12, -0x60(%rsp)
movq %rdx, %rsi
imulq %r14, %rsi
movq %r11, %r13
movq %r9, %rcx
imulq %r9, %r13
movq %rbp, %r15
movq %rbp, %rax
imulq %r14, %r15
leaq (%rbx,%rbx), %r9
movq %rcx, %rbp
imulq %r9, %rbp
movq %r8, %rdx
imulq %r14, %rdx
imulq %r9, %rdi
movq %rdi, -0x28(%rsp)
movq %rcx, %r12
movq -0x70(%rsp), %rdi
imulq %rdi, %rcx
movq %rcx, -0x80(%rsp)
movq %r11, %r10
imulq %r14, %r10
movq -0x78(%rsp), %rcx
imulq %rdi, %rcx
movq %rcx, -0x78(%rsp)
imulq %r14, %r9
imulq %r14, %rdi
movq %rdi, -0x70(%rsp)
movq 0x48(%rsp), %rcx
imulq %rcx, %r14
addq 0x40(%rsp), %r14
imulq %r8, %r12
addq %r14, %r12
movq -0x30(%rsp), %rdi
movq %rdi, %r14
imulq %r11, %r14
addq %r12, %r14
movq -0x10(%rsp), %r12
imulq %rax, %r12
addq %r12, %r14
movq %r14, -0x68(%rsp)
imulq %rcx, %rcx
addq %rsi, %rcx
addq 0x38(%rsp), %rcx
movq %rbx, %r12
imulq %rbx, %rdi
addq %rcx, %rdi
leaq (%rdi,%r13,2), %r13
movq -0x8(%rsp), %rcx
imulq %r8, %rcx
addq %rcx, %r13
movq %rax, %rsi
movq 0x58(%rsp), %rbx
imulq %rbx, %rsi
movq -0x20(%rsp), %rdi
imulq %rbx, %rdi
movq %r11, %r14
imulq %rbx, %r14
imulq %rbx, %r12
movq 0x50(%rsp), %rax
imulq %rax, %rbx
addq %r15, %rbx
addq 0x30(%rsp), %rbx
addq %rbx, %rbp
movq (%rsp), %rcx
imulq %r11, %rcx
addq %rcx, %rbp
addq 0x20(%rsp), %rdx
movq %rax, %rbx
movq -0x40(%rsp), %r15
imulq %r15, %rbx
addq %rsi, %rbx
addq %rdx, %rbx
movq -0x80(%rsp), %rax
addq %rbx, %rax
addq -0x28(%rsp), %rax
movq %rax, -0x80(%rsp)
addq 0x18(%rsp), %r10
movq %r8, %rdx
imulq %r15, %rdx
imulq %r15, %r11
movq %r15, %rsi
movq -0x48(%rsp), %rax
imulq %rax, %rsi
addq %rdi, %rsi
addq %r10, %rsi
addq %rsi, -0x78(%rsp)
addq %r9, %rdx
imulq %rax, %r8
imulq %rax, %rax
addq %r14, %rax
addq %rdx, %rax
addq 0x10(%rsp), %rax
addq %rax, -0x38(%rsp)
addq -0x70(%rsp), %r12
addq %r8, %r11
addq %r12, %r11
addq 0x8(%rsp), %r11
movq %r11, -0x58(%rsp)
movl $0x2000000, %edx        # imm = 0x2000000
movq -0x50(%rsp), %rdi
leaq (%rdi,%rdx), %rcx
movq %rcx, %rax
sarq $0x1a, %rax
addq -0x18(%rsp), %rax
movq $-0x4000000, %rsi       # imm = 0xFC000000
andq %rsi, %rcx
subq %rcx, %rdi
movq %rdi, -0x50(%rsp)
leaq (%rdx,%r13), %rcx
movq %rcx, %r15
sarq $0x1a, %r15
addq %rbp, %r15
andq %rsi, %rcx
subq %rcx, %r13
movl $0x1000000, %ebx        # imm = 0x1000000
leaq (%rax,%rbx), %rcx
movq %rcx, %rdi
sarq $0x19, %rdi
addq -0x60(%rsp), %rdi
movl $0xfe000000, %esi       # imm = 0xFE000000
andl %esi, %ecx
subl %ecx, %eax
leaq (%r15,%rbx), %rcx
movq %rcx, %r10
sarq $0x19, %r10
addq -0x80(%rsp), %r10
andl %esi, %ecx
subl %ecx, %r15d
leaq (%rdi,%rdx), %r9
movq %r9, %r8
sarq $0x1a, %r8
addq -0x68(%rsp), %r8
movl $0xfc000000, %ecx       # imm = 0xFC000000
andl %ecx, %r9d
subl %r9d, %edi
leaq (%r10,%rdx), %r9
movq %r9, %r14
sarq $0x1a, %r14
addq -0x78(%rsp), %r14
andl %ecx, %r9d
subl %r9d, %r10d
leaq (%r8,%rbx), %r9
movq %r9, %r12
sarq $0x19, %r12
addq %r13, %r12
andl %esi, %r9d
subl %r9d, %r8d
leaq (%r14,%rbx), %r11
movq %r11, %r9
sarq $0x19, %r9
addq -0x38(%rsp), %r9
andl %esi, %r11d
subl %r11d, %r14d
leaq (%r12,%rdx), %r13
movq %r13, %r11
andl %ecx, %r13d
subl %r13d, %r12d
shrq $0x1a, %r11
addl %r15d, %r11d
leaq (%r9,%rdx), %r13
movq %r13, %r15
sarq $0x1a, %r15
addq -0x58(%rsp), %r15
andl %ecx, %r13d
subl %r13d, %r9d
addq %r15, %rbx
movq %rbx, %r13
andl %esi, %ebx
sarq $0x19, %r13
subl %ebx, %r15d
leaq (,%r13,8), %rsi
addq %r13, %rsi
leaq (,%rsi,2), %rsi
addq %r13, %rsi
addq -0x50(%rsp), %rsi
addq %rsi, %rdx
movq %rdx, %rbx
andl %ecx, %edx
subl %edx, %esi
shrq $0x1a, %rbx
addl %eax, %ebx
movq 0x60(%rsp), %rax
movl %esi, (%rax)
movl %ebx, 0x4(%rax)
movl %edi, 0x8(%rax)
movl %r8d, 0xc(%rax)
movl %r12d, 0x10(%rax)
movl %r11d, 0x14(%rax)
movl %r10d, 0x18(%rax)
movl %r14d, 0x1c(%rax)
movl %r9d, 0x20(%rax)
movl %r15d, 0x24(%rax)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq