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

```asm
<strdoubler>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  call   <strlen@plt>
  mov    %eax,%ebp
  mov    %eax,%edi
  call   <malloc@plt>
  add    %ebp,%ebp
  lea    -0x1(%rbp),%ecx
  mov    %rax,%r8
  test   %ecx,%ecx
  jle    L134
  sub    $0x2,%ebp
  mov    %ebp,%r9d
  shr    %r9d
  lea    0x1(%r9),%edx
  lea    (%rax,%rdx,2),%rsi
  mov    %rdx,%rdi
  cmp    %rsi,%rbx
  setae  %sil
  add    %rbx,%rdx
  cmp    %rdx,%rax
  setae  %dl
  or     %dl,%sil
  je     L148
  cmp    $0x1d,%ebp
  jbe    L148
  mov    %edi,%eax
  mov    %rbx,%rdx
  shr    $0x4,%eax
  sub    $0x1,%eax
  shl    $0x4,%rax
  lea    0x10(%rbx,%rax,1),%rsi
  mov    %r8,%rax
  nopl   0x0(%rax,%rax,1)
L4:
  movdqu (%rdx),%xmm0
  add    $0x10,%rdx
  add    $0x20,%rax
  movdqa %xmm0,%xmm1
  punpcklbw %xmm0,%xmm1
  punpckhbw %xmm0,%xmm0
  movups %xmm1,-0x20(%rax)
  movups %xmm0,-0x10(%rax)
  cmp    %rsi,%rdx
  jne    L4
  mov    %edi,%edx
  and    $0xfffffff0,%edx
  lea    (%rdx,%rdx,1),%eax
  cmp    %edx,%edi
  je     L134
  movslq %edx,%rsi
  lea    0x1(%rdx),%edi
  movzbl (%rbx,%rsi,1),%r9d
  movslq %eax,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x1(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x2(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0x2(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x3(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x4(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0x3(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x5(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x6(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0x4(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x7(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x8(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0x5(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x9(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0xa(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0x6(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0xb(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0xc(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0x7(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0xd(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0xe(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0x8(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0xf(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x10(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0x9(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x11(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x12(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0xa(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x13(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x14(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0xb(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x15(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x16(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0xc(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x17(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x18(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  movzbl (%rbx,%rdi,1),%r9d
  lea    0xd(%rdx),%edi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x19(%rax),%esi
  movslq %esi,%rsi
  mov    %r9b,(%r8,%rsi,1)
  lea    0x1a(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edi,%rdi
  movslq %esi,%rsi
  add    $0xe,%edx
  movzbl (%rbx,%rdi,1),%edi
  mov    %dil,(%r8,%rsi,1)
  lea    0x1b(%rax),%esi
  movslq %esi,%rsi
  mov    %dil,(%r8,%rsi,1)
  lea    0x1c(%rax),%esi
  cmp    %esi,%ecx
  jle    L134
  movslq %edx,%rdx
  add    $0x1d,%eax
  movslq %esi,%rsi
  movzbl (%rbx,%rdx,1),%edx
  cltq
  mov    %dl,(%r8,%rsi,1)
  mov    %dl,(%r8,%rax,1)
L134:
  add    $0x8,%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L148:
  lea    0x2(%r8,%r9,2),%rcx
  nopl   (%rax)
L186:
  movzbl (%rbx),%edx
  add    $0x2,%rax
  add    $0x1,%rbx
  mov    %dl,-0x2(%rax)
  mov    %dl,-0x1(%rax)
  cmp    %rax,%rcx
  jne    L186
  add    $0x8,%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
char *strdoubler(char *str) {
  int string_size = strlen(str);
  char *doubled_string = (char *)malloc(sizeof(char) * string_size);
  int doubler_size = string_size * 2 - 1;
  int str_index = 0;
  for (int ii = 0; ii < doubler_size; ++ii) {
    doubled_string[ii++] = str[str_index];
    doubled_string[ii] = str[str_index++];
  }
  return doubled_string;
}
```