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

```asm
<gen_switches_and_alarms>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x28(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x2c,%edx
  mov    $0x1,%esi
  lea    D78(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x37,%edx
  mov    $0x1,%esi
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x28(%rbp),%rax
  mov    $0xd,%edx
  lea    D53(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x48,%edx
  mov    $0x1,%esi
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  movl   $0x1,-0x14(%rbp)
  jmp    L0
L11:
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x14(%rbp),%edx
  mov    -0x28(%rbp),%rax
  lea    D47(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x14(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x14(%rbp),%edx
  mov    -0x28(%rbp),%rax
  lea    D21(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x14(%rbp),%eax
  lea    0xd(%rax),%ecx
  mov    -0x14(%rbp),%edx
  mov    -0x28(%rbp),%rax
  lea    D44(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x14(%rbp),%eax
  lea    0xd(%rax),%ecx
  mov    -0x14(%rbp),%edx
  mov    -0x28(%rbp),%rax
  lea    D59(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  addl   $0x1,-0x14(%rbp)
L0:
  cmpl   $0xb,-0x14(%rbp)
  jle    L11
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L14
  call   <__stack_chk_fail@plt>
L14:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D78
data_type: string
name: read_data
arguments: label: D46
data_type: string
name: read_data
arguments: label: D53
data_type: string
name: read_data
arguments: label: D52
data_type: string
name: read_data
arguments: label: D47
data_type: string
name: read_data
arguments: label: D21
data_type: string
name: read_data
arguments: label: D44
data_type: string
name: read_data
arguments: label: D59
data_type: string

tool: D78: INTEGER, PARAMETER :: history_only      = 1


tool: D46: INTEGER, PARAMETER :: HISTORY_ALARM     = history_only


tool: D53: INTEGER, PARAMETER :: input_only        = %d


tool: D52: INTEGER, PARAMETER :: INPUT_ALARM       = input_only         ! not used


tool: D47: INTEGER, PARAMETER :: auxhist%d_only     = %d


tool: D21: INTEGER, PARAMETER :: AUXHIST%d_ALARM    = %d


tool: D44: INTEGER, PARAMETER :: auxinput%d_only     = %d


tool: D59: INTEGER, PARAMETER :: AUXINPUT%d_ALARM    = %d


assistant: ```c
int gen_switches_and_alarms(FILE *fp) {
  char *aux, *streamtype, streamno[5];
  int i;
  fprintf(fp, "INTEGER, PARAMETER :: history_only      = 1\n");
  fprintf(fp, "INTEGER, PARAMETER :: HISTORY_ALARM     = history_only\n");
  fprintf(fp, "INTEGER, PARAMETER :: input_only        = %d\n", 12 + 1);
  fprintf(fp, "INTEGER, PARAMETER :: INPUT_ALARM       = input_only         ! not used\n");
  for (i = 1; i < 12; i++) {
    fprintf(fp, "INTEGER, PARAMETER :: auxhist%d_only     = %d\n", i, i + 1);
    fprintf(fp, "INTEGER, PARAMETER :: AUXHIST%d_ALARM    = %d\n", i, i + 1);
    fprintf(fp, "INTEGER, PARAMETER :: auxinput%d_only     = %d\n", i, 12 + i + 1);
    fprintf(fp, "INTEGER, PARAMETER :: AUXINPUT%d_ALARM    = %d\n", i, 12 + i + 1);
  }
  return 0;
}
```