user: 请将以下的汇编代码转换成C语言代码：

```asm
<get_global_flags_old>:
  endbr64
  push   %r15
  mov    %rdx,%r11
  mov    %rcx,%r10
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x108,%rsp
  mov    0x140(%rsp),%rax
  mov    %rdx,0x28(%rsp)
  mov    %rdi,0x8(%rsp)
  mov    0x150(%rsp),%rdx
  mov    %rax,0x38(%rsp)
  mov    %rax,%rbx
  mov    0x148(%rsp),%eax
  mov    %rsi,0x10(%rsp)
  mov    %rcx,0x30(%rsp)
  mov    %r8,0x18(%rsp)
  mov    %r9,0x20(%rsp)
  mov    %fs:0x28,%rcx
  mov    %rcx,0xf8(%rsp)
  xor    %ecx,%ecx
  movb   $0x0,(%rbx)
  movq   $0x0,(%r10)
  movq   $0x0,(%r11)
  movq   $0x0,(%rdi)
  movq   $0x0,(%rsi)
  movq   $0x0,(%r8)
  movq   $0x0,(%r9)
  cmp    $0x1,%eax
  jle    L318
  sub    $0x2,%eax
  lea    0x8(%rdx),%rbp
  lea    0x50(%rsp),%rbx
  lea    0x10(%rdx,%rax,8),%r14
  lea    D134(%rip),%r13
  lea    D147(%rip),%r15
L623:
  mov    0x0(%rbp),%rsi
  mov    $0x20,%edx
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <strncpy2@plt>
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <strlower@plt>
  mov    $0x4,%edx
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L290
  mov    $0x7,%edx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L1
  mov    $0x6,%edx
  mov    %rbx,%rsi
  lea    D75(%rip),%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L540
  mov    $0x9,%edx
  mov    %rbx,%rsi
  lea    D182(%rip),%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L378
  cmpl   $0x6867696e,(%rbx)
  je     L621
L726:
  movabs $0x746867696e746f6e,%rax
  cmp    %rax,(%rbx)
  je     L228
L328:
  cmpl   $0x6b726164,(%rbx)
  je     L390
L650:
  movabs $0x6b726164746f6e,%rax
  cmp    %rax,(%rbx)
  je     L240
  cmpl   $0x706d6174,(%rbx)
  je     L669
L59:
  movabs $0x65706d6174746f6e,%rax
  cmp    %rax,(%rbx)
  je     L521
L255:
  cmpl   $0x656d7261,(%rbx)
  je     L217
L444:
  movabs $0x64656d7261746f6e,%rax
  cmp    %rax,(%rbx)
  je     L359
L128:
  movabs $0x64656d7261736964,%rax
  cmp    %rax,(%rbx)
  je     L654
L638:
  movabs $0x7261736964746f6e,%rax
  cmp    %rax,(%rbx)
  je     L224
L407:
  movabs $0x69646e65706d7261,%rax
  cmp    %rax,(%rbx)
  je     L263
L29:
  movabs $0x65706d7261746f6e,%rax
  cmp    %rax,(%rbx)
  je     L450
L460:
  mov    %rbx,%rsi
  lea    D155(%rip),%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L624
  mov    0x28(%rsp),%rax
  orq    $0x80000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
  nopl   0x0(%rax)
L290:
  lea    0x48(%rsp),%rsi
  lea    0x54(%rsp),%rdi
  mov    $0xa,%edx
  call   <strtol@plt>
  lea    D118(%rip),%rdi
  mov    %eax,%r12d
  mov    0x48(%rsp),%rax
  movsbl (%rax),%esi
  call   <strchr@plt>
  test   %rax,%rax
  je     L360
  lea    -0x1(%r12),%ecx
  mov    0x0(%rbp),%rdx
  cmp    $0x1f,%ecx
  ja     L360
  mov    $0x1,%eax
  shl    %cl,%rax
  mov    0x8(%rsp),%rcx
  or     %rax,(%rcx)
  movb   $0x0,(%rdx)
L175:
  add    $0x8,%rbp
  cmp    %rbp,%r14
  jne    L623
L318:
  mov    0x28(%rsp),%rax
  mov    0x30(%rsp),%rcx
  mov    (%rax),%rdx
  mov    (%rcx),%rax
  or     %rdx,%rax
  test   $0x80000,%eax
  je     L565
  test   $0x140000,%edx
  jne    L565
  mov    0x28(%rsp),%rax
  or     $0x40000,%rdx
  mov    %rdx,(%rax)
L565:
  mov    0x8(%rsp),%rax
  mov    0x10(%rsp),%rcx
  mov    (%rax),%rax
  and    (%rcx),%rax
  je     L396
  lea    D84(%rip),%rdi
  xor    %eax,%eax
  call   <store_error_message@plt>
  mov    $0xffffffff,%eax
L421:
  mov    0xf8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L609
  add    $0x108,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L1:
  lea    0x48(%rsp),%rsi
  lea    0x57(%rsp),%rdi
  mov    $0xa,%edx
  call   <strtol@plt>
  lea    D118(%rip),%rdi
  mov    %eax,%r12d
  mov    0x48(%rsp),%rax
  movsbl (%rax),%esi
  call   <strchr@plt>
  test   %rax,%rax
  je     L220
  lea    -0x1(%r12),%ecx
  mov    0x0(%rbp),%rdx
  cmp    $0x1f,%ecx
  ja     L220
  mov    $0x1,%eax
  shl    %cl,%rax
  mov    0x10(%rsp),%rcx
  or     %rax,(%rcx)
  movb   $0x0,(%rdx)
  jmp    L175
  xchg   %ax,%ax
L540:
  lea    0x48(%rsp),%rsi
  lea    0x56(%rsp),%rdi
  mov    $0xa,%edx
  call   <strtol@plt>
  lea    D118(%rip),%rdi
  mov    %eax,%r12d
  mov    0x48(%rsp),%rax
  movsbl (%rax),%esi
  call   <strchr@plt>
  test   %rax,%rax
  je     L564
  lea    -0x1(%r12),%ecx
  mov    0x0(%rbp),%rdx
  cmp    $0x1f,%ecx
  ja     L564
  mov    $0x1,%eax
  shl    %cl,%rax
  mov    0x18(%rsp),%rcx
  or     %rax,(%rcx)
  movb   $0x0,(%rdx)
  jmp    L175
  xchg   %ax,%ax
L378:
  lea    0x48(%rsp),%rsi
  lea    0x59(%rsp),%rdi
  mov    $0xa,%edx
  call   <strtol@plt>
  lea    D118(%rip),%rdi
  mov    %eax,%r12d
  mov    0x48(%rsp),%rax
  movsbl (%rax),%esi
  call   <strchr@plt>
  test   %rax,%rax
  je     L259
  lea    -0x1(%r12),%ecx
  mov    0x0(%rbp),%rdx
  cmp    $0x1f,%ecx
  ja     L259
  mov    $0x1,%eax
  shl    %cl,%rax
  mov    0x20(%rsp),%rcx
  or     %rax,(%rcx)
  movb   $0x0,(%rdx)
  jmp    L175
  xchg   %ax,%ax
L621:
  cmpw   $0x74,0x4(%rbx)
  jne    L726
  mov    0x28(%rsp),%rax
  orq    $0x10000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
  nopl   0x0(%rax,%rax,1)
L228:
  cmpb   $0x0,0x8(%rbx)
  jne    L328
  mov    0x30(%rsp),%rax
  orq    $0x10000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
  nopw   0x0(%rax,%rax,1)
L390:
  cmpb   $0x0,0x4(%rbx)
  jne    L650
  mov    0x28(%rsp),%rax
  orq    $0x20000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
  nopw   0x0(%rax,%rax,1)
L360:
  mov    0x0(%rbp),%rdx
  lea    0x70(%rsp),%r12
  lea    D43(%rip),%rsi
L720:
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <store_error_message@plt>
  mov    $0xffffffff,%eax
  jmp    L421
L669:
  cmpw   $0x7265,0x4(%rbx)
  jne    L59
  cmpb   $0x0,0x6(%rbx)
  jne    L59
  mov    0x28(%rsp),%rax
  orq    $0x200000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
  nopl   0x0(%rax)
L220:
  mov    0x0(%rbp),%rdx
  lea    0x70(%rsp),%r12
  lea    D94(%rip),%rsi
  jmp    L720
  nopw   0x0(%rax,%rax,1)
L240:
  mov    0x30(%rsp),%rax
  orq    $0x20000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
L564:
  mov    0x0(%rbp),%rdx
  lea    0x70(%rsp),%r12
  lea    D9(%rip),%rsi
  jmp    L720
L396:
  mov    0x18(%rsp),%rax
  mov    0x20(%rsp),%rcx
  mov    (%rax),%rax
  and    (%rcx),%rax
  je     L485
  lea    D0(%rip),%rdi
  xor    %eax,%eax
  call   <store_error_message@plt>
  mov    $0xffffffff,%eax
  jmp    L421
L259:
  mov    0x0(%rbp),%rdx
  lea    0x70(%rsp),%r12
  lea    D14(%rip),%rsi
  jmp    L720
L521:
  cmpw   $0x72,0x8(%rbx)
  jne    L255
  mov    0x30(%rsp),%rax
  orq    $0x200000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
L359:
  cmpb   $0x0,0x8(%rbx)
  jne    L128
  mov    0x30(%rsp),%rax
  orq    $0x40000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
L485:
  mov    0x30(%rsp),%rax
  and    (%rax),%rdx
  jne    L530
  mov    0x38(%rsp),%rax
  cmpb   $0x3,(%rax)
  je     L112
  xor    %eax,%eax
  jmp    L421
L217:
  cmpw   $0x64,0x4(%rbx)
  jne    L444
  mov    0x28(%rsp),%rax
  orq    $0x40000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
L654:
  cmpb   $0x0,0x8(%rbx)
  jne    L638
  mov    0x30(%rsp),%rax
  orq    $0x140000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
L224:
  cmpl   $0x64656d,0x8(%rbx)
  jne    L407
  mov    0x28(%rsp),%rax
  orq    $0x140000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
L263:
  cmpw   $0x676e,0x8(%rbx)
  jne    L29
  cmpb   $0x0,0xa(%rbx)
  jne    L29
  mov    0x28(%rsp),%rax
  orq    $0x100000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
L450:
  cmpl   $0x6e69646e,0x8(%rbx)
  jne    L460
  cmpw   $0x67,0xc(%rbx)
  jne    L460
  mov    0x30(%rsp),%rax
  orq    $0x100000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
L609:
  call   <__stack_chk_fail@plt>
L624:
  mov    %rbx,%rsi
  lea    D40(%rip),%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L431
  mov    0x30(%rsp),%rax
  orq    $0x80000,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
L112:
  lea    D153(%rip),%rdi
  xor    %eax,%eax
  call   <store_error_message@plt>
  or     $0xffffffff,%eax
  jmp    L421
L530:
  lea    D71(%rip),%rdi
  xor    %eax,%eax
  call   <store_error_message@plt>
  or     $0xffffffff,%eax
  jmp    L421
L431:
  mov    %rbx,%rsi
  lea    D31(%rip),%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L770
  mov    0x38(%rsp),%rax
  orb    $0x1,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
L770:
  mov    %rbx,%rsi
  lea    D199(%rip),%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L175
  mov    0x38(%rsp),%rax
  orb    $0x2,(%rax)
  mov    0x0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L175
```

tool_calls: name: parse_data
arguments: data_tag: D134
type_guessed: string
name: parse_data
arguments: data_tag: D147
type_guessed: string
name: parse_data
arguments: data_tag: D75
type_guessed: string
name: parse_data
arguments: data_tag: D182
type_guessed: string
name: parse_data
arguments: data_tag: D155
type_guessed: string
name: parse_data
arguments: data_tag: D118
type_guessed: string
name: parse_data
arguments: data_tag: D84
type_guessed: string
name: parse_data
arguments: data_tag: D43
type_guessed: string
name: parse_data
arguments: data_tag: D94
type_guessed: string
name: parse_data
arguments: data_tag: D9
type_guessed: string
name: parse_data
arguments: data_tag: D0
type_guessed: string
name: parse_data
arguments: data_tag: D14
type_guessed: string
name: parse_data
arguments: data_tag: D40
type_guessed: string
name: parse_data
arguments: data_tag: D153
type_guessed: string
name: parse_data
arguments: data_tag: D71
type_guessed: string
name: parse_data
arguments: data_tag: D31
type_guessed: string
name: parse_data
arguments: data_tag: D199
type_guessed: string

tool: D134: flag

tool: D147: notflag

tool: D75: czflag

tool: D182: notczflag

tool: D155: home

tool: D118:  /t/n

tool: D84: Conflicting common flag/notflag in launch conditions.

tool: D43: Invalid flag launch parameter '%s'

tool: D94: Invalid notflag launch parameter '%s'

tool: D9: Invalid cxflag launch parameter '%s'

tool: D0: Conflicting czflag/notczflag in launch conditions.

tool: D14: Invalid notczflag launch parameter '%s'

tool: D40: away

tool: D153: Conflicting continue/break in launch conditions.

tool: D71: Conflicting global flag/notflag in launch conditions.

tool: D31: continue

tool: D199: break

assistant: ```c
int get_global_flags_old(unsigned long *cflags, unsigned long *notcflags, unsigned long *sflags, unsigned long *notsflags, unsigned long *czflags, unsigned long *notczflags, unsigned char *scanmode, int tokc, char **tokv) {
  int k, flag;
  char *sp;
  char errmsg[128];
  char tbuf[32];
  *sflags = *notsflags = *scanmode = 0;
  for (k = 0; k < 1; k++) {
    cflags[k] = 0;
    notcflags[k] = 0;
  }
  for (k = 0; k < 1; k++) {
    czflags[k] = 0;
    notczflags[k] = 0;
  }
  for (k = 1; k < tokc; k++) {
    strncpy2(tbuf, tokv[k], (sizeof(tbuf)));
    strlower(tbuf);
    if (strncmp("flag", tbuf, 4) == 0) {
      flag = (int)strtol(tbuf + 4, &sp, 10);
      if (!strchr(" /t/n", *sp) || flag < 1 || flag > (32 * 1)) {
        sprintf(errmsg, "Invalid flag launch parameter '%s'", tokv[k]);
        store_error_message(errmsg);
        return -1;
      }
      cflags[(flag - 1) / 32] |= 1UL << ((flag - 1) % 32);
      *tokv[k] = '\0';
    } else if (strncmp("notflag", tbuf, 7) == 0) {
      flag = (int)strtol(tbuf + 7, &sp, 10);
      if (!strchr(" /t/n", *sp) || flag < 1 || flag > (32 * 1)) {
        sprintf(errmsg, "Invalid notflag launch parameter '%s'", tokv[k]);
        store_error_message(errmsg);
        return -1;
      }
      notcflags[(flag - 1) / 32] |= 1UL << ((flag - 1) % 32);
      *tokv[k] = '\0';
    } else if (strncmp("czflag", tbuf, 6) == 0) {
      flag = (int)strtol(tbuf + 6, &sp, 10);
      if (!strchr(" /t/n", *sp) || flag < 1 || flag > (32 * 1)) {
        sprintf(errmsg, "Invalid cxflag launch parameter '%s'", tokv[k]);
        store_error_message(errmsg);
        return -1;
      }
      czflags[(flag - 1) / 32] |= 1UL << ((flag - 1) % 32);
      *tokv[k] = '\0';
    } else if (strncmp("notczflag", tbuf, 9) == 0) {
      flag = (int)strtol(tbuf + 9, &sp, 10);
      if (!strchr(" /t/n", *sp) || flag < 1 || flag > (32 * 1)) {
        sprintf(errmsg, "Invalid notczflag launch parameter '%s'", tokv[k]);
        store_error_message(errmsg);
        return -1;
      }
      notczflags[(flag - 1) / 32] |= 1UL << ((flag - 1) % 32);
      *tokv[k] = '\0';
    } else if (strcmp("night", tbuf) == 0) {
      *sflags |= (0x01 << 16);
      *tokv[k] = '\0';
    } else if (strcmp("notnight", tbuf) == 0) {
      *notsflags |= (0x01 << 16);
      *tokv[k] = '\0';
    } else if (strcmp("dark", tbuf) == 0) {
      *sflags |= (0x02 << 16);
      *tokv[k] = '\0';
    } else if (strcmp("notdark", tbuf) == 0) {
      *notsflags |= (0x02 << 16);
      *tokv[k] = '\0';
    } else if (strcmp("tamper", tbuf) == 0) {
      *sflags |= (0x08 << 18);
      *tokv[k] = '\0';
    } else if (strcmp("nottamper", tbuf) == 0) {
      *notsflags |= (0x08 << 18);
      *tokv[k] = '\0';
    } else if (strcmp("armed", tbuf) == 0) {
      *sflags |= (0x01 << 18);
      *tokv[k] = '\0';
    } else if (strcmp("notarmed", tbuf) == 0) {
      *notsflags |= (0x01 << 18);
      *tokv[k] = '\0';
    } else if (strcmp("disarmed", tbuf) == 0) {
      *notsflags |= ((0x01 << 18) | (0x04 << 18));
      *tokv[k] = '\0';
    } else if (strcmp("notdisarmed", tbuf) == 0) {
      *sflags |= ((0x01 << 18) | (0x04 << 18));
      *tokv[k] = '\0';
    } else if (strcmp("armpending", tbuf) == 0) {
      *sflags |= (0x04 << 18);
      *tokv[k] = '\0';
    } else if (strcmp("notarmpending", tbuf) == 0) {
      *notsflags |= (0x04 << 18);
      *tokv[k] = '\0';
    } else if (strcmp("home", tbuf) == 0) {
      *sflags |= (0x02 << 18);
      *tokv[k] = '\0';
    } else if (strcmp("away", tbuf) == 0) {
      *notsflags |= (0x02 << 18);
      *tokv[k] = '\0';
    } else if (strcmp("continue", tbuf) == 0) {
      *scanmode |= 1;
      *tokv[k] = '\0';
    } else if (strcmp("break", tbuf) == 0) {
      *scanmode |= 2;
      *tokv[k] = '\0';
    }
  }
  if (((*sflags | *notsflags) & (0x02 << 18)) && !(*sflags & ((0x01 << 18) | (0x04 << 18)))) {
    *sflags |= (0x01 << 18);
  }
  for (k = 0; k < 1; k++) {
    if (cflags[k] & notcflags[k]) {
      store_error_message("Conflicting common flag/notflag in launch conditions.");
      return -1;
    }
  }
  for (k = 0; k < 1; k++) {
    if (czflags[k] & notczflags[k]) {
      store_error_message("Conflicting czflag/notczflag in launch conditions.");
      return -1;
    }
  }
  if (*sflags & *notsflags) {
    store_error_message("Conflicting global flag/notflag in launch conditions.");
    return -1;
  }
  if (*scanmode == (1 | 2)) {
    store_error_message("Conflicting continue/break in launch conditions.");
    return -1;
  }
  return 0;
}
```