user: 下面的汇编指令对应的C源代码是什么：

```asm
<reduce8>:
  endbr64
  mov    %edi,%ecx
  cmp    $0x1d,%edi
  jg     L22
  cmp    $0x1d,%esi
  jg     L22
  xor    %r10d,%r10d
  cmp    $0x1d,%edx
  jle    L57
L123:
  mov    %ecx,%eax
  mov    %esi,%edi
  push   %rbx
  neg    %eax
  cmovs  %ecx,%eax
  imul   %ecx,%eax
  neg    %edi
  cmovs  %esi,%edi
  imul   %esi,%edi
  add    %edi,%eax
  mov    %edx,%edi
  neg    %edi
  cmovs  %edx,%edi
  imul   %edx,%edi
  add    %edi,%eax
  mov    $0x10,%edi
  mov    %edi,%r9d
  sub    %esi,%r9d
  mov    %r9d,%r8d
  neg    %r8d
  cmovs  %r9d,%r8d
  sub    %edx,%edi
  mov    $0xd0,%r9d
  mov    %edi,%r11d
  imul   %esi,%r8d
  neg    %r11d
  cmovs  %edi,%r11d
  sub    %ecx,%r9d
  mov    %r9d,%edi
  imul   %edx,%r11d
  neg    %edi
  cmovs  %r9d,%edi
  imul   %ecx,%edi
  add    %r8d,%edi
  add    %r11d,%edi
  cmp    %eax,%edi
  jl     L143
  xor    %r10d,%r10d
  cmp    $0xffffffff,%eax
  je     L143
L248:
  mov    $0x10,%r9d
  mov    $0xe0,%ebx
  sub    %ecx,%r9d
  mov    %r9d,%edi
  neg    %edi
  cmovs  %r9d,%edi
  sub    %esi,%ebx
  mov    %ebx,%r9d
  imul   %ecx,%edi
  neg    %r9d
  cmovs  %ebx,%r9d
  imul   %esi,%r9d
  add    %edi,%r9d
  add    %r11d,%r9d
  cmp    $0xffffffff,%eax
  je     L221
  cmp    %r9d,%eax
  jg     L221
L41:
  mov    $0xf7,%r11d
  mov    $0xf5,%ebx
  sub    %ecx,%r11d
  mov    %r11d,%r9d
  neg    %r9d
  cmovs  %r11d,%r9d
  sub    %esi,%ebx
  mov    %ebx,%r11d
  imul   %ecx,%r9d
  neg    %r11d
  cmovs  %ebx,%r11d
  mov    $0x3a,%ebx
  sub    %edx,%ebx
  imul   %esi,%r11d
  add    %r11d,%r9d
  mov    %ebx,%r11d
  neg    %r11d
  cmovs  %ebx,%r11d
  imul   %edx,%r11d
  add    %r11d,%r9d
  cmp    $0xffffffff,%eax
  je     L46
  cmp    %r9d,%eax
  jg     L46
L246:
  mov    $0xf0,%r11d
  sub    %edx,%r11d
  mov    %r11d,%r9d
  neg    %r9d
  cmovs  %r11d,%r9d
  add    %edi,%r8d
  imul   %edx,%r9d
  add    %r9d,%r8d
  cmp    $0xffffffff,%eax
  je     L235
  cmp    %r8d,%eax
  jg     L235
L147:
  mov    $0xfb,%r11d
  mov    $0x3d,%ebx
  sub    %ecx,%r11d
  mov    %r11d,%r8d
  neg    %r8d
  cmovs  %r11d,%r8d
  sub    %esi,%ebx
  mov    %ebx,%r11d
  imul   %ecx,%r8d
  neg    %r11d
  cmovs  %ebx,%r11d
  mov    $0xf8,%ebx
  sub    %edx,%ebx
  imul   %esi,%r11d
  add    %r11d,%r8d
  mov    %ebx,%r11d
  neg    %r11d
  cmovs  %ebx,%r11d
  imul   %r11d,%edx
  add    %r8d,%edx
  cmp    $0xffffffff,%eax
  je     L225
  cmp    %edx,%eax
  jg     L225
L78:
  mov    $0xf0,%r8d
  sub    %esi,%r8d
  mov    %r8d,%edx
  neg    %edx
  cmovs  %r8d,%edx
  imul   %edx,%esi
  add    %esi,%edi
  add    %r9d,%edi
  cmp    $0xffffffff,%eax
  je     L130
  cmp    %edi,%eax
  jg     L130
L161:
  mov    $0xf0,%edi
  sub    %ecx,%edi
  mov    %edi,%edx
  neg    %edx
  cmovs  %edi,%edx
  imul   %ecx,%edx
  add    %esi,%edx
  add    %r9d,%edx
  cmp    %eax,%edx
  jl     L239
  cmp    $0xffffffff,%eax
  je     L239
  mov    %r10d,%eax
  pop    %rbx
  ret
  nopl   0x0(%rax,%rax,1)
L22:
  cmp    $0xc8,%esi
  setg   %dil
  cmp    $0xc8,%edx
  setg   %al
  test   %al,%dil
  je     L123
  mov    $0x7,%r10d
  cmp    $0xc8,%ecx
  jle    L123
L57:
  mov    %r10d,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L239:
  mov    $0x7,%r10d
  pop    %rbx
  mov    %r10d,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L130:
  mov    %edi,%eax
  mov    $0x6,%r10d
  jmp    L161
  nopw   0x0(%rax,%rax,1)
L225:
  mov    %edx,%eax
  mov    $0x5,%r10d
  jmp    L78
  nopl   (%rax)
L235:
  mov    %r8d,%eax
  mov    $0x4,%r10d
  jmp    L147
  cs nopw 0x0(%rax,%rax,1)
L46:
  mov    %r9d,%eax
  mov    $0x3,%r10d
  jmp    L246
  xchg   %ax,%ax
L221:
  mov    %r9d,%eax
  mov    $0x2,%r10d
  jmp    L41
  xchg   %ax,%ax
L143:
  mov    %edi,%eax
  mov    $0x1,%r10d
  jmp    L248
```

assistant: ```c
int reduce8(int r, int g, int b) {
  int colors_len = 8;
  int select = 0;
  int odistance = -1;
  int i, k = 1;
  int colors[][3] = {
      {0x00, 0x00, 0x00}, {0xd0, 0x10, 0x10}, {0x10, 0xe0, 0x10}, {0xf7, 0xf5, 0x3a}, {0x10, 0x10, 0xf0}, {0xfb, 0x3d, 0xf8}, {0x10, 0xf0, 0xf0}, {0xf0, 0xf0, 0xf0},
  };
  r /= k;
  r *= k;
  g /= k;
  g *= k;
  b /= k;
  b *= k;
  if (r < 30 && g < 30 && b < 30)
    return 0;
  if (r > 200 && g > 200 && b > 200)
    return 7;
  odistance = -1;
  for (i = 0; i < colors_len; i++) {
    int distance = (((((colors[i][0] - r)) < 0) ? -((colors[i][0] - r)) : ((colors[i][0] - r))) * (r)) + (((((colors[i][1] - g)) < 0) ? -((colors[i][1] - g)) : ((colors[i][1] - g))) * (g)) + (((((colors[i][2] - b)) < 0) ? -((colors[i][2] - b)) : ((colors[i][2] - b))) * (b));
    if (odistance == -1 || distance < odistance) {
      odistance = distance;
      select = i;
    }
  }
  return select;
}
```