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

```asm
<check_labels>:
  endbr64
  movslq %esi,%r9
  mov    %rdx,%rsi
  movslq %edi,%rdx
  push   %r13
  lea    0x0(,%rdx,8),%r11
  push   %r12
  mov    %r9,%rax
  push   %rbp
  push   %rbx
  mov    (%rsi,%rdx,8),%rbp
  lea    -0x1(%r9),%edx
  lea    0x0(,%r9,4),%rbx
  cmp    %edx,%r8d
  not    %edx
  setg   %r12b
  shr    $0x1f,%edx
  mov    0x0(%rbp,%r9,4),%r10d
  and    %edx,%r12d
  mov    %r9d,%edx
  cmp    %r8d,%r9d
  not    %edx
  setl   %r13b
  add    $0x1,%eax
  shr    $0x1f,%edx
  and    %edx,%r13d
  cmp    %eax,%r8d
  jle    L497
  test   %eax,%eax
  js     L497
  movslq %eax,%rdx
  lea    -0x1(%rdi),%eax
  test   %r13b,%r13b
  jne    L83
  test   %r12b,%r12b
  jne    L530
  cmp    %eax,%ecx
  jle    L441
  test   %eax,%eax
  js     L441
  mov    -0x8(%rsi,%r11,1),%rax
  mov    (%rax,%rdx,4),%r8d
  mov    $0x2710,%eax
  cmp    %eax,%r8d
  cmovle %r8d,%eax
  test   %r8d,%r8d
  mov    $0x2710,%r8d
  cmovle %r8d,%eax
L161:
  cmp    %ecx,%edi
  jge    L222
  test   %edi,%edi
  js     L222
  mov    0x0(%rbp,%rdx,4),%r8d
  cmp    %r8d,%eax
  mov    %r8d,%r9d
  cmovle %eax,%r9d
  test   %r8d,%r8d
  cmovg  %r9d,%eax
L222:
  add    $0x1,%edi
  cmp    %edi,%ecx
  jle    L542
  test   %edi,%edi
  js     L542
  mov    0x8(%rsi,%r11,1),%rcx
L382:
  mov    (%rcx,%rdx,4),%edx
L546:
  cmp    %edx,%eax
  mov    %edx,%ecx
  cmovle %eax,%ecx
  test   %edx,%edx
  cmovg  %ecx,%eax
L542:
  cmp    $0x2710,%eax
  jne    L143
  xor    %edx,%edx
  test   %r10d,%r10d
  cmove  %edx,%eax
L143:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L497:
  test   %r13b,%r13b
  jne    L206
  mov    $0x2710,%eax
  test   %r12b,%r12b
  je     L542
  mov    %edi,%edx
  lea    -0x1(%rdi),%r8d
  neg    %edx
  jns    L344
  cmp    %r8d,%ecx
  jle    L344
  mov    -0x8(%rsi,%r11,1),%rdx
  mov    -0x4(%rdx,%rbx,1),%r8d
  mov    $0x2710,%edx
  cmp    %edx,%r8d
  cmovle %r8d,%edx
  test   %r8d,%r8d
  cmovg  %edx,%eax
L76:
  test   %edi,%edi
  js     L247
  cmp    %ecx,%edi
  jge    L247
  mov    -0x4(%rbp,%rbx,1),%edx
  cmp    %edx,%eax
  mov    %edx,%r8d
  cmovle %eax,%r8d
  test   %edx,%edx
  cmovg  %r8d,%eax
L247:
  add    $0x1,%edi
  cmp    %edi,%ecx
  jle    L542
  test   %edi,%edi
  js     L542
  mov    0x8(%rsi,%r11,1),%rdx
  mov    -0x4(%rdx,%rbx,1),%edx
  jmp    L546
  nopw   0x0(%rax,%rax,1)
L206:
  lea    -0x1(%rdi),%edx
  mov    %edi,%eax
  test   %r12b,%r12b
  jne    L630
  neg    %eax
  jns    L408
  cmp    %edx,%ecx
  jle    L408
  mov    -0x8(%rsi,%r11,1),%rax
  mov    (%rax,%r9,4),%edx
  mov    $0x2710,%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  test   %edx,%edx
  mov    $0x2710,%edx
  cmovle %edx,%eax
L56:
  test   %edi,%edi
  js     L257
  cmp    %ecx,%edi
  jge    L257
  cmp    %r10d,%eax
  mov    %r10d,%edx
  cmovle %eax,%edx
  test   %r10d,%r10d
  cmovg  %edx,%eax
L257:
  add    $0x1,%edi
  cmp    %edi,%ecx
  jle    L542
  test   %edi,%edi
  js     L542
  mov    0x8(%rsi,%r11,1),%rdx
  mov    (%rdx,%r9,4),%edx
  jmp    L546
  nopl   0x0(%rax,%rax,1)
L83:
  test   %r12b,%r12b
  jne    L200
  cmp    %eax,%ecx
  jle    L308
  test   %eax,%eax
  js     L308
  mov    -0x8(%rsi,%r11,1),%rbx
  mov    $0x2710,%eax
  mov    (%rbx,%r9,4),%r8d
  cmp    %eax,%r8d
  cmovle %r8d,%eax
  test   %r8d,%r8d
  mov    $0x2710,%r8d
  cmovle %r8d,%eax
  mov    (%rbx,%rdx,4),%r8d
  cmp    %r8d,%eax
  mov    %r8d,%ebx
  cmovle %eax,%ebx
  test   %r8d,%r8d
  cmovg  %ebx,%eax
L403:
  cmp    %ecx,%edi
  jge    L469
  test   %edi,%edi
  js     L469
  cmp    %r10d,%eax
  mov    %r10d,%r8d
  cmovle %eax,%r8d
  test   %r10d,%r10d
  cmovg  %r8d,%eax
  mov    0x0(%rbp,%rdx,4),%r8d
  cmp    %r8d,%eax
  mov    %r8d,%ebx
  cmovle %eax,%ebx
  test   %r8d,%r8d
  cmovg  %ebx,%eax
L469:
  add    $0x1,%edi
  cmp    %edi,%ecx
  jle    L542
  test   %edi,%edi
  js     L542
  mov    0x8(%rsi,%r11,1),%rsi
  mov    (%rsi,%r9,4),%ecx
L110:
  cmp    %ecx,%eax
  mov    %ecx,%edi
  mov    (%rsi,%rdx,4),%edx
  cmovle %eax,%edi
  test   %ecx,%ecx
  cmovg  %edi,%eax
  jmp    L546
  nopl   0x0(%rax,%rax,1)
L530:
  cmp    %eax,%ecx
  jle    L351
  test   %eax,%eax
  js     L351
  mov    -0x8(%rsi,%r11,1),%r9
  mov    $0x2710,%eax
  mov    -0x4(%r9,%rbx,1),%r8d
  cmp    %eax,%r8d
  cmovle %r8d,%eax
  test   %r8d,%r8d
  mov    $0x2710,%r8d
  cmovle %r8d,%eax
  mov    (%r9,%rdx,4),%r8d
  cmp    %r8d,%eax
  mov    %r8d,%r9d
  cmovle %eax,%r9d
  test   %r8d,%r8d
  cmovg  %r9d,%eax
L416:
  cmp    %ecx,%edi
  jge    L334
  test   %edi,%edi
  js     L334
  mov    -0x4(%rbp,%rbx,1),%r8d
  cmp    %r8d,%eax
  mov    %r8d,%r9d
  cmovle %eax,%r9d
  test   %r8d,%r8d
  mov    0x0(%rbp,%rdx,4),%r8d
  cmovg  %r9d,%eax
  mov    %r8d,%r9d
  cmp    %r8d,%eax
  cmovle %eax,%r9d
  test   %r8d,%r8d
  cmovg  %r9d,%eax
L334:
  add    $0x1,%edi
  cmp    %edi,%ecx
  jle    L542
  test   %edi,%edi
  js     L542
  mov    0x8(%rsi,%r11,1),%rsi
  mov    -0x4(%rsi,%rbx,1),%ecx
  jmp    L110
  nopl   (%rax)
L200:
  cmp    %eax,%ecx
  jle    L434
  test   %eax,%eax
  js     L434
  mov    -0x8(%rsi,%r11,1),%r8
  mov    $0x2710,%eax
  mov    -0x4(%r8,%rbx,1),%r12d
  cmp    %eax,%r12d
  cmovle %r12d,%eax
  test   %r12d,%r12d
  mov    $0x2710,%r12d
  cmovle %r12d,%eax
  mov    (%r8,%r9,4),%r12d
  mov    (%r8,%rdx,4),%r8d
  cmp    %r12d,%eax
  mov    %r12d,%r13d
  cmovle %eax,%r13d
  test   %r12d,%r12d
  mov    %r8d,%r12d
  cmovg  %r13d,%eax
  cmp    %r8d,%eax
  cmovle %eax,%r12d
  test   %r8d,%r8d
  cmovg  %r12d,%eax
L500:
  cmp    %ecx,%edi
  jge    L475
  test   %edi,%edi
  js     L475
  mov    -0x4(%rbp,%rbx,1),%r8d
  cmp    %r8d,%eax
  mov    %r8d,%r12d
  cmovle %eax,%r12d
  test   %r8d,%r8d
  mov    %r10d,%r8d
  cmovg  %r12d,%eax
  cmp    %r10d,%eax
  cmovle %eax,%r8d
  test   %r10d,%r10d
  cmovg  %r8d,%eax
  mov    0x0(%rbp,%rdx,4),%r8d
  cmp    %r8d,%eax
  mov    %r8d,%ebp
  cmovle %eax,%ebp
  test   %r8d,%r8d
  cmovg  %ebp,%eax
L475:
  add    $0x1,%edi
  cmp    %edi,%ecx
  jle    L542
  test   %edi,%edi
  js     L542
  mov    0x8(%rsi,%r11,1),%rcx
  mov    -0x4(%rcx,%rbx,1),%esi
  cmp    %esi,%eax
  mov    %esi,%edi
  cmovle %eax,%edi
  test   %esi,%esi
  mov    (%rcx,%r9,4),%esi
  cmovg  %edi,%eax
  mov    %esi,%edi
  cmp    %esi,%eax
  cmovle %eax,%edi
  test   %esi,%esi
  cmovg  %edi,%eax
  jmp    L382
  nopl   (%rax)
L630:
  neg    %eax
  jns    L290
  cmp    %ecx,%edx
  jge    L290
  mov    -0x8(%rsi,%r11,1),%r8
  mov    $0x2710,%eax
  mov    -0x4(%r8,%rbx,1),%edx
  cmp    %eax,%edx
  cmovle %edx,%eax
  test   %edx,%edx
  mov    $0x2710,%edx
  cmovle %edx,%eax
  mov    (%r8,%r9,4),%edx
  cmp    %edx,%eax
  mov    %edx,%r8d
  cmovle %eax,%r8d
  test   %edx,%edx
  cmovg  %r8d,%eax
L619:
  cmp    %ecx,%edi
  jge    L555
  test   %edi,%edi
  js     L555
  mov    -0x4(%rbp,%rbx,1),%edx
  cmp    %edx,%eax
  mov    %edx,%r8d
  cmovle %eax,%r8d
  test   %edx,%edx
  mov    %r10d,%edx
  cmovg  %r8d,%eax
  cmp    %r10d,%eax
  cmovle %eax,%edx
  test   %r10d,%r10d
  cmovg  %edx,%eax
L555:
  add    $0x1,%edi
  js     L542
  cmp    %edi,%ecx
  jle    L542
  mov    0x8(%rsi,%r11,1),%rcx
  mov    -0x4(%rcx,%rbx,1),%edx
  cmp    %edx,%eax
  mov    %edx,%esi
  cmovle %eax,%esi
  test   %edx,%edx
  mov    (%rcx,%r9,4),%edx
  cmovg  %esi,%eax
  jmp    L546
L344:
  mov    $0x2710,%eax
  jmp    L76
L351:
  mov    $0x2710,%eax
  jmp    L416
L434:
  mov    $0x2710,%eax
  jmp    L500
L408:
  mov    $0x2710,%eax
  jmp    L56
L290:
  mov    $0x2710,%eax
  jmp    L619
L308:
  mov    $0x2710,%eax
  jmp    L403
L441:
  mov    $0x2710,%eax
  jmp    L161
```

assistant: ```c
int check_labels(int i, int j, int **label_array, int rows, int cols) {
  int k, l;
  int x, y;
  int min_value;
  int current_label;
  current_label = label_array[i][j];
  min_value = 10000;
  for (k = -1; k <= 1; k++) {
    for (l = -1; l <= 1; l++) {
      x = i + k;
      y = j + l;
      if ((x < rows) && (x >= 0) && (y < cols) && (y >= 0)) {
        if ((label_array[x][y] > 0) && (label_array[x][y] < min_value)) {
          min_value = label_array[x][y];
        }
      }
    }
  }
  if ((min_value == 10000) && (current_label == 0)) {
    min_value = 0;
  }
  return min_value;
}
```