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

```asm
<ffrwrg>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %r8,(%rsp)
  mov    0x60(%rsp),%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  mov    (%r15),%eax
  test   %eax,%eax
  jg     L109
  mov    %rsi,%rbx
  test   %rsi,%rsi
  jle    L136
  mov    %rdi,0x10(%rsp)
  mov    %rdi,%r14
  mov    %edx,%r13d
  mov    %rcx,%rbp
  movl   $0x0,(%rcx)
  movsbl (%rdi),%edi
  mov    %r9,%r12
  cmp    $0x20,%dil
  jne    L345
  lea    0x1(%r14),%rax
  nopl   0x0(%rax,%rax,1)
L42:
  mov    %rax,%rcx
  movsbl (%rax),%edi
  lea    0x1(%rax),%rax
  cmp    $0x20,%dil
  je     L42
  mov    %rcx,0x10(%rsp)
  nopl   (%rax)
L169:
  test   %dil,%dil
  je     L391
  cmp    $0x2d,%dil
  je     L85
  call   <isdigit@plt>
  test   %rax,%rax
  je     L293
  mov    0x10(%rsp),%rdi
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtol@plt>
  mov    0x10(%rsp),%rcx
  movzbl (%rcx),%esi
  cmp    $0x20,%sil
  jne    L415
  lea    0x1(%rcx),%rdx
  nop
L359:
  mov    %rdx,0x10(%rsp)
  mov    %rdx,%rcx
  movzbl (%rdx),%esi
  add    $0x1,%rdx
  cmp    $0x20,%sil
  je     L359
L415:
  cmp    $0x2d,%sil
  je     L191
  cmp    $0x2c,%sil
  je     L34
  test   %sil,%sil
  jne    L293
L34:
  mov    %rax,%r8
L394:
  mov    0x0(%rbp),%edx
  cmp    %r13d,%edx
  jge    L59
  test   %r8,%r8
  jle    L174
  cmp    %r8,%rax
  jl     L117
  test   %edx,%edx
  jle    L383
  movslq %edx,%rcx
  cmp    %r8,-0x8(%r12,%rcx,8)
  jge    L46
L383:
  cmp    %r8,%rbx
  jl     L70
  cmp    %rbx,%rax
  mov    (%rsp),%rdi
  movslq %edx,%rcx
  cmovg  %rbx,%rax
  add    $0x1,%edx
  mov    %r8,(%rdi,%rcx,8)
  mov    %rax,(%r12,%rcx,8)
  mov    %edx,0x0(%rbp)
L70:
  mov    0x10(%rsp),%rsi
  movzbl (%rsi),%edx
  cmp    $0x20,%dl
  jne    L276
  lea    0x1(%rsi),%rax
  nopl   0x0(%rax,%rax,1)
L152:
  mov    %rax,0x10(%rsp)
  mov    %rax,%rsi
  movzbl (%rax),%edx
  add    $0x1,%rax
  cmp    $0x20,%dl
  je     L152
L276:
  cmp    $0x2c,%dl
  je     L71
  mov    0x10(%rsp),%rcx
  movsbl (%rcx),%edi
  jmp    L169
L293:
  movl   $0x7e,(%r15)
  lea    D32(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %r14,%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
L109:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L380
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L85:
  mov    $0x1,%r8d
L66:
  lea    0x1(%rcx),%rax
  mov    %rax,0x10(%rsp)
  movsbl 0x1(%rcx),%edi
  cmp    $0x20,%dil
  jne    L218
  add    $0x2,%rcx
  nopl   (%rax)
L399:
  mov    %rcx,0x10(%rsp)
  movsbl (%rcx),%edi
  add    $0x1,%rcx
  cmp    $0x20,%dil
  je     L399
L218:
  mov    %r8,0x8(%rsp)
  call   <isdigit@plt>
  mov    0x8(%rsp),%r8
  test   %rax,%rax
  jne    L36
  mov    0x10(%rsp),%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L100
  test   %al,%al
  jne    L293
L100:
  mov    %rbx,%rax
  jmp    L394
L36:
  mov    0x10(%rsp),%rdi
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtol@plt>
  mov    0x8(%rsp),%r8
  jmp    L394
L136:
  movl   $0x7e,(%r15)
  lea    D47(%rip),%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
  jmp    L109
L391:
  mov    0x0(%rbp),%eax
  test   %eax,%eax
  jne    L89
  mov    (%rsp),%rax
  movq   $0x1,(%rax)
  mov    %rbx,(%r12)
  movl   $0x1,0x0(%rbp)
L89:
  mov    (%r15),%eax
  jmp    L109
L59:
  movl   $0x7e,(%r15)
  lea    D1(%rip),%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
  jmp    L109
L117:
  movl   $0x7e,(%r15)
  lea    D33(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %r14,%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
  jmp    L109
L174:
  movl   $0x7e,(%r15)
  lea    D6(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %r14,%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
  jmp    L109
L71:
  lea    0x1(%rsi),%rcx
  mov    %rcx,0x10(%rsp)
  movsbl 0x1(%rsi),%edi
  cmp    $0x20,%dil
  jne    L169
  add    $0x2,%rsi
  nopl   0x0(%rax)
L157:
  mov    %rsi,0x10(%rsp)
  mov    %rsi,%rcx
  movsbl (%rsi),%edi
  add    $0x1,%rsi
  cmp    $0x20,%dil
  je     L157
  jmp    L169
L345:
  mov    %r14,%rcx
  jmp    L169
L46:
  movl   $0x7e,(%r15)
  lea    D37(%rip),%rdi
  call   <ffpmsg@plt>
  lea    D36(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %r14,%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
  jmp    L109
L191:
  mov    %rax,%r8
  jmp    L66
L380:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D32
data_type: string
name: unpack_data
arguments: data_label: D47
data_type: string
name: unpack_data
arguments: data_label: D1
data_type: string
name: unpack_data
arguments: data_label: D33
data_type: string
name: unpack_data
arguments: data_label: D6
data_type: string
name: unpack_data
arguments: data_label: D37
data_type: string
name: unpack_data
arguments: data_label: D36
data_type: string

tool: D32: Syntax error in this row range list:

tool: D47: Input maximum range value is <= 0 (fits_parse_ranges)

tool: D1: Overflowed maximum number of ranges (fits_parse_ranges)

tool: D33: Syntax error in this row range list: min > max

tool: D6: Syntax error in this row range list: row number < 1

tool: D37: Syntax error in this row range list.  Range minimum is

tool: D36:   less than or equal to previous range maximum

assistant: ```c
int ffrwrg(char *rowlist, long maxrows, int maxranges, int *numranges, long *minrow, long *maxrow, int *status) {
  char *next;
  long minval, maxval;
  if (*status > 0)
    return (*status);
  if (maxrows <= 0) {
    *status = 126;
    ffpmsg("Input maximum range value is <= 0 (fits_parse_ranges)");
    return (*status);
  }
  next = rowlist;
  *numranges = 0;
  while (*next == ' ')
    next++;
  while (*next != '\0') {
    if (*next == '-') {
      minval = 1;
    } else if (isdigit((int)*next)) {
      minval = strtol(next, &next, 10);
    } else {
      *status = 126;
      ffpmsg("Syntax error in this row range list:");
      ffpmsg(rowlist);
      return (*status);
    }
    while (*next == ' ')
      next++;
    if (*next == '-') {
      next++;
      while (*next == ' ')
        next++;
      if (isdigit((int)*next)) {
        maxval = strtol(next, &next, 10);
      } else if (*next == ',' || *next == '\0') {
        maxval = maxrows;
      } else {
        *status = 126;
        ffpmsg("Syntax error in this row range list:");
        ffpmsg(rowlist);
        return (*status);
      }
    } else if (*next == ',' || *next == '\0') {
      maxval = minval;
    } else {
      *status = 126;
      ffpmsg("Syntax error in this row range list:");
      ffpmsg(rowlist);
      return (*status);
    }
    if (*numranges + 1 > maxranges) {
      *status = 126;
      ffpmsg("Overflowed maximum number of ranges (fits_parse_ranges)");
      return (*status);
    }
    if (minval < 1) {
      *status = 126;
      ffpmsg("Syntax error in this row range list: row number < 1");
      ffpmsg(rowlist);
      return (*status);
    }
    if (maxval < minval) {
      *status = 126;
      ffpmsg("Syntax error in this row range list: min > max");
      ffpmsg(rowlist);
      return (*status);
    }
    if (*numranges > 0) {
      if (minval <= maxrow[(*numranges) - 1]) {
        *status = 126;
        ffpmsg("Syntax error in this row range list.  Range minimum is");
        ffpmsg("  less than or equal to previous range maximum");
        ffpmsg(rowlist);
        return (*status);
      }
    }
    if (minval <= maxrows) {
      if (maxval > maxrows)
        maxval = maxrows;
      minrow[*numranges] = minval;
      maxrow[*numranges] = maxval;
      (*numranges)++;
    }
    while (*next == ' ')
      next++;
    if (*next == ',') {
      next++;
      while (*next == ' ')
        next++;
    }
  }
  if (*numranges == 0) {
    minrow[0] = 1;
    maxrow[0] = maxrows;
    *numranges = 1;
  }
  return (*status);
}
```