user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<run_zone_trigger>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x238,%rsp
  mov    %edi,%r14d
  mov    %rsi,%r13
  mov    %edx,%r12d
  mov    %ecx,0x8(%rsp)
  mov    %r8d,%ebp
  mov    %r9d,0xc(%rsp)
  mov    0x278(%rsp),%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x228(%rsp)
  xor    %eax,%eax
  lea    D66(%rip),%rsi
  mov    $0x3,%edi
  call   <logmsg@plt>
  lea    0x120(%rsp),%rdi
  lea    D2(%rip),%rcx
  lea    D24(%rip),%rdx
  mov    $0xff,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  mov    $0x0,%ebx
  test   %rax,%rax
  jns    L13
L80:
  lea    0x120(%rsp),%rdi
  mov    %r15,%rcx
  lea    D94(%rip),%rdx
  mov    $0xff,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  jns    L52
L86:
  lea    0x120(%rsp),%rdi
  mov    %r14d,%ecx
  lea    D48(%rip),%rdx
  mov    $0xff,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  jns    L102
L165:
  lea    0x120(%rsp),%rdi
  mov    %r13,%rcx
  lea    D97(%rip),%rdx
  mov    $0xff,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  jns    L156
L4:
  lea    0x120(%rsp),%rdi
  mov    %r12d,%ecx
  lea    D107(%rip),%rdx
  mov    $0xff,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  jns    L131
L130:
  lea    0x120(%rsp),%rdi
  mov    %ebp,%ecx
  lea    D28(%rip),%rdx
  mov    $0xff,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  jns    L153
L176:
  lea    0x120(%rsp),%rdi
  mov    0xc(%rsp),%ecx
  lea    D21(%rip),%rdx
  mov    $0xff,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  jns    L206
L139:
  lea    0x120(%rsp),%rdi
  mov    0x8(%rsp),%ecx
  lea    D33(%rip),%rdx
  mov    $0xff,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  jns    L48
L148:
  lea    0x120(%rsp),%rdi
  mov    0x270(%rsp),%ecx
  lea    D7(%rip),%rdx
  mov    $0xff,%esi
  mov    $0x0,%eax
  call   <snprintf@plt>
  test   %rax,%rax
  jns    L129
L201:
  movslq %ebx,%rbx
  movq   $0x0,0x10(%rsp,%rbx,8)
  lea    0x10(%rsp),%rdi
  call   <run_trigger_program@plt>
  mov    0x10(%rsp),%rdi
  test   %rdi,%rdi
  je     L7
  lea    0x10(%rsp),%rbx
L2:
  call   <free@plt>
  add    $0x8,%rbx
  mov    (%rbx),%rdi
  test   %rdi,%rdi
  jne    L2
L7:
  mov    0x228(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L81
  add    $0x238,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L13:
  lea    0x120(%rsp),%rdi
  call   <strdup@plt>
  mov    %rax,0x10(%rsp)
  test   %rax,%rax
  setne  %bl
  movzbl %bl,%ebx
  jmp    L80
L52:
  lea    0x120(%rsp),%rdi
  call   <strdup@plt>
  movslq %ebx,%rdx
  mov    %rax,0x10(%rsp,%rdx,8)
  cmp    $0x1,%rax
  sbb    $0xffffffff,%ebx
  jmp    L86
L102:
  lea    0x120(%rsp),%rdi
  call   <strdup@plt>
  movslq %ebx,%rdx
  mov    %rax,0x10(%rsp,%rdx,8)
  cmp    $0x1,%rax
  sbb    $0xffffffff,%ebx
  jmp    L165
L156:
  lea    0x120(%rsp),%rdi
  call   <strdup@plt>
  movslq %ebx,%rdx
  mov    %rax,0x10(%rsp,%rdx,8)
  cmp    $0x1,%rax
  sbb    $0xffffffff,%ebx
  jmp    L4
L131:
  lea    0x120(%rsp),%rdi
  call   <strdup@plt>
  movslq %ebx,%rdx
  mov    %rax,0x10(%rsp,%rdx,8)
  cmp    $0x1,%rax
  sbb    $0xffffffff,%ebx
  jmp    L130
L153:
  lea    0x120(%rsp),%rdi
  call   <strdup@plt>
  movslq %ebx,%rdx
  mov    %rax,0x10(%rsp,%rdx,8)
  cmp    $0x1,%rax
  sbb    $0xffffffff,%ebx
  jmp    L176
L206:
  lea    0x120(%rsp),%rdi
  call   <strdup@plt>
  movslq %ebx,%rdx
  mov    %rax,0x10(%rsp,%rdx,8)
  cmp    $0x1,%rax
  sbb    $0xffffffff,%ebx
  jmp    L139
L48:
  lea    0x120(%rsp),%rdi
  call   <strdup@plt>
  movslq %ebx,%rdx
  mov    %rax,0x10(%rsp,%rdx,8)
  cmp    $0x1,%rax
  sbb    $0xffffffff,%ebx
  jmp    L148
L129:
  lea    0x120(%rsp),%rdi
  call   <strdup@plt>
  movslq %ebx,%rdx
  mov    %rax,0x10(%rsp,%rdx,8)
  cmp    $0x1,%rax
  sbb    $0xffffffff,%ebx
  jmp    L201
L81:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D66
type_infered: string
name: retrieve_data
arguments: label: D2
type_infered: string
name: retrieve_data
arguments: label: D24
type_infered: string
name: retrieve_data
arguments: label: D94
type_infered: string
name: retrieve_data
arguments: label: D48
type_infered: string
name: retrieve_data
arguments: label: D97
type_infered: string
name: retrieve_data
arguments: label: D107
type_infered: string
name: retrieve_data
arguments: label: D28
type_infered: string
name: retrieve_data
arguments: label: D21
type_infered: string
name: retrieve_data
arguments: label: D33
type_infered: string
name: retrieve_data
arguments: label: D7
type_infered: string

tool: D66: run_zone_trigger() called

tool: D2: zone

tool: D24: ALARM_EVENT_TYPE=%s

tool: D94: ALARM_EVENT_STATUS=%s

tool: D48: ALARM_EVENT_ZONE=%d

tool: D97: ALARM_EVENT_ZONE_NAME=%s

tool: D107: ALARM_EVENT_ZONE_FAULT=%d

tool: D28: ALARM_EVENT_ZONE_TROUBLE=%d

tool: D21: ALARM_EVENT_ZONE_TAMPER=%d

tool: D33: ALARM_EVENT_ZONE_BYPASS=%d

tool: D7: 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++;
  }
}
```