user: What would the C source look like for the assembly code provided here:

```asm
<parse_coarse>:
  endbr64
  push   %r15
  push   %r14
  mov    %r9,%r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    %rcx,0x8(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  call   <strlen@plt>
  mov    $0x3a,%esi
  mov    %r13,%rdi
  mov    %rax,0x18(%rsp)
  call   <strchr@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L84
  cmpb   $0x2d,0x0(%r13)
  je     L122
  mov    D10(%rip),%r15
  lea    0x20(%rsp),%rsi
  mov    $0xa,%edx
  mov    %r13,%rdi
  movq   $0x0,(%r15)
  call   <strtoul@plt>
  cmpq   $0x0,(%r15)
  jne    L122
  cmp    %rbp,0x20(%rsp)
  jne    L122
  mov    D8(%rip),%rdx
  cmp    %rax,(%rdx)
  jb     L122
  lea    0x1(%rbp),%rdx
L200:
  mov    %eax,(%rbx)
  mov    $0x2d,%esi
  mov    %r13,%rdi
  mov    %rdx,(%r12)
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L20
  lea    0x1(%rax),%r15
  mov    0x10(%rsp),%rax
  mov    %r15,%rcx
  mov    %r15,(%rax)
  mov    0x18(%rsp),%rax
  sub    %r13,%rcx
  sub    %rcx,%rax
  mov    0x8(%rsp),%rcx
  mov    %rax,(%r14)
  mov    (%r12),%r14
  mov    %rbx,%rax
  sub    %r14,%rax
  mov    %rax,(%rcx)
  movsbl 0x1(%rbx),%edi
  test   %dil,%dil
  jne    L32
  jmp    L5
  nopl   0x0(%rax)
L3:
  movsbl 0x1(%r15),%edi
  add    $0x1,%r15
  test   %dil,%dil
  je     L71
L32:
  call   <is_revchar@plt>
  test   %eax,%eax
  jne    L3
L122:
  mov    $0xffffffff,%eax
L143:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L12
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L71:
  mov    (%r12),%r14
L5:
  movsbl (%r14),%edi
  test   %dil,%dil
  je     L172
  cmp    %r14,%rbx
  je     L172
  xor    %r12d,%r12d
  test   %rbx,%rbx
  setne  %r12b
  test   %rbp,%rbp
  setne  %bpl
  movzbl %bpl,%ebp
  jmp    L190
  nopl   0x0(%rax)
L136:
  add    $0x1,%r14
  movsbl (%r14),%edi
  cmp    %r14,%rbx
  je     L172
  test   %dil,%dil
  je     L172
L190:
  mov    %r12d,%edx
  mov    %ebp,%esi
  call   <is_uschar@plt>
  test   %eax,%eax
  jne    L136
  jmp    L122
  nopl   (%rax)
L172:
  xor    %eax,%eax
  jmp    L143
  nop
L84:
  mov    %r13,%rdx
  xor    %eax,%eax
  jmp    L200
  nopw   0x0(%rax,%rax,1)
L20:
  mov    0x18(%rsp),%rdi
  mov    0x10(%rsp),%rax
  add    %r13,%rdi
  mov    %rdi,(%rax)
  mov    0x8(%rsp),%rax
  movq   $0x0,(%r14)
  mov    (%r12),%r14
  sub    %r14,%rdi
  mov    %rdi,(%rax)
  jmp    L5
L12:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int parse_coarse(const char *v, unsigned *epoch, const char **upstream, size_t *us_len, const char **rev, size_t *rev_len) {
  char *col, *end, *hyp;
  const char *c;
  unsigned long u;
  size_t len = strlen(v);
  if ((col = strchr(v, ':')) != NULL) {
    if (v[0] == '-') {
      return -1;
    }
    errno = 0;
    u = strtoul(v, &end, 10);
    if (errno != 0 || end != col || u > UINT_MAX) {
      return -1;
    }
    *epoch = u;
    *upstream = col + 1;
  } else {
    *epoch = 0;
    *upstream = v;
  }
  if ((hyp = strchr(v, '-')) != NULL) {
    *rev = hyp + 1;
    *rev_len = len - ((hyp + 1) - v);
    *us_len = (hyp - *upstream);
    for (c = hyp + 1; *c != 0; c++) {
      if (!is_revchar(*c)) {
        return -1;
      }
    }
  } else {
    *rev = v + len;
    *rev_len = 0;
    *us_len = (*rev - *upstream);
  }
  c = *upstream;
  for (; *c != 0 && c != hyp; c++) {
    if (!is_uschar(*c, col != NULL, hyp != NULL)) {
      return -1;
    }
  }
  return 0;
}
```