user: 请从给定的汇编指令推导出C源代码：

```asm
<doubles>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <string_length@plt>
  mov    %eax,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L65
L14:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L31
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L31
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%esi
  mov    -0x18(%rbp),%rax
  lea    D13(%rip),%rcx
  mov    %rax,%rdi
  call   <replace_sub_string@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L118
L31:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L34
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L34
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%esi
  mov    -0x18(%rbp),%rax
  lea    D17(%rip),%rcx
  mov    %rax,%rdi
  call   <replace_sub_string@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L118
L34:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L9
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L9
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%esi
  mov    -0x18(%rbp),%rax
  lea    D13(%rip),%rcx
  mov    %rax,%rdi
  call   <replace_sub_string@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L118
L9:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L103
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L103
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x8(%rbp),%esi
  mov    -0x18(%rbp),%rax
  lea    D17(%rip),%rcx
  mov    %rax,%rdi
  call   <replace_sub_string@plt>
  mov    %rax,-0x18(%rbp)
  jmp    L118
L103:
  addl   $0x1,-0x8(%rbp)
L65:
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L14
L118:
  mov    -0x18(%rbp),%rax
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D13
type_guessed: string
name: parse_data
arguments: data_label: D17
type_guessed: string

tool: D13: -

tool: D17: +

assistant: ```c
char *doubles(char buffer[]) {
  int length = string_length(buffer);
  int count;
  for (count = 0; count < length - 1; count++) {
    if ((buffer[count] == '+') && (buffer[count + 1] == '-')) {
      buffer = replace_sub_string(buffer, count, count + 1, "-");
      break;
    }
    if ((buffer[count] == '+') && (buffer[count + 1] == '+')) {
      buffer = replace_sub_string(buffer, count, count + 1, "+");
      break;
    }
    if ((buffer[count] == '-') && (buffer[count + 1] == '+')) {
      buffer = replace_sub_string(buffer, count, count + 1, "-");
      break;
    }
    if ((buffer[count] == '-') && (buffer[count + 1] == '-')) {
      buffer = replace_sub_string(buffer, count, count + 1, "+");
      break;
    }
  }
  return buffer;
}
```