user: What would the C source look like for the assembly code provided here?

```asm
<try_name>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x20000(%rsp),%r11
L160:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L160
  sub    $0x20,%rsp
  mov    %rdi,%r12
  mov    %esi,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,0x20018(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbx
  mov    %rdi,%rcx
  lea    D23(%rip),%rdx
  mov    $0x10000,%esi
  mov    %rbx,%rdi
  call   <snprintf@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <open@plt>
  mov    $0x0,%r14d
  test   %eax,%eax
  js     L107
  mov    %eax,%ebx
  lea    0x10010(%rsp),%rsi
  mov    $0x10000,%edx
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,%ebp
  mov    %ebx,%edi
  call   <close@plt>
  test   %ebp,%ebp
  jle    L57
  cmp    $0x10000,%ebp
  je     L57
  sub    $0x1,%ebp
  movslq %ebp,%rax
  cmpb   $0xa,0x10010(%rsp,%rax,1)
  je     L99
L107:
  mov    0x20018(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L190
  mov    %r14,%rax
  add    $0x20020,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L99:
  movb   $0x0,0x10010(%rsp,%rax,1)
  lea    0x8(%rsp),%rsi
  lea    0x10010(%rsp),%rdi
  mov    $0xa,%edx
  call   <strtoul@plt>
  mov    %rax,%rbx
  mov    0x8(%rsp),%rdi
  cmpb   $0x3a,(%rdi)
  jne    L107
  lea    0x8(%rsp),%rsi
  add    $0x1,%rdi
  mov    $0xa,%edx
  call   <strtoul@plt>
  mov    0x8(%rsp),%rdx
  cmpb   $0x0,(%rdx)
  jne    L107
  mov    %eax,%esi
  mov    %ebx,%edi
  call   <makedev@plt>
  mov    %rax,%r14
  test   %r13d,%r13d
  je     L107
  lea    0x10(%rsp),%rbx
  mov    %r12,%rcx
  lea    D29(%rip),%rdx
  mov    $0x10000,%esi
  mov    %rbx,%rdi
  call   <snprintf@plt>
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <open@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  js     L178
  lea    0x10010(%rsp),%rsi
  mov    $0x20,%edx
  mov    %eax,%edi
  call   <read@plt>
  mov    %eax,%ebp
  mov    %ebx,%edi
  call   <close@plt>
  test   %ebp,%ebp
  jle    L83
  cmp    $0x20,%ebp
  je     L83
  sub    $0x1,%ebp
  movslq %ebp,%rax
  cmpb   $0xa,0x10010(%rsp,%rax,1)
  je     L123
  mov    $0x0,%r14d
  jmp    L107
L123:
  movb   $0x0,0x10010(%rsp,%rax,1)
  lea    0x8(%rsp),%rsi
  lea    0x10010(%rsp),%rdi
  mov    $0xa,%edx
  call   <strtoul@plt>
  mov    0x8(%rsp),%rdx
  cmpb   $0x0,(%rdx)
  jne    L182
  cmp    %eax,%r13d
  jl     L93
L182:
  mov    $0x0,%r14d
  jmp    L107
L93:
  movslq %r13d,%rax
  add    %rax,%r14
  mov    %r14,%rdi
  call   <bdevname@plt>
  mov    %rax,%rcx
  mov    %r13d,%edx
  mov    %r12,%rsi
  lea    D27(%rip),%rdi
  call   <printf@plt>
  jmp    L107
L57:
  mov    $0x0,%r14d
  jmp    L107
L178:
  mov    $0x0,%r14d
  jmp    L107
L83:
  mov    $0x0,%r14d
  jmp    L107
L190:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D23
datatype: string
name: extract_symbolic_data
arguments: data_label: D29
datatype: string
name: extract_symbolic_data
arguments: data_label: D27
datatype: string

tool: D23: /sys/block/%s/dev

tool: D29: /sys/block/%s/range

tool: D27: kinit: try_name %s,%d = %s


assistant: ```c
dev_t try_name(char *name, int part) {
  char path[65536];
  char buf[65536];
  int range;
  unsigned int major, minor;
  dev_t res;
  char *s;
  int len;
  int fd;
  snprintf(path, sizeof(path), "/sys/block/%s/dev", name);
  fd = open(path, 0, 0);
  if (fd < 0)
    goto fail;
  len = read(fd, buf, 65536);
  close(fd);
  if (len <= 0 || len == 65536 || buf[len - 1] != '\n')
    goto fail;
  buf[len - 1] = '\0';
  major = strtoul(buf, &s, 10);
  if (*s != ':')
    goto fail;
  minor = strtoul(s + 1, &s, 10);
  if (*s)
    goto fail;
  res = makedev(major, minor);
  if (!part)
    return res;
  snprintf(path, sizeof(path), "/sys/block/%s/range", name);
  fd = open(path, 0, 0);
  if (fd < 0)
    goto fail;
  len = read(fd, buf, 32);
  close(fd);
  if (len <= 0 || len == 32 || buf[len - 1] != '\n')
    goto fail;
  buf[len - 1] = '\0';
  range = strtoul(buf, &s, 10);
  if (*s)
    goto fail;
  if (part < range) {
    printf("kinit: try_name %s,%d = %s\n", name, part, bdevname(res + part));
    return res + part;
  }
fail:
  return (dev_t)0;
}
```