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

```asm
<main>:
  endbr64
  push   %r15
  lea    D94(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D93(%rip),%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0x8(%rsp),%rbp
  movl   $0x0,0x8(%rsp)
  movl   $0x0,0xc(%rsp)
  movl   $0x0,0x14(%rsp)
  call   <puts@plt>
  nopw   0x0(%rax,%rax,1)
L112:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x8(%rsp),%esi
  test   %esi,%esi
  jle    L112
  lea    D37(%rip),%rdi
  lea    0xc(%rsp),%rbp
  call   <puts@plt>
  xchg   %ax,%ax
L138:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0xc(%rsp),%ecx
  test   %ecx,%ecx
  jle    L138
  xor    %r15d,%r15d
  xor    %r14d,%r14d
  lea    D70(%rip),%rbp
  lea    D17(%rip),%rbx
  lea    D9(%rip),%r13
  lea    D102(%rip),%r12
  nopw   0x0(%rax,%rax,1)
L32:
  mov    0x8(%rsp),%edx
  test   %edx,%edx
  jg     L57
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L62
L57:
  mov    %rbp,%rdi
  call   <puts@plt>
  lea    0x14(%rsp),%rdx
  mov    %rbx,%rdi
  xor    %eax,%eax
  lea    0x10(%rsp),%rsi
  call   <scanf@plt>
  mov    0x10(%rsp),%eax
  cmp    $0x1,%eax
  je     L113
  cmp    $0x2,%eax
  jne    L32
  mov    0x14(%rsp),%eax
  mov    0xc(%rsp),%edx
  cmp    %edx,%eax
  jg     L63
  test   %eax,%eax
  jne    L69
  nopw   0x0(%rax,%rax,1)
L63:
  mov    %r13,%rdi
  call   <puts@plt>
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L32
  nopl   0x0(%rax)
L113:
  mov    0x14(%rsp),%eax
  cmp    0x8(%rsp),%eax
  jg     L63
  test   %eax,%eax
  je     L63
  lea    D56(%rip),%rdi
  add    $0x1,%r14d
  call   <puts@plt>
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%esi
  mov    %r12,%rdi
  sub    0x14(%rsp),%esi
  xor    %eax,%eax
  mov    %esi,0x8(%rsp)
  call   <printf@plt>
  jmp    L32
  nopl   (%rax)
L62:
  lea    D11(%rip),%rdi
  call   <puts@plt>
  mov    %r14d,%esi
  lea    D7(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  mov    %r15d,%esi
  lea    D82(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L125
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L69:
  sub    %eax,%edx
  lea    D56(%rip),%rdi
  add    $0x1,%r15d
  mov    %edx,0xc(%rsp)
  call   <puts@plt>
  mov    0xc(%rsp),%edx
  mov    0x8(%rsp),%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L32
L125:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D94
type: string
name: read_data
arguments: data_label: D93
type: string
name: read_data
arguments: data_label: D37
type: string
name: read_data
arguments: data_label: D70
type: string
name: read_data
arguments: data_label: D17
type: string
name: read_data
arguments: data_label: D9
type: string
name: read_data
arguments: data_label: D102
type: string
name: read_data
arguments: data_label: D56
type: string
name: read_data
arguments: data_label: D11
type: string
name: read_data
arguments: data_label: D7
type: string
name: read_data
arguments: data_label: D82
type: string

tool: D94: Informe a quantidade inicial do produto A:

tool: D93: %d

tool: D37: Informe a quantidade inicial do produto B:

tool: D70: Informe vendas:

tool: D17: %d %d

tool: D9: Venda nao registrada

tool: D102: Estoque: A = %d B = %d


tool: D56: Venda registrada

tool: D11: 
Relatorio:

tool: D7: Numero de registos de venda o produto A: %d


tool: D82: Numero de registos de venda o produto B: %d


assistant: ```c
int main() {
  int prodA = 0, prodB = 0, vendA = 0, vendB = 0;
  int cod, prod = 0;
  printf("Informe a quantidade inicial do produto A:\n");
  do {
    scanf("%d", &prodA);
  } while (prodA <= 0);
  printf("Informe a quantidade inicial do produto B:\n");
  do {
    scanf("%d", &prodB);
  } while (prodB <= 0);
  while (prodA > 0 || prodB > 0) {
    printf("Informe vendas:\n");
    scanf("%d %d", &cod, &prod);
    if (cod == 1) {
      if (prod > prodA || prod == 0) {
        puts("Venda nao registrada");
        printf("Estoque: A = %d B = %d\n", prodA, prodB);
      } else {
        puts("Venda registrada");
        prodA -= prod;
        printf("Estoque: A = %d B = %d\n", prodA, prodB);
        vendA++;
      }
    } else if (cod == 2) {
      if (prod > prodB || prod == 0) {
        puts("Venda nao registrada");
        printf("Estoque: A = %d B = %d\n", prodA, prodB);
      } else {
        prodB -= prod;
        puts("Venda registrada");
        printf("Estoque: A = %d B = %d\n", prodA, prodB);
        vendB++;
      }
    }
  }
  puts("\nRelatorio:");
  printf("Numero de registos de venda o produto A: %d\n", vendA);
  printf("Numero de registos de venda o produto B: %d\n", vendB);
  return 0;
}
```