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

```asm
<parse_hex_line>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movl   $0x0,(%rcx)
  cmpb   $0x3a,(%rdi)
  jne    L77
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %rdx,%r13
  mov    %rcx,%rbp
  mov    %r8,%r15
  call   <strlen@plt>
  cmp    $0xa,%rax
  ja     L53
L77:
  xor    %eax,%eax
L117:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L92
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L53:
  lea    D4(%rip),%r14
  xor    %eax,%eax
  lea    0x1(%rbx),%rdi
  mov    %rsp,%rdx
  mov    %r14,%rsi
  call   <sscanf@plt>
  test   %eax,%eax
  je     L77
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %rax,%r8
  mov    (%rsp),%eax
  lea    0xb(%rax,%rax,1),%eax
  cltq
  cmp    %rax,%r8
  jb     L77
  xor    %eax,%eax
  lea    0x3(%rbx),%rdi
  lea    D7(%rip),%rsi
  mov    %r13,%rdx
  call   <sscanf@plt>
  test   %eax,%eax
  je     L77
  xor    %eax,%eax
  lea    0x7(%rbx),%rdi
  mov    %r15,%rdx
  mov    %r14,%rsi
  call   <sscanf@plt>
  test   %eax,%eax
  je     L77
  mov    0x0(%r13),%eax
  mov    (%rsp),%edx
  add    $0x9,%rbx
  movzbl %ah,%ecx
  movzbl %al,%eax
  mov    %ecx,%r13d
  movzbl %dl,%ecx
  add    %ecx,%r13d
  add    %eax,%r13d
  movzbl (%r15),%eax
  add    %eax,%r13d
  mov    0x0(%rbp),%eax
  jmp    L6
L73:
  cltq
  mov    %r14,%rsi
  mov    %rbx,%rdi
  lea    (%r12,%rax,4),%rdx
  xor    %eax,%eax
  call   <sscanf@plt>
  test   %eax,%eax
  je     L77
  movslq 0x0(%rbp),%rdx
  add    $0x2,%rbx
  mov    %rdx,%rax
  movzbl (%r12,%rdx,4),%edx
  add    $0x1,%eax
  mov    %eax,0x0(%rbp)
  add    %edx,%r13d
  cmp    $0xff,%eax
  jg     L77
  mov    (%rsp),%edx
L6:
  cmp    %edx,%eax
  jne    L73
  xor    %eax,%eax
  lea    0x4(%rsp),%rdx
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <sscanf@plt>
  test   %eax,%eax
  je     L77
  xor    %eax,%eax
  add    0x4(%rsp),%r13b
  sete   %al
  jmp    L117
L92:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D4
data_type: string
name: retrieve_data
arguments: data_label: D7
data_type: string

tool: D4: %02x

tool: D7: %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;
}
```