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

```asm
<Str2BCD>:
  endbr64
  mov    %rdi,%rax
  mov    %rsi,%r8
  test   %rdi,%rdi
  je     L98
  test   %rsi,%rsi
  je     L98
  mov    %edx,%r9d
  and    $0xff,%r9d
  je     L98
  movzbl %dl,%edx
  lea    (%rdi,%rdx,2),%rcx
  cmp    %rcx,%rsi
  setae  %cl
  add    %rsi,%rdx
  cmp    %rdx,%rdi
  setae  %dl
  or     %dl,%cl
  je     L83
  lea    -0x1(%r9),%edx
  cmp    $0xe,%edx
  jbe    L83
  movdqu (%rsi),%xmm0
  movdqa D22(%rip),%xmm1
  pxor   %xmm5,%xmm5
  mov    %r9d,%edx
  movdqa D0(%rip),%xmm4
  movdqa D29(%rip),%xmm2
  shr    $0x4,%edx
  psrlw  $0x4,%xmm0
  movdqa D4(%rip),%xmm3
  movdqu (%rsi),%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm1,%xmm6
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,(%rdi)
  movups %xmm0,0x10(%rdi)
  cmp    $0x1,%edx
  je     L3
  movdqu 0x10(%rsi),%xmm0
  movdqu 0x10(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0x20(%rdi)
  movups %xmm0,0x30(%rdi)
  cmp    $0x2,%edx
  je     L3
  movdqu 0x20(%rsi),%xmm0
  movdqu 0x20(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0x40(%rdi)
  movups %xmm0,0x50(%rdi)
  cmp    $0x3,%edx
  je     L3
  movdqu 0x30(%rsi),%xmm0
  movdqu 0x30(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0x60(%rdi)
  movups %xmm0,0x70(%rdi)
  cmp    $0x4,%edx
  je     L3
  movdqu 0x40(%rsi),%xmm0
  movdqu 0x40(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  movdqa %xmm7,%xmm5
  pand   %xmm6,%xmm5
  pandn  %xmm8,%xmm6
  por    %xmm5,%xmm6
  movdqa %xmm0,%xmm5
  punpcklbw %xmm6,%xmm5
  punpckhbw %xmm6,%xmm0
  movups %xmm5,0x80(%rdi)
  movups %xmm0,0x90(%rdi)
  cmp    $0x5,%edx
  je     L3
  movdqu 0x50(%rsi),%xmm0
  pxor   %xmm5,%xmm5
  movdqu 0x50(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0xa0(%rdi)
  movups %xmm0,0xb0(%rdi)
  cmp    $0x6,%edx
  je     L3
  movdqu 0x60(%rsi),%xmm0
  movdqu 0x60(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0xc0(%rdi)
  movups %xmm0,0xd0(%rdi)
  cmp    $0x7,%edx
  je     L3
  movdqu 0x70(%rsi),%xmm0
  movdqu 0x70(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0xe0(%rdi)
  movups %xmm0,0xf0(%rdi)
  cmp    $0x8,%edx
  je     L3
  movdqu 0x80(%rsi),%xmm0
  movdqu 0x80(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0x100(%rdi)
  movups %xmm0,0x110(%rdi)
  cmp    $0x9,%edx
  je     L3
  movdqu 0x90(%rsi),%xmm0
  movdqu 0x90(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0x120(%rdi)
  movups %xmm0,0x130(%rdi)
  cmp    $0xa,%edx
  je     L3
  movdqu 0xa0(%rsi),%xmm0
  movdqu 0xa0(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0x140(%rdi)
  movups %xmm0,0x150(%rdi)
  cmp    $0xb,%edx
  je     L3
  movdqu 0xb0(%rsi),%xmm0
  movdqu 0xb0(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0x160(%rdi)
  movups %xmm0,0x170(%rdi)
  cmp    $0xc,%edx
  je     L3
  movdqu 0xc0(%rsi),%xmm0
  movdqu 0xc0(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0x180(%rdi)
  movups %xmm0,0x190(%rdi)
  cmp    $0xd,%edx
  je     L3
  movdqu 0xd0(%rsi),%xmm0
  movdqu 0xd0(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm7
  movdqa %xmm0,%xmm8
  psubusb %xmm4,%xmm0
  pcmpeqb %xmm5,%xmm0
  paddb  %xmm3,%xmm8
  paddb  %xmm2,%xmm7
  pand   %xmm0,%xmm7
  pandn  %xmm8,%xmm0
  movdqa %xmm6,%xmm8
  por    %xmm7,%xmm0
  movdqa %xmm6,%xmm7
  psubusb %xmm4,%xmm6
  pcmpeqb %xmm5,%xmm6
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  pand   %xmm6,%xmm7
  pandn  %xmm8,%xmm6
  por    %xmm7,%xmm6
  movdqa %xmm0,%xmm7
  punpcklbw %xmm6,%xmm7
  punpckhbw %xmm6,%xmm0
  movups %xmm7,0x1a0(%rdi)
  movups %xmm0,0x1b0(%rdi)
  cmp    $0xf,%edx
  jne    L3
  movdqu 0xe0(%rsi),%xmm0
  movdqu 0xe0(%rsi),%xmm6
  psrlw  $0x4,%xmm0
  pand   %xmm1,%xmm6
  pand   %xmm0,%xmm1
  movdqa %xmm1,%xmm7
  movdqa %xmm1,%xmm8
  psubusb %xmm4,%xmm1
  pcmpeqb %xmm5,%xmm1
  paddb  %xmm2,%xmm7
  paddb  %xmm3,%xmm8
  paddb  %xmm6,%xmm2
  paddb  %xmm6,%xmm3
  pand   %xmm1,%xmm7
  pandn  %xmm8,%xmm1
  movdqa %xmm1,%xmm0
  movdqa %xmm6,%xmm1
  psubusb %xmm4,%xmm1
  por    %xmm7,%xmm0
  pcmpeqb %xmm5,%xmm1
  pand   %xmm1,%xmm2
  pandn  %xmm3,%xmm1
  por    %xmm2,%xmm1
  movdqa %xmm0,%xmm2
  punpcklbw %xmm1,%xmm2
  punpckhbw %xmm1,%xmm0
  movups %xmm2,0x1c0(%rdi)
  movups %xmm0,0x1d0(%rdi)
  nopl   0x0(%rax)
L3:
  mov    %r9d,%edx
  and    $0xfffffff0,%edx
  lea    (%rdx,%rdx,1),%ecx
  cmp    %edx,%r9d
  je     L98
  movslq %ecx,%rcx
  add    %rax,%rcx
L76:
  movzbl (%r8,%rdx,1),%eax
  mov    %eax,%esi
  shr    $0x4,%al
  lea    0x37(%rax),%r10d
  and    $0xf,%esi
  lea    0x30(%rax),%edi
  cmp    $0xa,%al
  mov    %r10d,%eax
  cmovb  %edi,%eax
  cmp    $0xa,%sil
  lea    0x37(%rsi),%edi
  mov    %al,(%rcx)
  lea    0x30(%rsi),%eax
  cmovae %edi,%eax
  add    $0x1,%rdx
  add    $0x2,%rcx
  mov    %al,-0x1(%rcx)
  cmp    %edx,%r9d
  jg     L76
  ret
  nopl   0x0(%rax)
L83:
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L169:
  movzbl (%r8,%rcx,1),%edx
  mov    %edx,%esi
  shr    $0x4,%dl
  lea    0x30(%rdx),%r10d
  and    $0xf,%esi
  lea    0x37(%rdx),%edi
  cmp    $0x9,%dl
  mov    %r10d,%edx
  cmova  %edi,%edx
  cmp    $0x9,%sil
  lea    0x30(%rsi),%edi
  mov    %dl,(%rax,%rcx,2)
  lea    0x37(%rsi),%edx
  cmovbe %edi,%edx
  mov    %dl,0x1(%rax,%rcx,2)
  add    $0x1,%rcx
  cmp    %ecx,%r9d
  jg     L169
L98:
  ret
```

tool_calls: name: read_data
arguments: data_tag: D22
type_infered: byte[16]
name: read_data
arguments: data_tag: D0
type_infered: byte[16]
name: read_data
arguments: data_tag: D29
type_infered: byte[16]
name: read_data
arguments: data_tag: D4
type_infered: byte[16]

tool: {"D22": [0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f]}

tool: {"D0": [0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09]}

tool: {"D29": [0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30]}

tool: {"D4": [0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37]}

assistant: ```c
void Str2BCD(unsigned char *dst, char *src, unsigned char length) {
  int i, j;
  unsigned char lo_nibble, hi_nibble;
  char c;
  if ((dst == NULL) || (src == NULL)) {
    return;
  }
  j = 0;
  for (i = 0; i < length; i++) {
    c = src[i];
    lo_nibble = src[i] & 0x0f;
    hi_nibble = (src[i] >> 4) & 0x0f;
    if ((hi_nibble >= 0x0) && (hi_nibble <= 0x09)) {
      dst[j++] = hi_nibble + 0x30;
    } else {
      dst[j++] = hi_nibble + 'A' - 10;
    }
    if ((lo_nibble >= 0x0) && (lo_nibble <= 0x09)) {
      dst[j++] = lo_nibble + 0x30;
    } else {
      dst[j++] = lo_nibble + 'A' - 10;
    }
  }
}
```