user: 请将以下的汇编代码转换成C语言代码：

```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    L290
  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    L220
  lea    0x1(%r14),%rax
  nopl   0x0(%rax,%rax,1)
L376:
  mov    %rax,%rcx
  movsbl (%rax),%edi
  lea    0x1(%rax),%rax
  cmp    $0x20,%dil
  je     L376
  mov    %rcx,0x10(%rsp)
  nopl   (%rax)
L137:
  test   %dil,%dil
  je     L334
  cmp    $0x2d,%dil
  je     L219
  call   <isdigit@plt>
  test   %rax,%rax
  je     L114
  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    L396
  lea    0x1(%rcx),%rdx
  nop
L414:
  mov    %rdx,0x10(%rsp)
  mov    %rdx,%rcx
  movzbl (%rdx),%esi
  add    $0x1,%rdx
  cmp    $0x20,%sil
  je     L414
L396:
  cmp    $0x2d,%sil
  je     L333
  cmp    $0x2c,%sil
  je     L265
  test   %sil,%sil
  jne    L114
L265:
  mov    %rax,%r8
L36:
  mov    0x0(%rbp),%edx
  cmp    %r13d,%edx
  jge    L244
  test   %r8,%r8
  jle    L352
  cmp    %r8,%rax
  jl     L275
  test   %edx,%edx
  jle    L37
  movslq %edx,%rcx
  cmp    %r8,-0x8(%r12,%rcx,8)
  jge    L127
L37:
  cmp    %r8,%rbx
  jl     L179
  cmp    %rbx,%rax
  mov    (%rsp),%rsi
  movslq %edx,%rcx
  cmovg  %rbx,%rax
  add    $0x1,%edx
  mov    %r8,(%rsi,%rcx,8)
  mov    %rax,(%r12,%rcx,8)
  mov    %edx,0x0(%rbp)
L179:
  mov    0x10(%rsp),%rcx
  movsbl (%rcx),%edi
  cmp    $0x20,%dil
  jne    L207
  lea    0x1(%rcx),%rax
  nopl   0x0(%rax)
L308:
  mov    %rax,0x10(%rsp)
  mov    %rax,%rcx
  movsbl (%rax),%edi
  add    $0x1,%rax
  cmp    $0x20,%dil
  je     L308
L207:
  cmp    $0x2c,%dil
  jne    L137
  lea    0x1(%rcx),%rax
  mov    %rax,0x10(%rsp)
  movsbl 0x1(%rcx),%edi
  cmp    $0x20,%dil
  jne    L169
  lea    0x2(%rcx),%rax
  nopw   0x0(%rax,%rax,1)
L247:
  mov    %rax,0x10(%rsp)
  mov    %rax,%rcx
  movsbl (%rax),%edi
  add    $0x1,%rax
  cmp    $0x20,%dil
  je     L247
  jmp    L137
L114:
  movl   $0x7e,(%r15)
  lea    D63(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %r14,%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
L109:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L139
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L219:
  mov    $0x1,%r8d
L144:
  lea    0x1(%rcx),%rax
  mov    %rax,0x10(%rsp)
  movsbl 0x1(%rcx),%edi
  cmp    $0x20,%dil
  jne    L2
  add    $0x2,%rcx
  nopl   (%rax)
L75:
  mov    %rcx,0x10(%rsp)
  movsbl (%rcx),%edi
  add    $0x1,%rcx
  cmp    $0x20,%dil
  je     L75
L2:
  mov    %r8,0x8(%rsp)
  call   <isdigit@plt>
  mov    0x8(%rsp),%r8
  test   %rax,%rax
  jne    L256
  mov    0x10(%rsp),%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L357
  test   %al,%al
  jne    L114
L357:
  mov    %rbx,%rax
  jmp    L36
L256:
  mov    0x10(%rsp),%rdi
  lea    0x10(%rsp),%rsi
  mov    $0xa,%edx
  call   <strtol@plt>
  mov    0x8(%rsp),%r8
  jmp    L36
L290:
  movl   $0x7e,(%r15)
  lea    D30(%rip),%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
  jmp    L109
L334:
  mov    0x0(%rbp),%eax
  test   %eax,%eax
  jne    L91
  mov    (%rsp),%rax
  movq   $0x1,(%rax)
  mov    %rbx,(%r12)
  movl   $0x1,0x0(%rbp)
L91:
  mov    (%r15),%eax
  jmp    L109
L244:
  movl   $0x7e,(%r15)
  lea    D33(%rip),%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
  jmp    L109
L275:
  movl   $0x7e,(%r15)
  lea    D34(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %r14,%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
  jmp    L109
L352:
  movl   $0x7e,(%r15)
  lea    D22(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %r14,%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
  jmp    L109
L220:
  mov    %r14,%rcx
  jmp    L137
L127:
  movl   $0x7e,(%r15)
  lea    D48(%rip),%rdi
  call   <ffpmsg@plt>
  lea    D44(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %r14,%rdi
  call   <ffpmsg@plt>
  mov    (%r15),%eax
  jmp    L109
L169:
  mov    %rax,%rcx
  jmp    L137
L139:
  call   <__stack_chk_fail@plt>
L333:
  mov    %rax,%r8
  jmp    L144
```

tool_calls: name: read_data
arguments: label: D63
type: string
name: read_data
arguments: label: D30
type: string
name: read_data
arguments: label: D33
type: string
name: read_data
arguments: label: D34
type: string
name: read_data
arguments: label: D22
type: string
name: read_data
arguments: label: D48
type: string
name: read_data
arguments: label: D44
type: string

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

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

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

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

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

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

tool: D44:   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);
}
```