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

```asm
<negx_handler>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  sar    $0x6,%eax
  and    $0x3,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <ea_alterable_na@plt>
  test   %eax,%eax
  je     L46
  cmpl   $0x3,-0x4(%rbp)
  jne    L30
L46:
  mov    $0xffffffff,%eax
  jmp    L38
L30:
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <is_checking@plt>
  test   %rax,%rax
  je     L42
  mov    $0x0,%eax
  jmp    L38
L42:
  mov    -0x4(%rbp),%eax
  mov    $0x8,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    -0x4(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  mov    %eax,%esi
  lea    D23(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x4(%rbp),%eax
  mov    $0x8,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x4(%rbp),%eax
  mov    $0x8,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D59(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x4(%rbp),%eax
  mov    $0x8,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    -0x4(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  mov    %eax,%esi
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x4(%rbp),%eax
  mov    $0x8,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
L38:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D23
type: string
name: extract_symbolic_data
arguments: label: D44
type: string
name: extract_symbolic_data
arguments: label: D53
type: string
name: extract_symbolic_data
arguments: label: D59
type: string
name: extract_symbolic_data
arguments: label: D42
type: string
name: extract_symbolic_data
arguments: label: D1
type: string

tool: D23: 	{
		uint%d_t result = (uint%d_t)(0 - EV - GET_X_FLAG());


tool: D44: 		SET_X_FLAG(((uint%d_t)EV != 0 || GET_X_FLAG() != 0)?1:0);


tool: D53: 		SET_N_FLAG%d(result);


tool: D59: 		if (result) {SET_Z_FLAG(0);}

tool: D42: 		SET_V_FLAG((uint%d_t)result == (1<<(%d-1))?1:0);


tool: D1: 		SET_C_FLAG(((uint%d_t)EV != 0 || GET_X_FLAG() != 0)?1:0);


assistant: ```c
int negx_handler(int opcode) {
  int op_size = (opcode >> 6) & 3;
  if (!ea_alterable_na(opcode) || op_size == 3)
    return -1;
  if (is_checking(opcode))
    return 0;
  printf("\t{\n\t\tuint%d_t result = (uint%d_t)(0 - EV - GET_X_FLAG());\n", 8 << op_size, 8 << op_size);
  printf("\t\tSET_X_FLAG(((uint%d_t)EV != 0 || GET_X_FLAG() != 0)?1:0);\n", 8 << op_size);
  printf("\t\tSET_N_FLAG%d(result);\n", 8 << op_size);
  printf("\t\tif (result) {SET_Z_FLAG(0);}\n");
  printf("\t\tSET_V_FLAG((uint%d_t)result == (1<<(%d-1))?1:0);\n", 8 << op_size, 8 << op_size);
  printf("\t\tSET_C_FLAG(((uint%d_t)EV != 0 || GET_X_FLAG() != 0)?1:0);\n", 8 << op_size);
  return 0;
}
```