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

```asm
<print_flags_cmove>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L465
  mov    $0x3c,%edi
  call   <putchar@plt>
  movl   $0x0,-0xc(%rbp)
  movq   $0x1,-0x8(%rbp)
  jmp    L59
L329:
  mov    -0x18(%rbp),%rax
  and    -0x8(%rbp),%rax
  mov    $0x80000000,%edx
  cmp    %rdx,%rax
  je     L17
  mov    $0x80000000,%edx
  cmp    %rdx,%rax
  ja     L376
  cmp    $0x40000000,%rax
  je     L476
  cmp    $0x40000000,%rax
  ja     L376
  cmp    $0x20000000,%rax
  je     L100
  cmp    $0x20000000,%rax
  ja     L376
  cmp    $0x10000000,%rax
  je     L70
  cmp    $0x10000000,%rax
  ja     L376
  cmp    $0x8000000,%rax
  je     L463
  cmp    $0x8000000,%rax
  ja     L376
  cmp    $0x4000000,%rax
  je     L212
  cmp    $0x4000000,%rax
  ja     L376
  cmp    $0x2000000,%rax
  je     L36
  cmp    $0x2000000,%rax
  ja     L376
  cmp    $0x1000000,%rax
  je     L166
  cmp    $0x1000000,%rax
  ja     L376
  cmp    $0x200000,%rax
  je     L407
  cmp    $0x200000,%rax
  ja     L376
  cmp    $0x100000,%rax
  je     L266
  cmp    $0x100000,%rax
  ja     L376
  cmp    $0x80000,%rax
  je     L77
  cmp    $0x80000,%rax
  ja     L376
  cmp    $0x40000,%rax
  je     L179
  cmp    $0x40000,%rax
  ja     L376
  cmp    $0x20000,%rax
  je     L190
  cmp    $0x20000,%rax
  ja     L376
  cmp    $0x20,%rax
  ja     L480
  test   %rax,%rax
  je     L376
  cmp    $0x20,%rax
  ja     L376
  lea    0x0(,%rax,4),%rdx
  lea    D166(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D166(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
L480:
  cmp    $0x10000,%rax
  je     L271
  jmp    L376
  lea    D190(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
  lea    D118(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L271:
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L190:
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L179:
  lea    D197(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L77:
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L266:
  lea    D192(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L407:
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L166:
  lea    D167(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L36:
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L212:
  lea    D78(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L463:
  lea    D174(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L70:
  lea    D136(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L100:
  lea    D51(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L476:
  lea    D146(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L376
L17:
  lea    D199(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  nop
L376:
  shlq   -0x8(%rbp)
  addl   $0x1,-0xc(%rbp)
L59:
  cmpl   $0x1f,-0xc(%rbp)
  jle    L329
  mov    $0x3e,%edi
  call   <putchar@plt>
  jmp    L489
L465:
  nop
L489:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D190
type: string
name: parse_data
arguments: data_tag: D118
type: string
name: parse_data
arguments: data_tag: D31
type: string
name: parse_data
arguments: data_tag: D45
type: string
name: parse_data
arguments: data_tag: D9
type: string
name: parse_data
arguments: data_tag: D55
type: string
name: parse_data
arguments: data_tag: D197
type: string
name: parse_data
arguments: data_tag: D15
type: string
name: parse_data
arguments: data_tag: D192
type: string
name: parse_data
arguments: data_tag: D7
type: string
name: parse_data
arguments: data_tag: D167
type: string
name: parse_data
arguments: data_tag: D12
type: string
name: parse_data
arguments: data_tag: D78
type: string
name: parse_data
arguments: data_tag: D174
type: string
name: parse_data
arguments: data_tag: D136
type: string
name: parse_data
arguments: data_tag: D51
type: string
name: parse_data
arguments: data_tag: D146
type: string
name: parse_data
arguments: data_tag: D199
type: string

tool: D190: CM_ATTACK_ONLY 

tool: D118: CM_20_RANDOM 

tool: D31: CM_40_RANDOM 

tool: D45: CM_75_RANDOM 

tool: D9: CM_INVISIBLE 

tool: D55: CM_OPEN_DOOR 

tool: D197: CM_PHASE 

tool: D15: CM_EATS_OTHER 

tool: D192: CM_PICKS_UP 

tool: D7: CM_MULTIPLY 

tool: D167: CM_CARRY_OTHER 

tool: D12: CM_CARRY_GOLD 

tool: D78: CM_60_RANDOM 

tool: D174: CM_90_RANDOM 

tool: D136: CM_1D2_OBJ 

tool: D51: CM_2D2_OBJ 

tool: D146: CM_4D2_OBJ 

tool: D199: CM_WIN 

assistant: ```c
print_flags_cmove(cmove) unsigned long cmove;
{
  int count;
  unsigned long mask;
  if (cmove == 0)
    return;
  printf("<");
  for (count = 0, mask = 0x01; count < 32; mask <<= 1, count++) {
    switch (cmove & mask) {
    case 0x00000001L:
      printf("CM_ATTACK_ONLY ");
      break;
    case 0x00000002L:
      break;
    case 0x00000008L:
      printf("CM_20_RANDOM ");
      break;
    case 0x00000010L:
      printf("CM_40_RANDOM ");
      break;
    case 0x00000020L:
      printf("CM_75_RANDOM ");
      break;
    case 0x00010000L:
      printf("CM_INVISIBLE ");
      break;
    case 0x00020000L:
      printf("CM_OPEN_DOOR ");
      break;
    case 0x00040000L:
      printf("CM_PHASE ");
      break;
    case 0x00080000L:
      printf("CM_EATS_OTHER ");
      break;
    case 0x00100000L:
      printf("CM_PICKS_UP ");
      break;
    case 0x00200000L:
      printf("CM_MULTIPLY ");
      break;
    case 0x01000000L:
      printf("CM_CARRY_OTHER ");
      break;
    case 0x02000000L:
      printf("CM_CARRY_GOLD ");
      break;
    case 0x04000000L:
      printf("CM_60_RANDOM ");
      break;
    case 0x08000000L:
      printf("CM_90_RANDOM ");
      break;
    case 0x10000000L:
      printf("CM_1D2_OBJ ");
      break;
    case 0x20000000L:
      printf("CM_2D2_OBJ ");
      break;
    case 0x40000000L:
      printf("CM_4D2_OBJ ");
      break;
    case 0x80000000L:
      printf("CM_WIN ");
      break;
    }
  }
  printf(">");
}
```