user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<ss_swapmerge>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x480,%rsp
  mov    %rdi,-0x458(%rbp)
  mov    %rsi,-0x460(%rbp)
  mov    %rdx,-0x468(%rbp)
  mov    %rcx,-0x470(%rbp)
  mov    %r8,-0x478(%rbp)
  mov    %r9,-0x480(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x438(%rbp)
  movl   $0x0,-0x43c(%rbp)
L158:
  mov    -0x478(%rbp),%rax
  sub    -0x470(%rbp),%rax
  sar    $0x2,%rax
  mov    %rax,%rdx
  mov    0x10(%rbp),%eax
  cltq
  cmp    %rax,%rdx
  jg     L260
  mov    -0x468(%rbp),%rax
  cmp    -0x470(%rbp),%rax
  jae    L190
  mov    -0x470(%rbp),%rax
  cmp    -0x478(%rbp),%rax
  jae    L190
  mov    -0x480(%rbp),%r9
  mov    -0x478(%rbp),%r8
  mov    -0x470(%rbp),%rcx
  mov    -0x468(%rbp),%rdx
  mov    -0x460(%rbp),%rsi
  mov    -0x458(%rbp),%rax
  sub    $0x8,%rsp
  mov    0x18(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ss_mergebackward@plt>
  add    $0x10,%rsp
L190:
  mov    -0x438(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L587
  mov    -0x438(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L549
  mov    -0x468(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x460(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x468(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L532
  mov    -0x468(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  jmp    L277
L532:
  mov    -0x468(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  not    %eax
  cltq
  shl    $0x2,%rax
L277:
  mov    -0x460(%rbp),%rdx
  lea    (%rax,%rdx,1),%rsi
  mov    0x18(%rbp),%edx
  mov    -0x458(%rbp),%rax
  mov    %edx,%ecx
  mov    %rdi,%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ss_compare@plt>
  test   %eax,%eax
  jne    L549
L587:
  mov    -0x468(%rbp),%rax
  mov    (%rax),%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x468(%rbp),%rax
  mov    %edx,(%rax)
L549:
  mov    -0x438(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L266
  mov    -0x478(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x460(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x478(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L376
  mov    -0x478(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  jmp    L418
L376:
  mov    -0x478(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  not    %eax
  cltq
  shl    $0x2,%rax
L418:
  mov    -0x460(%rbp),%rdx
  lea    (%rax,%rdx,1),%rsi
  mov    0x18(%rbp),%edx
  mov    -0x458(%rbp),%rax
  mov    %edx,%ecx
  mov    %rdi,%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ss_compare@plt>
  test   %eax,%eax
  jne    L266
  mov    -0x478(%rbp),%rax
  mov    (%rax),%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x478(%rbp),%rax
  mov    %edx,(%rax)
L266:
  cmpl   $0x0,-0x43c(%rbp)
  je     L480
  subl   $0x1,-0x43c(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x410,%rax
  mov    (%rax),%rax
  mov    %rax,-0x468(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x408,%rax
  mov    (%rax),%rax
  mov    %rax,-0x470(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x400,%rax
  mov    (%rax),%rax
  mov    %rax,-0x478(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x3f8,%rax
  mov    (%rax),%eax
  mov    %eax,-0x438(%rbp)
  jmp    L595
L260:
  mov    -0x470(%rbp),%rax
  sub    -0x468(%rbp),%rax
  sar    $0x2,%rax
  mov    %rax,%rdx
  mov    0x10(%rbp),%eax
  cltq
  cmp    %rax,%rdx
  jg     L421
  mov    -0x468(%rbp),%rax
  cmp    -0x470(%rbp),%rax
  jae    L149
  mov    -0x480(%rbp),%r9
  mov    -0x478(%rbp),%r8
  mov    -0x470(%rbp),%rcx
  mov    -0x468(%rbp),%rdx
  mov    -0x460(%rbp),%rsi
  mov    -0x458(%rbp),%rax
  sub    $0x8,%rsp
  mov    0x18(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ss_mergeforward@plt>
  add    $0x10,%rsp
L149:
  mov    -0x438(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L366
  mov    -0x438(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L33
  mov    -0x468(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x460(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x468(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L602
  mov    -0x468(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  jmp    L471
L602:
  mov    -0x468(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  not    %eax
  cltq
  shl    $0x2,%rax
L471:
  mov    -0x460(%rbp),%rdx
  lea    (%rax,%rdx,1),%rsi
  mov    0x18(%rbp),%edx
  mov    -0x458(%rbp),%rax
  mov    %edx,%ecx
  mov    %rdi,%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ss_compare@plt>
  test   %eax,%eax
  jne    L33
L366:
  mov    -0x468(%rbp),%rax
  mov    (%rax),%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x468(%rbp),%rax
  mov    %edx,(%rax)
L33:
  mov    -0x438(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L504
  mov    -0x478(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x460(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x478(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L198
  mov    -0x478(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  jmp    L196
L198:
  mov    -0x478(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  not    %eax
  cltq
  shl    $0x2,%rax
L196:
  mov    -0x460(%rbp),%rdx
  lea    (%rax,%rdx,1),%rsi
  mov    0x18(%rbp),%edx
  mov    -0x458(%rbp),%rax
  mov    %edx,%ecx
  mov    %rdi,%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ss_compare@plt>
  test   %eax,%eax
  jne    L504
  mov    -0x478(%rbp),%rax
  mov    (%rax),%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x478(%rbp),%rax
  mov    %edx,(%rax)
L504:
  cmpl   $0x0,-0x43c(%rbp)
  je     L489
  subl   $0x1,-0x43c(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x410,%rax
  mov    (%rax),%rax
  mov    %rax,-0x468(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x408,%rax
  mov    (%rax),%rax
  mov    %rax,-0x470(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x400,%rax
  mov    (%rax),%rax
  mov    %rax,-0x478(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x3f8,%rax
  mov    (%rax),%eax
  mov    %eax,-0x438(%rbp)
  jmp    L595
L421:
  movl   $0x0,-0x448(%rbp)
  mov    -0x470(%rbp),%rax
  sub    -0x468(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x478(%rbp),%rax
  sub    -0x470(%rbp),%rax
  cmp    %rax,%rdx
  jge    L492
  mov    -0x470(%rbp),%rax
  sub    -0x468(%rbp),%rax
  sar    $0x2,%rax
  jmp    L511
L492:
  mov    -0x478(%rbp),%rax
  sub    -0x470(%rbp),%rax
  sar    $0x2,%rax
L511:
  mov    %eax,-0x444(%rbp)
  mov    -0x444(%rbp),%eax
  sar    %eax
  mov    %eax,-0x440(%rbp)
  jmp    L464
L535:
  mov    -0x448(%rbp),%eax
  cltq
  shl    $0x2,%rax
  neg    %rax
  mov    %rax,%rdx
  mov    -0x440(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x470(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L292
  mov    -0x448(%rbp),%eax
  cltq
  shl    $0x2,%rax
  neg    %rax
  mov    %rax,%rdx
  mov    -0x440(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x470(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  jmp    L71
L292:
  mov    -0x448(%rbp),%eax
  cltq
  shl    $0x2,%rax
  neg    %rax
  mov    %rax,%rdx
  mov    -0x440(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x470(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  not    %eax
  cltq
  shl    $0x2,%rax
L71:
  mov    -0x460(%rbp),%rdx
  lea    (%rax,%rdx,1),%rdi
  mov    -0x448(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x440(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x470(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L617
  mov    -0x448(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x440(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x470(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  jmp    L589
L617:
  mov    -0x448(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x440(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x470(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  not    %eax
  cltq
  shl    $0x2,%rax
L589:
  mov    -0x460(%rbp),%rdx
  lea    (%rax,%rdx,1),%rsi
  mov    0x18(%rbp),%edx
  mov    -0x458(%rbp),%rax
  mov    %edx,%ecx
  mov    %rdi,%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ss_compare@plt>
  test   %eax,%eax
  jns    L457
  mov    -0x440(%rbp),%eax
  add    $0x1,%eax
  add    %eax,-0x448(%rbp)
  mov    -0x444(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  sub    %eax,-0x440(%rbp)
L457:
  mov    -0x440(%rbp),%eax
  mov    %eax,-0x444(%rbp)
  sarl   -0x440(%rbp)
L464:
  cmpl   $0x0,-0x444(%rbp)
  jg     L535
  cmpl   $0x0,-0x448(%rbp)
  jle    L234
  mov    -0x448(%rbp),%eax
  cltq
  shl    $0x2,%rax
  neg    %rax
  mov    %rax,%rdx
  mov    -0x470(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x420(%rbp)
  mov    -0x448(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x470(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x418(%rbp)
  mov    -0x448(%rbp),%edx
  mov    -0x470(%rbp),%rcx
  mov    -0x420(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ss_blockswap@plt>
  mov    -0x470(%rbp),%rax
  mov    %rax,-0x428(%rbp)
  mov    -0x428(%rbp),%rax
  mov    %rax,-0x430(%rbp)
  movl   $0x0,-0x434(%rbp)
  mov    -0x418(%rbp),%rax
  cmp    -0x478(%rbp),%rax
  jae    L127
  mov    -0x418(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jns    L251
  mov    -0x418(%rbp),%rax
  mov    (%rax),%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x418(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x468(%rbp),%rax
  cmp    -0x420(%rbp),%rax
  jae    L473
  nop
L113:
  subq   $0x4,-0x430(%rbp)
  mov    -0x430(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L113
  orl    $0x4,-0x434(%rbp)
L473:
  orl    $0x1,-0x434(%rbp)
  jmp    L127
L251:
  mov    -0x468(%rbp),%rax
  cmp    -0x420(%rbp),%rax
  jae    L127
  jmp    L354
L369:
  addq   $0x4,-0x428(%rbp)
L354:
  mov    -0x428(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L369
  orl    $0x2,-0x434(%rbp)
L127:
  mov    -0x430(%rbp),%rax
  sub    -0x468(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x478(%rbp),%rax
  sub    -0x428(%rbp),%rax
  cmp    %rax,%rdx
  jg     L221
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  lea    -0x410(%rax),%rdx
  mov    -0x428(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  lea    -0x408(%rax),%rdx
  mov    -0x418(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  lea    -0x400(%rax),%rdx
  mov    -0x478(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x434(%rbp),%eax
  and    $0x3,%eax
  mov    %eax,%esi
  mov    -0x438(%rbp),%eax
  and    $0x4,%eax
  mov    %eax,%ecx
  mov    -0x43c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x43c(%rbp)
  or     %ecx,%esi
  mov    %esi,%edx
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x3f8,%rax
  mov    %edx,(%rax)
  mov    -0x420(%rbp),%rax
  mov    %rax,-0x470(%rbp)
  mov    -0x430(%rbp),%rax
  mov    %rax,-0x478(%rbp)
  mov    -0x438(%rbp),%eax
  and    $0x3,%eax
  mov    %eax,%edx
  mov    -0x434(%rbp),%eax
  and    $0x4,%eax
  or     %edx,%eax
  mov    %eax,-0x438(%rbp)
  jmp    L158
L221:
  mov    -0x434(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L25
  mov    -0x428(%rbp),%rax
  cmp    -0x470(%rbp),%rax
  jne    L25
  xorl   $0x6,-0x434(%rbp)
L25:
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  lea    -0x410(%rax),%rdx
  mov    -0x468(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  lea    -0x408(%rax),%rdx
  mov    -0x420(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  lea    -0x400(%rax),%rdx
  mov    -0x430(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x438(%rbp),%eax
  and    $0x3,%eax
  mov    %eax,%esi
  mov    -0x434(%rbp),%eax
  and    $0x4,%eax
  mov    %eax,%ecx
  mov    -0x43c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x43c(%rbp)
  or     %ecx,%esi
  mov    %esi,%edx
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x3f8,%rax
  mov    %edx,(%rax)
  mov    -0x428(%rbp),%rax
  mov    %rax,-0x468(%rbp)
  mov    -0x418(%rbp),%rax
  mov    %rax,-0x470(%rbp)
  mov    -0x434(%rbp),%eax
  and    $0x3,%eax
  mov    %eax,%edx
  mov    -0x438(%rbp),%eax
  and    $0x4,%eax
  or     %edx,%eax
  mov    %eax,-0x438(%rbp)
  jmp    L158
L234:
  mov    -0x470(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x460(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x470(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L630
  mov    -0x470(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  jmp    L72
L630:
  mov    -0x470(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  not    %eax
  cltq
  shl    $0x2,%rax
L72:
  mov    -0x460(%rbp),%rdx
  lea    (%rax,%rdx,1),%rsi
  mov    0x18(%rbp),%edx
  mov    -0x458(%rbp),%rax
  mov    %edx,%ecx
  mov    %rdi,%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ss_compare@plt>
  test   %eax,%eax
  jne    L477
  mov    -0x470(%rbp),%rax
  mov    (%rax),%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x470(%rbp),%rax
  mov    %edx,(%rax)
L477:
  mov    -0x438(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L649
  mov    -0x438(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L596
  mov    -0x468(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x460(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x468(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L624
  mov    -0x468(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  jmp    L604
L624:
  mov    -0x468(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  not    %eax
  cltq
  shl    $0x2,%rax
L604:
  mov    -0x460(%rbp),%rdx
  lea    (%rax,%rdx,1),%rsi
  mov    0x18(%rbp),%edx
  mov    -0x458(%rbp),%rax
  mov    %edx,%ecx
  mov    %rdi,%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ss_compare@plt>
  test   %eax,%eax
  jne    L596
L649:
  mov    -0x468(%rbp),%rax
  mov    (%rax),%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x468(%rbp),%rax
  mov    %edx,(%rax)
L596:
  mov    -0x438(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L331
  mov    -0x478(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x460(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x478(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L123
  mov    -0x478(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  jmp    L57
L123:
  mov    -0x478(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  not    %eax
  cltq
  shl    $0x2,%rax
L57:
  mov    -0x460(%rbp),%rdx
  lea    (%rax,%rdx,1),%rsi
  mov    0x18(%rbp),%edx
  mov    -0x458(%rbp),%rax
  mov    %edx,%ecx
  mov    %rdi,%rdx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <ss_compare@plt>
  test   %eax,%eax
  jne    L331
  mov    -0x478(%rbp),%rax
  mov    (%rax),%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x478(%rbp),%rax
  mov    %edx,(%rax)
L331:
  cmpl   $0x0,-0x43c(%rbp)
  je     L610
  subl   $0x1,-0x43c(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x410,%rax
  mov    (%rax),%rax
  mov    %rax,-0x468(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x408,%rax
  mov    (%rax),%rax
  mov    %rax,-0x470(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x400,%rax
  mov    (%rax),%rax
  mov    %rax,-0x478(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  add    %rbp,%rax
  sub    $0x3f8,%rax
  mov    (%rax),%eax
  mov    %eax,-0x438(%rbp)
L595:
  jmp    L158
L480:
  nop
  jmp    L47
L489:
  nop
  jmp    L47
L610:
  nop
L47:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L574
  call   <__stack_chk_fail@plt>
L574:
  leave
  ret
```

assistant: ```c
void ss_swapmerge(const unsigned char *T, const int *PA, int *first, int *middle, int *last, int *buf, int bufsize, int depth) {
  struct {
    int *a, *b, *c;
    int d;
  } stack[(32)];
  int *l, *r, *lm, *rm;
  int m, len, half;
  int ssize;
  int check, next;
  for (check = 0, ssize = 0;;) {
    if ((last - middle) <= bufsize) {
      if ((first < middle) && (middle < last)) {
        ss_mergebackward(T, PA, first, middle, last, buf, depth);
      }
      do {
        if (((check)&1) || (((check)&2) && (ss_compare(T, PA + ((0 <= (*((first)-1))) ? (*((first)-1)) : (~(*((first)-1)))), PA + *(first), depth) == 0))) {
          *(first) = ~*(first);
        }
        if (((check)&4) && ((ss_compare(T, PA + ((0 <= (*((last)-1))) ? (*((last)-1)) : (~(*((last)-1)))), PA + *(last), depth) == 0))) {
          *(last) = ~*(last);
        }
      } while (0);
      do {
        if (ssize == 0) {
          return;
        }
        (first) = stack[--ssize].a, (middle) = stack[ssize].b, (last) = stack[ssize].c, (check) = stack[ssize].d;
      } while (0);
      continue;
    }
    if ((middle - first) <= bufsize) {
      if (first < middle) {
        ss_mergeforward(T, PA, first, middle, last, buf, depth);
      }
      do {
        if (((check)&1) || (((check)&2) && (ss_compare(T, PA + ((0 <= (*((first)-1))) ? (*((first)-1)) : (~(*((first)-1)))), PA + *(first), depth) == 0))) {
          *(first) = ~*(first);
        }
        if (((check)&4) && ((ss_compare(T, PA + ((0 <= (*((last)-1))) ? (*((last)-1)) : (~(*((last)-1)))), PA + *(last), depth) == 0))) {
          *(last) = ~*(last);
        }
      } while (0);
      do {
        if (ssize == 0) {
          return;
        }
        (first) = stack[--ssize].a, (middle) = stack[ssize].b, (last) = stack[ssize].c, (check) = stack[ssize].d;
      } while (0);
      continue;
    }
    for (m = 0, len = (((middle - first) < (last - middle)) ? (middle - first) : (last - middle)), half = len >> 1; 0 < len; len = half, half >>= 1) {
      if (ss_compare(T, PA + ((0 <= (*(middle + m + half))) ? (*(middle + m + half)) : (~(*(middle + m + half)))), PA + ((0 <= (*(middle - m - half - 1))) ? (*(middle - m - half - 1)) : (~(*(middle - m - half - 1)))), depth) < 0) {
        m += half + 1;
        half -= (len & 1) ^ 1;
      }
    }
    if (0 < m) {
      lm = middle - m, rm = middle + m;
      ss_blockswap(lm, middle, m);
      l = r = middle, next = 0;
      if (rm < last) {
        if (*rm < 0) {
          *rm = ~*rm;
          if (first < lm) {
            for (; *--l < 0;) {
            }
            next |= 4;
          }
          next |= 1;
        } else if (first < lm) {
          for (; *r < 0; ++r) {
          }
          next |= 2;
        }
      }
      if ((l - first) <= (last - r)) {
        do {
          stack[ssize].a = (r), stack[ssize].b = (rm), stack[ssize].c = (last), stack[ssize++].d = ((next & 3) | (check & 4));
        } while (0);
        middle = lm, last = l, check = (check & 3) | (next & 4);
      } else {
        if ((next & 2) && (r == middle)) {
          next ^= 6;
        }
        do {
          stack[ssize].a = (first), stack[ssize].b = (lm), stack[ssize].c = (l), stack[ssize++].d = ((check & 3) | (next & 4));
        } while (0);
        first = r, middle = rm, check = (next & 3) | (check & 4);
      }
    } else {
      if (ss_compare(T, PA + ((0 <= (*(middle - 1))) ? (*(middle - 1)) : (~(*(middle - 1)))), PA + *middle, depth) == 0) {
        *middle = ~*middle;
      }
      do {
        if (((check)&1) || (((check)&2) && (ss_compare(T, PA + ((0 <= (*((first)-1))) ? (*((first)-1)) : (~(*((first)-1)))), PA + *(first), depth) == 0))) {
          *(first) = ~*(first);
        }
        if (((check)&4) && ((ss_compare(T, PA + ((0 <= (*((last)-1))) ? (*((last)-1)) : (~(*((last)-1)))), PA + *(last), depth) == 0))) {
          *(last) = ~*(last);
        }
      } while (0);
      do {
        if (ssize == 0) {
          return;
        }
        (first) = stack[--ssize].a, (middle) = stack[ssize].b, (last) = stack[ssize].c, (check) = stack[ssize].d;
      } while (0);
    }
  }
}
```