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

```asm
<get_dist_conf_name>:
  endbr64
  push   %r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x128,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L3
  lea    0x10(%rsp),%rbp
  mov    %rdi,%rcx
  lea    D64(%rip),%rdx
  mov    $0x100,%esi
  mov    %rbp,%rdi
  lea    D69(%rip),%r15
  call   <snprintf@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  movslq %eax,%rbx
  add    %rbp,%rbx
L65:
  mov    %r12,%rdi
  xor    %eax,%eax
  mov    %rbp,%r8
  mov    %r14,%rcx
  mov    %r15,%rdx
  mov    %r13d,%esi
  call   <snprintf@plt>
  mov    %r12,%rdi
  call   <stat_file@plt>
  test   %rax,%rax
  jne    L27
  cmp    %rbp,%rbx
  ja     L25
  jmp    L59
  nopw   0x0(%rax,%rax,1)
L7:
  sub    $0x1,%rbx
  cmp    %rbp,%rbx
  je     L59
L25:
  cmpb   $0x2d,(%rbx)
  jne    L7
  movb   $0x0,(%rbx)
  cmp    %rbp,%rbx
  ja     L65
  jmp    L30
  nopl   0x0(%rax,%rax,1)
L59:
  movb   $0x0,(%rbx)
L30:
  mov    %r14,%rcx
  lea    D26(%rip),%rdx
  mov    %r13d,%esi
  mov    %r12,%rdi
  lea    D45(%rip),%r8
  xor    %eax,%eax
  call   <snprintf@plt>
  mov    0x8(%rsp),%rcx
  xor    %esi,%esi
  lea    D82(%rip),%rdx
  mov    $0xffffffff,%edi
  call   <logger@plt>
L72:
  mov    %r12,%rdi
  call   <stat_file@plt>
  test   %rax,%rax
  je     L54
L27:
  xor    %eax,%eax
L102:
  mov    0x118(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L108
  add    $0x128,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L3:
  mov    %rsi,%rcx
  mov    %r12,%rdi
  mov    %r13d,%esi
  xor    %eax,%eax
  lea    D45(%rip),%r8
  lea    D26(%rip),%rdx
  call   <snprintf@plt>
  mov    %r12,%rcx
  xor    %esi,%esi
  mov    $0xffffffff,%edi
  lea    D63(%rip),%rdx
  call   <logger@plt>
  jmp    L72
L54:
  mov    %r12,%rcx
  lea    D5(%rip),%rdx
  xor    %esi,%esi
  mov    $0xffffffff,%edi
  call   <logger@plt>
  mov    $0x6b,%eax
  jmp    L102
L108:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D64
type: string
name: parse_data
arguments: data_tag: D69
type: string
name: parse_data
arguments: data_tag: D26
type: string
name: parse_data
arguments: data_tag: D45
type: string
name: parse_data
arguments: data_tag: D82
type: string
name: parse_data
arguments: data_tag: D63
type: string
name: parse_data
arguments: data_tag: D5
type: string

tool: D64: %s

tool: D69: %s/%s.conf

tool: D26: %s/%s

tool: D45: default

tool: D82: Warning: configuration file for distribution %s not found default used

tool: D63: Warning: distribution not specified default used %s

tool: D5: Distribution configuration not found %s

assistant: ```c
int get_dist_conf_name(char *dist_name, char *dir, char *file, int len) {
  char buf[256];
  char *ep;
  if (dist_name != NULL) {
    snprintf(buf, sizeof(buf), "%s", dist_name);
    ep = buf + strlen(buf);
    do {
      snprintf(file, len, "%s/%s.conf", dir, buf);
      if (stat_file(file))
        return 0;
      while (ep > buf && *ep != '-')
        --ep;
      *ep = 0;
    } while (ep > buf);
    snprintf(file, len, "%s/%s", dir, "default");
    logger(-1, 0,
           "Warning: configuration file"
           " for distribution %s not found default used",
           dist_name);
  } else {
    snprintf(file, len, "%s/%s", dir, "default");
    logger(-1, 0,
           "Warning: distribution not specified"
           " default used %s",
           file);
  }
  if (!stat_file(file)) {
    logger(-1, 0, "Distribution configuration not found %s", file);
    return 107;
  }
  return 0;
}
```