user: 下面的汇编指令对应的C源代码是什么:

```asm
<process_go_command_write>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  movslq %edi,%rbx
  lea    D61(%rip),%rdi
  sub    $0x28,%rsp
  call   <puts@plt>
  cmp    %ebp,%ebx
  jge    L54
  mov    (%r12,%rbx,8),%r12
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    %eax,%r13d
  shr    $0x1f,%ebx
  add    %eax,%ebx
  sar    %ebx
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L124
  mov    %r13d,%edx
  shr    $0x1f,%edx
  lea    0x0(%r13,%rdx,1),%eax
  and    $0x1,%eax
  sub    %edx,%eax
  cmp    $0x1,%eax
  je     L144
L174:
  cmp    $0x1,%r13d
  jle    L146
  xor    %edx,%edx
  jmp    L119
L104:
  lea    -0x41(%rcx),%eax
  cmp    $0x5,%al
  ja     L57
  lea    -0x37(%rcx),%eax
L171:
  mov    %al,0x0(%rbp,%rdx,1)
  movzbl 0x1(%r12,%rdx,2),%ecx
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  jbe    L16
  lea    -0x61(%rcx),%esi
  cmp    $0x5,%sil
  ja     L90
  lea    -0x57(%rcx),%esi
L16:
  shl    $0x4,%eax
  or     %esi,%eax
  mov    %al,0x0(%rbp,%rdx,1)
  add    $0x1,%rdx
  cmp    %edx,%ebx
  jle    L43
L119:
  movb   $0x0,0x0(%rbp,%rdx,1)
  movzbl (%r12,%rdx,2),%ecx
  lea    -0x30(%rcx),%eax
  cmp    $0x9,%al
  jbe    L171
  lea    -0x61(%rcx),%eax
  cmp    $0x5,%al
  ja     L104
  lea    -0x57(%rcx),%eax
  jmp    L171
  nopl   0x0(%rax,%rax,1)
L90:
  lea    -0x41(%rcx),%esi
  cmp    $0x5,%sil
  ja     L57
  lea    -0x37(%rcx),%esi
  jmp    L16
L57:
  movsbl %cl,%esi
  lea    D114(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  xor    %eax,%eax
L32:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L54:
  lea    D14(%rip),%rdi
  call   <puts@plt>
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L144:
  lea    D119(%rip),%rdi
  call   <puts@plt>
  jmp    L174
L43:
  mov    $0xffffffff,%edx
  mov    $0x1,%esi
  xor    %edi,%edi
  xor    %r13d,%r13d
  call   <crc32@plt>
  mov    $0x4,%esi
  xor    %edi,%edi
  mov    %eax,%edx
  call   <crc32@plt>
  mov    %rax,%r12
  nopl   0x0(%rax,%rax,1)
L153:
  movzbl 0x0(%rbp,%r13,1),%edi
  mov    %r12d,%edx
  mov    $0x8,%esi
  add    $0x1,%r13
  call   <crc32@plt>
  mov    %rax,%r12
  cmp    %r13d,%ebx
  jg     L153
  mov    $0x4,%esi
  xor    %edi,%edi
  xor    %r14d,%r14d
  call   <reverse_bits@plt>
  mov    %rax,%r13
  nopl   0x0(%rax)
L218:
  movzbl 0x0(%rbp,%r14,1),%edi
  mov    $0x8,%esi
  call   <reverse_bits@plt>
  mov    %al,0x0(%rbp,%r14,1)
  add    $0x1,%r14
  cmp    %r14d,%ebx
  jg     L218
  mov    %r12,%rdi
  mov    $0x20,%esi
  lea    0xa(%rbx),%r15d
  call   <reverse_bits@plt>
  mov    %r15d,%edi
  mov    %rax,%r14
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L87
  mov    %r15d,%edx
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  lea    0x0(%r13,%r13,1),%eax
  xor    %edx,%edx
  mov    %al,(%r12)
  cs nopw 0x0(%rax,%rax,1)
L38:
  movzbl 0x0(%rbp,%rdx,1),%ecx
  shl    $0x5,%ecx
  or     %ecx,%eax
  mov    %al,(%r12,%rdx,1)
  movzbl 0x0(%rbp,%rdx,1),%eax
  shr    $0x3,%al
  mov    %al,0x1(%r12,%rdx,1)
  add    $0x1,%rdx
  cmp    %edx,%ebx
  jg     L38
L66:
  movslq %ebx,%r8
  mov    %r14d,%eax
  mov    %r15d,%edx
  mov    %r12,%rsi
  shl    $0x5,%eax
  or     %al,(%r12,%r8,1)
  mov    %r14,%rax
  shr    $0x3,%rax
  lea    0x4(%r12,%r8,1),%rcx
  mov    %r8,0x18(%rsp)
  lea    D96(%rip),%rdi
  mov    %al,0x1(%r12,%r8,1)
  mov    %r14,%rax
  shr    $0xb,%rax
  mov    %rcx,0x10(%rsp)
  mov    %al,0x2(%r12,%r8,1)
  mov    %r14,%rax
  shr    $0x1b,%r14
  shr    $0x13,%rax
  mov    %al,0x3(%r12,%r8,1)
  mov    %r14b,(%rcx)
  call   <dump_jreg@plt>
  lea    0x49(,%rbx,8),%esi
  mov    %r12,%rdi
  call   <or1ksim_jtag_shift_dr@plt>
  mov    %r15d,%edx
  mov    %r12,%rsi
  lea    D8(%rip),%rdi
  movsd  %xmm0,0x8(%rsp)
  call   <dump_jreg@plt>
  mov    0x18(%rsp),%r8
  mov    0x10(%rsp),%rcx
  mov    $0x4,%esi
  movzbl 0x5(%r12,%r8,1),%eax
  movzbl 0x6(%r12,%r8,1),%r13d
  mov    %eax,%edx
  shl    $0x7,%r13
  lea    0x0(,%rax,8),%edi
  shr    %dl
  movzbl %dl,%edx
  or     %rdx,%r13
  movzbl 0x7(%r12,%r8,1),%edx
  shl    $0xf,%rdx
  or     %rdx,%r13
  movzbl 0x8(%r12,%r8,1),%edx
  shl    $0x17,%rdx
  or     %rdx,%r13
  movzbl 0x9(%r12,%r8,1),%edx
  shl    $0x1f,%rdx
  or     %rdx,%r13
  movzbl (%rcx),%edx
  shr    $0x5,%dl
  or     %edx,%edi
  and    $0xf,%edi
  call   <reverse_bits@plt>
  mov    %r13,%rdi
  mov    $0x20,%esi
  mov    %rax,%rbx
  call   <reverse_bits@plt>
  movzbl %bl,%r13d
  mov    $0xffffffff,%edx
  mov    $0x4,%esi
  mov    %r13d,%edi
  mov    %rax,%r15
  call   <crc32@plt>
  mov    %r13d,%esi
  lea    D127(%rip),%rdi
  mov    %rax,%r14
  xor    %eax,%eax
  call   <printf@plt>
  cmp    %r14,%r15
  movsd  0x8(%rsp),%xmm0
  je     L158
  lea    D49(%rip),%rdi
  call   <puts@plt>
  mov    %r15,%rsi
  lea    D95(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %r14,%rsi
  lea    D92(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  movsd  0x8(%rsp),%xmm0
L158:
  lea    D67(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  add    $0x28,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L124:
  lea    D110(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L32
L87:
  lea    D9(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  xor    %eax,%eax
  jmp    L32
L146:
  mov    $0xffffffff,%edx
  mov    $0x1,%esi
  lea    0xa(%rbx),%r15d
  xor    %edi,%edi
  call   <crc32@plt>
  mov    $0x4,%esi
  xor    %edi,%edi
  mov    %eax,%edx
  call   <crc32@plt>
  mov    $0x4,%esi
  xor    %edi,%edi
  mov    %rax,%r12
  call   <reverse_bits@plt>
  mov    %r12,%rdi
  mov    $0x20,%esi
  mov    %rax,%r13
  call   <reverse_bits@plt>
  mov    %r15d,%edi
  mov    %rax,%r14
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L87
  mov    %r15d,%edx
  xor    %esi,%esi
  mov    %r12,%rdi
  add    %r13d,%r13d
  call   <memset@plt>
  mov    %r13b,(%r12)
  jmp    L66
```

tool_calls: name: parse_data
arguments: data_label: D61
type_infered: string
name: parse_data
arguments: data_label: D114
type_infered: string
name: parse_data
arguments: data_label: D14
type_infered: string
name: parse_data
arguments: data_label: D119
type_infered: string
name: parse_data
arguments: data_label: D96
type_infered: string
name: parse_data
arguments: data_label: D8
type_infered: string
name: parse_data
arguments: data_label: D127
type_infered: string
name: parse_data
arguments: data_label: D49
type_infered: string
name: parse_data
arguments: data_label: D95
type_infered: string
name: parse_data
arguments: data_label: D92
type_infered: string
name: parse_data
arguments: data_label: D67
type_infered: string
name: parse_data
arguments: data_label: D110
type_infered: string
name: parse_data
arguments: data_label: D9
type_infered: string

tool: D61: Processing GO_COMMAND_WRITE.

tool: D114: ERROR: Non-hex digit in data: %c


tool: D14: GO_COMMAND_WRITE usage: GO_COMMAND_WRITE <data>.

tool: D119: Warning: GO_COMMAND_WRITE odd char ignored

tool: D96:   shifting in

tool: D8:   shifted out

tool: D127:   status:       0x%01x


tool: D49:   CRC mismatch

tool: D95:     CRC out:      0x%08lx


tool: D92:     CRC computed: 0x%08lx


tool: D67:   time taken:   %.12fs


tool: D110: ERROR: data malloc for GO_COMMAND_WRITE register failed.

tool: D9: ERROR: jreg malloc for GO_COMMAND_WRITE register failed.

assistant: ```c
int process_go_command_write(int next_jreg, int argc, char *argv[]) {
  printf("Processing GO_COMMAND_WRITE.\n");
  if (next_jreg >= argc) {
    printf("GO_COMMAND_WRITE usage: GO_COMMAND_WRITE <data>.\n");
    return 0;
  }
  unsigned long int cmd = 0;
  char *data_str = argv[next_jreg];
  int data_len = strlen(data_str);
  int data_bytes = data_len / 2;
  unsigned char *data = malloc(data_bytes);
  if (NULL == data) {
    printf("ERROR: data malloc for GO_COMMAND_WRITE register failed.\n");
    return 0;
  }
  if (1 == (data_len % 2)) {
    printf("Warning: GO_COMMAND_WRITE odd char ignored\n");
  }
  int i;
  for (i = 0; i < data_bytes; i++) {
    int ch_off_ms = i * 2;
    int ch_off_ls = i * 2 + 1;
    data[i] = 0;
    int j;
    for (j = ch_off_ms; j <= ch_off_ls; j++) {
      char c = data_str[j];
      int dig_val = (('0' <= c) && (c <= '9')) ? c - '0' : (('a' <= c) && (c <= 'f')) ? c - 'a' + 10 : (('A' <= c) && (c <= 'F')) ? c - 'A' + 10 : -1;
      if (dig_val < 0) {
        printf("ERROR: Non-hex digit in data: %c\n", c);
        free(data);
        return 0;
      }
      data[i] = (data[i] << 4) | dig_val;
    }
  }
  unsigned long int crc_in;
  crc_in = crc32(0, 1, 0xffffffff);
  crc_in = crc32(cmd, 4, crc_in);
  for (i = 0; i < data_bytes; i++) {
    crc_in = crc32(data[i], 8, crc_in);
  }
  cmd = reverse_bits(cmd, 4);
  for (i = 0; i < data_bytes; i++) {
    data[i] = reverse_bits(data[i], 8);
  }
  crc_in = reverse_bits(crc_in, 32);
  int num_bytes = 10 + data_bytes;
  unsigned char *jreg = malloc(num_bytes);
  if (NULL == jreg) {
    printf("ERROR: jreg malloc for GO_COMMAND_WRITE register failed.\n");
    free(data);
    return 0;
  }
  memset(jreg, 0, num_bytes);
  jreg[0] = 0x0;
  jreg[0] |= cmd << 1;
  for (i = 0; i < data_bytes; i++) {
    jreg[i] |= data[i] << 5;
    jreg[i + 1] = data[i] >> 3;
  }
  jreg[data_bytes] |= crc_in << 5;
  jreg[data_bytes + 1] = crc_in >> 3;
  jreg[data_bytes + 2] = crc_in >> 11;
  jreg[data_bytes + 3] = crc_in >> 19;
  jreg[data_bytes + 4] = crc_in >> 27;
  dump_jreg("  shifting in", jreg, num_bytes);
  double t = or1ksim_jtag_shift_dr(jreg, 32 + 4 + 32 + data_bytes * 8 + 4 + 1);
  dump_jreg("  shifted out", jreg, num_bytes);
  unsigned char status;
  unsigned long int crc_out;
  status = ((jreg[data_bytes + 4] >> 5) | (jreg[data_bytes + 5] << 3)) & 0xf;
  crc_out = ((unsigned long int)jreg[data_bytes + 5] >> 1) | ((unsigned long int)jreg[data_bytes + 6] << 7) | ((unsigned long int)jreg[data_bytes + 7] << 15) | ((unsigned long int)jreg[data_bytes + 8] << 23) | ((unsigned long int)jreg[data_bytes + 9] << 31);
  status = reverse_bits(status, 4);
  crc_out = reverse_bits(crc_out, 32);
  unsigned long int crc_computed = crc32(status, 4, 0xffffffff);
  printf("  status:       0x%01x\n", status);
  if (crc_out != crc_computed) {
    printf("  CRC mismatch\n");
    printf("    CRC out:      0x%08lx\n", crc_out);
    printf("    CRC computed: 0x%08lx\n", crc_computed);
  }
  printf("  time taken:   %.12fs\n", t);
  free(data);
  free(jreg);
  return 1;
}
```