user: What is the c source code of the assembly code below:

```asm
<get_str>:
  endbr64
  mov    (%rdi),%r9
  movzbl (%r9),%eax
  test   %al,%al
  je     L309
  test   %ecx,%ecx
  jle    L192
  test   %rsi,%rsi
  je     L366
  test   %rdx,%rdx
  je     L302
  movslq %ecx,%rcx
  xor    %r8d,%r8d
  add    %rsi,%rcx
  jmp    L417
  nopl   0x0(%rax)
L465:
  movzbl %al,%r9d
  cmpb   $0x0,(%rdx,%r9,1)
  je     L423
  mov    %al,(%rsi)
  mov    (%rdi),%rax
  add    $0x1,%rsi
  add    $0x1,%r8d
  lea    0x1(%rax),%r9
  mov    %r9,(%rdi)
  movzbl 0x1(%rax),%eax
  test   %al,%al
  je     L423
L417:
  cmp    %rsi,%rcx
  jne    L465
L226:
  mov    %rcx,%rsi
L423:
  movb   $0x0,(%rsi)
L419:
  mov    %r8d,%eax
  ret
  xchg   %ax,%ax
L192:
  test   %rsi,%rsi
  je     L87
  test   %rdx,%rdx
  je     L243
  xor    %r8d,%r8d
  jmp    L194
  nopw   0x0(%rax,%rax,1)
L20:
  mov    %al,(%rsi)
  mov    (%rdi),%rax
  add    $0x1,%rsi
  add    $0x1,%r8d
  lea    0x1(%rax),%rcx
  mov    %rcx,(%rdi)
  movzbl 0x1(%rax),%eax
  test   %al,%al
  je     L423
L194:
  movzbl %al,%ecx
  cmpb   $0x0,(%rdx,%rcx,1)
  jne    L20
  jmp    L423
  nopw   0x0(%rax,%rax,1)
L366:
  xor    %r8d,%r8d
  test   %rdx,%rdx
  je     L348
  nopl   0x0(%rax,%rax,1)
L271:
  cmpb   $0x0,(%rdx,%rax,1)
  je     L419
  mov    %r9,%rax
  add    $0x1,%r9
  add    $0x1,%r8d
  mov    %r9,(%rdi)
  movzbl 0x1(%rax),%eax
  test   %al,%al
  je     L419
  cmp    %r8d,%ecx
  jne    L271
L38:
  mov    %ecx,%r8d
  jmp    L419
  nopl   (%rax)
L390:
  cmp    $0x8,%al
  jg     L419
L68:
  mov    %r9,%rax
  add    $0x1,%r9
  add    $0x1,%r8d
  mov    %r9,(%rdi)
  movzbl 0x1(%rax),%eax
  test   %al,%al
  je     L419
  cmp    %r8d,%ecx
  je     L38
L348:
  cmp    $0xd,%al
  jle    L390
  cmp    $0x20,%al
  jne    L68
  jmp    L419
L243:
  mov    %rsi,%rdx
  xor    %r8d,%r8d
  jmp    L180
  nopl   0x0(%rax)
L244:
  cmp    $0x8,%al
  jg     L320
L0:
  mov    %al,(%rdx)
  mov    (%rdi),%rax
  add    $0x1,%rdx
  add    $0x1,%r8d
  lea    0x1(%rax),%rcx
  mov    %rcx,(%rdi)
  movzbl 0x1(%rax),%eax
  test   %al,%al
  je     L509
L180:
  cmp    $0xd,%al
  jle    L244
  cmp    $0x20,%al
  jne    L0
  nopl   0x0(%rax,%rax,1)
L320:
  test   %rsi,%rsi
  je     L419
L509:
  mov    %rdx,%rsi
  jmp    L423
L302:
  mov    %rsi,%rdx
  xor    %r8d,%r8d
  jmp    L383
  nopl   0x0(%rax)
L255:
  cmp    $0x8,%al
  jg     L320
L503:
  mov    %al,(%rdx)
  mov    (%rdi),%rax
  add    $0x1,%rdx
  add    $0x1,%r8d
  lea    0x1(%rax),%r9
  mov    %r9,(%rdi)
  movzbl 0x1(%rax),%eax
  test   %al,%al
  je     L509
  cmp    %r8d,%ecx
  je     L164
L383:
  cmp    $0xd,%al
  jle    L255
  cmp    $0x20,%al
  jne    L503
  jmp    L320
L87:
  xor    %r8d,%r8d
  test   %rdx,%rdx
  jne    L375
  jmp    L343
  nopl   0x0(%rax)
L372:
  mov    %r9,%rax
  add    $0x1,%r9
  add    $0x1,%r8d
  mov    %r9,(%rdi)
  movzbl 0x1(%rax),%eax
  test   %al,%al
  je     L419
L375:
  cmpb   $0x0,(%rdx,%rax,1)
  jne    L372
  jmp    L419
  nopl   (%rax)
L472:
  cmp    $0x8,%al
  jg     L419
L491:
  mov    %r9,%rax
  add    $0x1,%r9
  add    $0x1,%r8d
  mov    %r9,(%rdi)
  movzbl 0x1(%rax),%eax
  test   %al,%al
  je     L419
L343:
  cmp    $0xd,%al
  jle    L472
  cmp    $0x20,%al
  jne    L491
  jmp    L419
L164:
  mov    %rdx,%rcx
  jmp    L226
L309:
  mov    %rsi,%rdx
  xor    %r8d,%r8d
  jmp    L320
```

assistant: ```c
int get_str(const char **str, char *ptr, char *set, int width) {
  int n, w, skip;
  unsigned char c;
  w = (width > 0);
  skip = (ptr == NULL);
  for (n = 0; **str; (*str)++, n++) {
    c = **str;
    if ((w && width-- == 0) || (!set && (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v')))
      break;
    if (set && (set[c] == 0))
      break;
    if (!skip)
      *ptr++ = c;
  }
  if (!skip)
    *ptr = 0;
  return n;
}
```