user: Converte this assembly snippet into its equivalent C code:

```asm
<mult_scalar>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  mov    %edi,%ebx
  sub    $0x128,%rsp
  mov    0x10(%rbp),%rax
  mov    %rcx,-0x108(%rbp)
  mov    %rsi,-0x128(%rbp)
  mov    %rsp,%rdx
  mov    %rax,-0x130(%rbp)
  mov    0x18(%rbp),%rax
  mov    %r8,-0xf8(%rbp)
  mov    %rax,-0x138(%rbp)
  mov    0x20(%rbp),%rax
  mov    %r9,-0x100(%rbp)
  mov    %rax,-0x140(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  test   %edi,%edi
  lea    0x1f(%rdi),%eax
  cmovns %edi,%eax
  sar    $0x5,%eax
  lea    0x1(%rax),%r12d
  mov    %eax,-0x10c(%rbp)
  movslq %r12d,%rax
  lea    0xf(,%rax,4),%rcx
  mov    %rcx,%rax
  mov    %rcx,-0x120(%rbp)
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L1099
L760:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L760
L1099:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L1132
L741:
  mov    -0x120(%rbp),%rcx
  lea    0x3(%rsp),%rax
  mov    %rsp,%rdx
  mov    %rax,%r13
  and    $0xfffffffffffffffc,%rax
  mov    %rax,-0x58(%rbp)
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  shr    $0x2,%r13
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L428
L1148:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L1148
L428:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L600
L726:
  mov    -0x120(%rbp),%rcx
  mov    %rsp,%rdx
  mov    %rsp,-0x60(%rbp)
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L148
L1016:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L1016
L148:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L511
  orq    $0x0,-0x8(%rsp,%rax,1)
L511:
  mov    -0x120(%rbp),%rcx
  mov    %rsp,%rdx
  mov    %rsp,-0x68(%rbp)
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L893
L785:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L785
L893:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L409
  orq    $0x0,-0x8(%rsp,%rax,1)
L409:
  lea    0x3(%rsp),%rax
  mov    %rax,%r15
  and    $0xfffffffffffffffc,%rax
  mov    %rax,-0x70(%rbp)
  shr    $0x2,%r15
  test   %r12d,%r12d
  jle    L945
  mov    -0x10c(%rbp),%eax
  mov    -0x60(%rbp),%rdi
  xor    %esi,%esi
  lea    0x4(,%rax,4),%r14
  mov    %r14,%rdx
  call   <memset@plt>
  mov    -0x70(%rbp),%rdi
  mov    %r14,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    -0x58(%rbp),%rdi
  mov    %r14,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    -0x100(%rbp),%rsi
  mov    -0x68(%rbp),%rdi
  mov    %r14,%rdx
  call   <memcpy@plt>
L945:
  mov    -0x120(%rbp),%rcx
  lea    (%r12,%r12,1),%eax
  mov    %rsp,%rdx
  movl   $0x1,0x0(,%r15,4)
  mov    %eax,-0xd0(%rbp)
  movl   $0x1,0x0(,%r13,4)
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L1042
L472:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L472
L1042:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L478
  orq    $0x0,-0x8(%rsp,%rax,1)
L478:
  movslq -0xd0(%rbp),%rax
  mov    %rsp,%rdx
  mov    %rsp,-0xa8(%rbp)
  lea    0xf(,%rax,4),%rcx
  mov    %rax,-0x148(%rbp)
  mov    %rcx,-0x118(%rbp)
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L679
L560:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L560
L679:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L1069
  orq    $0x0,-0x8(%rsp,%rax,1)
L1069:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,%rdx
  mov    %rsp,%r13
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L304
L1224:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L1224
L304:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L559
  orq    $0x0,-0x8(%rsp,%rax,1)
L559:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,%rdx
  mov    %rsp,%r14
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L965
L774:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L774
L965:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L686
  orq    $0x0,-0x8(%rsp,%rax,1)
L686:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,%rdx
  mov    %rsp,-0x48(%rbp)
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L501
L305:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L305
L501:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L115
  orq    $0x0,-0x8(%rsp,%rax,1)
L115:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,%rdx
  mov    %rsp,%r15
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L857
L211:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L211
L857:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L107
  orq    $0x0,-0x8(%rsp,%rax,1)
L107:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0x50(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L711:
  cmp    %rdx,%rsp
  je     L986
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L711
  nopl   0x0(%rax)
L1132:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L741
L600:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L726
L986:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L582
  orq    $0x0,-0x8(%rsp,%rax,1)
L582:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0xb0(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L727:
  cmp    %rdx,%rsp
  je     L72
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L727
L72:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L812
  orq    $0x0,-0x8(%rsp,%rax,1)
L812:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0xb8(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L15:
  cmp    %rdx,%rsp
  je     L618
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L15
L618:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L817
  orq    $0x0,-0x8(%rsp,%rax,1)
L817:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0x78(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L891:
  cmp    %rdx,%rsp
  je     L980
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L891
L980:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L396
  orq    $0x0,-0x8(%rsp,%rax,1)
L396:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0xd8(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L926:
  cmp    %rdx,%rsp
  je     L351
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L926
L351:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L1076
  orq    $0x0,-0x8(%rsp,%rax,1)
L1076:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0xe0(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L36:
  cmp    %rdx,%rsp
  je     L215
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L36
L215:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L855
  orq    $0x0,-0x8(%rsp,%rax,1)
L855:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0x80(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L425:
  cmp    %rdx,%rsp
  je     L584
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L425
L584:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L53
  orq    $0x0,-0x8(%rsp,%rax,1)
L53:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0xc0(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L460:
  cmp    %rdx,%rsp
  je     L316
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L460
L316:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L357
  orq    $0x0,-0x8(%rsp,%rax,1)
L357:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0xc8(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L308:
  cmp    %rdx,%rsp
  je     L178
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L308
L178:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L835
  orq    $0x0,-0x8(%rsp,%rax,1)
L835:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0x88(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L603:
  cmp    %rdx,%rsp
  je     L144
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L603
L144:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L188
  orq    $0x0,-0x8(%rsp,%rax,1)
L188:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0xe8(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L1054:
  cmp    %rdx,%rsp
  je     L1090
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1054
L1090:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L214
  orq    $0x0,-0x8(%rsp,%rax,1)
L214:
  mov    -0x118(%rbp),%rcx
  mov    %rsp,-0xf0(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rax
  and    $0xfffffffffffff000,%rcx
  and    $0xfffffffffffffff0,%rax
  sub    %rcx,%rdx
L765:
  cmp    %rdx,%rsp
  je     L717
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L765
L717:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L1073
  orq    $0x0,-0x8(%rsp,%rax,1)
L1073:
  mov    %rsp,-0x90(%rbp)
  cmp    $0xffffffe1,%ebx
  jl     L859
  mov    -0xd0(%rbp),%eax
  sub    $0x1,%eax
  lea    0x4(,%rax,4),%rbx
  mov    -0x10c(%rbp),%eax
  mov    %eax,-0xcc(%rbp)
  nopl   0x0(%rax)
L403:
  movl   $0x1f,-0x98(%rbp)
  movl   $0x80000000,-0xa0(%rbp)
  jmp    L743
  nopl   0x0(%rax)
L97:
  mov    -0x70(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  mov    %r13,%rcx
  mov    %r12d,%edi
  call   <f2m_mult@plt>
  mov    -0x60(%rbp),%rdx
  mov    -0x68(%rbp),%rsi
  mov    %r14,%rcx
  mov    %r12d,%edi
  call   <f2m_mult@plt>
  mov    %r13,%rdi
  call   <f2m_reduce@plt>
  mov    %r14,%rdi
  call   <f2m_reduce@plt>
  mov    -0x48(%rbp),%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12d,%edi
  call   <f2m_mult@plt>
  mov    -0x48(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12d,%edi
  mov    -0xa8(%rbp),%rcx
  call   <f2m_Add@plt>
  mov    -0xa8(%rbp),%rsi
  mov    %r15,%rdx
  mov    %r12d,%edi
  call   <f2m_square@plt>
  mov    %r15,%rdi
  call   <f2m_reduce@plt>
  mov    -0x60(%rbp),%rdx
  mov    %r15,%rsi
  mov    %r12d,%edi
  call   <copy@plt>
  mov    -0x50(%rbp),%rcx
  mov    %r15,%rdx
  mov    %r12d,%edi
  mov    -0x100(%rbp),%rsi
  call   <f2m_mult@plt>
  mov    -0x50(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x58(%rbp),%rcx
  mov    -0x48(%rbp),%rdx
  mov    %r12d,%edi
  mov    -0x50(%rbp),%rsi
  call   <f2m_Add@plt>
  mov    -0xb0(%rbp),%rdx
  mov    -0x68(%rbp),%rsi
  mov    %r12d,%edi
  call   <f2m_square@plt>
  mov    -0xb0(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0xb8(%rbp),%rdx
  mov    -0x70(%rbp),%rsi
  mov    %r12d,%edi
  call   <f2m_square@plt>
  mov    -0xb8(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x78(%rbp),%rcx
  mov    -0xb8(%rbp),%rdx
  mov    %r12d,%edi
  mov    -0xb0(%rbp),%rsi
  call   <f2m_mult@plt>
  mov    -0x78(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x70(%rbp),%rdx
  mov    -0x78(%rbp),%rsi
  mov    %r12d,%edi
  call   <copy@plt>
  mov    -0xd8(%rbp),%rdx
  mov    -0xb0(%rbp),%rsi
  mov    %r12d,%edi
  call   <f2m_square@plt>
  mov    -0xd8(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0xe0(%rbp),%rdx
  mov    -0xb8(%rbp),%rsi
  mov    %r12d,%edi
  call   <f2m_square@plt>
  mov    -0xe0(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x80(%rbp),%rcx
  mov    -0xe0(%rbp),%rdx
  mov    %r12d,%edi
  mov    -0x108(%rbp),%rsi
  call   <f2m_mult@plt>
  mov    -0x80(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x68(%rbp),%rcx
  mov    -0x80(%rbp),%rdx
  mov    %r12d,%edi
  mov    -0xd8(%rbp),%rsi
  call   <f2m_Add@plt>
  sarl   -0xa0(%rbp)
  subl   $0x1,-0x98(%rbp)
  js     L160
L743:
  cmpl   $0x1f,-0x98(%rbp)
  jne    L620
  mov    -0xcc(%rbp),%ecx
  cmp    %ecx,-0x10c(%rbp)
  je     L1180
L620:
  mov    -0xd0(%rbp),%eax
  test   %eax,%eax
  jle    L189
  mov    %rbx,%rdx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    %rbx,%rdx
  xor    %esi,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    -0x48(%rbp),%rdi
  mov    %rbx,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    -0x50(%rbp),%rdi
  mov    %rbx,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    -0x78(%rbp),%rdi
  mov    %rbx,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    -0x80(%rbp),%rdi
  mov    %rbx,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    -0x88(%rbp),%rdi
  mov    %rbx,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    -0x90(%rbp),%rdi
  mov    %rbx,%rdx
  xor    %esi,%esi
  call   <memset@plt>
L189:
  movslq -0xcc(%rbp),%rax
  mov    -0xf8(%rbp),%rsi
  mov    -0xa0(%rbp),%ecx
  and    (%rsi,%rax,4),%ecx
  jne    L97
  mov    -0x60(%rbp),%rdx
  mov    -0x68(%rbp),%rsi
  mov    %r14,%rcx
  mov    %r12d,%edi
  call   <f2m_mult@plt>
  mov    %r14,%rdi
  call   <f2m_reduce@plt>
  mov    -0x70(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  mov    %r13,%rcx
  mov    %r12d,%edi
  call   <f2m_mult@plt>
  mov    %r13,%rdi
  call   <f2m_reduce@plt>
  mov    -0x48(%rbp),%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12d,%edi
  call   <f2m_mult@plt>
  mov    -0x48(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %r12d,%edi
  mov    -0xa8(%rbp),%rcx
  call   <f2m_Add@plt>
  mov    -0xa8(%rbp),%rsi
  mov    %r15,%rdx
  mov    %r12d,%edi
  call   <f2m_square@plt>
  mov    %r15,%rdi
  call   <f2m_reduce@plt>
  mov    -0x70(%rbp),%rdx
  mov    %r15,%rsi
  mov    %r12d,%edi
  call   <copy@plt>
  mov    -0x50(%rbp),%rcx
  mov    %r15,%rdx
  mov    %r12d,%edi
  mov    -0x100(%rbp),%rsi
  call   <f2m_mult@plt>
  mov    -0x50(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x68(%rbp),%rcx
  mov    -0x48(%rbp),%rdx
  mov    %r12d,%edi
  mov    -0x50(%rbp),%rsi
  call   <f2m_Add@plt>
  mov    -0xc0(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  mov    %r12d,%edi
  call   <f2m_square@plt>
  mov    -0xc0(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0xc8(%rbp),%rdx
  mov    -0x60(%rbp),%rsi
  mov    %r12d,%edi
  call   <f2m_square@plt>
  mov    -0xc8(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x88(%rbp),%rcx
  mov    -0xc8(%rbp),%rdx
  mov    %r12d,%edi
  mov    -0xc0(%rbp),%rsi
  call   <f2m_mult@plt>
  mov    -0x88(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x60(%rbp),%rdx
  mov    -0x88(%rbp),%rsi
  mov    %r12d,%edi
  call   <copy@plt>
  mov    -0xe8(%rbp),%rdx
  mov    -0xc0(%rbp),%rsi
  mov    %r12d,%edi
  call   <f2m_square@plt>
  mov    -0xe8(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0xf0(%rbp),%rdx
  mov    -0xc8(%rbp),%rsi
  mov    %r12d,%edi
  call   <f2m_square@plt>
  mov    -0xf0(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x90(%rbp),%rcx
  mov    -0xf0(%rbp),%rdx
  mov    %r12d,%edi
  mov    -0x108(%rbp),%rsi
  call   <f2m_mult@plt>
  mov    -0x90(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x58(%rbp),%rcx
  mov    -0x90(%rbp),%rdx
  mov    %r12d,%edi
  mov    -0xe8(%rbp),%rsi
  call   <f2m_Add@plt>
  sarl   -0xa0(%rbp)
  subl   $0x1,-0x98(%rbp)
  jns    L743
L160:
  subl   $0x1,-0xcc(%rbp)
  jns    L403
L859:
  mov    -0x120(%rbp),%rbx
  mov    %rsp,%rdx
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  sub    %rbx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L993
L549:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L549
L993:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L684
  orq    $0x0,-0x8(%rsp,%rax,1)
L684:
  mov    -0x120(%rbp),%rbx
  mov    %rsp,%rdx
  mov    %rsp,%r8
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  sub    %rbx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L256
L295:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L295
L256:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L921
  orq    $0x0,-0x8(%rsp,%rax,1)
L921:
  mov    -0x120(%rbp),%rbx
  mov    %rsp,%rdx
  mov    %rsp,-0x80(%rbp)
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  sub    %rbx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L821
L323:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L323
L821:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L532
  orq    $0x0,-0x8(%rsp,%rax,1)
L532:
  mov    -0x120(%rbp),%rbx
  mov    %rsp,%rdx
  mov    %rsp,-0x50(%rbp)
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  sub    %rbx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L1114
L129:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L129
L1114:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L113
  orq    $0x0,-0x8(%rsp,%rax,1)
L113:
  mov    -0x120(%rbp),%rbx
  mov    %rsp,%rdx
  mov    %rsp,-0x88(%rbp)
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  sub    %rbx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L1034
L691:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L691
L1034:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L228
  orq    $0x0,-0x8(%rsp,%rax,1)
L228:
  mov    -0x120(%rbp),%rbx
  mov    %rsp,%rdx
  mov    %rsp,-0x90(%rbp)
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  sub    %rbx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L562
L285:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L285
L562:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L65
  orq    $0x0,-0x8(%rsp,%rax,1)
L65:
  mov    -0x120(%rbp),%rbx
  mov    %rsp,-0x98(%rbp)
  mov    %rsp,%rdx
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  and    $0xfffffffffffffff0,%rax
  sub    %rbx,%rdx
L978:
  cmp    %rdx,%rsp
  je     L328
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L978
  nop
L1180:
  mov    -0xf8(%rbp),%rsi
  mov    %r12d,%edi
  call   <getDegree@plt>
  test   %eax,%eax
  lea    0x1f(%rax),%edx
  cmovns %eax,%edx
  sar    $0x5,%edx
  mov    %edx,-0xcc(%rbp)
  cltd
  shr    $0x1b,%edx
  add    %edx,%eax
  and    $0x1f,%eax
  sub    %edx,%eax
  mov    %eax,-0x98(%rbp)
  jmp    L620
L328:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L884
  orq    $0x0,-0x8(%rsp,%rax,1)
L884:
  mov    -0x120(%rbp),%rax
  mov    %rsp,-0xa0(%rbp)
  mov    %rsp,%rcx
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  and    $0xfffffffffffffff0,%rdx
  sub    %rax,%rcx
L327:
  cmp    %rcx,%rsp
  je     L564
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L327
L564:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L907
  orq    $0x0,-0x8(%rsp,%rax,1)
L907:
  mov    -0x118(%rbp),%rbx
  mov    %rsp,-0xa8(%rbp)
  mov    %rsp,%rdx
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  and    $0xfffffffffffffff0,%rax
  sub    %rbx,%rdx
L880:
  cmp    %rdx,%rsp
  je     L339
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L880
L339:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L14
  orq    $0x0,-0x8(%rsp,%rax,1)
L14:
  mov    -0x118(%rbp),%rbx
  mov    %rsp,%rdx
  mov    %rsp,%r14
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  and    $0xfffffffffffffff0,%rax
  sub    %rbx,%rdx
L1072:
  cmp    %rdx,%rsp
  je     L1094
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1072
L1094:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L841
  orq    $0x0,-0x8(%rsp,%rax,1)
L841:
  mov    -0x118(%rbp),%rbx
  mov    %rsp,-0x48(%rbp)
  mov    %rsp,%rdx
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  and    $0xfffffffffffffff0,%rax
  sub    %rbx,%rdx
L344:
  cmp    %rdx,%rsp
  je     L689
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L344
L689:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L1121
  orq    $0x0,-0x8(%rsp,%rax,1)
L1121:
  mov    -0x118(%rbp),%rbx
  mov    %rsp,-0x78(%rbp)
  mov    %rsp,%rdx
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  and    $0xfffffffffffffff0,%rax
  sub    %rbx,%rdx
L545:
  cmp    %rdx,%rsp
  je     L615
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L545
L615:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L514
  orq    $0x0,-0x8(%rsp,%rax,1)
L514:
  mov    -0x118(%rbp),%rbx
  mov    %rsp,%rdx
  mov    %rsp,%r15
  mov    %rbx,%rax
  and    $0xfffffffffffff000,%rbx
  and    $0xfffffffffffffff0,%rax
  sub    %rbx,%rdx
L290:
  cmp    %rdx,%rsp
  je     L882
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L290
L882:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L729
  orq    $0x0,-0x8(%rsp,%rax,1)
L729:
  mov    -0x118(%rbp),%rax
  mov    %rsp,%rcx
  mov    %rsp,%r13
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  and    $0xfffffffffffffff0,%rdx
  sub    %rax,%rcx
L823:
  cmp    %rcx,%rsp
  je     L1105
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L823
L1105:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L822
  orq    $0x0,-0x8(%rsp,%rax,1)
L822:
  cmpl   $0x0,-0xd0(%rbp)
  mov    %rsp,%rbx
  jle    L1071
  mov    -0x148(%rbp),%rdx
  xor    %esi,%esi
  mov    %r14,%rdi
  mov    %r8,-0xb8(%rbp)
  shl    $0x2,%rdx
  mov    %rdx,-0xb0(%rbp)
  call   <memset@plt>
  mov    -0xb0(%rbp),%rdx
  mov    -0x48(%rbp),%rdi
  xor    %esi,%esi
  call   <memset@plt>
  mov    -0xb0(%rbp),%rdx
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  mov    -0xb0(%rbp),%rdx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    -0xb0(%rbp),%rdx
  xor    %esi,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    -0xb8(%rbp),%r8
L1071:
  mov    -0x128(%rbp),%rdx
  mov    -0x60(%rbp),%rsi
  mov    %r8,%rcx
  mov    %r12d,%edi
  mov    %r8,-0xb0(%rbp)
  call   <f2m_calculateInverse@plt>
  mov    -0x58(%rbp),%rsi
  mov    %r14,%rcx
  mov    %r12d,%edi
  mov    -0xb0(%rbp),%rdx
  call   <f2m_mult@plt>
  mov    %r14,%rdi
  call   <f2m_reduce@plt>
  mov    -0x138(%rbp),%rdx
  mov    %r14,%rsi
  mov    %r12d,%edi
  call   <copy@plt>
  mov    -0x50(%rbp),%rcx
  mov    %r14,%rsi
  mov    %r12d,%edi
  mov    -0x100(%rbp),%rdx
  call   <f2m_Add@plt>
  mov    -0x80(%rbp),%rcx
  mov    -0x70(%rbp),%rsi
  mov    %r12d,%edi
  mov    -0x128(%rbp),%rdx
  call   <f2m_calculateInverse@plt>
  mov    -0x48(%rbp),%r14
  mov    -0x80(%rbp),%rdx
  mov    %r12d,%edi
  mov    -0x68(%rbp),%rsi
  mov    %r14,%rcx
  call   <f2m_mult@plt>
  mov    %r14,%rdi
  mov    %r14,-0x48(%rbp)
  call   <f2m_reduce@plt>
  mov    -0x100(%rbp),%r14
  mov    -0x48(%rbp),%rsi
  mov    %r12d,%edi
  mov    -0x88(%rbp),%rcx
  mov    %r14,%rdx
  call   <f2m_Add@plt>
  mov    -0x78(%rbp),%rdx
  mov    %r14,%rsi
  mov    %r12d,%edi
  call   <f2m_square@plt>
  mov    -0x78(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x50(%rbp),%rdx
  mov    %r15,%rcx
  mov    %r12d,%edi
  mov    -0x88(%rbp),%rsi
  call   <f2m_mult@plt>
  mov    %r15,%rdi
  call   <f2m_reduce@plt>
  mov    -0x78(%rbp),%rdx
  mov    %r15,%rsi
  mov    %r12d,%edi
  mov    -0x90(%rbp),%rcx
  call   <f2m_Add@plt>
  mov    -0x98(%rbp),%r15
  mov    -0x130(%rbp),%rdx
  mov    %r12d,%edi
  mov    -0x90(%rbp),%rsi
  mov    %r15,%rcx
  call   <f2m_Add@plt>
  mov    -0x50(%rbp),%rsi
  mov    %r15,%rdx
  mov    %r13,%rcx
  mov    %r12d,%edi
  call   <f2m_mult@plt>
  mov    %r13,%rdi
  call   <f2m_reduce@plt>
  mov    -0xa0(%rbp),%r15
  mov    %r14,%rsi
  mov    %r12d,%edi
  mov    -0x128(%rbp),%rdx
  mov    %r15,%rcx
  call   <f2m_calculateInverse@plt>
  mov    %r15,%rsi
  mov    %rbx,%rcx
  mov    %r13,%rdx
  mov    %r12d,%edi
  call   <f2m_mult@plt>
  mov    %rbx,%rdi
  call   <f2m_reduce@plt>
  mov    -0xa8(%rbp),%r15
  mov    %rbx,%rsi
  mov    %r12d,%edi
  mov    -0x130(%rbp),%rdx
  mov    %r15,%rcx
  call   <f2m_Add@plt>
  mov    -0x140(%rbp),%rdx
  mov    %r15,%rsi
  mov    %r12d,%edi
  call   <copy@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L710
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L710:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void mult_scalar(uint32_t m, uint32_t *F, uint32_t *a, uint32_t *b, uint32_t *d, uint32_t *xP, uint32_t *yP, uint32_t *xQ, uint32_t *yQ) {
  uint32_t t = (m / 32) + 1;
  uint32_t Xq[t], Zq[t], Xr[t], Zr[t];
  uint32_t y;
  for (y = 0; y < t; y++) {
    Zq[y] = 0x0;
    Zr[y] = 0x0;
    Xq[y] = 0x0;
    Xr[y] = xP[y];
  }
  Zr[0] = 0x1;
  Xq[0] = 0x1;
  uint32_t t2 = t * 2;
  uint32_t XrZqPLUSXqZr[t];
  uint32_t XqZr[t2], XrZq[t2], XqZrXrZq[t2], XrZqPLUSXqZrSquared[t2], xpXrZqPLUSXqZrSquared[t2];
  uint32_t XrSquard[t2], ZrSquard[t2], XrSquardZrSquard[t2], XrPow4[t2], ZrPow4[t2], bZrPow4[t2];
  uint32_t XqSquard[t2], ZqSquard[t2], XqSquardZqSquard[t2], XqPow4[t2], ZqPow4[t2], bZqPow4[t2];
  int i;
  for (i = t - 1; i >= 0; i--) {
    uint32_t bitMask = 0x80000000;
    int y;
    for (y = 31; y >= 0; y--) {
      if ((i == t - 1) && (y == 31)) {
        int deg = getDegree(t, d);
        i = deg / 32;
        y = deg - (i * 32);
      }
      uint32_t z;
      for (z = 0; z < t2; z++) {
        XqZr[z] = 0x0;
        XrZq[z] = 0x0;
        XqZrXrZq[z] = 0x0;
        xpXrZqPLUSXqZrSquared[z] = 0x0;
        XrSquardZrSquard[z] = 0x0;
        bZrPow4[z] = 0x0;
        XqSquardZqSquard[z] = 0x0;
        bZqPow4[z] = 0x0;
      }
      if ((d[i] & bitMask) != 0) {
        f2m_mult(t, Xq, Zr, XqZr);
        f2m_mult(t, Xr, Zq, XrZq);
        f2m_reduce(XqZr);
        f2m_reduce(XrZq);
        f2m_mult(t, XqZr, XrZq, XqZrXrZq);
        f2m_reduce(XqZrXrZq);
        f2m_Add(t, XqZr, XrZq, XrZqPLUSXqZr);
        f2m_square(t, XrZqPLUSXqZr, XrZqPLUSXqZrSquared);
        f2m_reduce(XrZqPLUSXqZrSquared);
        copy(t, XrZqPLUSXqZrSquared, Zq);
        f2m_mult(t, xP, XrZqPLUSXqZrSquared, xpXrZqPLUSXqZrSquared);
        f2m_reduce(xpXrZqPLUSXqZrSquared);
        f2m_Add(t, xpXrZqPLUSXqZrSquared, XqZrXrZq, Xq);
        f2m_square(t, Xr, XrSquard);
        f2m_reduce(XrSquard);
        f2m_square(t, Zr, ZrSquard);
        f2m_reduce(ZrSquard);
        f2m_mult(t, XrSquard, ZrSquard, XrSquardZrSquard);
        f2m_reduce(XrSquardZrSquard);
        copy(t, XrSquardZrSquard, Zr);
        f2m_square(t, XrSquard, XrPow4);
        f2m_reduce(XrPow4);
        f2m_square(t, ZrSquard, ZrPow4);
        f2m_reduce(ZrPow4);
        f2m_mult(t, b, ZrPow4, bZrPow4);
        f2m_reduce(bZrPow4);
        f2m_Add(t, XrPow4, bZrPow4, Xr);
      } else {
        f2m_mult(t, Xr, Zq, XrZq);
        f2m_reduce(XrZq);
        f2m_mult(t, Xq, Zr, XqZr);
        f2m_reduce(XqZr);
        f2m_mult(t, XqZr, XrZq, XqZrXrZq);
        f2m_reduce(XqZrXrZq);
        f2m_Add(t, XqZr, XrZq, XrZqPLUSXqZr);
        f2m_square(t, XrZqPLUSXqZr, XrZqPLUSXqZrSquared);
        f2m_reduce(XrZqPLUSXqZrSquared);
        copy(t, XrZqPLUSXqZrSquared, Zr);
        f2m_mult(t, xP, XrZqPLUSXqZrSquared, xpXrZqPLUSXqZrSquared);
        f2m_reduce(xpXrZqPLUSXqZrSquared);
        f2m_Add(t, xpXrZqPLUSXqZrSquared, XqZrXrZq, Xr);
        f2m_square(t, Xq, XqSquard);
        f2m_reduce(XqSquard);
        f2m_square(t, Zq, ZqSquard);
        f2m_reduce(ZqSquard);
        f2m_mult(t, XqSquard, ZqSquard, XqSquardZqSquard);
        f2m_reduce(XqSquardZqSquard);
        copy(t, XqSquardZqSquard, Zq);
        f2m_square(t, XqSquard, XqPow4);
        f2m_reduce(XqPow4);
        f2m_square(t, ZqSquard, ZqPow4);
        f2m_reduce(ZqPow4);
        f2m_mult(t, b, ZqPow4, bZqPow4);
        f2m_reduce(bZqPow4);
        f2m_Add(t, XqPow4, bZqPow4, Xq);
      }
      bitMask >>= 1;
    }
  }
  uint32_t ZqInverse[t], ZrInverse[t], Xq_ZqInverse_PLUS_xP[t], Xr_ZrInverse_PLUS_xP[t], term2[t], term3[t], xPInverse[t], result[t];
  uint32_t Xq_ZqInverse[t2], Xr_ZrInverse[t2], xPSquared[t2], term1[t2], term4[t2], term5[t2];
  for (y = 0; y < t2; y++) {
    Xq_ZqInverse[y] = 0x0;
    Xr_ZrInverse[y] = 0x0;
    term1[y] = 0x0;
    term4[y] = 0x0;
    term5[y] = 0x0;
  }
  f2m_calculateInverse(t, Zq, F, ZqInverse);
  f2m_mult(t, Xq, ZqInverse, Xq_ZqInverse);
  f2m_reduce(Xq_ZqInverse);
  copy(t, Xq_ZqInverse, xQ);
  f2m_Add(t, Xq_ZqInverse, xP, Xq_ZqInverse_PLUS_xP);
  f2m_calculateInverse(t, Zr, F, ZrInverse);
  f2m_mult(t, Xr, ZrInverse, Xr_ZrInverse);
  f2m_reduce(Xr_ZrInverse);
  f2m_Add(t, Xr_ZrInverse, xP, Xr_ZrInverse_PLUS_xP);
  f2m_square(t, xP, xPSquared);
  f2m_reduce(xPSquared);
  f2m_mult(t, Xr_ZrInverse_PLUS_xP, Xq_ZqInverse_PLUS_xP, term1);
  f2m_reduce(term1);
  f2m_Add(t, term1, xPSquared, term2);
  f2m_Add(t, term2, yP, term3);
  f2m_mult(t, Xq_ZqInverse_PLUS_xP, term3, term4);
  f2m_reduce(term4);
  f2m_calculateInverse(t, xP, F, xPInverse);
  f2m_mult(t, xPInverse, term4, term5);
  f2m_reduce(term5);
  f2m_Add(t, term5, yP, result);
  copy(t, result, yQ);
}
```