user: Demonstrate the C code that generates the assembly output below:

```asm
<EncodeString>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x10(%rbp)
  jmp    L141
L152:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L134
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  je     L134
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L134
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5f,%al
  je     L134
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L134
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L95
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L23
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jle    L95
L23:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x5a,%al
  jle    L72
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x60,%al
  jle    L95
L72:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x7a,%al
  jle    L134
L95:
  mov    -0x1c(%rbp),%edx
  mov    -0x10(%rbp),%esi
  mov    -0x18(%rbp),%rax
  mov    %edx,%ecx
  mov    $0x2,%edx
  mov    %rax,%rdi
  call   <BufferDiff@plt>
  test   %rax,%rax
  jns    L24
  mov    $0xffffffff,%eax
  jmp    L12
L24:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  lea    -0xc(%rbp),%rax
  lea    D1(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xc(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x10(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x10(%rbp)
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xb(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movzbl -0xa(%rbp),%eax
  mov    %al,(%rdx)
L134:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jne    L98
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2b,(%rax)
L98:
  addl   $0x1,-0x10(%rbp)
L141:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L152
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
L12:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L160
  call   <__stack_chk_fail@plt>
L160:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D1
type: string

tool: D1: %%%2x

assistant: ```c
int EncodeString(char *sString, int dMaxSize) {
  int i;
  char sAccum[4];
  i = 0;
  while (sString[i] != 0) {
    if (((sString[i] != ' ') && (sString[i] != '*') && (sString[i] != '-') && (sString[i] != '_') && (sString[i] != '.')) && ((sString[i] < '0') || ((sString[i] > '9') && (sString[i] < 'A')) || ((sString[i] > 'Z') && (sString[i] < 'a')) || (sString[i] > 'z'))) {
      if (BufferDiff(sString, i, 2, dMaxSize) < 0) {
        return -1;
      }
      sprintf(sAccum, "%%%2x", sString[i]);
      sString[i++] = sAccum[0];
      sString[i++] = sAccum[1];
      sString[i] = sAccum[2];
    }
    if (sString[i] == ' ') {
      sString[i] = '+';
    }
    i++;
  }
  return strlen(sString);
}
```