user: Please show me the C implementation that matches the assembly code listed below:

```asm
<run_zone_trigger>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x260,%rsp
  mov    %edi,-0x234(%rbp)
  mov    %rsi,-0x240(%rbp)
  mov    %edx,-0x238(%rbp)
  mov    %ecx,-0x244(%rbp)
  mov    %r8d,-0x248(%rbp)
  mov    %r9d,-0x24c(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x258(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x22c(%rbp)
  lea    D16(%rip),%rax
  mov    %rax,%rsi
  mov    $0x3,%edi
  call   <logmsg@plt>
  cmpl   $0x1f,-0x22c(%rbp)
  jg     L137
  lea    -0x110(%rbp),%rax
  lea    D70(%rip),%rdx
  mov    %rdx,%rcx
  lea    D11(%rip),%rdx
  mov    $0xff,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  js     L137
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x22c(%rbp),%eax
  cltq
  mov    %rdx,-0x220(%rbp,%rax,8)
  mov    -0x22c(%rbp),%eax
  cltq
  mov    -0x220(%rbp,%rax,8),%rax
  test   %rax,%rax
  je     L137
  addl   $0x1,-0x22c(%rbp)
L137:
  cmpl   $0x1f,-0x22c(%rbp)
  jg     L194
  mov    -0x258(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rcx
  lea    D85(%rip),%rdx
  mov    $0xff,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  js     L194
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x22c(%rbp),%eax
  cltq
  mov    %rdx,-0x220(%rbp,%rax,8)
  mov    -0x22c(%rbp),%eax
  cltq
  mov    -0x220(%rbp,%rax,8),%rax
  test   %rax,%rax
  je     L194
  addl   $0x1,-0x22c(%rbp)
L194:
  cmpl   $0x1f,-0x22c(%rbp)
  jg     L109
  mov    -0x234(%rbp),%edx
  lea    -0x110(%rbp),%rax
  mov    %edx,%ecx
  lea    D3(%rip),%rdx
  mov    $0xff,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  js     L109
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x22c(%rbp),%eax
  cltq
  mov    %rdx,-0x220(%rbp,%rax,8)
  mov    -0x22c(%rbp),%eax
  cltq
  mov    -0x220(%rbp,%rax,8),%rax
  test   %rax,%rax
  je     L109
  addl   $0x1,-0x22c(%rbp)
L109:
  cmpl   $0x1f,-0x22c(%rbp)
  jg     L288
  mov    -0x240(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  mov    %rdx,%rcx
  lea    D33(%rip),%rdx
  mov    $0xff,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  js     L288
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x22c(%rbp),%eax
  cltq
  mov    %rdx,-0x220(%rbp,%rax,8)
  mov    -0x22c(%rbp),%eax
  cltq
  mov    -0x220(%rbp,%rax,8),%rax
  test   %rax,%rax
  je     L288
  addl   $0x1,-0x22c(%rbp)
L288:
  cmpl   $0x1f,-0x22c(%rbp)
  jg     L270
  mov    -0x238(%rbp),%edx
  lea    -0x110(%rbp),%rax
  mov    %edx,%ecx
  lea    D35(%rip),%rdx
  mov    $0xff,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  js     L270
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x22c(%rbp),%eax
  cltq
  mov    %rdx,-0x220(%rbp,%rax,8)
  mov    -0x22c(%rbp),%eax
  cltq
  mov    -0x220(%rbp,%rax,8),%rax
  test   %rax,%rax
  je     L270
  addl   $0x1,-0x22c(%rbp)
L270:
  cmpl   $0x1f,-0x22c(%rbp)
  jg     L61
  mov    -0x248(%rbp),%edx
  lea    -0x110(%rbp),%rax
  mov    %edx,%ecx
  lea    D37(%rip),%rdx
  mov    $0xff,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  js     L61
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x22c(%rbp),%eax
  cltq
  mov    %rdx,-0x220(%rbp,%rax,8)
  mov    -0x22c(%rbp),%eax
  cltq
  mov    -0x220(%rbp,%rax,8),%rax
  test   %rax,%rax
  je     L61
  addl   $0x1,-0x22c(%rbp)
L61:
  cmpl   $0x1f,-0x22c(%rbp)
  jg     L98
  mov    -0x24c(%rbp),%edx
  lea    -0x110(%rbp),%rax
  mov    %edx,%ecx
  lea    D107(%rip),%rdx
  mov    $0xff,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  js     L98
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x22c(%rbp),%eax
  cltq
  mov    %rdx,-0x220(%rbp,%rax,8)
  mov    -0x22c(%rbp),%eax
  cltq
  mov    -0x220(%rbp,%rax,8),%rax
  test   %rax,%rax
  je     L98
  addl   $0x1,-0x22c(%rbp)
L98:
  cmpl   $0x1f,-0x22c(%rbp)
  jg     L296
  mov    -0x244(%rbp),%edx
  lea    -0x110(%rbp),%rax
  mov    %edx,%ecx
  lea    D0(%rip),%rdx
  mov    $0xff,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  js     L296
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x22c(%rbp),%eax
  cltq
  mov    %rdx,-0x220(%rbp,%rax,8)
  mov    -0x22c(%rbp),%eax
  cltq
  mov    -0x220(%rbp,%rax,8),%rax
  test   %rax,%rax
  je     L296
  addl   $0x1,-0x22c(%rbp)
L296:
  cmpl   $0x1f,-0x22c(%rbp)
  jg     L116
  lea    -0x110(%rbp),%rax
  mov    0x10(%rbp),%ecx
  lea    D87(%rip),%rdx
  mov    $0xff,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  js     L116
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,%rdx
  mov    -0x22c(%rbp),%eax
  cltq
  mov    %rdx,-0x220(%rbp,%rax,8)
  mov    -0x22c(%rbp),%eax
  cltq
  mov    -0x220(%rbp,%rax,8),%rax
  test   %rax,%rax
  je     L116
  addl   $0x1,-0x22c(%rbp)
L116:
  mov    -0x22c(%rbp),%eax
  cltq
  movq   $0x0,-0x220(%rbp,%rax,8)
  lea    -0x220(%rbp),%rax
  mov    %rax,%rdi
  call   <run_trigger_program@plt>
  lea    -0x220(%rbp),%rax
  mov    %rax,-0x228(%rbp)
  jmp    L63
L298:
  mov    -0x228(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <free@plt>
  addq   $0x8,-0x228(%rbp)
L63:
  mov    -0x228(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L298
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L139
  call   <__stack_chk_fail@plt>
L139:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D16
type: string
name: parse_data
arguments: data_tag: D70
type: string
name: parse_data
arguments: data_tag: D11
type: string
name: parse_data
arguments: data_tag: D85
type: string
name: parse_data
arguments: data_tag: D3
type: string
name: parse_data
arguments: data_tag: D33
type: string
name: parse_data
arguments: data_tag: D35
type: string
name: parse_data
arguments: data_tag: D37
type: string
name: parse_data
arguments: data_tag: D107
type: string
name: parse_data
arguments: data_tag: D0
type: string
name: parse_data
arguments: data_tag: D87
type: string

tool: D16: run_zone_trigger() called

tool: D70: zone

tool: D11: ALARM_EVENT_TYPE=%s

tool: D85: ALARM_EVENT_STATUS=%s

tool: D3: ALARM_EVENT_ZONE=%d

tool: D33: ALARM_EVENT_ZONE_NAME=%s

tool: D35: ALARM_EVENT_ZONE_FAULT=%d

tool: D37: ALARM_EVENT_ZONE_TROUBLE=%d

tool: D107: ALARM_EVENT_ZONE_TAMPER=%d

tool: D0: ALARM_EVENT_ZONE_BYPASS=%d

tool: D87: ALARM_EVENT_ZONE_ARMED=%d

assistant: ```c
void run_zone_trigger(int zonenum, const char *zonename, int fault, int bypass, int trouble, int tamper, int armed, const char *zonestatus) {
  char *env[32 + 1];
  int envc = 0;
  char tmp[255], **e;
  logmsg(3, "run_zone_trigger() called");
  if (envc < 32 && snprintf(tmp, sizeof(tmp), "ALARM_EVENT_TYPE=%s", "zone") >= 0) {
    if ((env[envc] = strdup(tmp)) != NULL)
      envc++;
  };
  if (envc < 32 && snprintf(tmp, sizeof(tmp), "ALARM_EVENT_STATUS=%s", zonestatus) >= 0) {
    if ((env[envc] = strdup(tmp)) != NULL)
      envc++;
  };
  if (envc < 32 && snprintf(tmp, sizeof(tmp), "ALARM_EVENT_ZONE=%d", zonenum) >= 0) {
    if ((env[envc] = strdup(tmp)) != NULL)
      envc++;
  };
  if (envc < 32 && snprintf(tmp, sizeof(tmp), "ALARM_EVENT_ZONE_NAME=%s", zonename) >= 0) {
    if ((env[envc] = strdup(tmp)) != NULL)
      envc++;
  };
  if (envc < 32 && snprintf(tmp, sizeof(tmp), "ALARM_EVENT_ZONE_FAULT=%d", fault) >= 0) {
    if ((env[envc] = strdup(tmp)) != NULL)
      envc++;
  };
  if (envc < 32 && snprintf(tmp, sizeof(tmp), "ALARM_EVENT_ZONE_TROUBLE=%d", trouble) >= 0) {
    if ((env[envc] = strdup(tmp)) != NULL)
      envc++;
  };
  if (envc < 32 && snprintf(tmp, sizeof(tmp), "ALARM_EVENT_ZONE_TAMPER=%d", tamper) >= 0) {
    if ((env[envc] = strdup(tmp)) != NULL)
      envc++;
  };
  if (envc < 32 && snprintf(tmp, sizeof(tmp), "ALARM_EVENT_ZONE_BYPASS=%d", bypass) >= 0) {
    if ((env[envc] = strdup(tmp)) != NULL)
      envc++;
  };
  if (envc < 32 && snprintf(tmp, sizeof(tmp), "ALARM_EVENT_ZONE_ARMED=%d", armed) >= 0) {
    if ((env[envc] = strdup(tmp)) != NULL)
      envc++;
  };
  env[envc] = NULL;
  run_trigger_program((const char **)env);
  e = env;
  while (*e) {
    free(*e);
    e++;
  }
}
```