user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<S_check_flags>:
  endbr64
  push   %r12
  not    %esi
  push   %rbp
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  and    %edi,%esi
  je     L123
  mov    %rdx,%rbp
  test   $0x1,%sil
  jne    L116
  test   $0x2,%sil
  jne    L233
  test   $0x8,%sil
  jne    L230
  test   $0x10,%sil
  jne    L218
  test   $0x20,%sil
  jne    L146
  test   $0x40,%sil
  jne    L9
  test   $0x80,%sil
  jne    L99
  test   $0x100,%esi
  jne    L151
  test   $0x200,%esi
  jne    L147
  test   $0x400,%esi
  jne    L66
  test   $0x800,%esi
  jne    L56
  test   $0x1000,%esi
  je     L145
  mov    %rsp,%r12
  lea    D27(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  jmp    L25
  xchg   %ax,%ax
L116:
  mov    %rsp,%r12
  lea    D139(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
L25:
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    D4(%rip),%rdi
  xor    %eax,%eax
  call   <CFCUtil_die@plt>
L123:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  add    $0x28,%rsp
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L230:
  mov    %rsp,%r12
  lea    D36(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  jmp    L25
  nopl   0x0(%rax)
L233:
  mov    %rsp,%r12
  lea    D121(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  jmp    L25
  nopl   0x0(%rax)
L9:
  mov    %rsp,%r12
  lea    D1(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  jmp    L25
  nopl   0x0(%rax)
L218:
  mov    %rsp,%r12
  lea    D91(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  jmp    L25
  nopw   0x0(%rax,%rax,1)
L146:
  mov    %rsp,%r12
  lea    D16(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  jmp    L25
  nopw   0x0(%rax,%rax,1)
L99:
  mov    %rsp,%r12
  lea    D14(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  jmp    L25
  nopw   0x0(%rax,%rax,1)
L151:
  mov    %rsp,%r12
  lea    D131(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  jmp    L25
L147:
  mov    %rsp,%r12
  lea    D88(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  jmp    L25
L66:
  mov    %rsp,%r12
  lea    D46(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  jmp    L25
L145:
  lea    D138(%rip),%rdi
  xor    %eax,%eax
  mov    %rsp,%r12
  call   <CFCUtil_die@plt>
  jmp    L25
L56:
  mov    %rsp,%r12
  lea    D124(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  jmp    L25
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D27
type_guessed: string
name: unpack_data
arguments: label: D139
type_guessed: string
name: unpack_data
arguments: label: D4
type_guessed: string
name: unpack_data
arguments: label: D36
type_guessed: string
name: unpack_data
arguments: label: D121
type_guessed: string
name: unpack_data
arguments: label: D1
type_guessed: string
name: unpack_data
arguments: label: D91
type_guessed: string
name: unpack_data
arguments: label: D16
type_guessed: string
name: unpack_data
arguments: label: D14
type_guessed: string
name: unpack_data
arguments: label: D131
type_guessed: string
name: unpack_data
arguments: label: D88
type_guessed: string
name: unpack_data
arguments: label: D46
type_guessed: string
name: unpack_data
arguments: label: D138
type_guessed: string
name: unpack_data
arguments: label: D124
type_guessed: string

tool: D27: COMPOSITE

tool: D139: CONST

tool: D4: Bad flag for type %s: %s

tool: D36: INCREMENTED

tool: D121: NULLABLE

tool: D1: PRIMITIVE

tool: D91: DECREMENTED

tool: D16: OBJECT

tool: D14: INTEGER

tool: D131: FLOATING

tool: D88: STRING_TYPE

tool: D46: VA_LIST

tool: D138: Unknown flags: %d

tool: D124: ARBITRARY

assistant: ```c
void S_check_flags(int supplied, int acceptable, const char *type_name) {
  int bad = (supplied & ~acceptable);
  if (bad) {
    char bad_flag[20];
    if ((bad & 0x00000001)) {
      strcpy(bad_flag, "CONST");
    } else if ((bad & 0x00000002)) {
      strcpy(bad_flag, "NULLABLE");
    } else if ((bad & 0x00000008)) {
      strcpy(bad_flag, "INCREMENTED");
    } else if ((bad & 0x00000010)) {
      strcpy(bad_flag, "DECREMENTED");
    } else if ((bad & 0x00000020)) {
      strcpy(bad_flag, "OBJECT");
    } else if ((bad & 0x00000040)) {
      strcpy(bad_flag, "PRIMITIVE");
    } else if ((bad & 0x00000080)) {
      strcpy(bad_flag, "INTEGER");
    } else if ((bad & 0x00000100)) {
      strcpy(bad_flag, "FLOATING");
    } else if ((bad & 0x00000200)) {
      strcpy(bad_flag, "STRING_TYPE");
    } else if ((bad & 0x00000400)) {
      strcpy(bad_flag, "VA_LIST");
    } else if ((bad & 0x00000800)) {
      strcpy(bad_flag, "ARBITRARY");
    } else if ((bad & 0x00001000)) {
      strcpy(bad_flag, "COMPOSITE");
    } else {
      CFCUtil_die("Unknown flags: %d", bad);
    }
    CFCUtil_die("Bad flag for type %s: %s", type_name, bad_flag);
  }
}
```