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

```asm
<step5_lng>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9,-0x50(%rbp)
  mov    D0(%rip),%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  jmp    L131
L156:
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L10
  movq   $0x0,-0x10(%rbp)
  jmp    L47
L80:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L53
  mov    0x18(%rbp),%rax
  imul   -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jge    L53
  mov    -0x8(%rbp),%rax
  mov    %rax,-0x20(%rbp)
L53:
  addq   $0x1,-0x10(%rbp)
L47:
  mov    -0x10(%rbp),%rax
  cmp    0x20(%rbp),%rax
  jl     L80
L10:
  addq   $0x1,-0x18(%rbp)
L131:
  mov    -0x18(%rbp),%rax
  cmp    0x18(%rbp),%rax
  jl     L156
  movq   $0x0,-0x18(%rbp)
  jmp    L35
L166:
  mov    -0x18(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L147
  movq   $0x0,-0x10(%rbp)
  jmp    L39
L70:
  mov    0x18(%rbp),%rax
  imul   -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  mov    0x18(%rbp),%rax
  imul   -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  addq   $0x1,-0x10(%rbp)
L39:
  mov    -0x10(%rbp),%rax
  cmp    0x20(%rbp),%rax
  jl     L70
L147:
  addq   $0x1,-0x18(%rbp)
L35:
  mov    -0x18(%rbp),%rax
  cmp    0x18(%rbp),%rax
  jl     L166
  movq   $0x0,-0x10(%rbp)
  jmp    L151
L6:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L72
  movq   $0x0,-0x18(%rbp)
  jmp    L81
L77:
  mov    0x18(%rbp),%rax
  imul   -0x10(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    0x18(%rbp),%rdx
  mov    %rdx,%rcx
  imul   -0x10(%rbp),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  sub    -0x20(%rbp),%rax
  mov    %rax,(%rdx)
  addq   $0x1,-0x18(%rbp)
L81:
  mov    -0x18(%rbp),%rax
  cmp    0x18(%rbp),%rax
  jl     L77
L72:
  addq   $0x1,-0x10(%rbp)
L151:
  mov    -0x10(%rbp),%rax
  cmp    0x20(%rbp),%rax
  jl     L6
  mov    -0x50(%rbp),%r8
  mov    -0x48(%rbp),%rdi
  mov    -0x40(%rbp),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x30(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  push   0x28(%rbp)
  push   0x20(%rbp)
  push   0x18(%rbp)
  push   0x10(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <step3_lng@plt>
  add    $0x20,%rsp
  nop
  leave
  ret
```

assistant: ```c
void step5_lng(long *assignment, long *distMatrix, bool *starMatrix, bool *newStarMatrix, bool *primeMatrix, bool *coveredColumns, bool *coveredRows, long nOfRows, long nOfColumns, long minDim) {
  long h, value;
  long row, col;
  h = LONG_MAX;
  for (row = 0; row < nOfRows; row++)
    if (!coveredRows[row])
      for (col = 0; col < nOfColumns; col++)
        if (!coveredColumns[col]) {
          value = distMatrix[row + nOfRows * col];
          if (value < h)
            h = value;
        }
  for (row = 0; row < nOfRows; row++)
    if (coveredRows[row])
      for (col = 0; col < nOfColumns; col++)
        distMatrix[row + nOfRows * col] += h;
  for (col = 0; col < nOfColumns; col++)
    if (!coveredColumns[col])
      for (row = 0; row < nOfRows; row++)
        distMatrix[row + nOfRows * col] -= h;
  step3_lng(assignment, distMatrix, starMatrix, newStarMatrix, primeMatrix, coveredColumns, coveredRows, nOfRows, nOfColumns, minDim);
}
```