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

```asm
<getbsize>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D21(%rip),%rdi
  call   <getenv@plt>
  test   %rax,%rax
  je     L79
  mov    %rax,%rbx
  lea    D104(%rip),%r15
  mov    $0x200,%r13d
  mov    $0x200,%r14d
  cmpb   $0x0,(%rax)
  jne    L217
L16:
  mov    %r15,%r8
  mov    %r14,%rcx
  lea    D118(%rip),%rdx
  mov    $0x14,%esi
  lea    D114(%rip),%rbx
  mov    %rbx,%rdi
  call   <snprintf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,0x0(%rbp)
  mov    %r13,(%r12)
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L42
  mov    %rbx,%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L217:
  mov    %rsp,%rsi
  mov    $0xa,%edx
  mov    %rax,%rdi
  call   <strtol@plt>
  test   %rax,%rax
  js     L132
  je     L156
  mov    (%rsp),%rdx
  movzbl (%rdx),%ecx
  test   %cl,%cl
  jne    L166
  lea    D104(%rip),%r15
  mov    $0x1,%r13d
  mov    $0x40000000,%r14d
L13:
  cmp    %rax,%r14
  jge    L176
  mov    $0x1,%esi
  lea    D141(%rip),%rdi
  mov    $0x0,%eax
  call   <warnx@plt>
L54:
  imul   %r14,%r13
  cmp    $0x1ff,%r13
  jg     L16
L132:
  lea    D80(%rip),%rdi
  mov    $0x0,%eax
  call   <warnx@plt>
  lea    D104(%rip),%r15
  mov    $0x200,%r13d
  mov    $0x200,%r14d
  jmp    L16
L150:
  mov    $0x1,%eax
L166:
  cmpb   $0x0,0x1(%rdx)
  jne    L142
  sub    $0x47,%ecx
  cmp    $0x26,%cl
  ja     L142
  mov    $0x1,%edx
  shl    %cl,%rdx
  movabs $0x100000001,%rcx
  test   %rcx,%rdx
  jne    L74
  movabs $0x1000000010,%rcx
  test   %rcx,%rdx
  jne    L35
  movabs $0x4000000040,%rcx
  test   %rcx,%rdx
  jne    L106
L142:
  mov    %rbx,%rsi
  lea    D97(%rip),%rdi
  mov    $0x0,%eax
  call   <warnx@plt>
  lea    D104(%rip),%r15
  mov    $0x200,%r13d
  mov    $0x200,%r14d
  jmp    L16
L74:
  lea    D87(%rip),%r15
  mov    $0x40000000,%r13d
  mov    $0x1,%r14d
  jmp    L13
L35:
  lea    D115(%rip),%r15
  mov    $0x400,%r13d
  mov    $0x100000,%r14d
  jmp    L13
L106:
  lea    D30(%rip),%r15
  mov    $0x100000,%r13d
  mov    $0x400,%r14d
  jmp    L13
L176:
  mov    %rax,%r14
  jmp    L54
L79:
  lea    D104(%rip),%r15
  mov    $0x200,%r13d
  mov    $0x200,%r14d
  jmp    L16
L156:
  mov    (%rsp),%rdx
  movzbl (%rdx),%ecx
  test   %cl,%cl
  jne    L150
  lea    D104(%rip),%r15
  mov    $0x1,%r13d
  mov    $0x1,%r14d
  jmp    L54
L42:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D21
type_infered: string
name: read_data
arguments: data_tag: D104
type_infered: string
name: read_data
arguments: data_tag: D118
type_infered: string
name: read_data
arguments: data_tag: D141
type_infered: string
name: read_data
arguments: data_tag: D80
type_infered: string
name: read_data
arguments: data_tag: D97
type_infered: string
name: read_data
arguments: data_tag: D87
type_infered: string
name: read_data
arguments: data_tag: D115
type_infered: string
name: read_data
arguments: data_tag: D30
type_infered: string

tool: D21: BLOCKSIZE

tool: 

tool: D118: %ld%s-blocks

tool: D141: maximum blocksize is %ldG

tool: D80: minimum blocksize is 512

tool: D97: %s: unknown blocksize

tool: D87: G

tool: D115: K

tool: D30: M

assistant: ```c
char *getbsize(int *headerlenp, long *blocksizep) {
  static char header[20];
  long n, max, mul, blocksize;
  char *ep, *p;
  const char *form;
  form = "";
  if ((p = getenv("BLOCKSIZE")) != NULL && *p != '\0') {
    if ((n = strtol(p, &ep, 10)) < 0)
      goto underflow;
    if (n == 0)
      n = 1;
    if (*ep && ep[1])
      goto fmterr;
    switch (*ep) {
    case 'G':
    case 'g':
      form = "G";
      max = (1024L * 1024L * 1024L) / (1024L * 1024L * 1024L);
      mul = (1024L * 1024L * 1024L);
      break;
    case 'K':
    case 'k':
      form = "K";
      max = (1024L * 1024L * 1024L) / (1024L);
      mul = (1024L);
      break;
    case 'M':
    case 'm':
      form = "M";
      max = (1024L * 1024L * 1024L) / (1024L * 1024L);
      mul = (1024L * 1024L);
      break;
    case '\0':
      max = (1024L * 1024L * 1024L);
      mul = 1;
      break;
    default:
    fmterr:
      warnx("%s: unknown blocksize", p);
      n = 512;
      max = (1024L * 1024L * 1024L);
      mul = 1;
      break;
    }
    if (n > max) {
      warnx("maximum blocksize is %ldG", (1024L * 1024L * 1024L) / (1024L * 1024L * 1024L));
      n = max;
    }
    if ((blocksize = n * mul) < 512) {
    underflow:
      warnx("minimum blocksize is 512");
      form = "";
      blocksize = n = 512;
    }
  } else
    blocksize = n = 512;
  (void)snprintf(header, sizeof(header), "%ld%s-blocks", n, form);
  *headerlenp = strlen(header);
  *blocksizep = blocksize;
  return (header);
}
```