user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<proc_gps_input>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x200,%rsp
  mov    %edi,-0x1d4(%rbp)
  mov    %rsi,-0x1e0(%rbp)
  mov    %edx,-0x1d8(%rbp)
  mov    %rcx,-0x1e8(%rbp)
  mov    %r8,-0x1f0(%rbp)
  mov    %r9,-0x1f8(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x200(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x1c4(%rbp)
  cmpl   $0x0,-0x1d4(%rbp)
  jg     L110
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    -0x1d4(%rbp),%eax
  jmp    L43
L110:
  mov    -0x1e0(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x1d4(%rbp),%eax
  add    %eax,%edx
  mov    -0x1e0(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L191
L193:
  mov    -0x1a0(%rbp),%rax
  sub    -0x1e8(%rbp),%rax
  add    $0x1,%eax
  mov    %eax,%edx
  mov    -0x1e8(%rbp),%rcx
  mov    -0x200(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x1a0(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x1e8(%rbp),%rax
  mov    $0x6,%edx
  lea    D70(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L106
  mov    -0x1e8(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x190(%rbp),%rsi
  lea    -0x110(%rbp),%rax
  mov    $0xd,%ecx
  lea    D42(%rip),%rdx
  mov    %rax,%rdi
  call   <my_split@plt>
  mov    %eax,-0x1b8(%rbp)
  cmpl   $0xc,-0x1b8(%rbp)
  je     L218
  cmpl   $0xd,-0x1b8(%rbp)
  jne    L205
L218:
  lea    -0x1cc(%rbp),%rax
  mov    %rax,%rdi
  call   <compass_get_heading@plt>
  test   %rax,%rax
  je     L64
  movss  -0x1cc(%rbp),%xmm0
  cvttss2si %xmm0,%edx
  lea    -0x124(%rbp),%rax
  mov    %edx,%ecx
  lea    D50(%rip),%rdx
  mov    $0xa,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  jmp    L311
L64:
  movb   $0x0,-0x124(%rbp)
L311:
  lea    -0x1c8(%rbp),%rax
  mov    %rax,%rdi
  call   <tacho_get_speed@plt>
  test   %rax,%rax
  je     L96
  movss  -0x1c8(%rbp),%xmm0
  cvttss2si %xmm0,%edx
  lea    -0x11a(%rbp),%rax
  mov    %edx,%ecx
  lea    D50(%rip),%rdx
  mov    $0xa,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  jmp    L30
L96:
  movb   $0x0,-0x11a(%rbp)
L30:
  mov    -0x1b8(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x190(%rbp,%rax,8),%rax
  mov    $0x2a,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x198(%rbp)
  cmpq   $0x0,-0x198(%rbp)
  je     L174
  mov    -0x198(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0x2,%eax
  jle    L174
  mov    -0x198(%rbp),%rax
  add    $0x1,%rax
  mov    $0x10,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strtoul@plt>
  mov    %eax,-0x1bc(%rbp)
  movl   $0x0,-0x1c0(%rbp)
  jmp    L159
L197:
  mov    -0x150(%rbp),%rdx
  mov    -0x1c0(%rbp),%eax
  cltq
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  xor    %eax,-0x1bc(%rbp)
  addl   $0x1,-0x1c0(%rbp)
L159:
  mov    -0x150(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x1c0(%rbp)
  jl     L197
  movl   $0x0,-0x1c0(%rbp)
  jmp    L20
L219:
  mov    -0x1c0(%rbp),%eax
  cltq
  movzbl -0x124(%rbp,%rax,1),%eax
  movsbl %al,%eax
  xor    %eax,-0x1bc(%rbp)
  addl   $0x1,-0x1c0(%rbp)
L20:
  lea    -0x124(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x1c0(%rbp)
  jl     L219
  movzbl -0x11a(%rbp),%eax
  test   %al,%al
  je     L117
  movl   $0x0,-0x1c0(%rbp)
  jmp    L42
L160:
  mov    -0x158(%rbp),%rdx
  mov    -0x1c0(%rbp),%eax
  cltq
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  xor    %eax,-0x1bc(%rbp)
  addl   $0x1,-0x1c0(%rbp)
L42:
  mov    -0x158(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x1c0(%rbp)
  jl     L160
  movl   $0x0,-0x1c0(%rbp)
  jmp    L296
L154:
  mov    -0x1c0(%rbp),%eax
  cltq
  movzbl -0x11a(%rbp,%rax,1),%eax
  movsbl %al,%eax
  xor    %eax,-0x1bc(%rbp)
  addl   $0x1,-0x1c0(%rbp)
L296:
  lea    -0x11a(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x1c0(%rbp)
  jl     L154
L117:
  mov    -0x1bc(%rbp),%eax
  movzbl %al,%edx
  lea    -0x127(%rbp),%rax
  mov    %edx,%ecx
  lea    D55(%rip),%rdx
  mov    $0x3,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  mov    -0x198(%rbp),%rax
  lea    0x1(%rax),%rdx
  movzbl -0x127(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x198(%rbp),%rax
  lea    0x2(%rax),%rdx
  movzbl -0x126(%rbp),%eax
  mov    %al,(%rdx)
L174:
  lea    -0x124(%rbp),%rax
  mov    %rax,-0x150(%rbp)
  movzbl -0x11a(%rbp),%eax
  test   %al,%al
  je     L227
  lea    -0x11a(%rbp),%rax
  mov    %rax,-0x158(%rbp)
L227:
  movl   $0x0,-0x1c0(%rbp)
  jmp    L65
L73:
  cmpl   $0x0,-0x1c0(%rbp)
  je     L178
  mov    -0x200(%rbp),%rax
  movb   $0x2c,(%rax)
  addl   $0x1,-0x1c4(%rbp)
  addq   $0x1,-0x200(%rbp)
L178:
  mov    -0x1c0(%rbp),%eax
  cltq
  mov    -0x190(%rbp,%rax,8),%rdx
  mov    -0x200(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x1c0(%rbp),%eax
  cltq
  mov    -0x190(%rbp,%rax,8),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %eax,-0x1c4(%rbp)
  mov    -0x1c0(%rbp),%eax
  cltq
  mov    -0x190(%rbp,%rax,8),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  add    %rax,-0x200(%rbp)
  addl   $0x1,-0x1c0(%rbp)
L65:
  mov    -0x1c0(%rbp),%eax
  cmp    -0x1b8(%rbp),%eax
  jl     L73
  mov    -0x200(%rbp),%rax
  movb   $0xa,(%rax)
  addq   $0x1,-0x200(%rbp)
  addl   $0x1,-0x1c4(%rbp)
  mov    -0x168(%rbp),%rax
  mov    %rax,%rdi
  call   <to_seconds@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x1a8(%rbp)
  mov    -0x178(%rbp),%rax
  mov    %rax,%rdi
  call   <to_seconds@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x1b0(%rbp)
  mov    -0x170(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x53,%al
  jne    L275
  movsd  -0x1b0(%rbp),%xmm0
  movq   D6(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x1b0(%rbp)
L275:
  mov    -0x160(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x57,%al
  jne    L224
  movsd  -0x1a8(%rbp),%xmm0
  movq   D6(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x1a8(%rbp)
L224:
  mov    -0x148(%rbp),%rcx
  mov    -0x188(%rbp),%rax
  mov    -0x1f8(%rbp),%rdx
  movsd  -0x1b0(%rbp),%xmm0
  mov    -0x1a8(%rbp),%rsi
  mov    -0x1f0(%rbp),%r8
  movapd %xmm0,%xmm1
  movq   %rsi,%xmm0
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   *%r8
  jmp    L116
L205:
  mov    -0x1a0(%rbp),%rax
  sub    -0x1e8(%rbp),%rax
  mov    %eax,%edx
  mov    -0x1c4(%rbp),%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    %eax,-0x1c4(%rbp)
  mov    -0x1a0(%rbp),%rax
  sub    -0x1e8(%rbp),%rax
  add    $0x1,%rax
  add    %rax,-0x200(%rbp)
  jmp    L116
L106:
  mov    -0x1a0(%rbp),%rax
  sub    -0x1e8(%rbp),%rax
  mov    %eax,%edx
  mov    -0x1c4(%rbp),%eax
  add    %edx,%eax
  add    $0x1,%eax
  mov    %eax,-0x1c4(%rbp)
  mov    -0x1a0(%rbp),%rax
  sub    -0x1e8(%rbp),%rax
  add    $0x1,%rax
  add    %rax,-0x200(%rbp)
L116:
  mov    -0x1a0(%rbp),%rax
  movb   $0xa,(%rax)
  addq   $0x1,-0x1a0(%rbp)
  mov    -0x1a0(%rbp),%rax
  sub    -0x1e8(%rbp),%rax
  mov    %eax,-0x1b4(%rbp)
  mov    -0x1e0(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1b4(%rbp)
  je     L147
  mov    -0x1e0(%rbp),%rax
  mov    (%rax),%eax
  sub    -0x1b4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1a0(%rbp),%rcx
  mov    -0x1e8(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memmove@plt>
L147:
  mov    -0x1e0(%rbp),%rax
  mov    (%rax),%eax
  sub    -0x1b4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1e0(%rbp),%rax
  mov    %edx,(%rax)
L191:
  mov    -0x1e0(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x1e8(%rbp),%rax
  mov    $0xa,%esi
  mov    %rax,%rdi
  call   <memchr@plt>
  mov    %rax,-0x1a0(%rbp)
  cmpq   $0x0,-0x1a0(%rbp)
  jne    L193
  mov    -0x1c4(%rbp),%eax
L43:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L123
  call   <__stack_chk_fail@plt>
L123:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D5
type: string
name: disassemble_data
arguments: data_label: D70
type: string
name: disassemble_data
arguments: data_label: D42
type: string
name: disassemble_data
arguments: data_label: D50
type: string
name: disassemble_data
arguments: data_label: D55
type: string
name: disassemble_data
arguments: data_label: D6
type: byte[8]

tool: D5: proc_gps_input: 

tool: D70: $GPRMC

tool: D42: ,

tool: D50: %.1f

tool: D55: %02X

tool: {"D6": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
int proc_gps_input(int l, int *bufpos, int buflen, char *buf, void (*gpsproc)(char *ptime, char *date, double longg, double latt, void *), void *data, char *writeptr) {
  char *endp;
  int wlen = 0;
  if (l <= 0) {
    perror("proc_gps_input: ");
    return l;
  }
  (*bufpos) += l;
  while ((endp = memchr(buf, '\n', *bufpos))) {
    int readlen;
    memcpy(writeptr, buf, endp - buf + 1);
    *endp = 0;
    if (strncmp(buf, "$GPRMC", 6) == 0) {
      char linebuf[256];
      char *fields[13];
      char headingbuf[10];
      char speedbuf[10];
      strcpy(linebuf, buf);
      int numfields = my_split(linebuf, fields, ",", 13);
      if ((numfields == 12) || (numfields == 13)) {
        double lattsec;
        double longsec;
        float heading;
        float speed;
        if (compass_get_heading(&heading)) {
          snprintf(headingbuf, sizeof(headingbuf), "%.1f", heading);
        } else {
          headingbuf[0] = 0;
        }
        if (tacho_get_speed(&speed)) {
          snprintf(speedbuf, sizeof(speedbuf), "%.1f", speed);
        } else {
          speedbuf[0] = 0;
        }
        if (1) {
          int i;
          int chksum;
          char *chkptr;
          if ((chkptr = strchr(fields[numfields - 1], '*'))) {
            if (strlen(chkptr) > 2) {
              char chkbuf[3];
              chksum = strtoul(chkptr + 1, NULL, 16);
              for (i = 0; i < strlen(fields[8]); i++) {
                chksum ^= (fields[8])[i];
              }
              for (i = 0; i < strlen(headingbuf); i++) {
                chksum ^= headingbuf[i];
              }
              if (speedbuf[0] != 0) {
                for (i = 0; i < strlen(fields[7]); i++) {
                  chksum ^= (fields[7])[i];
                }
                for (i = 0; i < strlen(speedbuf); i++) {
                  chksum ^= speedbuf[i];
                }
              }
              snprintf(chkbuf, sizeof(chkbuf), "%02X", 0xff & (int)chksum);
              chkptr[1] = chkbuf[0];
              chkptr[2] = chkbuf[1];
            }
          }
          fields[8] = headingbuf;
          if (speedbuf[0])
            fields[7] = speedbuf;
          for (i = 0; i < numfields; i++) {
            if (i) {
              writeptr[0] = ',';
              wlen++;
              writeptr++;
            }
            strcpy(writeptr, fields[i]);
            wlen += strlen(fields[i]);
            writeptr += strlen(fields[i]);
          }
          *writeptr = '\n';
          writeptr++;
          wlen++;
        } else {
          wlen += (endp - buf) + 1;
          writeptr += (endp - buf) + 1;
        }
        longsec = to_seconds(fields[5]);
        lattsec = to_seconds(fields[3]);
        if ((fields[4])[0] == 'S')
          lattsec = -lattsec;
        if ((fields[6])[0] == 'W')
          longsec = -longsec;
        gpsproc(fields[1], fields[9], longsec, lattsec, data);
      } else {
        wlen += (endp - buf) + 1;
        writeptr += (endp - buf) + 1;
      }
    } else {
      wlen += (endp - buf) + 1;
      writeptr += (endp - buf) + 1;
    }
    *endp = '\n';
    endp++;
    readlen = endp - buf;
    if (readlen != *bufpos)
      memmove(buf, endp, (*bufpos) - readlen);
    (*bufpos) -= readlen;
  }
  return wlen;
}
```