user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x40(%rbp)
  movq   $0x0,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  movq   $0x0,-0x28(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movl   $0x0,-0x10(%rbp)
  lea    -0x44(%rbp),%rdx
  lea    -0x48(%rbp),%rax
  mov    %rax,%rsi
  lea    D89(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  jmp    L251
L142:
  mov    -0x48(%rbp),%eax
  cmp    $0x63,%eax
  jle    L74
  mov    -0x40(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x48(%rbp),%eax
  sub    $0x64,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L50
L74:
  mov    -0x48(%rbp),%eax
  cmp    $0x31,%eax
  jle    L234
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x48(%rbp),%eax
  sub    $0x32,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L50
L234:
  mov    -0x48(%rbp),%eax
  cmp    $0x13,%eax
  jle    L195
  mov    -0x38(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x48(%rbp),%eax
  sub    $0x14,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L50
L195:
  mov    -0x48(%rbp),%eax
  cmp    $0x9,%eax
  jle    L211
  mov    -0x34(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x48(%rbp),%eax
  sub    $0xa,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L50
L211:
  mov    -0x48(%rbp),%eax
  cmp    $0x4,%eax
  jle    L217
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x48(%rbp),%eax
  sub    $0x5,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L50
L217:
  mov    -0x48(%rbp),%eax
  cmp    $0x1,%eax
  jle    L243
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x48(%rbp),%eax
  sub    $0x2,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L50
L243:
  mov    -0x48(%rbp),%eax
  test   %eax,%eax
  jle    L50
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x48(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x48(%rbp)
L50:
  mov    -0x44(%rbp),%eax
  cmp    $0x31,%eax
  jle    L8
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x44(%rbp),%eax
  sub    $0x32,%eax
  mov    %eax,-0x44(%rbp)
  jmp    L251
L8:
  mov    -0x44(%rbp),%eax
  cmp    $0x18,%eax
  jle    L29
  mov    -0x20(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x44(%rbp),%eax
  sub    $0x19,%eax
  mov    %eax,-0x44(%rbp)
  jmp    L251
L29:
  mov    -0x44(%rbp),%eax
  cmp    $0x9,%eax
  jle    L51
  mov    -0x1c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x44(%rbp),%eax
  sub    $0xa,%eax
  mov    %eax,-0x44(%rbp)
  jmp    L251
L51:
  mov    -0x44(%rbp),%eax
  cmp    $0x4,%eax
  jle    L112
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x44(%rbp),%eax
  sub    $0x5,%eax
  mov    %eax,-0x44(%rbp)
  jmp    L251
L112:
  mov    -0x44(%rbp),%eax
  test   %eax,%eax
  jle    L251
  mov    -0x14(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x44(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x44(%rbp)
L251:
  mov    -0x48(%rbp),%eax
  test   %eax,%eax
  jg     L142
  mov    -0x44(%rbp),%eax
  test   %eax,%eax
  jg     L142
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x40(%rbp),%eax
  mov    %eax,%esi
  lea    D30(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x3c(%rbp),%eax
  mov    %eax,%esi
  lea    D51(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x38(%rbp),%eax
  mov    %eax,%esi
  lea    D102(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x34(%rbp),%eax
  mov    %eax,%esi
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x30(%rbp),%eax
  mov    %eax,%esi
  lea    D80(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x2c(%rbp),%eax
  mov    %eax,%esi
  lea    D65(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x28(%rbp),%eax
  mov    %eax,%esi
  lea    D106(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  lea    D74(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D66(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%esi
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x18(%rbp),%eax
  mov    %eax,%esi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D144(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L140
  call   <__stack_chk_fail@plt>
L140:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D89
type: string
name: retrieve_data
arguments: tag: D37
type: string
name: retrieve_data
arguments: tag: D30
type: string
name: retrieve_data
arguments: tag: D51
type: string
name: retrieve_data
arguments: tag: D102
type: string
name: retrieve_data
arguments: tag: D33
type: string
name: retrieve_data
arguments: tag: D80
type: string
name: retrieve_data
arguments: tag: D65
type: string
name: retrieve_data
arguments: tag: D49
type: string
name: retrieve_data
arguments: tag: D106
type: string
name: retrieve_data
arguments: tag: D74
type: string
name: retrieve_data
arguments: tag: D66
type: string
name: retrieve_data
arguments: tag: D99
type: string
name: retrieve_data
arguments: tag: D15
type: string
name: retrieve_data
arguments: tag: D144
type: string

tool: D89: %d.%d

tool: D37: NOTAS:

tool: D30: %d nota(s) de R$ 100.00


tool: D51: %d nota(s) de R$ 50.00


tool: D102: %d nota(s) de R$ 20.00


tool: D33: %d nota(s) de R$ 10.00


tool: D80: %d nota(s) de R$ 5.00


tool: D65: %d nota(s) de R$ 2.00


tool: D49: MOEDAS:

tool: D106: %d moeda(s) de R$ 1.00


tool: D74: %d moeda(s) de R$ 0.50


tool: D66: %d moeda(s) de R$ 0.25


tool: D99: %d moeda(s) de R$ 0.10


tool: D15: %d moeda(s) de R$ 0.05


tool: D144: %d moeda(s) de R$ 0.01


assistant: ```c
int main() {
  int cont[13] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, N, M;
  scanf("%d.%d", &N, &M);
  while (N > 0 || M > 0) {
    if (N >= 100) {
      cont[0]++;
      N -= 100;
    } else if (N >= 50) {
      cont[1]++;
      N -= 50;
    } else if (N >= 20) {
      cont[2]++;
      N -= 20;
    } else if (N >= 10) {
      cont[3]++;
      N -= 10;
    } else if (N >= 5) {
      cont[4]++;
      N -= 5;
    } else if (N >= 2) {
      cont[5]++;
      N -= 2;
    } else if (N >= 1) {
      cont[6]++;
      N -= 1;
    }
    if (M >= 50) {
      cont[7]++;
      M -= 50;
    } else if (M >= 25) {
      cont[8]++;
      M -= 25;
    } else if (M >= 10) {
      cont[9]++;
      M -= 10;
    } else if (M >= 5) {
      cont[10]++;
      M -= 5;
    } else if (M >= 1) {
      cont[11]++;
      M -= 1;
    }
  }
  printf("NOTAS:\n");
  printf("%d nota(s) de R$ 100.00\n", cont[0]);
  printf("%d nota(s) de R$ 50.00\n", cont[1]);
  printf("%d nota(s) de R$ 20.00\n", cont[2]);
  printf("%d nota(s) de R$ 10.00\n", cont[3]);
  printf("%d nota(s) de R$ 5.00\n", cont[4]);
  printf("%d nota(s) de R$ 2.00\n", cont[5]);
  printf("MOEDAS:\n");
  printf("%d moeda(s) de R$ 1.00\n", cont[6]);
  printf("%d moeda(s) de R$ 0.50\n", cont[7]);
  printf("%d moeda(s) de R$ 0.25\n", cont[8]);
  printf("%d moeda(s) de R$ 0.10\n", cont[9]);
  printf("%d moeda(s) de R$ 0.05\n", cont[10]);
  printf("%d moeda(s) de R$ 0.01\n", cont[11]);
  return 0;
}
```