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

```asm
<gen_move>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x110,%rsp
  mov    %rdi,-0x108(%rbp)
  mov    %esi,-0x10c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x3,-0xf0(%rbp)
  movl   $0x0,-0xec(%rbp)
  movl   $0x2,-0xe8(%rbp)
  movl   $0x1,-0xe4(%rbp)
  mov    -0x10c(%rbp),%eax
  sar    $0xc,%eax
  and    $0x3,%eax
  mov    %eax,-0xfc(%rbp)
  mov    -0xfc(%rbp),%eax
  cltq
  mov    -0xf0(%rbp,%rax,4),%eax
  mov    %eax,-0xfc(%rbp)
  mov    -0x10c(%rbp),%eax
  sar    $0x9,%eax
  and    $0x7,%eax
  mov    %eax,%edx
  mov    -0x10c(%rbp),%eax
  sar    $0x3,%eax
  and    $0x38,%eax
  or     %edx,%eax
  mov    %eax,-0xf8(%rbp)
  mov    -0xf8(%rbp),%eax
  mov    %eax,%edi
  call   <ea_alterable@plt>
  test   %eax,%eax
  je     L234
  cmpl   $0x3,-0xfc(%rbp)
  je     L234
  mov    -0x10c(%rbp),%eax
  mov    %eax,%edi
  call   <ea_mode@plt>
  cmp    $0x1,%eax
  jne    L104
  cmpl   $0x0,-0xfc(%rbp)
  je     L234
L104:
  mov    -0x10c(%rbp),%eax
  mov    %eax,%edi
  call   <ea_mode@plt>
  test   %eax,%eax
  jns    L71
L234:
  mov    $0x0,%eax
  call   <invalid@plt>
  jmp    L19
L71:
  mov    -0x10c(%rbp),%ecx
  mov    -0x108(%rbp),%rdx
  lea    -0xe0(%rbp),%rax
  lea    D61(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    -0xe0(%rbp),%rax
  mov    %rax,%rdi
  call   <begin_function@plt>
  mov    %eax,-0xf4(%rbp)
  mov    -0xfc(%rbp),%edx
  mov    -0x10c(%rbp),%esi
  lea    -0xe0(%rbp),%rax
  mov    $0x1,%ecx
  mov    %rax,%rdi
  call   <get_ea@plt>
  test   %rax,%rax
  jns    L137
  mov    $0xffffffff,%eax
  jmp    L19
L137:
  mov    -0x10c(%rbp),%eax
  mov    %eax,%edi
  call   <ea_address@plt>
  test   %rax,%rax
  je     L212
  cmpl   $0x0,-0xfc(%rbp)
  je     L253
  lea    D134(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L253:
  mov    -0xfc(%rbp),%eax
  shl    $0x6,%eax
  or     -0xf8(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x108(%rbp),%rdx
  lea    -0xe0(%rbp),%rax
  lea    D106(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    -0xfc(%rbp),%edx
  lea    -0xe0(%rbp),%rax
  mov    %edx,%r8d
  lea    D82(%rip),%rdx
  mov    %rdx,%rcx
  lea    D155(%rip),%rdx
  lea    D50(%rip),%rsi
  mov    %rax,%rdi
  call   <print_bus_read_@plt>
  test   %rax,%rax
  jns    L212
  mov    -0xf4(%rbp),%eax
  jmp    L19
L212:
  mov    -0xfc(%rbp),%eax
  mov    $0x8,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  lea    D227(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xf8(%rbp),%eax
  mov    %eax,%edi
  call   <ea_mode@plt>
  cmp    $0x1,%eax
  je     L67
  mov    -0xfc(%rbp),%eax
  mov    $0x8,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  lea    D150(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xfc(%rbp),%eax
  mov    $0x8,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  lea    D77(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L67:
  mov    -0xf8(%rbp),%eax
  mov    %eax,%edi
  call   <ea_mode@plt>
  test   %eax,%eax
  jne    L50
  mov    -0xf8(%rbp),%eax
  and    $0xf,%eax
  mov    %eax,%edx
  mov    -0xfc(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  mov    %eax,%esi
  lea    D93(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D72(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L101
L50:
  mov    -0xf8(%rbp),%eax
  mov    %eax,%edi
  call   <ea_mode@plt>
  cmp    $0x1,%eax
  jne    L107
  mov    -0xfc(%rbp),%eax
  mov    $0x8,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    -0xf8(%rbp),%eax
  and    $0xf,%eax
  mov    %eax,%esi
  lea    D229(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D72(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L101
L107:
  lea    -0xe0(%rbp),%rdx
  lea    -0x70(%rbp),%rax
  lea    D79(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    D96(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0xfc(%rbp),%edx
  mov    -0xf8(%rbp),%esi
  lea    -0x70(%rbp),%rax
  mov    $0x0,%ecx
  mov    %rax,%rdi
  call   <get_ea@plt>
  test   %rax,%rax
  jns    L154
  mov    $0xffffffff,%eax
  jmp    L19
L154:
  cmpl   $0x2,-0xfc(%rbp)
  je     L40
  cmpl   $0x2,-0xfc(%rbp)
  jg     L101
  cmpl   $0x0,-0xfc(%rbp)
  je     L182
  cmpl   $0x1,-0xfc(%rbp)
  je     L167
  jmp    L101
L182:
  lea    D146(%rip),%rax
  mov    %rax,%rsi
  lea    D103(%rip),%rax
  mov    %rax,%rdi
  call   <print_bus_wait@plt>
  jmp    L101
L167:
  lea    D54(%rip),%rax
  mov    %rax,%rsi
  lea    D200(%rip),%rax
  mov    %rax,%rdi
  call   <print_bus_wait@plt>
  jmp    L101
L40:
  lea    D138(%rip),%rax
  mov    %rax,%rsi
  lea    D45(%rip),%rax
  mov    %rax,%rdi
  call   <print_bus_wait@plt>
  nop
L101:
  mov    -0xf4(%rbp),%eax
L19:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L214
  call   <__stack_chk_fail@plt>
L214:
  leave
  ret
```

tool_calls: name: read_data
arguments: tag: D61
datatype: string
name: read_data
arguments: tag: D134
datatype: string
name: read_data
arguments: tag: D106
datatype: string
name: read_data
arguments: tag: D82
datatype: string
name: read_data
arguments: tag: D155
datatype: string
name: read_data
arguments: tag: D50
datatype: string
name: read_data
arguments: tag: D227
datatype: string
name: read_data
arguments: tag: D150
datatype: string
name: read_data
arguments: tag: D77
datatype: string
name: read_data
arguments: tag: D104
datatype: string
name: read_data
arguments: tag: D44
datatype: string
name: read_data
arguments: tag: D93
datatype: string
name: read_data
arguments: tag: D72
datatype: string
name: read_data
arguments: tag: D229
datatype: string
name: read_data
arguments: tag: D79
datatype: string
name: read_data
arguments: tag: D96
datatype: string
name: read_data
arguments: tag: D146
datatype: string
name: read_data
arguments: tag: D103
datatype: string
name: read_data
arguments: tag: D54
datatype: string
name: read_data
arguments: tag: D200
datatype: string
name: read_data
arguments: tag: D138
datatype: string
name: read_data
arguments: tag: D45
datatype: string

tool: D61: %s_%04X

tool: D134: 	if (EA&1) ADDRESS_EXCEPTION;

tool: D106: %s_common_%02X

tool: D82: EV

tool: D155: EA

tool: 

tool: D227: 	{
		uint%d_t result = EV;


tool: D150: 		SET_N_FLAG%d(result);


tool: D77: 		SET_Z_FLAG%d(result);


tool: D104: 		SET_V_FLAG(0);

tool: D44: 		SET_C_FLAG(0);

tool: D93: 		SET_DN_REG%d(%d, result);
	}


tool: D72: 	FETCH_OPCODE;
}


tool: D229: 		REG_D(%d) = (uint32_t)(int%d_t)result;
	}


tool: D79: %s_dest

tool: D96: 		EV = result;
	}

tool: D146: done_write_wb

tool: D103: done_wait_wb

tool: D54: done_write_ww

tool: D200: done_wait_ww

tool: D138: done_write_wl

tool: D45: done_wait_wl

assistant: ```c
int gen_move(const char *mnemonic, int opcode) {
  char func_name[(100)];
  char access_name[(100)];
  int func_id;
  int op_size;
  int op_dest;
  int sizes[4] = {3, 0, 2, 1};
  op_size = (opcode >> 12) & 3;
  op_size = sizes[op_size];
  op_dest = ((opcode >> 9) & 7) | ((opcode >> 3) & 0x38);
  if (!ea_alterable(op_dest) || op_size == 3 || (ea_mode(opcode) == 1 && op_size == 0) || ea_mode(opcode) < 0)
    return invalid();
  sprintf(func_name, "%s_%04X", mnemonic, opcode);
  func_id = begin_function(func_name);
  if (get_ea(func_name, opcode, op_size, 1) < 0)
    return -1;
  if (ea_address(opcode)) {
    if (op_size)
      printf("\tif (EA&1) ADDRESS_EXCEPTION;\n");
    sprintf(func_name, "%s_common_%02X", mnemonic, (op_size << 6) | op_dest);
    if (print_bus_read_(func_name, "", "EA", "EV", op_size) < 0)
      return func_id;
  }
  printf("\t{\n\t\tuint%d_t result = EV;\n", 8 << op_size);
  if (ea_mode(op_dest) != 1) {
    printf("\t\tSET_N_FLAG%d(result);\n", 8 << op_size);
    printf("\t\tSET_Z_FLAG%d(result);\n", 8 << op_size);
    printf("\t\tSET_V_FLAG(0);\n");
    printf("\t\tSET_C_FLAG(0);\n");
  }
  if (ea_mode(op_dest) == 0) {
    printf("\t\tSET_DN_REG%d(%d, result);\n\t}\n", 8 << op_size, op_dest & 0xF);
    printf("\tFETCH_OPCODE;\n}\n\n");
  } else if (ea_mode(op_dest) == 1) {
    printf("\t\tREG_D(%d) = (uint32_t)(int%d_t)result;\n\t}\n", op_dest & 0xF, 8 << op_size);
    printf("\tFETCH_OPCODE;\n}\n\n");
  } else {
    sprintf(access_name, "%s_dest", func_name);
    printf("\t\tEV = result;\n\t}\n");
    if (get_ea(access_name, op_dest, op_size, 0) < 0)
      return -1;
    switch (op_size) {
    case 0:
      print_bus_wait("done_wait_wb", "done_write_wb");
      break;
    case 1:
      print_bus_wait("done_wait_ww", "done_write_ww");
      break;
    case 2:
      print_bus_wait("done_wait_wl", "done_write_wl");
      break;
    }
  }
  return func_id;
}
```