user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<router_rewrite_metric>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %rdi,%r13
  xor    %edi,%edi
  push   %r12
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  sub    $0x38,%rsp
  cmpq   $0x0,0x70(%rsp)
  mov    %rsi,0x10(%rsp)
  setne  %dil
  mov    %r9,0x8(%rsp)
  call   <assert@plt>
  mov    0x70(%rsp),%rax
  movslq (%rax),%rbx
  cmp    $0x1fff,%rbx
  ja     L573
  lea    (%r15,%rbx,1),%rsi
  cmp    %rsi,%r15
  jae    L821
  lea    0x1(%r15),%rcx
  mov    %r13,%rdx
  lea    -0x1(%rbx),%rax
  sub    %rcx,%rdx
  cmp    $0xe,%rdx
  jbe    L757
  cmp    $0x6,%rax
  jbe    L757
  cmp    $0xe,%rax
  jbe    L687
  mov    %rbx,%rdx
  xor    %eax,%eax
  and    $0xfffffffffffffff0,%rdx
L108:
  movdqu (%r15,%rax,1),%xmm0
  movups %xmm0,0x0(%r13,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L108
  mov    %rbx,%rcx
  and    $0xfffffffffffffff0,%rcx
  lea    0x0(%r13,%rcx,1),%rdx
  lea    (%r15,%rcx,1),%rax
  cmp    %rcx,%rbx
  je     L629
  mov    %rbx,%rdi
  sub    %rcx,%rdi
  lea    -0x1(%rdi),%r8
  cmp    $0x6,%r8
  jbe    L504
L713:
  mov    (%r15,%rcx,1),%r8
  mov    %r8,0x0(%r13,%rcx,1)
  mov    %rdi,%rcx
  and    $0xfffffffffffffff8,%rcx
  add    %rcx,%rdx
  add    %rcx,%rax
  cmp    %rcx,%rdi
  je     L629
L504:
  movzbl (%rax),%ecx
  mov    %cl,(%rdx)
  lea    0x1(%rax),%rcx
  cmp    %rcx,%rsi
  jbe    L629
  movzbl 0x1(%rax),%ecx
  mov    %cl,0x1(%rdx)
  lea    0x2(%rax),%rcx
  cmp    %rcx,%rsi
  jbe    L629
  movzbl 0x2(%rax),%ecx
  mov    %cl,0x2(%rdx)
  lea    0x3(%rax),%rcx
  cmp    %rcx,%rsi
  jbe    L629
  movzbl 0x3(%rax),%ecx
  mov    %cl,0x3(%rdx)
  lea    0x4(%rax),%rcx
  cmp    %rcx,%rsi
  jbe    L629
  movzbl 0x4(%rax),%ecx
  mov    %cl,0x4(%rdx)
  lea    0x5(%rax),%rcx
  cmp    %rcx,%rsi
  jbe    L629
  movzbl 0x5(%rax),%ecx
  mov    %cl,0x5(%rdx)
  lea    0x6(%rax),%rcx
  cmp    %rcx,%rsi
  jbe    L629
  movzbl 0x6(%rax),%eax
  mov    %al,0x6(%rdx)
L629:
  add    %r13,%rbx
L335:
  xor    %ecx,%ecx
  mov    %r14,0x18(%rsp)
  xor    %esi,%esi
  mov    %r13,%r14
  xor    %r12d,%r12d
  mov    %ecx,%r13d
  mov    %r15,%rcx
  cs nopw 0x0(%rax,%rax,1)
L724:
  mov    %rbx,%rdx
  movzbl 0x0(%rbp),%eax
  sub    %r14,%rdx
  test   %r12b,%r12b
  jne    L257
  cmp    $0x5c,%al
  je     L521
L257:
  cmp    $0x1,%r12b
  jne    L66
  test   %r13d,%r13d
  jne    L66
  cmp    $0x5f,%al
  je     L686
  cmp    $0x5e,%al
  je     L326
  lea    -0x30(%rax),%edi
  cmp    $0x9,%dil
  jbe    L668
L372:
  test   %esi,%esi
  je     L762
  movslq %esi,%rdi
  xor    %esi,%esi
  cmp    0x8(%rsp),%rdi
  ja     L762
  mov    0x70(%rsp),%r10
  lea    (%r10,%rdi,8),%r10
  movslq (%r10),%rdi
  test   %edi,%edi
  js     L762
  movslq 0x4(%r10),%r11
  lea    (%rcx,%rdi,1),%r9
  mov    %r9,%r15
  lea    (%rcx,%r11,1),%r8
  lea    (%r8,%rdx,1),%r10
  sub    %r9,%r10
  cmp    $0x1fff,%r10
  jbe    L438
  nopw   0x0(%rax,%rax,1)
L762:
  cmp    $0x5c,%al
  je     L525
  add    $0x1,%rdx
  cmp    $0x1fff,%rdx
  ja     L124
  mov    %al,(%rbx)
  movzbl 0x0(%rbp),%eax
  add    $0x1,%rbx
L124:
  test   %al,%al
  je     L551
  xor    %r13d,%r13d
  xor    %r12d,%r12d
L525:
  add    $0x1,%rbp
  jmp    L724
  xchg   %ax,%ax
L551:
  mov    0x70(%rsp),%rax
  lea    -0x1(%rbx),%rbp
  mov    %r14,%r13
  mov    %rcx,%r15
  mov    0x18(%rsp),%r14
  mov    %rbp,%r12
  movslq 0x4(%rax),%rsi
  sub    %r13,%r12
  lea    (%rcx,%rsi,1),%rdx
  lea    (%r14,%r12,1),%rcx
  sub    %rdx,%rcx
  mov    %rdx,%rax
  cmp    $0x1fff,%rcx
  ja     L573
  cmp    %r14,%rdx
  jae    L264
  lea    0x1(%r15,%rsi,1),%r8
  mov    %r14,%rcx
  mov    %rbp,%rsi
  sub    %rdx,%rcx
  sub    %r8,%rsi
  lea    -0x1(%rcx),%rdi
  cmp    $0xe,%rsi
  jbe    L87
  cmp    $0x6,%rdi
  jbe    L87
  cmp    $0xe,%rdi
  jbe    L852
  mov    %rcx,%rsi
  xor    %eax,%eax
  and    $0xfffffffffffffff0,%rsi
  xchg   %ax,%ax
L256:
  movdqu (%rdx,%rax,1),%xmm1
  movups %xmm1,-0x1(%rbx,%rax,1)
  add    $0x10,%rax
  cmp    %rsi,%rax
  jne    L256
  mov    %rcx,%rdi
  and    $0xfffffffffffffff0,%rdi
  lea    0x0(%rbp,%rdi,1),%rsi
  lea    (%rdx,%rdi,1),%rax
  cmp    %rcx,%rdi
  je     L378
  mov    %rcx,%r8
  sub    %rdi,%r8
  lea    -0x1(%r8),%r9
  cmp    $0x6,%r9
  jbe    L83
L319:
  mov    (%rdx,%rdi,1),%rdx
  mov    %rdx,-0x1(%rbx,%rdi,1)
  mov    %r8,%rdx
  and    $0xfffffffffffffff8,%rdx
  add    %rdx,%rsi
  add    %rdx,%rax
  cmp    %r8,%rdx
  je     L378
L83:
  movzbl (%rax),%edx
  mov    %dl,(%rsi)
  lea    0x1(%rax),%rdx
  cmp    %rdx,%r14
  jbe    L378
  movzbl 0x1(%rax),%edx
  mov    %dl,0x1(%rsi)
  lea    0x2(%rax),%rdx
  cmp    %rdx,%r14
  jbe    L378
  movzbl 0x2(%rax),%edx
  mov    %dl,0x2(%rsi)
  lea    0x3(%rax),%rdx
  cmp    %rdx,%r14
  jbe    L378
  movzbl 0x3(%rax),%edx
  mov    %dl,0x3(%rsi)
  lea    0x4(%rax),%rdx
  cmp    %rdx,%r14
  jbe    L378
  movzbl 0x4(%rax),%edx
  mov    %dl,0x4(%rsi)
  lea    0x5(%rax),%rdx
  cmp    %rdx,%r14
  jbe    L378
  movzbl 0x5(%rax),%edx
  mov    %dl,0x5(%rsi)
  lea    0x6(%rax),%rdx
  cmp    %rdx,%r14
  jbe    L378
  movzbl 0x6(%rax),%eax
  mov    %al,0x6(%rsi)
L378:
  add    %rcx,%rbp
  mov    %rbp,%r12
  sub    %r13,%r12
L264:
  mov    0x10(%rsp),%rax
  mov    %r14,%rdi
  mov    %rbp,(%rax)
  call   <strlen@plt>
  cltq
  add    %r12,%rax
  cmp    $0x1fff,%rax
  jbe    L129
L573:
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L66:
  test   %r12b,%r12b
  je     L762
  lea    -0x30(%rax),%edi
  cmp    $0x9,%dil
  ja     L372
L668:
  lea    (%rsi,%rsi,4),%eax
  movsbl %dil,%edi
  mov    $0x2,%r12d
  lea    (%rdi,%rax,2),%esi
  jmp    L525
  nopl   0x0(%rax,%rax,1)
L521:
  xor    %r13d,%r13d
  mov    $0x1,%r12d
  jmp    L525
  xchg   %ax,%ax
L686:
  mov    $0x1,%r13d
  mov    $0x1,%r12d
  jmp    L525
  nopl   0x0(%rax)
L326:
  mov    $0x2,%r13d
  mov    $0x1,%r12d
  jmp    L525
  nopl   0x0(%rax)
L277:
  mov    %al,0x0(%rbp)
  add    $0x1,%rbp
  add    $0x1,%r14
L129:
  movzbl (%r14),%eax
  test   %al,%al
  jne    L277
  movb   $0x0,0x0(%rbp)
  lea    0x1(%rbp),%rax
  add    $0x38,%rsp
  pop    %rbx
  sub    %r13,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L438:
  cmp    $0x1,%r13d
  je     L479
  cmp    $0x2,%r13d
  je     L536
  test   %r13d,%r13d
  jne    L762
  cmp    %r8,%r9
  jae    L762
  lea    0x1(%rcx,%rdi,1),%rsi
  mov    %rbx,%rdx
  sub    %rdi,%r11
  sub    %rsi,%rdx
  lea    -0x1(%r11),%rax
  cmp    $0xe,%rdx
  jbe    L841
  cmp    $0x6,%rax
  jbe    L841
  cmp    $0xe,%rax
  jbe    L347
  mov    %r11,%rdx
  xor    %eax,%eax
  and    $0xfffffffffffffff0,%rdx
  nop
L333:
  movdqu (%r9,%rax,1),%xmm2
  movups %xmm2,(%rbx,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L333
  mov    %r11,%rdx
  and    $0xfffffffffffffff0,%rdx
  lea    (%rbx,%rdx,1),%rax
  lea    (%r9,%rdx,1),%r15
  cmp    %rdx,%r11
  je     L734
  mov    %r11,%rsi
  sub    %rdx,%rsi
  lea    -0x1(%rsi),%rdi
  cmp    $0x6,%rdi
  jbe    L501
L604:
  mov    (%r9,%rdx,1),%rdi
  mov    %rdi,(%rbx,%rdx,1)
  mov    %rsi,%rdx
  and    $0xfffffffffffffff8,%rdx
  add    %rdx,%rax
  add    %rdx,%r15
  cmp    %rdx,%rsi
  je     L734
L501:
  movzbl (%r15),%edx
  mov    %dl,(%rax)
  lea    0x1(%r15),%rdx
  cmp    %rdx,%r8
  jbe    L734
  movzbl 0x1(%r15),%edx
  mov    %dl,0x1(%rax)
  lea    0x2(%r15),%rdx
  cmp    %rdx,%r8
  jbe    L734
  movzbl 0x2(%r15),%edx
  mov    %dl,0x2(%rax)
  lea    0x3(%r15),%rdx
  cmp    %rdx,%r8
  jbe    L734
  movzbl 0x3(%r15),%edx
  mov    %dl,0x3(%rax)
  lea    0x4(%r15),%rdx
  cmp    %rdx,%r8
  jbe    L734
  movzbl 0x4(%r15),%edx
  mov    %dl,0x4(%rax)
  lea    0x5(%r15),%rdx
  cmp    %rdx,%r8
  jbe    L734
  movzbl 0x5(%r15),%edx
  mov    %dl,0x5(%rax)
  lea    0x6(%r15),%rdx
  cmp    %rdx,%r8
  jbe    L734
  movzbl 0x6(%r15),%edx
  mov    %dl,0x6(%rax)
L734:
  add    %r11,%rbx
  movzbl 0x0(%rbp),%eax
  xor    %esi,%esi
  mov    %rbx,%rdx
  sub    %r14,%rdx
  jmp    L762
  nopl   (%rax)
L757:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L71:
  movzbl (%r15,%rax,1),%edx
  mov    %dl,0x0(%r13,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rbx
  jne    L71
  jmp    L629
  nopl   0x0(%rax,%rax,1)
L87:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L561:
  movzbl (%rdx,%rax,1),%esi
  mov    %sil,-0x1(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L561
  jmp    L378
  nop
L821:
  mov    %r13,%rbx
  jmp    L335
L687:
  mov    %rbx,%rdi
  mov    %r15,%rax
  mov    %r13,%rdx
  xor    %ecx,%ecx
  jmp    L713
L536:
  sub    %rdi,%r11
  lea    (%rbx,%r11,1),%rdi
  cmp    %r8,%r9
  jae    L762
  mov    %rcx,0x20(%rsp)
  mov    %rdi,%r15
  mov    %rbp,0x28(%rsp)
  mov    %r9,%rbp
  nopl   0x0(%rax,%rax,1)
L768:
  movsbl 0x0(%rbp),%edi
  add    $0x1,%rbx
  add    $0x1,%rbp
  call   <toupper@plt>
  mov    %al,-0x1(%rbx)
  cmp    %r15,%rbx
  jne    L768
L652:
  mov    0x28(%rsp),%rbp
  mov    %rbx,%rdx
  mov    0x20(%rsp),%rcx
  xor    %esi,%esi
  sub    %r14,%rdx
  movzbl 0x0(%rbp),%eax
  jmp    L762
L479:
  sub    %rdi,%r11
  lea    (%rbx,%r11,1),%rdi
  cmp    %r8,%r9
  jae    L762
  mov    %rcx,0x20(%rsp)
  mov    %rdi,%r15
  mov    %rbp,0x28(%rsp)
  mov    %r9,%rbp
  nopl   0x0(%rax)
L332:
  movsbl 0x0(%rbp),%edi
  add    $0x1,%rbx
  add    $0x1,%rbp
  call   <tolower@plt>
  mov    %al,-0x1(%rbx)
  cmp    %r15,%rbx
  jne    L332
  jmp    L652
L852:
  mov    %rbp,%rsi
  mov    %rcx,%r8
  xor    %edi,%edi
  jmp    L319
L841:
  xor    %eax,%eax
L239:
  movzbl (%r9,%rax,1),%edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%r11
  jne    L239
  jmp    L734
L347:
  mov    %r11,%rsi
  mov    %rbx,%rax
  xor    %edx,%edx
  jmp    L604
```

assistant: ```c
size_t router_rewrite_metric(char (*newmetric)[8192], char **newfirstspace, const char *metric, const char *firstspace, const char *replacement, const size_t nmatch, const regmatch_t *pmatch) {
  char escape = 0;
  int ref = 0;
  char *s = *newmetric;
  const char *p;
  const char *q;
  const char *t;
  enum rewrite_case { RETAIN, LOWER, UPPER } rcase = RETAIN;
  assert(pmatch != NULL);
  q = metric;
  t = metric + pmatch[0].rm_so;
  if (s - *newmetric + t - q < sizeof(*newmetric)) {
    while (q < t)
      *s++ = *q++;
  } else {
    return 0;
  }
  for (p = replacement;; p++) {
    switch (*p) {
    case '\\':
      if (!escape) {
        escape = 1;
        rcase = RETAIN;
        break;
      }
    default:
      if (escape == 1 && rcase == RETAIN && *p == '_') {
        rcase = LOWER;
      } else if (escape == 1 && rcase == RETAIN && *p == '^') {
        rcase = UPPER;
      } else if (escape && *p >= '0' && *p <= '9') {
        escape = 2;
        ref *= 10;
        ref += *p - '0';
      } else {
        if (escape) {
          if (ref > 0 && ref <= nmatch && pmatch[ref].rm_so >= 0) {
            q = metric + pmatch[ref].rm_so;
            t = metric + pmatch[ref].rm_eo;
            if (s - *newmetric + t - q < sizeof(*newmetric)) {
              switch (rcase) {
              case RETAIN:
                while (q < t)
                  *s++ = *q++;
                break;
              case LOWER:
                while (q < t)
                  *s++ = (char)tolower(*q++);
                break;
              case UPPER:
                while (q < t)
                  *s++ = (char)toupper(*q++);
                break;
              }
            }
          }
          ref = 0;
        }
        if (*p != '\\') {
          escape = 0;
          rcase = RETAIN;
          if (s - *newmetric + 1 < sizeof(*newmetric))
            *s++ = *p;
        }
      }
      break;
    }
    if (*p == '\0')
      break;
  }
  s--;
  q = metric + pmatch[0].rm_eo;
  t = firstspace;
  if (s - *newmetric + t - q < sizeof(*newmetric)) {
    while (q < t)
      *s++ = *q++;
  } else {
    return 0;
  }
  *newfirstspace = s;
  if (s - *newmetric + strlen(firstspace) < sizeof(*newmetric)) {
    for (p = firstspace; *p != '\0'; p++)
      *s++ = *p;
    *s++ = '\0';
    return s - *newmetric;
  }
  return 0;
}
```