user: Translate the below assembly code into C programming language:

```asm
<getKey>:
  endbr64
  push   %r12
  mov    $0x3d,%esi
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  call   <strchr@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L152
  mov    %rax,%rbx
  sub    %rbp,%rbx
  lea    0x1(%rbx),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L178
  mov    %ebx,%edx
  test   %ebx,%ebx
  je     L43
  lea    0x1(%rbp),%rcx
  mov    %r12,%rdx
  lea    -0x1(%rbx),%eax
  sub    %rcx,%rdx
  cmp    $0xe,%rdx
  jbe    L129
  cmp    $0x6,%eax
  jbe    L129
  cmp    $0xe,%eax
  jbe    L151
  mov    %ebx,%edx
  mov    %rbp,%rcx
  mov    %r12,%rax
  shr    $0x4,%edx
  sub    %r12,%rcx
  shl    $0x4,%rdx
  add    %r12,%rdx
  nopl   0x0(%rax,%rax,1)
L7:
  movdqu (%rax,%rcx,1),%xmm0
  add    $0x10,%rax
  movups %xmm0,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L7
  mov    %ebx,%eax
  mov    %ebx,%edx
  and    $0xfffffff0,%eax
  test   $0xf,%bl
  je     L43
  mov    %ebx,%ecx
  sub    %eax,%ecx
  lea    -0x1(%rcx),%edx
  cmp    $0x6,%edx
  jbe    L171
L134:
  mov    %eax,%edx
  mov    0x0(%rbp,%rdx,1),%rsi
  mov    %rsi,(%r12,%rdx,1)
  mov    %ecx,%esi
  mov    %ebx,%edx
  and    $0xfffffff8,%esi
  add    %esi,%eax
  cmp    %esi,%ecx
  je     L43
L171:
  mov    %eax,%edx
  movzbl 0x0(%rbp,%rdx,1),%ecx
  mov    %cl,(%r12,%rdx,1)
  lea    0x1(%rax),%ecx
  mov    %ebx,%edx
  cmp    %ecx,%ebx
  jbe    L43
  movzbl 0x0(%rbp,%rcx,1),%esi
  mov    %sil,(%r12,%rcx,1)
  lea    0x2(%rax),%ecx
  cmp    %ecx,%ebx
  jbe    L43
  movzbl 0x0(%rbp,%rcx,1),%esi
  mov    %sil,(%r12,%rcx,1)
  lea    0x3(%rax),%ecx
  cmp    %ecx,%ebx
  jbe    L43
  movzbl 0x0(%rbp,%rcx,1),%esi
  mov    %sil,(%r12,%rcx,1)
  lea    0x4(%rax),%ecx
  cmp    %ecx,%ebx
  jbe    L43
  movzbl 0x0(%rbp,%rcx,1),%esi
  mov    %sil,(%r12,%rcx,1)
  lea    0x5(%rax),%ecx
  cmp    %ecx,%ebx
  jbe    L43
  movzbl 0x0(%rbp,%rcx,1),%esi
  add    $0x6,%eax
  mov    %sil,(%r12,%rcx,1)
  cmp    %eax,%ebx
  jbe    L43
  movzbl 0x0(%rbp,%rax,1),%ecx
  mov    %cl,(%r12,%rax,1)
L43:
  movb   $0x0,(%r12,%rdx,1)
L178:
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L151:
  mov    %ebx,%ecx
  xor    %eax,%eax
  jmp    L134
  nopl   0x0(%rax)
L129:
  mov    %ebx,%edx
  mov    %r12,%rax
  sub    %r12,%rbp
  lea    (%r12,%rdx,1),%rsi
  nopl   0x0(%rax)
L47:
  movzbl 0x0(%rbp,%rax,1),%ecx
  add    $0x1,%rax
  mov    %cl,-0x1(%rax)
  cmp    %rsi,%rax
  jne    L47
  movb   $0x0,(%r12,%rdx,1)
  jmp    L178
L152:
  mov    %rbp,%rsi
  lea    D3(%rip),%rdi
  call   <printf@plt>
  jmp    L178
```

tool_calls: name: unpack_data
arguments: data_tag: D3
type_infered: string

tool: D3: No equals found. Input was %s


assistant: ```c
char *getKey(char *pair) {
  char *equalsAddress = strchr(pair, '=');
  if (equalsAddress == NULL) {
    printf("No equals found. Input was %s\n", pair);
    return NULL;
  }
  unsigned int numCharichters = (equalsAddress - pair) + 1;
  char *newString = (char *)malloc(numCharichters);
  if (newString == NULL)
    return NULL;
  for (unsigned int i = 0; i < numCharichters - 1; i++) {
    newString[i] = pair[i];
  }
  newString[numCharichters - 1] = '\0';
  return newString;
}
```