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

```asm
<mmAddEntry>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,%eax
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %al,-0x2c(%rbp)
  movsbl -0x2c(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <mmGetPtr@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    %ebx,%eax
  add    $0x6,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  sub    $0x4,%eax
  mov    %eax,-0x20(%rbp)
  addq   $0x4,-0x18(%rbp)
  jmp    L78
L58:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L84
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  lea    D7(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L75
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x1c(%rbp)
  jle    L24
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  sub    %eax,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cltq
  add    %rax,-0x18(%rbp)
  jmp    L78
L75:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  sub    %eax,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  cltq
  add    %rax,-0x18(%rbp)
L78:
  mov    -0x20(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jge    L58
  jmp    L7
L84:
  nop
  jmp    L7
L24:
  nop
L7:
  mov    -0x20(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L108
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L56
  mov    -0x18(%rbp),%rax
  mov    -0x1c(%rbp),%edx
  mov    %edx,(%rax)
L56:
  addq   $0x4,-0x18(%rbp)
  mov    -0x38(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x18(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  add    $0x1,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x40(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L55
L108:
  movsbl -0x2c(%rbp),%ecx
  mov    -0x1c(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <mmGrowShm@plt>
  movsbl -0x2c(%rbp),%esi
  mov    -0x40(%rbp),%rcx
  mov    -0x38(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <mmAddEntry>
L55:
  mov    $0x1,%eax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D7
data_type: string

tool: D7: u

assistant: ```c
int mmAddEntry(char *path, char key, char *type, char *value) {
  char *shmptr = mmGetPtr(path, key);
  int addSize = strlen(type) + strlen(value) + sizeof(int) + 2;
  int size = *(int *)shmptr - sizeof(int);
  shmptr += sizeof(int);
  while (size >= addSize) {
    if (*(int *)shmptr == 0) {
      break;
    } else {
      if (!strcmp(shmptr + sizeof(int), "u")) {
        if (*(int *)shmptr >= addSize)
          break;
        else {
          size -= *(int *)shmptr;
          shmptr += *(int *)shmptr;
        }
      } else {
        size -= *(int *)shmptr;
        shmptr += *(int *)shmptr;
      }
    }
  }
  if (size >= addSize) {
    if (*(int *)shmptr == 0) {
      *(int *)shmptr = addSize;
    }
    shmptr += sizeof(int);
    strcpy(shmptr, type);
    shmptr = strchr(shmptr, '\0') + 1;
    strcpy(shmptr, value);
  } else {
    mmGrowShm(path, key, addSize);
    mmAddEntry(path, key, type, value);
  }
  return 1;
}
```