#include "crypto_asm_hidden.h" // linker define fe51_pack // linker use REDMASK51 /* This file is the result of merging amd64-51/fe25519_pack.c and amd64-51/fe25519_freeze.s. */ #include "fe51_namespace.h" #include "consts_namespace.h" # qhasm: int64 input_0 # qhasm: int64 input_1 # qhasm: int64 input_2 # qhasm: int64 input_3 # qhasm: int64 input_4 # qhasm: int64 input_5 # qhasm: stack64 input_6 # qhasm: stack64 input_7 # qhasm: int64 caller_r11 # qhasm: int64 caller_r12 # qhasm: int64 caller_r13 # qhasm: int64 caller_r14 # qhasm: int64 caller_r15 # qhasm: int64 caller_rbx # qhasm: int64 caller_rbp # qhasm: int64 r0 # qhasm: int64 r1 # qhasm: int64 r2 # qhasm: int64 r3 # qhasm: int64 r4 # qhasm: int64 t # qhasm: int64 s # qhasm: int64 loop # qhasm: int64 two51minus1 # qhasm: int64 two51minus19 # qhasm: stack64 r11_stack # qhasm: stack64 r12_stack # qhasm: stack64 r13_stack # qhasm: stack64 r14_stack # qhasm: stack64 r15_stack # qhasm: stack64 rbx_stack # qhasm: stack64 rbp_stack # qhasm: enter fe51_pack .p2align 5 ASM_HIDDEN _fe51_pack .global _fe51_pack ASM_HIDDEN fe51_pack .global fe51_pack _fe51_pack: fe51_pack: mov %rsp,%r11 and $31,%r11 add $32,%r11 sub %r11,%rsp # qhasm: r11_stack = caller_r11 # asm 1: movq r11_stack=stack64#1 # asm 2: movq r11_stack=0(%rsp) movq %r11,0(%rsp) # qhasm: r12_stack = caller_r12 # asm 1: movq r12_stack=stack64#2 # asm 2: movq r12_stack=8(%rsp) movq %r12,8(%rsp) # qhasm: r0 = *(uint64 *) (input_1 + 0) # asm 1: movq 0(r0=int64#3 # asm 2: movq 0(r0=%rdx movq 0(%rsi),%rdx # qhasm: r1 = *(uint64 *) (input_1 + 8) # asm 1: movq 8(r1=int64#4 # asm 2: movq 8(r1=%rcx movq 8(%rsi),%rcx # qhasm: r2 = *(uint64 *) (input_1 + 16) # asm 1: movq 16(r2=int64#5 # asm 2: movq 16(r2=%r8 movq 16(%rsi),%r8 # qhasm: r3 = *(uint64 *) (input_1 + 24) # asm 1: movq 24(r3=int64#6 # asm 2: movq 24(r3=%r9 movq 24(%rsi),%r9 # qhasm: r4 = *(uint64 *) (input_1 + 32) # asm 1: movq 32(r4=int64#2 # asm 2: movq 32(r4=%rsi movq 32(%rsi),%rsi # qhasm: two51minus1 = *(uint64 *) &REDMASK51 # asm 1: movq REDMASK51,>two51minus1=int64#7 # asm 2: movq REDMASK51,>two51minus1=%rax movq REDMASK51(%rip),%rax # qhasm: two51minus19 = two51minus1 - 18 # asm 1: lea -18(two51minus19=int64#8 # asm 2: lea -18(two51minus19=%r10 lea -18(%rax),%r10 # qhasm: loop = 3 # asm 1: mov $3,>loop=int64#9 # asm 2: mov $3,>loop=%r11 mov $3,%r11 # qhasm: reduceloop: ._reduceloop: # qhasm: t = r0 # asm 1: mov t=int64#10 # asm 2: mov t=%r12 mov %rdx,%r12 # qhasm: (uint64) t >>= 51 # asm 1: shr $51,t=int64#10 # asm 2: mov t=%r12 mov %rcx,%r12 # qhasm: (uint64) t >>= 51 # asm 1: shr $51,t=int64#10 # asm 2: mov t=%r12 mov %r8,%r12 # qhasm: (uint64) t >>= 51 # asm 1: shr $51,t=int64#10 # asm 2: mov t=%r12 mov %r9,%r12 # qhasm: (uint64) t >>= 51 # asm 1: shr $51,t=int64#10 # asm 2: mov t=%r12 mov %rsi,%r12 # qhasm: (uint64) t >>= 51 # asm 1: shr $51,? loop -= 1 # asm 1: sub $1, ja ._reduceloop # qhasm: t = 1 # asm 1: mov $1,>t=int64#10 # asm 2: mov $1,>t=%r12 mov $1,%r12 # qhasm: signedt=int64#7 # asm 2: mov t=%rax mov %rdx,%rax # qhasm: (uint32) t &= 0xFF # asm 1: and $0xFF,t=int64#7 # asm 2: mov t=%rax mov %rdx,%rax # qhasm: (uint64) t >>= 8 # asm 1: shr $8,t=int64#7 # asm 2: mov t=%rax mov %rdx,%rax # qhasm: (uint64) t >>= 16 # asm 1: shr $16,t=int64#7 # asm 2: mov t=%rax mov %rdx,%rax # qhasm: (uint64) t >>= 24 # asm 1: shr $24,t=int64#7 # asm 2: mov t=%rax mov %rdx,%rax # qhasm: (uint64) t >>= 32 # asm 1: shr $32,t=int64#7 # asm 2: mov t=%rax mov %rdx,%rax # qhasm: (uint64) t >>= 40 # asm 1: shr $40,s=int64#3 # asm 2: mov s=%rdx mov %rdx,%rdx # qhasm: (uint64) s >>= 48 # asm 1: shr $48,t=int64#7 # asm 2: mov t=%rax mov %rcx,%rax # qhasm: t <<= 3 # asm 1: shl $3,t=int64#3 # asm 2: mov t=%rdx mov %rcx,%rdx # qhasm: (uint64) t >>= 5 # asm 1: shr $5,t=int64#3 # asm 2: mov t=%rdx mov %rcx,%rdx # qhasm: (uint64) t >>= 13 # asm 1: shr $13,t=int64#3 # asm 2: mov t=%rdx mov %rcx,%rdx # qhasm: (uint64) t >>= 21 # asm 1: shr $21,t=int64#3 # asm 2: mov t=%rdx mov %rcx,%rdx # qhasm: (uint64) t >>= 29 # asm 1: shr $29,t=int64#3 # asm 2: mov t=%rdx mov %rcx,%rdx # qhasm: (uint64) t >>= 37 # asm 1: shr $37,s=int64#3 # asm 2: mov s=%rdx mov %rcx,%rdx # qhasm: (uint64) s >>= 45 # asm 1: shr $45,t=int64#4 # asm 2: mov t=%rcx mov %r8,%rcx # qhasm: t <<= 6 # asm 1: shl $6,t=int64#3 # asm 2: mov t=%rdx mov %r8,%rdx # qhasm: (uint64) t >>= 2 # asm 1: shr $2,t=int64#3 # asm 2: mov t=%rdx mov %r8,%rdx # qhasm: (uint64) t >>= 10 # asm 1: shr $10,t=int64#3 # asm 2: mov t=%rdx mov %r8,%rdx # qhasm: (uint64) t >>= 18 # asm 1: shr $18,t=int64#3 # asm 2: mov t=%rdx mov %r8,%rdx # qhasm: (uint64) t >>= 26 # asm 1: shr $26,t=int64#3 # asm 2: mov t=%rdx mov %r8,%rdx # qhasm: (uint64) t >>= 34 # asm 1: shr $34,t=int64#3 # asm 2: mov t=%rdx mov %r8,%rdx # qhasm: (uint64) t >>= 42 # asm 1: shr $42,s=int64#3 # asm 2: mov s=%rdx mov %r8,%rdx # qhasm: (uint64) s >>= 50 # asm 1: shr $50,t=int64#4 # asm 2: mov t=%rcx mov %r9,%rcx # qhasm: t <<= 1 # asm 1: shl $1,t=int64#3 # asm 2: mov t=%rdx mov %r9,%rdx # qhasm: (uint64) t >>= 7 # asm 1: shr $7,t=int64#3 # asm 2: mov t=%rdx mov %r9,%rdx # qhasm: (uint64) t >>= 15 # asm 1: shr $15,t=int64#3 # asm 2: mov t=%rdx mov %r9,%rdx # qhasm: (uint64) t >>= 23 # asm 1: shr $23,t=int64#3 # asm 2: mov t=%rdx mov %r9,%rdx # qhasm: (uint64) t >>= 31 # asm 1: shr $31,t=int64#3 # asm 2: mov t=%rdx mov %r9,%rdx # qhasm: (uint64) t >>= 39 # asm 1: shr $39,s=int64#3 # asm 2: mov s=%rdx mov %r9,%rdx # qhasm: (uint64) s >>= 47 # asm 1: shr $47,t=int64#4 # asm 2: mov t=%rcx mov %rsi,%rcx # qhasm: t <<= 4 # asm 1: shl $4,t=int64#3 # asm 2: mov t=%rdx mov %rsi,%rdx # qhasm: (uint64) t >>= 4 # asm 1: shr $4,t=int64#3 # asm 2: mov t=%rdx mov %rsi,%rdx # qhasm: (uint64) t >>= 12 # asm 1: shr $12,t=int64#3 # asm 2: mov t=%rdx mov %rsi,%rdx # qhasm: (uint64) t >>= 20 # asm 1: shr $20,t=int64#3 # asm 2: mov t=%rdx mov %rsi,%rdx # qhasm: (uint64) t >>= 28 # asm 1: shr $28,t=int64#3 # asm 2: mov t=%rdx mov %rsi,%rdx # qhasm: (uint64) t >>= 36 # asm 1: shr $36,t=int64#2 # asm 2: mov t=%rsi mov %rsi,%rsi # qhasm: (uint64) t >>= 44 # asm 1: shr $44,caller_r11=int64#9 # asm 2: movq caller_r11=%r11 movq 0(%rsp),%r11 # qhasm: caller_r12 = r12_stack # asm 1: movq caller_r12=int64#10 # asm 2: movq caller_r12=%r12 movq 8(%rsp),%r12 # qhasm: return add %r11,%rsp ret .section .note.GNU-stack,"",@progbits