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