user: 请从给定的汇编指令推导出C源代码：

```asm
<parse_hex_line>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x40(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L137
  mov    $0x0,%eax
  jmp    L69
L137:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    $0xa,%rax
  ja     L8
  mov    $0x0,%eax
  jmp    L69
L8:
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x10(%rbp)
  lea    -0x1c(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  lea    D47(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  test   %eax,%eax
  jne    L125
  mov    $0x0,%eax
  jmp    L69
L125:
  addq   $0x2,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    -0x1c(%rbp),%edx
  add    %edx,%edx
  add    $0xb,%edx
  movslq %edx,%rdx
  cmp    %rdx,%rax
  jae    L72
  mov    $0x0,%eax
  jmp    L69
L72:
  mov    -0x38(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  lea    D24(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  test   %eax,%eax
  jne    L179
  mov    $0x0,%eax
  jmp    L69
L179:
  addq   $0x4,-0x10(%rbp)
  mov    -0x48(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  lea    D47(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  test   %eax,%eax
  jne    L145
  mov    $0x0,%eax
  jmp    L69
L145:
  addq   $0x2,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  movzbl %al,%edx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  sar    $0x8,%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x48(%rbp),%rax
  mov    (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L200
L35:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%rax
  lea    D47(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  test   %eax,%eax
  jne    L209
  mov    $0x0,%eax
  jmp    L69
L209:
  addq   $0x2,-0x10(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  movzbl %al,%eax
  add    %eax,-0x14(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0xff,%eax
  jle    L200
  mov    $0x0,%eax
  jmp    L69
L200:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jne    L35
  lea    -0x18(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  lea    D47(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  test   %eax,%eax
  jne    L19
  mov    $0x0,%eax
  jmp    L69
L19:
  mov    -0x18(%rbp),%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  movzbl %al,%eax
  test   %eax,%eax
  je     L206
  mov    $0x0,%eax
  jmp    L69
L206:
  mov    $0x1,%eax
L69:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L192
  call   <__stack_chk_fail@plt>
L192:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D47
datatype: string
name: read_data
arguments: label: D24
datatype: string

tool: D47: %02x

tool: D24: %04x

assistant: ```c
int parse_hex_line(theline, bytes, addr, num, code)
char *theline;
int *addr, *num, *code, bytes[];
{
  int sum, len, cksum;
  char *ptr;
  *num = 0;
  if (theline[0] != ':')
    return 0;
  if (strlen(theline) < 11)
    return 0;
  ptr = theline + 1;
  if (!sscanf(ptr, "%02x", &len))
    return 0;
  ptr += 2;
  if (strlen(theline) < (11 + (len * 2)))
    return 0;
  if (!sscanf(ptr, "%04x", addr))
    return 0;
  ptr += 4;
  if (!sscanf(ptr, "%02x", code))
    return 0;
  ptr += 2;
  sum = (len & 255) + ((*addr >> 8) & 255) + (*addr & 255) + (*code & 255);
  while (*num != len) {
    if (!sscanf(ptr, "%02x", &bytes[*num]))
      return 0;
    ptr += 2;
    sum += bytes[*num] & 255;
    (*num)++;
    if (*num >= 256)
      return 0;
  }
  if (!sscanf(ptr, "%02x", &cksum))
    return 0;
  if (((sum & 255) + (cksum & 255)) & 255)
    return 0;
  return 1;
}
```