user: What is the c source code of the assembly code below?

```asm
<set_bool>:
  endbr64
  sub    $0x48,%rsp
  mov    %rsi,%rax
  lea    D56(%rip),%rsi
  mov    %fs:0x28,%rdx
  mov    %rdx,0x38(%rsp)
  lea    D32(%rip),%rdx
  movq   %rsi,%xmm0
  movsbl (%rax),%ecx
  lea    D34(%rip),%rsi
  movq   %rdx,%xmm1
  lea    D41(%rip),%rdx
  punpcklqdq %xmm1,%xmm0
  movq   %rdx,%xmm2
  lea    D0(%rip),%rdx
  movaps %xmm0,(%rsp)
  movq   %rsi,%xmm0
  lea    D22(%rip),%rsi
  movq   %rdx,%xmm3
  punpcklqdq %xmm2,%xmm0
  movaps %xmm0,0x10(%rsp)
  movq   %rsi,%xmm0
  punpcklqdq %xmm3,%xmm0
  movaps %xmm0,0x20(%rsp)
  test   %cl,%cl
  je     L347
  cmpb   $0x0,0x1(%rax)
  je     L130
  cmpb   $0x0,0x2(%rax)
  je     L308
  cmpb   $0x0,0x3(%rax)
  je     L52
  cmpb   $0x0,0x4(%rax)
  je     L259
  cmpb   $0x0,0x5(%rax)
  je     L173
  cmpb   $0x0,0x6(%rax)
  je     L230
  cmpb   $0x0,0x7(%rax)
  mov    $0xffffffff,%r8d
  mov    $0x7,%edx
  je     L292
L303:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L135
  mov    %r8d,%eax
  add    $0x48,%rsp
  ret
L308:
  mov    $0x2,%edx
L292:
  lea    -0x2(%rdx),%esi
  movslq %esi,%rsi
  mov    (%rsp,%rsi,8),%rsi
  movsbl (%rsi),%r8d
  cmp    %cl,%r8b
  je     L84
  add    $0x20,%ecx
  cmp    %r8d,%ecx
  jne    L347
L84:
  movsbl 0x1(%rsi),%r8d
  movsbl 0x1(%rax),%ecx
  cmp    %cl,%r8b
  je     L331
  add    $0x20,%ecx
  cmp    %ecx,%r8d
  jne    L347
L331:
  cmp    $0x2,%edx
  je     L223
  movsbl 0x2(%rsi),%r8d
  movsbl 0x2(%rax),%ecx
  cmp    %cl,%r8b
  je     L73
  add    $0x20,%ecx
  cmp    %ecx,%r8d
  jne    L347
L73:
  cmp    $0x3,%edx
  je     L223
  movsbl 0x3(%rsi),%r8d
  movsbl 0x3(%rax),%ecx
  cmp    %cl,%r8b
  je     L205
  add    $0x20,%ecx
  cmp    %ecx,%r8d
  jne    L347
L205:
  cmp    $0x4,%edx
  je     L223
  movsbl 0x4(%rsi),%r8d
  movsbl 0x4(%rax),%ecx
  cmp    %cl,%r8b
  je     L315
  add    $0x20,%ecx
  cmp    %ecx,%r8d
  jne    L347
L315:
  cmp    $0x5,%edx
  je     L223
  movsbl 0x5(%rsi),%r8d
  movsbl 0x5(%rax),%ecx
  cmp    %cl,%r8b
  je     L0
  add    $0x20,%ecx
  cmp    %ecx,%r8d
  jne    L347
L0:
  cmp    $0x7,%edx
  jne    L223
  movsbl 0x6(%rsi),%ecx
  movsbl 0x6(%rax),%eax
  cmp    %al,%cl
  je     L223
  add    $0x20,%eax
  cmp    %eax,%ecx
  jne    L347
L223:
  not    %edx
  xor    %r8d,%r8d
  and    $0x1,%edx
  mov    %edx,(%rdi)
  jmp    L303
  nopl   0x0(%rax)
L347:
  mov    $0xffffffff,%r8d
  jmp    L303
L130:
  xor    %eax,%eax
  cmp    $0x30,%cl
  setne  %al
  xor    %r8d,%r8d
  mov    %eax,(%rdi)
  jmp    L303
L52:
  mov    $0x3,%edx
  jmp    L292
L259:
  mov    $0x4,%edx
  jmp    L292
L173:
  mov    $0x5,%edx
  jmp    L292
L230:
  mov    $0x6,%edx
  jmp    L292
L135:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D56
data_type: string
name: disassemble_data
arguments: tag: D32
data_type: string
name: disassemble_data
arguments: tag: D34
data_type: string
name: disassemble_data
arguments: tag: D41
data_type: string
name: disassemble_data
arguments: tag: D0
data_type: string
name: disassemble_data
arguments: tag: D22
data_type: string

tool: D56: on

tool: D32: off

tool: D34: true

tool: D41: false

tool: D0: disable

tool: D22: enable

assistant: ```c
int set_bool(void *dst, const char *src) {
  const char *const str[] = {
      "on", "off", "true", "false", "enable", "disable",
  };
  int len = 0;
  while (len <= 7 && src[len] != '\0')
    len++;
  if (len == 1) {
    *(int *)dst = src[0] != '0';
    return 0;
  }
  if (len >= 2 && len <= 7) {
    for (int i = 0; i < len; i++)
      if ((str[len - 2][i] != src[i]) && (str[len - 2][i] != src[i] + 'a' - 'A'))
        return -1;
    *(int *)dst = !(len & 1);
    return 0;
  }
  return -1;
}
```