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

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x32,%ecx
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1e8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x1d8(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%r14
  lea    0x3c(%rsp),%rdx
  mov    %r14,%rdi
  lea    0x38(%rsp),%rsi
  rep stos %rax,%es:(%rdi)
  lea    D31(%rip),%rdi
  call   <scanf@plt>
  mov    0x38(%rsp),%eax
  test   %eax,%eax
  jle    L122
  mov    %r14,%r12
  xor    %ebp,%ebp
  lea    D30(%rip),%r13
L67:
  mov    %r12,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%ebp
  call   <scanf@plt>
  mov    0x38(%rsp),%r11d
  add    $0x4,%r12
  cmp    %ebp,%r11d
  jg     L67
  test   %r11d,%r11d
  jle    L122
  mov    0x3c(%rsp),%eax
  mov    0x40(%rsp),%edx
  lea    -0x1(%r11),%r12d
  xor    %r8d,%r8d
  movq   $0x1,0x10(%rsp)
  add    $0x4,%r14
  mov    %eax,0x24(%rsp)
  lea    0x48(%rsp),%rax
  mov    %edx,%edi
  mov    %rax,0x18(%rsp)
  mov    %r11d,%eax
  mov    %rax,0x28(%rsp)
  movl   $0x0,0xc(%rsp)
L62:
  mov    0x18(%rsp),%rbp
  mov    $0x1,%eax
  mov    0x10(%rsp),%rbx
  mov    -0x4(%rbp),%r10d
  cmp    %edi,%r10d
  cmovle 0xc(%rsp),%eax
  mov    %r10d,0x20(%rsp)
  mov    %eax,0xc(%rsp)
  mov    0x28(%rsp),%rax
  cmp    %rax,%rbx
  je     L65
  mov    0x24(%rsp),%eax
  add    $0x1,%rbx
  mov    %rbx,0x10(%rsp)
  cltd
  idiv   %edi
  mov    %eax,0x8(%rsp)
  mov    %edx,%r13d
  nopw   0x0(%rax,%rax,1)
L109:
  imul   0x8(%rsp),%r10d
  add    %r13d,%r10d
  cmp    %r10d,%r8d
  cmovl  %r10d,%r8d
  cmp    %ebx,%r11d
  jle    L112
  add    $0x1,%rbx
  mov    %rbp,%r9
  mov    %rbx,%rdi
  cmp    %edi,%r11d
  jle    L75
  nopl   0x0(%rax)
L22:
  mov    %r10d,%eax
  mov    %r12d,%ecx
  mov    %r9,%rsi
  cltd
  sub    %edi,%ecx
  idivl  (%r9)
  lea    -0x1(%rdi,%rcx,1),%rcx
  lea    (%r14,%rcx,4),%r15
  nopl   0x0(%rax,%rax,1)
L51:
  mov    0x4(%rsi),%ecx
  imul   %eax,%ecx
  add    %edx,%ecx
  cmp    %ecx,%r8d
  cmovl  %ecx,%r8d
  add    $0x4,%rsi
  cmp    %rsi,%r15
  jne    L51
  add    $0x1,%rdi
  add    $0x4,%r9
  cmp    %edi,%r11d
  jg     L22
L75:
  mov    0x0(%rbp),%r10d
  add    $0x4,%rbp
  jmp    L109
L112:
  addq   $0x4,0x18(%rsp)
  mov    0x20(%rsp),%edi
  jmp    L62
L65:
  cmpl   $0x1,0xc(%rsp)
  je     L52
L122:
  lea    D3(%rip),%rdi
  call   <puts@plt>
L124:
  mov    0x1d8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L74
  add    $0x1e8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L52:
  mov    %r8d,%esi
  lea    D1(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L124
L74:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D31
type_infered: string
name: extract_symbolic_data
arguments: label: D30
type_infered: string
name: extract_symbolic_data
arguments: label: D3
type_infered: string
name: extract_symbolic_data
arguments: label: D1
type_infered: string

tool: D31: %d %d

tool: D30: %d

tool: D3: Melhor nao investir agora, cara!

tool: D1: Capital final = R$%d


assistant: ```c
int main() {
  int nDias, nAcoes, cInicial, cAtual, cFinal, valor[100], resto, i, j, k, l, maior = 0, decres = 0;
  for (i = 0; i < 100; i++) {
    valor[i] = 0;
  }
  scanf("%d %d", &nDias, &cInicial);
  for (i = 0; i < nDias; i++)
    scanf("%d", &valor[i]);
  for (i = 0; i < nDias; i++) {
    if (valor[i] < valor[i + 1])
      decres = 1;
    for (j = i + 1; j < nDias; j++) {
      nAcoes = cInicial / valor[i];
      resto = cInicial % valor[i];
      cAtual = (nAcoes * valor[j]) + resto;
      if (cAtual > maior) {
        maior = cAtual;
      }
      for (k = j + 1; k < nDias; k++) {
        for (l = k + 1; l < nDias; l++) {
          cFinal = cAtual;
          nAcoes = cFinal / valor[k];
          resto = cFinal % valor[k];
          cFinal = (nAcoes * valor[l]) + resto;
          if (cFinal > maior) {
            maior = cFinal;
          }
        }
      }
    }
  }
  if (decres == 1)
    printf("Capital final = R$%d\n", maior);
  else
    printf("Melhor nao investir agora, cara!\n");
  return 0;
}
```