user: 这段汇编代码用C语言表示是什么样的：

```asm
<mat_d>:
  endbr64
  push   %r15
  mov    %rdi,%r11
  mov    %ecx,%edi
  push   %r14
  push   %r13
  push   %r12
  movslq %edx,%r12
  push   %rbp
  movslq %esi,%rbp
  lea    0x1(%rbp),%ecx
  mov    %ebp,%r10d
  push   %rbx
  movslq %ecx,%rcx
  sub    $0x1,%r10d
  js     L367
  movslq %r12d,%rbx
  movslq %r10d,%rax
  xor    %esi,%esi
  add    %rbx,%rbx
  nopw   0x0(%rax,%rax,1)
L449:
  mov    (%r11,%rax,8),%rdx
  cmp    %di,(%rdx,%rbx,1)
  je     L81
  cmp    %rcx,%r8
  jg     L21
L57:
  xor    %edx,%edx
  test   %si,%si
  jg     L426
L359:
  mov    %edx,%eax
  mov    %esi,%edx
  mov    %eax,%esi
L549:
  mov    %r12d,%eax
  xor    %ebx,%ebx
  sub    $0x1,%eax
  mov    %eax,-0x8(%rsp)
  js     L275
L296:
  movslq %ebp,%rax
  xor    %ebx,%ebx
  mov    (%r11,%rax,8),%r13
  movslq -0x8(%rsp),%rax
  nopl   0x0(%rax)
L386:
  cmp    %di,0x0(%r13,%rax,2)
  je     L214
L275:
  cmp    %bx,%dx
  jle    L135
L306:
  lea    0x1(%r12),%eax
  xor    %r13d,%r13d
  cltq
  mov    %rax,-0x10(%rsp)
  cmp    %rax,%r9
  jle    L277
  movslq %ebp,%r13
  movslq %r12d,%rax
  lea    -0x1(%r9),%rsi
  mov    (%r11,%r13,8),%r13
  sub    %rax,%rsi
  lea    0x0(%r13,%rax,2),%r14
  xor    %eax,%eax
  nopl   0x0(%rax)
L466:
  mov    %eax,%r13d
  cmp    %di,0x2(%r14,%rax,2)
  je     L592
L277:
  cmp    %bx,%r13w
  jl     L39
  cmp    %dx,%r13w
  cmovle %r13d,%edx
  mov    %ebx,%r13d
  mov    %edx,%ebx
L39:
  not    %r10d
  mov    -0x8(%rsp),%eax
  shr    $0x1f,%r10d
  mov    %r10d,-0x4(%rsp)
  test   %eax,%eax
  js     L529
  test   %r10b,%r10b
  je     L529
  movslq %eax,%r14
  lea    -0x2(%rbp),%esi
  mov    %r12d,%r15d
  xor    %eax,%eax
  movslq %esi,%rsi
  add    %r14,%r14
  sub    %ebp,%r15d
  nopw   0x0(%rax,%rax,1)
L456:
  mov    0x8(%r11,%rsi,8),%rdx
  cmp    %di,(%rdx,%r14,1)
  je     L391
L590:
  cwtl
  imul   $0xe,%eax,%eax
  add    $0x7,%eax
  movslq %eax,%rdx
  sar    $0x1f,%eax
  imul   $0x66666667,%rdx,%rdx
  sar    $0x22,%rdx
  sub    %eax,%edx
L339:
  cmp    %dx,%r13w
  jg     L419
  cmp    %dx,%bx
  cmovg  %edx,%ebx
  mov    %r13d,%edx
  mov    %ebx,%r13d
L419:
  mov    -0x10(%rsp),%rax
  cmp    %rax,%r9
  jle    L17
  cmpb   $0x0,-0x4(%rsp)
  jne    L289
L17:
  test   %dx,%dx
  jle    L264
  cmp    -0x10(%rsp),%r9
  jg     L253
  xor    %r9d,%r9d
  xor    %eax,%eax
  jmp    L65
  nop
L426:
  mov    %r12d,%eax
  xor    %edx,%edx
  sub    $0x1,%eax
  mov    %eax,-0x8(%rsp)
  jns    L296
  xor    %ebx,%ebx
L135:
  cmp    %si,%bx
  cmovle %ebx,%esi
  mov    %edx,%ebx
  mov    %esi,%edx
  jmp    L306
  nopl   0x0(%rax,%rax,1)
L391:
  lea    (%r15,%rsi,1),%edx
  mov    %esi,%r10d
  add    $0x1,%eax
  sub    $0x1,%rsi
  not    %edx
  not    %r10d
  sub    $0x2,%r14
  shr    $0x1f,%edx
  shr    $0x1f,%r10d
  test   %r10b,%dl
  jne    L456
  jmp    L590
  nopl   0x0(%rax)
L214:
  sub    $0x1,%rax
  add    $0x1,%ebx
  test   %eax,%eax
  jns    L386
  jmp    L275
  nopl   0x0(%rax)
L592:
  lea    0x1(%rax),%r13d
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L466
  jmp    L277
  cs nopw 0x0(%rax,%rax,1)
L81:
  sub    $0x1,%rax
  add    $0x1,%esi
  test   %eax,%eax
  jns    L449
  cmp    %rcx,%r8
  jle    L57
L21:
  mov    %rcx,%rax
  xor    %edx,%edx
L423:
  mov    (%r11,%rax,8),%r13
  cmp    %di,0x0(%r13,%rbx,1)
  je     L560
L249:
  cmp    %si,%dx
  jl     L549
  cmp    $0xfe,%dx
  jle    L359
  mov    %esi,%edx
  mov    $0xff,%esi
  jmp    L549
  nopl   0x0(%rax)
L560:
  add    $0x1,%rax
  add    $0x1,%edx
  cmp    %r8,%rax
  jl     L423
  jmp    L249
  xchg   %ax,%ax
L529:
  xor    %edx,%edx
  jmp    L339
  nopw   0x0(%rax,%rax,1)
L289:
  lea    -0x2(%rbp),%esi
  lea    (%rax,%rax,1),%r14
  xor    %r10d,%r10d
  movslq %esi,%rsi
  lea    0x1(%rax),%rbx
  nopl   0x0(%rax)
L580:
  mov    0x8(%r11,%rsi,8),%rax
  cmp    %di,(%rax,%r14,1)
  je     L407
L34:
  movswl %r10w,%r10d
  imul   $0xe,%r10d,%r10d
  add    $0x7,%r10d
  movslq %r10d,%rax
  sar    $0x1f,%r10d
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  sub    %r10d,%eax
  mov    %eax,%esi
  cmp    %ax,%dx
  jg     L532
  cmp    %ax,%r13w
  cmovg  %eax,%r13d
L576:
  mov    %edx,%esi
  mov    %r13d,%edx
  nopl   (%rax)
L532:
  cmp    %rcx,%r8
  jg     L445
  xor    %r9d,%r9d
  nopl   0x0(%rax)
L479:
  cmp    %r9w,%si
  jle    L270
  mov    -0x8(%rsp),%eax
  test   %eax,%eax
  js     L361
L94:
  cmp    %rcx,%r8
  jle    L361
  movslq %eax,%rdx
  mov    %eax,%eax
  lea    0x1(%rbp,%rax,1),%r10
  add    %rdx,%rdx
  xor    %eax,%eax
  xchg   %ax,%ax
L322:
  mov    (%r11,%rcx,8),%rbx
  cmp    %di,(%rbx,%rdx,1)
  je     L75
L450:
  cwtl
  imul   $0xe,%eax,%eax
  add    $0x7,%eax
  movslq %eax,%rdx
  sar    $0x1f,%eax
  imul   $0x66666667,%rdx,%rdx
  sar    $0x22,%rdx
  sub    %eax,%edx
  mov    %edx,%eax
  cmp    %dx,%r9w
  jle    L177
  mov    %edx,%r9d
  xor    %edi,%edi
  jmp    L196
  xchg   %ax,%ax
L407:
  mov    %esi,%eax
  add    $0x1,%r10d
  not    %eax
  shr    $0x1f,%eax
  cmp    %r9,%rbx
  setl   %r15b
  sub    $0x1,%rsi
  add    $0x2,%r14
  add    $0x1,%rbx
  test   %al,%r15b
  je     L34
  jmp    L580
L264:
  xor    %eax,%eax
  test   %r13w,%r13w
  cmovg  %eax,%r13d
  cmp    -0x10(%rsp),%r9
  jg     L576
  mov    %edx,%esi
  xor    %r9d,%r9d
  mov    %r13d,%edx
  nopl   0x0(%rax)
L270:
  mov    %esi,%eax
L65:
  cmp    %r9w,%dx
  mov    %r9d,%esi
  mov    %eax,%r9d
  mov    -0x8(%rsp),%eax
  cmovle %edx,%esi
  test   %eax,%eax
  jns    L94
L361:
  xor    %eax,%eax
  test   %r9w,%r9w
  jg     L357
L177:
  cmp    %ax,%si
  cmovle %esi,%eax
  cmp    %ax,%r9w
  mov    $0x0,%eax
  cmovne %eax,%edi
L196:
  xor    %edx,%edx
  movswl %di,%eax
  test   %r9w,%r9w
  cmove  %edx,%eax
L357:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L75:
  add    $0x1,%eax
  cmp    %rcx,%r10
  je     L450
  add    $0x1,%rcx
  sub    $0x2,%rdx
  cmp    %rcx,%r8
  je     L450
  jmp    L322
  nopw   0x0(%rax,%rax,1)
L367:
  xor    %esi,%esi
  cmp    %rcx,%r8
  jle    L426
  movslq %r12d,%rbx
  xor    %esi,%esi
  add    %rbx,%rbx
  jmp    L21
L445:
  mov    -0x10(%rsp),%rax
  lea    0x1(%r12,%r8,1),%r13
  lea    (%rax,%rax,1),%rbx
  lea    0x1(%rax),%r10
  movslq %ebp,%rax
  sub    %rax,%r13
  sub    %r12,%rax
  lea    (%r11,%rax,8),%r14
  xor    %eax,%eax
  nopl   0x0(%rax)
L314:
  mov    (%r14,%rbx,4),%r12
  cmp    %di,(%r12,%rbx,1)
  je     L504
L586:
  cwtl
  imul   $0xe,%eax,%eax
  add    $0x7,%eax
  movslq %eax,%r9
  sar    $0x1f,%eax
  imul   $0x66666667,%r9,%r9
  sar    $0x22,%r9
  sub    %eax,%r9d
  jmp    L479
  nopl   0x0(%rax,%rax,1)
L504:
  add    $0x1,%eax
  cmp    %r10,%r9
  jle    L586
  add    $0x1,%r10
  add    $0x2,%rbx
  cmp    %r10,%r13
  jne    L314
  jmp    L586
L253:
  xor    %esi,%esi
  jmp    L532
```

assistant: ```c
int mat_d(the_image, a, b, value, rows, cols)
int a, b;
short **the_image, value;
long cols, rows;
{
  int i, j, measuring;
  short dist1 = 0, dist2 = 0, dist3 = 0, dist4 = 0, dist5 = 0, dist6 = 0, dist7 = 0, dist8 = 0, min1 = 255, min2 = 255, result = 0;
  measuring = 1;
  i = a;
  j = b;
  while (measuring) {
    i--;
    if (i >= 0) {
      if (the_image[i][j] == value)
        dist1++;
      else
        measuring = 0;
    } else
      measuring = 0;
  }
  result = dist1;
  min1 = dist1;
  measuring = 1;
  i = a;
  j = b;
  while (measuring) {
    i++;
    if (i <= rows - 1) {
      if (the_image[i][j] == value)
        dist2++;
      else
        measuring = 0;
    } else
      measuring = 0;
  }
  if (dist2 <= result)
    result = dist2;
  if (dist2 < min1) {
    min2 = min1;
    min1 = dist2;
  } else if (dist2 < min2)
    min2 = dist2;
  measuring = 1;
  i = a;
  j = b;
  while (measuring) {
    j--;
    if (j >= 0) {
      if (the_image[i][j] == value)
        dist3++;
      else
        measuring = 0;
    } else
      measuring = 0;
  }
  if (dist3 <= result)
    result = dist3;
  if (dist3 < min1) {
    min2 = min1;
    min1 = dist3;
  } else if (dist3 < min2)
    min2 = dist3;
  measuring = 1;
  i = a;
  j = b;
  while (measuring) {
    j++;
    if (j <= cols - 1) {
      if (the_image[i][j] == value)
        dist4++;
      else
        measuring = 0;
    } else
      measuring = 0;
  }
  if (dist4 <= result)
    result = dist4;
  if (dist4 < min1) {
    min2 = min1;
    min1 = dist4;
  } else if (dist4 < min2)
    min2 = dist4;
  measuring = 1;
  i = a;
  j = b;
  while (measuring) {
    j--;
    i--;
    if (j >= 0 && i >= 0) {
      if (the_image[i][j] == value)
        dist5++;
      else
        measuring = 0;
    } else
      measuring = 0;
  }
  dist5 = ((dist5 * 14) + 7) / 10;
  if (dist5 <= result)
    result = dist5;
  if (dist5 < min1) {
    min2 = min1;
    min1 = dist5;
  } else if (dist5 < min2)
    min2 = dist5;
  measuring = 1;
  i = a;
  j = b;
  while (measuring) {
    j++;
    i--;
    if (j <= cols - 1 && i >= 0) {
      if (the_image[i][j] == value)
        dist6++;
      else
        measuring = 0;
    } else
      measuring = 0;
  }
  dist6 = ((dist6 * 14) + 7) / 10;
  if (dist6 <= result)
    result = dist6;
  if (dist6 < min1) {
    min2 = min1;
    min1 = dist6;
  } else if (dist6 < min2)
    min2 = dist6;
  measuring = 1;
  i = a;
  j = b;
  while (measuring) {
    j++;
    i++;
    if (j <= cols - 1 && i <= rows - 1) {
      if (the_image[i][j] == value)
        dist7++;
      else
        measuring = 0;
    } else
      measuring = 0;
  }
  dist7 = ((dist7 * 14) + 7) / 10;
  if (dist7 <= result)
    result = dist7;
  if (dist7 < min1) {
    min2 = min1;
    min1 = dist7;
  } else if (dist7 < min2)
    min2 = dist7;
  measuring = 1;
  i = a;
  j = b;
  while (measuring) {
    j--;
    i++;
    if (j >= 0 && i <= rows - 1) {
      if (the_image[i][j] == value)
        dist8++;
      else
        measuring = 0;
    } else
      measuring = 0;
  }
  dist8 = ((dist8 * 14) + 7) / 10;
  if (dist8 <= result)
    result = dist8;
  if (dist8 < min1) {
    min2 = min1;
    min1 = dist8;
  } else if (dist8 < min2)
    min2 = dist8;
  if (min1 == min2)
    result = value;
  else
    result = 0;
  if (min1 == 0)
    result = 0;
  return (result);
}
```