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

```asm
<UWAPI_Board_Regular2D_GetAdditionalParam>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x80(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x68(%rbp)
  mov    -0x68(%rbp),%rax
  add    $0x3,%rax
  mov    %rax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x60(%rbp)
  mov    %rax,%r14
  mov    $0x0,%r15d
  mov    %rax,%r12
  mov    $0x0,%r13d
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L22:
  cmp    %rdx,%rsp
  je     L51
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L22
L51:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L35
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L35:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  movb   $0x5f,(%rax)
  mov    -0x58(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    -0x68(%rbp),%rdx
  mov    -0x80(%rbp),%rax
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
  mov    -0x68(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    -0x58(%rbp),%rax
  movb   $0x3d,(%rax,%rdx,1)
  mov    -0x68(%rbp),%rax
  lea    0x2(%rax),%rdx
  mov    -0x58(%rbp),%rax
  movb   $0x0,(%rax,%rdx,1)
  mov    -0x58(%rbp),%rdx
  mov    -0x78(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strstr@plt>
  mov    %rax,-0x50(%rbp)
  cmpq   $0x0,-0x50(%rbp)
  jne    L10
  mov    -0x50(%rbp),%rax
  jmp    L14
L10:
  mov    -0x68(%rbp),%rax
  add    $0x2,%rax
  add    %rax,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  mov    $0x5f,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x48(%rbp)
  cmpq   $0x0,-0x48(%rbp)
  jne    L11
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x70(%rbp)
  jmp    L30
L11:
  mov    -0x48(%rbp),%rax
  sub    -0x50(%rbp),%rax
  mov    %rax,-0x70(%rbp)
L30:
  mov    -0x70(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x40(%rbp)
  mov    -0x70(%rbp),%rdx
  mov    -0x50(%rbp),%rcx
  mov    -0x40(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x40(%rbp),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x40(%rbp),%rax
L14:
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L17
  call   <__stack_chk_fail@plt>
L17:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
char *UWAPI_Board_Regular2D_GetAdditionalParam(char const *str, char const *key) {
  size_t key_query_len = strlen(key);
  char key_query[key_query_len + 3];
  key_query[0] = '_';
  memcpy(&(key_query[1]), key, key_query_len);
  key_query[1 + key_query_len] = '=';
  key_query[1 + key_query_len + 1] = '\0';
  char *start = strstr(str, key_query);
  if (start == NULL) {
    return start;
  }
  start += key_query_len + 2;
  size_t val_len;
  char *end = strstr(start, "_");
  if (end == NULL) {
    val_len = strlen(start);
  } else {
    val_len = end - start;
  }
  char *val = malloc(val_len + 1);
  memcpy(val, start, val_len);
  val[val_len] = '\0';
  return val;
}
```