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

```asm
<buildConfigPath>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x638,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x628(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strcpy@plt>
  lea    D1(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%r13d
  mov    $0x0,%r15d
  mov    $0x0,%r12d
  mov    %rbx,0x8(%rsp)
  lea    0x220(%rsp),%rax
  mov    %rax,0x10(%rsp)
  jmp    L112
L103:
  mov    %r13d,%ebx
  sub    %r12d,%ebx
  movslq %r15d,%rdi
  add    0x10(%rsp),%rdi
  mov    %ebx,%edx
  mov    %rbp,%rsi
  call   <memcpy@plt>
  add    %ebx,%r15d
  mov    %r13d,%r12d
L112:
  cmp    %r13d,%r12d
  jge    L28
  movslq %r12d,%rbp
  mov    0x8(%rsp),%r14
  add    %r14,%rbp
  mov    $0x24,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L103
  sub    %r14,%rbx
  mov    %ebx,%r14d
  sub    %r12d,%r14d
  test   %r14d,%r14d
  jle    L127
  movslq %r15d,%rdi
  add    0x10(%rsp),%rdi
  mov    %r14d,%edx
  mov    %rbp,%rsi
  call   <memcpy@plt>
  add    %r14d,%r15d
  jmp    L147
L150:
  add    $0x1,%rax
  cmp    $0x7e,%cl
  je     L64
  test   %dl,%dl
  je     L64
L66:
  mov    %eax,%ebx
  lea    (%r8,%rax,1),%r12d
  movzbl 0x1(%rsi,%rax,1),%ecx
  mov    %edi,%edx
  cmp    $0x2f,%cl
  ja     L150
  movabs $0xc01000000001,%rdx
  shr    %cl,%rdx
  xor    $0x1,%rdx
  and    $0x1,%edx
  jmp    L150
L21:
  mov    %r9d,%r12d
  mov    $0x0,%ebx
L64:
  movslq %r9d,%rsi
  add    0x8(%rsp),%rsi
  lea    0x420(%rsp),%rbp
  mov    %ebx,%edx
  mov    %rbp,%rdi
  call   <memcpy@plt>
  movslq %ebx,%rbx
  movb   $0x0,0x420(%rsp,%rbx,1)
  mov    %rbp,%rdi
  call   <getenv@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L112
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    (%r15,%rax,1),%ebp
  cmp    $0x1fd,%ebp
  jg     L112
  movslq %r15d,%rdi
  add    0x10(%rsp),%rdi
  mov    %rbx,%rsi
  call   <memcpy@plt>
  mov    %ebp,%r15d
  jmp    L112
L28:
  movslq %r15d,%r15
  movb   $0x0,0x220(%rsp,%r15,1)
  lea    0x220(%rsp),%rsi
  mov    0x18(%rsp),%rdi
  call   <strcpy@plt>
  mov    0x628(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L58
  add    $0x638,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L127:
  add    %r14d,%r15d
L147:
  lea    0x1(%rbx),%r9d
  movslq %r9d,%rax
  movzbl 0x20(%rsp,%rax,1),%ecx
  mov    $0x1,%eax
  cmp    $0x2f,%cl
  ja     L114
  movabs $0xc01000000001,%rax
  shr    %cl,%rax
  xor    $0x1,%rax
  and    $0x1,%eax
L114:
  cmp    $0x7e,%cl
  setne  %dil
  and    %al,%dil
  je     L21
  mov    $0x1,%eax
  lea    0x1(%rbx),%r8d
  movslq %ebx,%rbx
  mov    0x8(%rsp),%rcx
  lea    (%rcx,%rbx,1),%rsi
  jmp    L66
L58:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D1
type_infered: string

tool: D1: dumpasn1.cfg

assistant: ```c
void buildConfigPath(char *path, const char *pathTemplate) {
  char pathBuffer[512], newPath[512];
  int pathLen, pathPos = 0, newPathPos = 0;
  strcpy(pathBuffer, pathTemplate);
  strcat(pathBuffer, "dumpasn1.cfg");
  pathLen = strlen(pathBuffer);
  while (pathPos < pathLen) {
    char *strPtr;
    int substringSize;
    if ((strPtr = strstr(pathBuffer + pathPos, "$")) != NULL)
      substringSize = (int)((strPtr - pathBuffer) - pathPos);
    else
      substringSize = pathLen - pathPos;
    if (substringSize > 0) {
      memcpy(newPath + newPathPos, pathBuffer + pathPos, substringSize);
    }
    newPathPos += substringSize;
    pathPos += substringSize;
    if (strPtr != NULL) {
      char envName[512], *envString;
      int i;
      pathPos++;
      for (i = 0; !(((pathBuffer[pathPos + i]) == '/') || ((pathBuffer[pathPos + i]) == '.') || ((pathBuffer[pathPos + i]) == '$') || ((pathBuffer[pathPos + i]) == '\0') || ((pathBuffer[pathPos + i]) == '~')); i++)
        ;
      memcpy(envName, pathBuffer + pathPos, i);
      envName[i] = '\0';
      if ((envString = getenv(envName)) != NULL) {
        const int envStrLen = strlen(envString);
        if (newPathPos + envStrLen < 512 - 2) {
          memcpy(newPath + newPathPos, envString, envStrLen);
          newPathPos += envStrLen;
        }
      }
      pathPos += i;
    }
  }
  newPath[newPathPos] = '\0';
  strcpy(path, newPath);
}
```