user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %r13
  lea    D62(%rip),%rdi
  lea    D114(%rip),%rsi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movl   $0x1,(%rsp)
  movl   $0x1,0x4(%rsp)
  call   <fopen@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <sendto@plt>
  test   %rax,%rax
  je     L106
L1:
  lea    D85(%rip),%rsi
  xor    %edi,%edi
  lea    0x4(%rsp),%rbx
  call   <smpl@plt>
  lea    D58(%rip),%rbp
  mov    $0x1,%esi
  mov    %rbp,%rdi
  call   <facility@plt>
  mov    $0x1,%edi
  call   <stream@plt>
  mov    0x4(%rsp),%esi
  pxor   %xmm0,%xmm0
  mov    $0x1,%edi
  call   <schedule@plt>
  nopw   0x0(%rax,%rax,1)
L53:
  xor    %eax,%eax
  call   <time@plt>
  movsd  D24(%rip),%xmm1
  comisd %xmm0,%xmm1
  jbe    L68
  mov    %rsp,%rdi
  mov    %rbx,%rsi
  call   <cause@plt>
  mov    (%rsp),%eax
  cmp    $0x2,%eax
  je     L61
  cmp    $0x3,%eax
  je     L62
  cmp    $0x1,%eax
  jne    L53
  mov    0x4(%rsp),%esi
  mov    $0x2,%edi
  pxor   %xmm0,%xmm0
  call   <schedule@plt>
  mov    0x4(%rsp),%r13d
  movss  D108(%rip),%xmm0
  call   <expntl@plt>
  mov    %r13d,%esi
  mov    $0x1,%edi
  call   <schedule@plt>
  jmp    L53
  nopl   0x0(%rax)
L62:
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  call   <release@plt>
  jmp    L53
  xchg   %ax,%ax
L61:
  mov    0x4(%rsp),%edx
  xor    %ecx,%ecx
  mov    $0x2,%esi
  mov    %rbp,%rdi
  call   <request@plt>
  test   %eax,%eax
  jne    L53
  mov    0x4(%rsp),%r13d
  movss  D108(%rip),%xmm0
  call   <expntl@plt>
  mov    %r13d,%esi
  mov    $0x3,%edi
  call   <schedule@plt>
  jmp    L53
  nop
L68:
  xor    %eax,%eax
  call   <time@plt>
  lea    D7(%rip),%rsi
  mov    %r12,%rdi
  call   <fprintf@plt>
  mov    %rbp,%rdi
  call   <utilizacao_recurso@plt>
  lea    D44(%rip),%rsi
  mov    %r12,%rdi
  call   <fprintf@plt>
  mov    %rbp,%rdi
  call   <comprimento_medio_fila@plt>
  lea    D102(%rip),%rsi
  mov    %r12,%rdi
  call   <fprintf@plt>
  mov    %rbp,%rdi
  call   <periodo_medio_ocupado@plt>
  mov    %r12,%rdi
  lea    D41(%rip),%rsi
  call   <fprintf@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L50
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L106:
  lea    D84(%rip),%rdi
  call   <printf@plt>
  jmp    L1
L50:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D62
data_type: string
name: read_data
arguments: label: D114
data_type: string
name: read_data
arguments: label: D85
data_type: string
name: read_data
arguments: label: D58
data_type: string
name: read_data
arguments: label: D24
data_type: f64
name: read_data
arguments: label: D108
data_type: f32
name: read_data
arguments: label: D7
data_type: string
name: read_data
arguments: label: D44
data_type: string
name: read_data
arguments: label: D102
data_type: string
name: read_data
arguments: label: D41
data_type: string
name: read_data
arguments: label: D84
data_type: string

tool: D62: TESTE.out

tool: D114: w

tool: D85:  TESTE

tool: D58: CS_0

tool: D24: 100000

tool: D108: 10

tool: D7: TempoSimulado: %f


tool: D44: Utilizacao ("CS_0") = %g


tool: D102: Comprimento medio fila ("CS_0") = %g


tool: D41: Periodo medio ocupado ("CS_0") = %g


tool: D84: Erro na saida 


assistant: ```c
main() {
  float Te = 100000;
  int Event = 1, Customer = 1, Aleatorio;
  float Ta0 = 10, Ts0 = 10;
  int i = 0;
  FILE *p, *saida;
  saida = fopen("TESTE.out", "w");
  if ((p = sendto(saida)) == NULL)
    printf("Erro na saida \n");
  smpl(0, " TESTE");
  facility("CS_0", 1);
  stream(1);
  schedule(1, 0.0, Customer);
  while ((time() < Te)) {
    cause(&Event, &Customer);
    switch (Event) {
    case 1:
      schedule(2, 0.0, Customer);
      schedule(1, expntl(Ta0), Customer);
      break;
    case 2:
      if (request("CS_0", Event, Customer, 0) == 0)
        schedule(3, expntl(Ts0), Customer);
      break;
    case 3:
      release("CS_0", Customer);
      break;
    }
  }
  fprintf(saida, "TempoSimulado: %f\n", time());
  fprintf(saida, "Utilizacao (\"CS_0\") = %g\n", utilizacao_recurso("CS_0"));
  fprintf(saida, "Comprimento medio fila (\"CS_0\") = %g\n", comprimento_medio_fila("CS_0"));
  fprintf(saida, "Periodo medio ocupado (\"CS_0\") = %g\n", periodo_medio_ocupado("CS_0"));
  fclose(saida);
}
```