user: Demonstrate the C code that generates the assembly output below:

```asm
<build_map>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r12
  test   %rdi,%rdi
  je     L269
  mov    %rsi,%rbx
  mov    D24(%rip),%rsi
  test   %rsi,%rsi
  je     L190
  mov    D33(%rip),%ebp
  movslq %ebp,%rdx
  call   <strncmp@plt>
  movslq %ebp,%rdx
  lea    (%r12,%rdx,1),%r13
  test   %eax,%eax
  je     L102
L190:
  mov    %r12,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%r14d
  mov    %r14d,%esi
  mov    $0x5,%edi
  mov    $0x0,%eax
  call   <mem@plt>
  mov    %eax,%ebp
  mov    $0x0,%r13d
  test   %eax,%eax
  je     L102
  mov    %r14d,%esi
  mov    $0x6,%edi
  mov    $0x0,%eax
  call   <mem@plt>
  movslq %eax,%r13
  mov    %r13,D28(%rip)
  test   %eax,%eax
  je     L202
  movslq %ebp,%rbp
  movb   $0x0,0x0(%r13)
  movb   $0x0,0x0(%rbp)
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  lea    0x1(%rbp),%rdx
  movzbl 0x1(%rbp),%eax
  test   %al,%al
  je     L248
  mov    $0x0,%esi
  mov    $0x0,%r9d
  mov    $0x0,%ecx
  mov    $0x0,%r12d
  mov    $0x1,%r8d
  mov    $0x0,%edi
  jmp    L125
L174:
  movzbl (%rdx),%esi
  movslq %ecx,%rax
  mov    %sil,0x0(%rbp,%rax,1)
  lea    0x1(%rcx),%ecx
  lea    0x1(%rdx),%rdx
  mov    %edi,%esi
L149:
  movzbl (%rdx),%eax
  test   %al,%al
  je     L147
L125:
  test   %esi,%esi
  je     L96
  cmp    $0x2d,%al
  jne    L174
  movslq %ecx,%rax
  movb   $0x5c,0x0(%rbp,%rax,1)
  lea    0x1(%rcx),%ecx
  jmp    L174
L96:
  cmp    $0x5c,%al
  je     L182
  cmp    $0x7d,%al
  je     L267
  add    $0x1,%rdx
  movslq %ecx,%r10
  mov    %al,0x0(%rbp,%r10,1)
  lea    0x1(%rcx),%ecx
  jmp    L149
L182:
  add    $0x1,%rdx
  mov    %r8d,%esi
  jmp    L149
L267:
  test   %r9d,%r9d
  jne    L255
  lea    0x1(%rcx),%r10d
  movslq %ecx,%rcx
  movb   $0x0,0x0(%rbp,%rcx,1)
  lea    0x1(%rdx),%rax
  movzbl 0x1(%rdx),%edx
  cmp    $0x20,%dl
  je     L163
  cmp    $0x9,%dl
  jne    L137
L163:
  add    $0x1,%rax
  movzbl (%rax),%edx
  cmp    $0x20,%dl
  je     L163
  cmp    $0x9,%dl
  je     L163
L137:
  cmp    $0x7b,%dl
  jne    L292
  movslq %r10d,%r12
  add    %rbp,%r12
  lea    0x1(%rax),%rdx
  mov    %r9d,%esi
  mov    %r10d,%ecx
  mov    %r8d,%r9d
  jmp    L149
L255:
  movslq %ecx,%rcx
  movb   $0x0,0x0(%rbp,%rcx,1)
  lea    0x1(%rdx),%r13
  mov    %r13,%rax
  sub    %rbp,%rax
  mov    %eax,D28(%rip)
  mov    $0x0,%eax
L48:
  mov    %al,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    $0x100,%rax
  jne    L48
  mov    $0x0,%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <nextch@plt>
  mov    $0x1,%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <nextch@plt>
  jmp    L168
L147:
  mov    $0x0,%r13d
L102:
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L104:
  mov    $0x1,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <nextch@plt>
  movsbq %bpl,%rbp
  mov    %al,(%rbx,%rbp,1)
L168:
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <nextch@plt>
  mov    %eax,%ebp
  test   %al,%al
  jne    L104
  jmp    L102
L269:
  mov    %rdi,%r13
  jmp    L102
L202:
  mov    $0x0,%r13d
  jmp    L102
L248:
  mov    $0x0,%r13d
  jmp    L102
L292:
  mov    $0x0,%r13d
  jmp    L102
```

assistant: ```c
char *build_map(s, map)
char *s;
char *map;
{
  char *in;
  char *out;
  char *str;
  char *tmp;
  char c;
  int i = 0;
  int range_count = 0;
  int seenbs = 0;
  static char *last = 0;
  static int last_len;
  out = 0;
  if (!s) {
    return 0;
  }
  if (last && !strncmp(s, last, last_len)) {
    return s + last_len;
  } else {
    int len = strlen(s) + 1;
    if (!(str = mem(5, len)) || !(last = mem(6, len))) {
      return 0;
    }
    str[0] = last[0] = '\0';
    strcat(str, s);
    strcat(last, s);
  }
  tmp = str + 1;
  in = str;
  while (*tmp) {
    if (seenbs) {
      if (*tmp == '-') {
        str[i++] = '\\';
      }
      str[i++] = *tmp++;
      seenbs = 0;
    } else {
      if (*tmp == '\\') {
        seenbs = 1;
        tmp++;
      } else if (*tmp == '}') {
        if (!range_count) {
          range_count = 1;
          str[i++] = '\0';
          tmp++;
          while (*tmp == ' ' || *tmp == '\t') {
            tmp++;
          }
          if (*tmp != '{') {
            return 0;
          }
          out = str + i;
          tmp++;
        } else {
          str[i++] = '\0';
          tmp++;
          range_count = 2;
          break;
        }
      } else {
        str[i++] = *tmp++;
      }
    }
  }
  if (range_count != 2) {
    return 0;
  }
  last_len = tmp - str;
  for (i = 0; i < 1 << 8; i++) {
    map[i] = i;
  }
  (void)nextch(in, 0);
  (void)nextch(out, 1);
  while ((c = nextch((char *)0, 0))) {
    map[(int)c] = nextch((char *)0, 1);
  }
  return tmp;
}
```