// File: /workspace/github_cpp_makefile_star2_O2/occivink[P]pyct/monocypher.cpp
// Function: fe_mul(int*, int const*, int const*)
static void fe_mul(fe h, const fe f, const fe g)
{
    // Everything is unrolled and put in temporary variables.
    // We could roll the loop, but that would make curve25519 twice as slow.
    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 g0 = g[0]; i32 g1 = g[1]; i32 g2 = g[2]; i32 g3 = g[3]; i32 g4 = g[4];
    i32 g5 = g[5]; i32 g6 = g[6]; i32 g7 = g[7]; i32 g8 = g[8]; i32 g9 = g[9];
    i32 F1 = f1*2; i32 F3 = f3*2; i32 F5 = f5*2; i32 F7 = f7*2; i32 F9 = f9*2;
    i32 G1 = g1*19;  i32 G2 = g2*19;  i32 G3 = g3*19;
    i32 G4 = g4*19;  i32 G5 = g5*19;  i32 G6 = g6*19;
    i32 G7 = g7*19;  i32 G8 = g8*19;  i32 G9 = g9*19;
    // |F1|, |F3|, |F5|, |F7|, |F9|  <  1.65 * 2^26
    // |G0|, |G2|, |G4|, |G6|, |G8|  <  2^31
    // |G1|, |G3|, |G5|, |G7|, |G9|  <  2^30

    i64 t0 = f0*(i64)g0 + F1*(i64)G9 + f2*(i64)G8 + F3*(i64)G7 + f4*(i64)G6
        +    F5*(i64)G5 + f6*(i64)G4 + F7*(i64)G3 + f8*(i64)G2 + F9*(i64)G1;
    i64 t1 = f0*(i64)g1 + f1*(i64)g0 + f2*(i64)G9 + f3*(i64)G8 + f4*(i64)G7
        +    f5*(i64)G6 + f6*(i64)G5 + f7*(i64)G4 + f8*(i64)G3 + f9*(i64)G2;
    i64 t2 = f0*(i64)g2 + F1*(i64)g1 + f2*(i64)g0 + F3*(i64)G9 + f4*(i64)G8
        +    F5*(i64)G7 + f6*(i64)G6 + F7*(i64)G5 + f8*(i64)G4 + F9*(i64)G3;
    i64 t3 = f0*(i64)g3 + f1*(i64)g2 + f2*(i64)g1 + f3*(i64)g0 + f4*(i64)G9
        +    f5*(i64)G8 + f6*(i64)G7 + f7*(i64)G6 + f8*(i64)G5 + f9*(i64)G4;
    i64 t4 = f0*(i64)g4 + F1*(i64)g3 + f2*(i64)g2 + F3*(i64)g1 + f4*(i64)g0
        +    F5*(i64)G9 + f6*(i64)G8 + F7*(i64)G7 + f8*(i64)G6 + F9*(i64)G5;
    i64 t5 = f0*(i64)g5 + f1*(i64)g4 + f2*(i64)g3 + f3*(i64)g2 + f4*(i64)g1
        +    f5*(i64)g0 + f6*(i64)G9 + f7*(i64)G8 + f8*(i64)G7 + f9*(i64)G6;
    i64 t6 = f0*(i64)g6 + F1*(i64)g5 + f2*(i64)g4 + F3*(i64)g3 + f4*(i64)g2
        +    F5*(i64)g1 + f6*(i64)g0 + F7*(i64)G9 + f8*(i64)G8 + F9*(i64)G7;
    i64 t7 = f0*(i64)g7 + f1*(i64)g6 + f2*(i64)g5 + f3*(i64)g4 + f4*(i64)g3
        +    f5*(i64)g2 + f6*(i64)g1 + f7*(i64)g0 + f8*(i64)G9 + f9*(i64)G8;
    i64 t8 = f0*(i64)g8 + F1*(i64)g7 + f2*(i64)g6 + F3*(i64)g5 + f4*(i64)g4
        +    F5*(i64)g3 + f6*(i64)g2 + F7*(i64)g1 + f8*(i64)g0 + F9*(i64)G9;
    i64 t9 = f0*(i64)g9 + f1*(i64)g8 + f2*(i64)g7 + f3*(i64)g6 + f4*(i64)g5
        +    f5*(i64)g4 + f6*(i64)g3 + f7*(i64)g2 + f8*(i64)g1 + f9*(i64)g0;
    // 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; // Everything below 2^62, Carry precondition OK
}

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