user: Please show me the C implementation that matches the assembly code listed below:

```asm
<_glp_qmdupd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    %r8,-0x68(%rbp)
  mov    %r9,-0x70(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x78(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x80(%rbp)
  mov    0x20(%rbp),%rax
  mov    %rax,-0x88(%rbp)
  mov    0x28(%rbp),%rax
  mov    %rax,-0x90(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jle    L7
  movl   $0x0,-0x40(%rbp)
  movl   $0x0,-0x3c(%rbp)
  movl   $0x1,-0x2c(%rbp)
  jmp    L153
L198:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  jmp    L172
L65:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L29
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jns    L29
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
L29:
  addl   $0x1,-0x20(%rbp)
L172:
  mov    -0x20(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jle    L65
  addl   $0x1,-0x2c(%rbp)
L153:
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x2c(%rbp)
  jle    L198
  mov    -0x3c(%rbp),%eax
  test   %eax,%eax
  jle    L186
  mov    -0x3c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x80(%rbp),%r9
  mov    -0x78(%rbp),%r8
  mov    -0x70(%rbp),%rcx
  mov    -0x68(%rbp),%rdx
  mov    -0x50(%rbp),%rsi
  mov    -0x48(%rbp),%rax
  sub    $0x8,%rsp
  push   %rdi
  push   -0x88(%rbp)
  push   -0x90(%rbp)
  lea    -0x3c(%rbp),%rdi
  push   %rdi
  lea    -0x40(%rbp),%rdi
  push   %rdi
  mov    %rax,%rdi
  call   <_glp_qmdmrg@plt>
  add    $0x30,%rsp
L186:
  movl   $0x1,-0x2c(%rbp)
  jmp    L74
L49:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L137
  cmpl   $0x1,-0x1c(%rbp)
  jne    L105
L137:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movl   $0x2,(%rax)
  lea    -0x34(%rbp),%r9
  mov    -0x80(%rbp),%r8
  mov    -0x68(%rbp),%rcx
  mov    -0x50(%rbp),%rdx
  mov    -0x48(%rbp),%rsi
  lea    -0x38(%rbp),%rax
  sub    $0x8,%rsp
  push   -0x90(%rbp)
  lea    -0x3c(%rbp),%rdi
  push   %rdi
  push   -0x88(%rbp)
  mov    %rax,%rdi
  call   <_glp_qmdrch@plt>
  add    $0x20,%rsp
  mov    -0x40(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x34(%rbp),%eax
  test   %eax,%eax
  jle    L32
  movl   $0x1,-0x24(%rbp)
  jmp    L60
L64:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  add    %eax,-0x30(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x24(%rbp)
L60:
  mov    -0x34(%rbp),%eax
  cmp    %eax,-0x24(%rbp)
  jle    L64
L32:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%edx
  sub    $0x1,%edx
  mov    %edx,(%rax)
  mov    -0x3c(%rbp),%eax
  test   %eax,%eax
  jle    L105
  movl   $0x1,-0x28(%rbp)
  jmp    L120
L173:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x28(%rbp)
L120:
  mov    -0x3c(%rbp),%eax
  cmp    %eax,-0x28(%rbp)
  jle    L173
L105:
  addl   $0x1,-0x2c(%rbp)
L74:
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x2c(%rbp)
  jle    L49
  jmp    L69
L7:
  nop
L69:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L86
  call   <__stack_chk_fail@plt>
L86:
  leave
  ret
```

assistant: ```c
void _glp_qmdupd(int xadj[], int adjncy[], int *_nlist, int list[], int deg[], int qsize[], int qlink[], int marker[], int rchset[], int nbrhd[]) {
  int deg0, deg1, il, inhd, inode, irch, j, jstop, jstrt, mark, nabor, nhdsze, node, rchsze;
  if ((*_nlist) <= 0)
    return;
  deg0 = 0;
  nhdsze = 0;
  for (il = 1; il <= (*_nlist); il++) {
    node = list[il];
    deg0 += qsize[node];
    jstrt = xadj[node];
    jstop = xadj[node + 1] - 1;
    for (j = jstrt; j <= jstop; j++) {
      nabor = adjncy[j];
      if (marker[nabor] == 0 && deg[nabor] < 0) {
        marker[nabor] = -1;
        nhdsze++;
        nbrhd[nhdsze] = nabor;
      }
    }
  }
  if (nhdsze > 0)
    _glp_qmdmrg(xadj, adjncy, deg, qsize, qlink, marker, &deg0, &nhdsze, nbrhd, rchset, &nbrhd[nhdsze + 1]);
  for (il = 1; il <= (*_nlist); il++) {
    node = list[il];
    mark = marker[node];
    if (mark == 0 || mark == 1) {
      marker[node] = 2;
      _glp_qmdrch(&node, xadj, adjncy, deg, marker, &rchsze, rchset, &nhdsze, nbrhd);
      deg1 = deg0;
      if (rchsze > 0) {
        for (irch = 1; irch <= rchsze; irch++) {
          inode = rchset[irch];
          deg1 += qsize[inode];
          marker[inode] = 0;
        }
      }
      deg[node] = deg1 - 1;
      if (nhdsze > 0) {
        for (inhd = 1; inhd <= nhdsze; inhd++) {
          inode = nbrhd[inhd];
          marker[inode] = 0;
        }
      }
    }
  }
  return;
}
```