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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x138,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  lea    D39(%rip),%rax
  mov    %rax,0x50(%rsp)
  lea    D42(%rip),%rax
  mov    %rax,0x58(%rsp)
  lea    D181(%rip),%rdx
  mov    %rdx,0x60(%rsp)
  lea    D124(%rip),%rax
  mov    %rax,0x68(%rsp)
  lea    D155(%rip),%rcx
  mov    %rcx,0x70(%rsp)
  lea    D105(%rip),%rcx
  mov    %rcx,0x78(%rsp)
  mov    %rdx,0x80(%rsp)
  mov    %rax,0x88(%rsp)
  movq   $0x0,0x90(%rsp)
  movq   $0x2,0x98(%rsp)
  movq   $0x3,0xa0(%rsp)
  movq   $0x4,0xa8(%rsp)
  movq   $0x0,0xb0(%rsp)
  movq   $0x1,0xb8(%rsp)
  movq   $0x2,0xc0(%rsp)
  movq   $0x3,0xc8(%rsp)
  movq   $0x4,0xd0(%rsp)
  movabs $0x656d616e65736162,%rax
  mov    %rax,0xe7(%rsp)
  movb   $0x0,0xef(%rsp)
  movabs $0x3d3d3d3d3d3d3d3d,%rax
  movabs $0x3d3d3d3d3d3d3d3d,%rdx
  mov    %rax,0xf0(%rsp)
  mov    %rdx,0xf8(%rsp)
  mov    %rax,0x100(%rsp)
  mov    %rdx,0x108(%rsp)
  mov    %rax,0x110(%rsp)
  mov    %rdx,0x118(%rsp)
  movl   $0x3d3d3d3d,0x120(%rsp)
  movw   $0xa,0x124(%rsp)
  mov    D87(%rip),%rax
  mov    %rax,0x40(%rsp)
  mov    D38(%rip),%rax
  mov    %rax,0x48(%rsp)
  lea    0xf0(%rsp),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D151(%rip),%rdi
  call   <puts@plt>
  lea    0x50(%rsp),%rbx
  lea    0x70(%rsp),%r13
  lea    D158(%rip),%r12
L136:
  mov    (%rbx),%rbp
  mov    %rbp,%rdi
  call   <G_get_num_decimals@plt>
  mov    %eax,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x8,%rbx
  cmp    %r13,%rbx
  jne    L136
  lea    0xf0(%rsp),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D132(%rip),%rdi
  call   <puts@plt>
  lea    0x90(%rsp),%rax
  mov    %rax,0x10(%rsp)
  lea    0xb0(%rsp),%rcx
  mov    %rcx,0x30(%rsp)
  mov    %rax,0x18(%rsp)
  jmp    L1
L123:
  mov    $0xa,%edi
  call   <putchar@plt>
  add    $0x8,%r15
  cmp    0x20(%rsp),%r15
  je     L18
L113:
  lea    0x40(%rsp),%rbp
  mov    %rbp,0x28(%rsp)
  lea    0x50(%rsp),%r12
L61:
  mov    (%r15),%r14
  mov    0x18(%rsp),%rax
  mov    (%rax),%r13
  movsd  0x0(%rbp),%xmm1
  movsd  %xmm1,0x8(%rsp)
  mov    %r14,%rsi
  mov    %r13,%rdi
  movapd %xmm1,%xmm0
  call   <G_double_to_basename_format@plt>
  mov    %rax,%rbx
  mov    %rax,%rcx
  mov    %r14,%rdx
  mov    %r13,%rsi
  movsd  0x8(%rsp),%xmm0
  lea    D35(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  add    $0x8,%rbp
  cmp    %r12,%rbp
  jne    L61
  jmp    L123
L18:
  addq   $0x8,0x18(%rsp)
  mov    0x18(%rsp),%rax
  cmp    0x30(%rsp),%rax
  je     L30
L1:
  lea    0xb0(%rsp),%r15
  mov    %r15,0x38(%rsp)
  lea    0xd8(%rsp),%rax
  mov    %rax,0x20(%rsp)
  jmp    L113
L30:
  lea    0xf0(%rsp),%rbx
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D16(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  call   <G_get_basename_separator@plt>
  mov    %rax,%rsi
  lea    D29(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D123(%rip),%rdi
  call   <puts@plt>
  lea    0x70(%rsp),%rdi
  mov    $0x4,%esi
  call   <G_join_basename_strings@plt>
  mov    %rax,%rsi
  lea    D185(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D111(%rip),%rdi
  call   <puts@plt>
  lea    0xe7(%rsp),%rax
  mov    %r12,0x18(%rsp)
  mov    %rax,%r12
  jmp    L22
L19:
  lea    D133(%rip),%rdi
  call   <puts@plt>
  add    $0x8,%r15
  cmp    0x20(%rsp),%r15
  je     L131
L128:
  mov    0x28(%rsp),%rbp
L62:
  mov    (%r15),%r14
  mov    0x10(%rsp),%rax
  mov    (%rax),%r13
  movsd  0x0(%rbp),%xmm2
  movsd  %xmm2,0x8(%rsp)
  mov    %r14,%rdx
  mov    %r13,%rsi
  movapd %xmm2,%xmm0
  mov    %r12,%rdi
  call   <G_generate_basename@plt>
  mov    %rax,%rbx
  mov    %rax,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  movsd  0x8(%rsp),%xmm0
  mov    %r12,%rsi
  lea    D49(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  add    $0x8,%rbp
  cmp    0x18(%rsp),%rbp
  jne    L62
  jmp    L19
L131:
  addq   $0x8,0x10(%rsp)
  mov    0x10(%rsp),%rax
  cmp    0x30(%rsp),%rax
  je     L42
L22:
  mov    0x38(%rsp),%r15
  jmp    L128
L42:
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L119
  mov    $0x0,%eax
  add    $0x138,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L119:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D39
type_guessed: string
name: read_data
arguments: label: D42
type_guessed: string
name: read_data
arguments: label: D181
type_guessed: string
name: read_data
arguments: label: D124
type_guessed: string
name: read_data
arguments: label: D155
type_guessed: string
name: read_data
arguments: label: D105
type_guessed: string
name: read_data
arguments: label: D87
type_guessed: f64
name: read_data
arguments: label: D38
type_guessed: f64
name: read_data
arguments: label: D151
type_guessed: string
name: read_data
arguments: label: D158
type_guessed: string
name: read_data
arguments: label: D132
type_guessed: string
name: read_data
arguments: label: D35
type_guessed: string
name: read_data
arguments: label: D16
type_guessed: string
name: read_data
arguments: label: D29
type_guessed: string
name: read_data
arguments: label: D123
type_guessed: string
name: read_data
arguments: label: D185
type_guessed: string
name: read_data
arguments: label: D111
type_guessed: string
name: read_data
arguments: label: D133
type_guessed: string
name: read_data
arguments: label: D49
type_guessed: string

tool: D39: 12345.6789

tool: D42: 12345.67

tool: D181: 12345.

tool: D124: 12345

tool: D155: basename

tool: D105: 12345.6

tool: D87: 12.3456789

tool: D38: 0.987654321

tool: D151: 

Test G_get_num_decimals

tool: D158: Number of decimals in %s => %zu


tool: D132: 

Test G_double_to_basename_format

tool: D35: number: %10f, ndigits: %zu, ndecimals: %zu result => %s


tool: D16: 

Test G_get_basename_separator

tool: D29: The basename separator is: %s


tool: D123: 

G_join_basename_strings

tool: D185: result join strings: %s
**

tool: D111: 

Test G_get_format_name

tool: D133: =======================================================

tool: D49: basename: %s, number: %10f, ndigits: %zu, decimals: %zu result => %s


assistant: ```c
int main() {
  int i, j, n;
  const char *decimals_strings[4] = {"12345.6789", "12345.67", "12345.", "12345"};
  const char *strings[4] = {"basename", "12345.6", "12345.", "12345"};
  int len_decimals_strings = 4;
  size_t ndigits[] = {0, 2, 3, 4};
  int len_ndigits = 4;
  size_t ndecimals[] = {0, 1, 2, 3, 4};
  int len_ndecimals = 5;
  const char basename[] = "basename";
  const char SEP[] = "====================================================\n";
  double numbers[] = {12.34567890, 0.987654321};
  int len_numbers = 2;
  char *result;
  printf(SEP);
  printf("\n\nTest G_get_num_decimals\n");
  for (i = 0; i < len_decimals_strings; i++) {
    printf("Number of decimals in %s => %zu\n", decimals_strings[i], G_get_num_decimals(decimals_strings[i]));
  }
  printf(SEP);
  printf("\n\nTest G_double_to_basename_format\n");
  for (i = 0; i < len_ndigits; i++) {
    for (j = 0; j < len_ndecimals; j++) {
      for (n = 0; n < len_numbers; n++) {
        result = G_double_to_basename_format(numbers[n], ndigits[i], ndecimals[j]);
        printf("number: %10f, ndigits: %zu, ndecimals: %zu result => %s\n", numbers[n], ndigits[i], ndecimals[j], result);
        free(result);
      }
      printf("\n");
    }
  }
  printf(SEP);
  printf("\n\nTest G_get_basename_separator\n");
  printf("The basename separator is: %s\n", G_get_basename_separator());
  printf(SEP);
  printf("\n\nG_join_basename_strings\n");
  printf("result join strings: %s\n**", G_join_basename_strings(strings, 4));
  printf(SEP);
  printf("\n\nTest G_get_format_name\n");
  for (i = 0; i < len_ndigits; i++) {
    for (j = 0; j < len_ndecimals; j++) {
      for (n = 0; n < len_numbers; n++) {
        result = G_generate_basename(basename, numbers[n], ndigits[i], ndecimals[j]);
        printf("basename: %s, number: %10f, ndigits: %zu, decimals: %zu result => %s\n", basename, numbers[n], ndigits[i], ndecimals[j], result);
        free(result);
      }
      printf("=======================================================\n");
    }
  }
  return 0;
}
```