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

```asm
<optim_>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    (%rcx),%r12d
  mov    0x78(%rsp),%rax
  mov    %rdx,0x18(%rsp)
  mov    %r12d,%edx
  mov    %rdi,0x8(%rsp)
  mov    (%rax),%eax
  mov    %rsi,0x10(%rsp)
  mov    %r8,0x20(%rsp)
  test   %eax,%eax
  mov    %eax,D227(%rip)
  setle  %al
  shr    $0x1f,%edx
  mov    %r9,0x28(%rsp)
  or     %dl,%al
  mov    %r12d,D33(%rip)
  jne    L65
  movl   $0x0,D39(%rip)
  test   %r12d,%r12d
  je     L164
  mov    0x80(%rsp),%rax
  mov    %r12d,0x4(%rsp)
  lea    -0x4(%r8),%rbx
  lea    -0x4(%r9),%rbp
  mov    %r13d,%r12d
  lea    -0xc(%rax),%r15
  xor    %eax,%eax
  mov    %r15,%r14
L31:
  mov    0x4(%rsp),%r10d
  add    $0x1,%eax
  movl   $0x0,D97(%rip)
  mov    %eax,D327(%rip)
  movl   $0x1,D327(%rip)
  test   %r10d,%r10d
  jle    L93
  mov    %r14,%rdi
  mov    $0x1,%eax
  mov    %r12d,%r14d
  lea    D238(%rip),%r15
  lea    D106(%rip),%r13
  mov    %rdi,%r12
L185:
  add    %eax,%eax
  xor    %r8d,%r8d
  cltq
  add    $0x1,%rax
  movslq (%r12,%rax,4),%rdx
  mov    %edx,D357(%rip)
  mov    0x4(%r12,%rax,4),%edi
  mov    0x70(%rsp),%rax
  mov    %edi,D357(%rip)
  movslq -0x4(%rax,%rdx,4),%r9
  mov    0x0(%rbp,%r9,4),%eax
  mov    %r9d,D82(%rip)
  mov    %r9,%rsi
  mov    %eax,D58(%rip)
  jmp    L2
  nopl   0x0(%rax)
L172:
  mov    0x0(%rbp,%rdx,4),%edx
  mov    $0x1,%r8d
  mov    %eax,%r14d
  cmp    %edx,%esi
  je     L134
  mov    %edx,%eax
L2:
  movslq %eax,%rdx
  mov    (%rbx,%rdx,4),%ecx
  cmp    %ecx,%edi
  jne    L172
  test   %r8b,%r8b
  je     L193
  movslq %r14d,%rdx
  mov    %r14d,D115(%rip)
  mov    %eax,D115(%rip)
  mov    (%rbx,%rdx,4),%ecx
L64:
  mov    %ecx,D115(%rip)
  test   %ecx,%ecx
  js     L131
  movslq D115(%rip),%rax
  lea    D115(%rip),%rdi
  lea    D357(%rip),%rcx
  mov    %r13,%rsi
  movslq 0x0(%rbp,%rax,4),%rax
  mov    (%rbx,%rax,4),%edx
  mov    %eax,D215(%rip)
  mov    %edx,%eax
  neg    %eax
  cmovs  %edx,%eax
  sub    $0x8,%rsp
  mov    %r15,%rdx
  push   0x20(%rsp)
  mov    0x20(%rsp),%r9
  mov    0x18(%rsp),%r8
  mov    %eax,D215(%rip)
  call   <swptst_@plt>
  pop    %r8
  lea    D215(%rip),%rdi
  pop    %r9
  test   %eax,%eax
  je     L131
  lea    D215(%rip),%rax
  lea    D357(%rip),%rcx
  mov    %r13,%rsi
  mov    %r15,%rdx
  push   %rax
  push   0x78(%rsp)
  mov    0x38(%rsp),%r9
  mov    0x30(%rsp),%r8
  call   <swap_@plt>
  mov    D215(%rip),%edi
  pop    %rcx
  pop    %rsi
  test   %edi,%edi
  je     L57
  mov    D327(%rip),%eax
  mov    D215(%rip),%ecx
  movl   $0x1,D97(%rip)
  lea    (%rax,%rax,1),%edx
  movslq %edx,%rdx
  add    $0x1,%rdx
  mov    %ecx,(%r12,%rdx,4)
  mov    D115(%rip),%ecx
  mov    %ecx,0x4(%r12,%rdx,4)
L16:
  add    $0x1,%eax
  mov    %eax,D210(%rip)
  cmp    0x4(%rsp),%eax
  jle    L185
  mov    D97(%rip),%edx
  mov    %r12,%rax
  mov    %r14d,%r12d
  mov    %rax,%r14
  mov    D327(%rip),%eax
  test   %edx,%edx
  je     L93
  cmp    %eax,D210(%rip)
  je     L37
  mov    D33(%rip),%esi
  mov    %esi,0x4(%rsp)
  jmp    L31
  nopl   (%rax)
L134:
  mov    %eax,D210(%rip)
  mov    (%rbx,%r9,4),%eax
  mov    %esi,D210(%rip)
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  cmp    %edx,%edi
  jne    L75
  test   %eax,%eax
  jns    L64
  nopl   0x0(%rax,%rax,1)
L131:
  mov    D210(%rip),%eax
  jmp    L16
  nopl   0x0(%rax,%rax,1)
L193:
  mov    (%rbx,%r9,4),%ecx
  jmp    L64
L65:
  xor    %r12d,%r12d
  mov    $0x2,%edx
L92:
  mov    0x78(%rsp),%rax
  mov    %r12d,(%rax)
  mov    0x88(%rsp),%rax
  mov    %edx,(%rax)
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L75:
  mov    D327(%rip),%r12d
  mov    $0x3,%edx
  jmp    L92
L93:
  mov    %eax,%r12d
L164:
  xor    %edx,%edx
  jmp    L92
L57:
  mov    D327(%rip),%r12d
  mov    $0x4,%edx
  jmp    L92
L37:
  mov    %eax,%r12d
  mov    $0x1,%edx
  jmp    L92
```

assistant: ```c
int optim_(double *x, double *y, double *z__, int *na, int *list, int *lptr, int *lend, int *nit, int *iwk, int *ier) {
  int i__1, i__2;
  static int i__, n1, n2, lp, io1, io2, nna, lp21, lpl, lpp;
  static int swp;
  static int iter;
  static int maxit;
  --x;
  --y;
  --z__;
  iwk -= 3;
  --list;
  --lptr;
  --lend;
  nna = *na;
  maxit = *nit;
  if (nna < 0 || maxit < 1) {
    goto L7;
  }
  iter = 0;
  if (nna == 0) {
    goto L5;
  }
L1:
  if (iter == maxit) {
    goto L6;
  }
  ++iter;
  swp = (0);
  i__1 = nna;
  for (i__ = 1; i__ <= i__1; ++i__) {
    io1 = iwk[(i__ << 1) + 1];
    io2 = iwk[(i__ << 1) + 2];
    lpl = lend[io1];
    lpp = lpl;
    lp = lptr[lpp];
  L2:
    if (list[lp] == io2) {
      goto L3;
    }
    lpp = lp;
    lp = lptr[lpp];
    if (lp != lpl) {
      goto L2;
    }
    if ((i__2 = list[lp], ((i__2) >= 0 ? (i__2) : -(i__2))) != io2) {
      goto L8;
    }
    if (list[lp] < 0) {
      goto L4;
    }
  L3:
    n2 = list[lpp];
    if (n2 < 0) {
      goto L4;
    }
    lp = lptr[lp];
    n1 = (i__2 = list[lp], ((i__2) >= 0 ? (i__2) : -(i__2)));
    if (!swptst_(&n1, &n2, &io1, &io2, &x[1], &y[1], &z__[1])) {
      goto L4;
    }
    swap_(&n1, &n2, &io1, &io2, &list[1], &lptr[1], &lend[1], &lp21);
    if (lp21 == 0) {
      goto L9;
    }
    swp = (1);
    iwk[(i__ << 1) + 1] = n1;
    iwk[(i__ << 1) + 2] = n2;
  L4:;
  }
  if (swp) {
    goto L1;
  }
L5:
  *nit = iter;
  *ier = 0;
  return 0;
L6:
  *nit = maxit;
  *ier = 1;
  return 0;
L7:
  *nit = 0;
  *ier = 2;
  return 0;
L8:
  *nit = iter;
  *ier = 3;
  return 0;
L9:
  *nit = iter;
  *ier = 4;
  return 0;
}
```