user: 请将以下的汇编代码转换成C语言代码：

```asm
<mult_scalar>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x118,%rsp
  mov    %rsi,-0x128(%rbp)
  mov    %rcx,-0x100(%rbp)
  mov    %r8,-0xf0(%rbp)
  mov    %r9,-0xf8(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x130(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x138(%rbp)
  mov    0x20(%rbp),%rax
  mov    %rax,-0x140(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    0x1f(%rdi),%eax
  test   %edi,%edi
  cmovns %edi,%eax
  sar    $0x5,%eax
  mov    %eax,-0x10c(%rbp)
  lea    0x1(%rax),%r15d
  movslq %r15d,%rax
  shl    $0x2,%rax
  mov    %rax,-0x120(%rbp)
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L950:
  cmp    %rcx,%rsp
  je     L994
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L950
L994:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L817
  orq    $0x0,-0x8(%rsp,%rdx,1)
L817:
  lea    0x3(%rsp),%rax
  mov    %rax,%rsi
  shr    $0x2,%rsi
  and    $0xfffffffffffffffc,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x120(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L320:
  cmp    %rcx,%rsp
  je     L167
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L320
L167:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L563
  orq    $0x0,-0x8(%rsp,%rdx,1)
L563:
  mov    %rsp,-0x58(%rbp)
  mov    -0x120(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L12:
  cmp    %rcx,%rsp
  je     L200
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L12
L200:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L423
  orq    $0x0,-0x8(%rsp,%rdx,1)
L423:
  mov    %rsp,-0x60(%rbp)
  mov    -0x120(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L545:
  cmp    %rcx,%rsp
  je     L61
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L545
L61:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L1046
  orq    $0x0,-0x8(%rsp,%rdx,1)
L1046:
  lea    0x3(%rsp),%rax
  mov    %rax,%r8
  shr    $0x2,%r8
  and    $0xfffffffffffffffc,%rax
  mov    %rax,%r12
  mov    %rax,-0x68(%rbp)
  test   %r15d,%r15d
  jle    L544
  mov    -0x10c(%rbp),%eax
  lea    0x4(,%rax,4),%rcx
  mov    $0x0,%eax
  mov    -0xf8(%rbp),%r9
  mov    -0x50(%rbp),%r10
  mov    -0x58(%rbp),%r11
  mov    -0x60(%rbp),%rbx
L86:
  movl   $0x0,(%r11,%rax,1)
  movl   $0x0,(%r12,%rax,1)
  movl   $0x0,(%r10,%rax,1)
  mov    (%r9,%rax,1),%edx
  mov    %edx,(%rbx,%rax,1)
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L86
L544:
  movl   $0x1,0x0(,%r8,4)
  movl   $0x1,0x0(,%rsi,4)
  lea    (%r15,%r15,1),%eax
  mov    %eax,-0xc8(%rbp)
  mov    -0x120(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L1196:
  cmp    %rcx,%rsp
  je     L1
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1196
L1:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L504
  orq    $0x0,-0x8(%rsp,%rdx,1)
L504:
  mov    %rsp,-0xa0(%rbp)
  movslq -0xc8(%rbp),%rax
  shl    $0x2,%rax
  mov    %rax,-0x118(%rbp)
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L1079:
  cmp    %rcx,%rsp
  je     L836
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1079
L836:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L814
  orq    $0x0,-0x8(%rsp,%rdx,1)
L814:
  mov    %rsp,%r14
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L220:
  cmp    %rcx,%rsp
  je     L153
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L220
L153:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L586
  orq    $0x0,-0x8(%rsp,%rdx,1)
L586:
  mov    %rsp,%r13
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L1230:
  cmp    %rcx,%rsp
  je     L431
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1230
L431:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L1099
  orq    $0x0,-0x8(%rsp,%rdx,1)
L1099:
  mov    %rsp,%rbx
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L1210:
  cmp    %rcx,%rsp
  je     L358
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1210
L358:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L920
  orq    $0x0,-0x8(%rsp,%rdx,1)
L920:
  mov    %rsp,-0x48(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L633:
  cmp    %rcx,%rsp
  je     L1031
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L633
L1031:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L350
  orq    $0x0,-0x8(%rsp,%rdx,1)
L350:
  mov    %rsp,%r12
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L637:
  cmp    %rcx,%rsp
  je     L71
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L637
L71:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L724
  orq    $0x0,-0x8(%rsp,%rdx,1)
L724:
  mov    %rsp,-0xa8(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L37:
  cmp    %rcx,%rsp
  je     L927
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L37
L927:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L228
  orq    $0x0,-0x8(%rsp,%rdx,1)
L228:
  mov    %rsp,-0xb0(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L123:
  cmp    %rcx,%rsp
  je     L594
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L123
L594:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L1114
  orq    $0x0,-0x8(%rsp,%rdx,1)
L1114:
  mov    %rsp,-0x70(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L1086:
  cmp    %rcx,%rsp
  je     L150
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1086
L150:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L974
  orq    $0x0,-0x8(%rsp,%rdx,1)
L974:
  mov    %rsp,-0xd0(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L891:
  cmp    %rcx,%rsp
  je     L764
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L891
L764:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L313
  orq    $0x0,-0x8(%rsp,%rdx,1)
L313:
  mov    %rsp,-0xd8(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L204:
  cmp    %rcx,%rsp
  je     L547
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L204
L547:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L281
  orq    $0x0,-0x8(%rsp,%rdx,1)
L281:
  mov    %rsp,-0x78(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L1015:
  cmp    %rcx,%rsp
  je     L163
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1015
L163:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L1143
  orq    $0x0,-0x8(%rsp,%rdx,1)
L1143:
  mov    %rsp,-0xb8(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L703:
  cmp    %rcx,%rsp
  je     L896
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L703
L896:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L866
  orq    $0x0,-0x8(%rsp,%rdx,1)
L866:
  mov    %rsp,-0xc0(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L421:
  cmp    %rcx,%rsp
  je     L158
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L421
L158:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L217
  orq    $0x0,-0x8(%rsp,%rdx,1)
L217:
  mov    %rsp,-0x80(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L1078:
  cmp    %rcx,%rsp
  je     L514
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1078
L514:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L160
  orq    $0x0,-0x8(%rsp,%rdx,1)
L160:
  mov    %rsp,-0xe0(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L957:
  cmp    %rcx,%rsp
  je     L1168
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L957
L1168:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L469
  orq    $0x0,-0x8(%rsp,%rdx,1)
L469:
  mov    %rsp,-0xe8(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L752:
  cmp    %rcx,%rsp
  je     L692
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L752
L692:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L685
  orq    $0x0,-0x8(%rsp,%rdx,1)
L685:
  mov    %rsp,-0x88(%rbp)
  mov    -0x10c(%rbp),%eax
  mov    %eax,-0xc4(%rbp)
  mov    -0xc8(%rbp),%eax
  mov    %rax,-0x108(%rbp)
  cmp    $0xffffffe1,%edi
  jge    L791
L1001:
  mov    -0x120(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L931:
  cmp    %rcx,%rsp
  je     L172
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L931
L1195:
  mov    -0xf0(%rbp),%rsi
  mov    %r15d,%edi
  call   <getDegree@plt>
  lea    0x1f(%rax),%edx
  test   %eax,%eax
  cmovns %eax,%edx
  sar    $0x5,%edx
  mov    %edx,-0xc4(%rbp)
  cltd
  shr    $0x1b,%edx
  add    %edx,%eax
  and    $0x1f,%eax
  sub    %edx,%eax
  mov    %eax,-0x90(%rbp)
L776:
  cmpl   $0x0,-0xc8(%rbp)
  jle    L1138
  mov    $0x0,%eax
  mov    -0x70(%rbp),%rdx
  mov    -0x78(%rbp),%rcx
  mov    -0x80(%rbp),%rsi
  mov    -0x88(%rbp),%rdi
  mov    -0x108(%rbp),%r8
L842:
  movl   $0x0,(%r14,%rax,4)
  movl   $0x0,0x0(%r13,%rax,4)
  movl   $0x0,(%rbx,%rax,4)
  movl   $0x0,(%r12,%rax,4)
  movl   $0x0,(%rdx,%rax,4)
  movl   $0x0,(%rcx,%rax,4)
  movl   $0x0,(%rsi,%rax,4)
  movl   $0x0,(%rdi,%rax,4)
  add    $0x1,%rax
  cmp    %rax,%r8
  jne    L842
L1138:
  movslq -0xc4(%rbp),%rax
  mov    -0xf0(%rbp),%rsi
  mov    -0x98(%rbp),%ecx
  and    (%rsi,%rax,4),%ecx
  je     L717
  mov    %r14,%rcx
  mov    -0x68(%rbp),%rdx
  mov    -0x50(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %r13,%rcx
  mov    -0x58(%rbp),%rdx
  mov    -0x60(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %r14,%rdi
  call   <f2m_reduce@plt>
  mov    %r13,%rdi
  call   <f2m_reduce@plt>
  mov    %rbx,%rcx
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %rbx,%rdi
  call   <f2m_reduce@plt>
  mov    -0xa0(%rbp),%rcx
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  mov    -0x48(%rbp),%rdx
  mov    -0xa0(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_square@plt>
  mov    -0x48(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x58(%rbp),%rdx
  mov    -0x48(%rbp),%rsi
  mov    %r15d,%edi
  call   <copy@plt>
  mov    %r12,%rcx
  mov    -0x48(%rbp),%rdx
  mov    -0xf8(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %r12,%rdi
  call   <f2m_reduce@plt>
  mov    -0x50(%rbp),%rcx
  mov    %rbx,%rdx
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  mov    -0xa8(%rbp),%rdx
  mov    -0x60(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_square@plt>
  mov    -0xa8(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0xb0(%rbp),%rdx
  mov    -0x68(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_square@plt>
  mov    -0xb0(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x70(%rbp),%rcx
  mov    -0xb0(%rbp),%rdx
  mov    -0xa8(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    -0x70(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x68(%rbp),%rdx
  mov    -0x70(%rbp),%rsi
  mov    %r15d,%edi
  call   <copy@plt>
  mov    -0xd0(%rbp),%rdx
  mov    -0xa8(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_square@plt>
  mov    -0xd0(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0xd8(%rbp),%rdx
  mov    -0xb0(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_square@plt>
  mov    -0xd8(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x78(%rbp),%rcx
  mov    -0xd8(%rbp),%rdx
  mov    -0x100(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    -0x78(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x60(%rbp),%rcx
  mov    -0x78(%rbp),%rdx
  mov    -0xd0(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
L1093:
  sarl   -0x98(%rbp)
  subl   $0x1,-0x90(%rbp)
  js     L1213
L809:
  cmpl   $0x1f,-0x90(%rbp)
  jne    L776
  mov    -0xc4(%rbp),%ecx
  cmp    %ecx,-0x10c(%rbp)
  jne    L776
  jmp    L1195
L717:
  mov    %r13,%rcx
  mov    -0x58(%rbp),%rdx
  mov    -0x60(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %r13,%rdi
  call   <f2m_reduce@plt>
  mov    %r14,%rcx
  mov    -0x68(%rbp),%rdx
  mov    -0x50(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %r14,%rdi
  call   <f2m_reduce@plt>
  mov    %rbx,%rcx
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %rbx,%rdi
  call   <f2m_reduce@plt>
  mov    -0xa0(%rbp),%rcx
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  mov    -0x48(%rbp),%rdx
  mov    -0xa0(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_square@plt>
  mov    -0x48(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x68(%rbp),%rdx
  mov    -0x48(%rbp),%rsi
  mov    %r15d,%edi
  call   <copy@plt>
  mov    %r12,%rcx
  mov    -0x48(%rbp),%rdx
  mov    -0xf8(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %r12,%rdi
  call   <f2m_reduce@plt>
  mov    -0x60(%rbp),%rcx
  mov    %rbx,%rdx
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  mov    -0xb8(%rbp),%rdx
  mov    -0x50(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_square@plt>
  mov    -0xb8(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0xc0(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_square@plt>
  mov    -0xc0(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x80(%rbp),%rcx
  mov    -0xc0(%rbp),%rdx
  mov    -0xb8(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    -0x80(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x58(%rbp),%rdx
  mov    -0x80(%rbp),%rsi
  mov    %r15d,%edi
  call   <copy@plt>
  mov    -0xe0(%rbp),%rdx
  mov    -0xb8(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_square@plt>
  mov    -0xe0(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0xe8(%rbp),%rdx
  mov    -0xc0(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_square@plt>
  mov    -0xe8(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x88(%rbp),%rcx
  mov    -0xe8(%rbp),%rdx
  mov    -0x100(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    -0x88(%rbp),%rdi
  call   <f2m_reduce@plt>
  mov    -0x50(%rbp),%rcx
  mov    -0x88(%rbp),%rdx
  mov    -0xe0(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  jmp    L1093
L1213:
  subl   $0x1,-0xc4(%rbp)
  js     L1001
L791:
  movl   $0x1f,-0x90(%rbp)
  movl   $0x80000000,-0x98(%rbp)
  jmp    L809
L172:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L407
  orq    $0x0,-0x8(%rsp,%rdx,1)
L407:
  mov    %rsp,-0x70(%rbp)
  mov    -0x120(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L280:
  cmp    %rcx,%rsp
  je     L542
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L280
L542:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L1058
  orq    $0x0,-0x8(%rsp,%rdx,1)
L1058:
  mov    %rsp,-0x98(%rbp)
  mov    -0x120(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L959:
  cmp    %rcx,%rsp
  je     L227
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L959
L227:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L568
  orq    $0x0,-0x8(%rsp,%rdx,1)
L568:
  mov    %rsp,-0x78(%rbp)
  mov    -0x120(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L66:
  cmp    %rcx,%rsp
  je     L841
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L66
L841:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L1164
  orq    $0x0,-0x8(%rsp,%rdx,1)
L1164:
  mov    %rsp,-0x80(%rbp)
  mov    -0x120(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L900:
  cmp    %rcx,%rsp
  je     L1220
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L900
L1220:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L1077
  orq    $0x0,-0x8(%rsp,%rdx,1)
L1077:
  mov    %rsp,-0x88(%rbp)
  mov    -0x120(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L564:
  cmp    %rcx,%rsp
  je     L261
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L564
L261:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L251
  orq    $0x0,-0x8(%rsp,%rdx,1)
L251:
  mov    %rsp,-0x90(%rbp)
  mov    -0x120(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L352:
  cmp    %rcx,%rsp
  je     L1178
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L352
L1178:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L408
  orq    $0x0,-0x8(%rsp,%rdx,1)
L408:
  mov    %rsp,-0xa0(%rbp)
  mov    -0x120(%rbp),%rax
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffffff0,%rdx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L807:
  cmp    %rcx,%rsp
  je     L1144
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L807
L1144:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L186
  orq    $0x0,-0x8(%rsp,%rax,1)
L186:
  mov    %rsp,-0xa8(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L474:
  cmp    %rcx,%rsp
  je     L651
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L474
L651:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L201
  orq    $0x0,-0x8(%rsp,%rdx,1)
L201:
  mov    %rsp,%rbx
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L223:
  cmp    %rcx,%rsp
  je     L248
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L223
L248:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L74
  orq    $0x0,-0x8(%rsp,%rdx,1)
L74:
  mov    %rsp,%r12
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L1065:
  cmp    %rcx,%rsp
  je     L92
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1065
L92:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L1119
  orq    $0x0,-0x8(%rsp,%rdx,1)
L1119:
  mov    %rsp,-0x48(%rbp)
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L17:
  cmp    %rcx,%rsp
  je     L1061
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L17
L1061:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L893
  orq    $0x0,-0x8(%rsp,%rdx,1)
L893:
  mov    %rsp,%r13
  mov    -0x118(%rbp),%rax
  lea    0xf(%rax),%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffffff0,%rax
  and    $0xfffffffffffff000,%rdx
  mov    %rsp,%rcx
  sub    %rdx,%rcx
L1118:
  cmp    %rcx,%rsp
  je     L110
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1118
L110:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L403
  orq    $0x0,-0x8(%rsp,%rdx,1)
L403:
  mov    %rsp,%r14
  mov    -0x118(%rbp),%rax
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffffff0,%rdx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L1082:
  cmp    %rcx,%rsp
  je     L1239
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L1082
L1239:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L827
  orq    $0x0,-0x8(%rsp,%rax,1)
L827:
  mov    %rsp,%rcx
  mov    %rcx,-0xb0(%rbp)
  mov    -0xc8(%rbp),%eax
  test   %eax,%eax
  jle    L265
  mov    %eax,%eax
  mov    $0x0,%edx
L58:
  movl   $0x0,(%rbx,%rdx,4)
  movl   $0x0,(%r12,%rdx,4)
  movl   $0x0,0x0(%r13,%rdx,4)
  movl   $0x0,(%r14,%rdx,4)
  movl   $0x0,(%rcx,%rdx,4)
  add    $0x1,%rdx
  cmp    %rdx,%rax
  jne    L58
L265:
  mov    -0x70(%rbp),%rcx
  mov    -0x128(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_calculateInverse@plt>
  mov    %rbx,%rcx
  mov    -0x70(%rbp),%rdx
  mov    -0x50(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %rbx,%rdi
  call   <f2m_reduce@plt>
  mov    -0x138(%rbp),%rdx
  mov    %rbx,%rsi
  mov    %r15d,%edi
  call   <copy@plt>
  mov    -0x78(%rbp),%rcx
  mov    -0xf8(%rbp),%rdx
  mov    %rbx,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  mov    -0x98(%rbp),%rbx
  mov    %rbx,%rcx
  mov    -0x128(%rbp),%rdx
  mov    -0x68(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_calculateInverse@plt>
  mov    %r12,%rcx
  mov    %rbx,%rdx
  mov    -0x60(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %r12,%rdi
  call   <f2m_reduce@plt>
  mov    -0x80(%rbp),%rcx
  mov    -0xf8(%rbp),%rbx
  mov    %rbx,%rdx
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  mov    -0x48(%rbp),%r12
  mov    %r12,%rdx
  mov    %rbx,%rsi
  mov    %r15d,%edi
  call   <f2m_square@plt>
  mov    %r12,-0x48(%rbp)
  mov    %r12,%rdi
  call   <f2m_reduce@plt>
  mov    %r13,%rcx
  mov    -0x78(%rbp),%r12
  mov    %r12,%rdx
  mov    -0x80(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %r13,%rdi
  call   <f2m_reduce@plt>
  mov    -0x88(%rbp),%rcx
  mov    -0x48(%rbp),%rdx
  mov    %r13,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  mov    -0x90(%rbp),%rcx
  mov    -0x130(%rbp),%r13
  mov    %r13,%rdx
  mov    -0x88(%rbp),%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  mov    %r14,%rcx
  mov    -0x90(%rbp),%rdx
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %r14,%rdi
  call   <f2m_reduce@plt>
  mov    -0xa0(%rbp),%r12
  mov    %r12,%rcx
  mov    -0x128(%rbp),%rdx
  mov    %rbx,%rsi
  mov    %r15d,%edi
  call   <f2m_calculateInverse@plt>
  mov    -0xb0(%rbp),%rbx
  mov    %rbx,%rcx
  mov    %r14,%rdx
  mov    %r12,%rsi
  mov    %r15d,%edi
  call   <f2m_mult@plt>
  mov    %rbx,%rdi
  call   <f2m_reduce@plt>
  mov    -0xa8(%rbp),%r14
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %rbx,%rsi
  mov    %r15d,%edi
  call   <f2m_Add@plt>
  mov    -0x140(%rbp),%rdx
  mov    %r14,%rsi
  mov    %r15d,%edi
  call   <copy@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L826
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L826:
  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);
}
```