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

```asm
<main>:
  endbr64
  push   %r12
  lea    D7(%rip),%r12
  push   %rbp
  mov    %r12,%rdi
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rsi
  call   <scanf@plt>
  mov    %rbp,%rdi
  call   <str_len@plt>
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %eax,%edx
  sar    %edx
  cmp    $0x1,%eax
  jle    L228
  mov    %eax,%ecx
  and    $0x1,%ecx
  je     L61
  lea    0x10(%rdx),%ecx
  cmp    $0x1e,%ecx
  jbe    L311
  cmp    $0xf,%eax
  jle    L311
  cmp    $0x1f,%eax
  jle    L236
  lea    0x1(%rdx),%eax
  movdqa (%rsp),%xmm0
  mov    %edx,%ecx
  cltq
  shr    $0x4,%ecx
  add    %rbp,%rax
  movdqu (%rax),%xmm2
  movaps %xmm2,(%rsp)
  movups %xmm0,(%rax)
  cmp    $0x1,%ecx
  je     L430
  movdqa 0x10(%rsp),%xmm0
  movdqu 0x10(%rax),%xmm4
  movaps %xmm4,0x10(%rsp)
  movups %xmm0,0x10(%rax)
  cmp    $0x2,%ecx
  je     L430
  movdqa 0x20(%rsp),%xmm0
  movdqu 0x20(%rax),%xmm6
  movaps %xmm6,0x20(%rsp)
  movups %xmm0,0x20(%rax)
  cmp    $0x3,%ecx
  je     L430
  movdqa 0x30(%rsp),%xmm0
  movdqu 0x30(%rax),%xmm7
  movaps %xmm7,0x30(%rsp)
  movups %xmm0,0x30(%rax)
  cmp    $0x4,%ecx
  je     L430
  movdqa 0x40(%rsp),%xmm0
  movdqu 0x40(%rax),%xmm6
  movaps %xmm6,0x40(%rsp)
  movups %xmm0,0x40(%rax)
  cmp    $0x5,%ecx
  je     L430
  movdqa 0x50(%rsp),%xmm0
  movdqu 0x50(%rax),%xmm4
  movaps %xmm4,0x50(%rsp)
  movups %xmm0,0x50(%rax)
L430:
  mov    %edx,%eax
  and    $0xfffffff0,%eax
  mov    %eax,%ecx
  cmp    %eax,%edx
  je     L228
L410:
  mov    %edx,%edi
  sub    %eax,%edi
  lea    -0x1(%rdi),%esi
  cmp    $0x6,%esi
  jbe    L1
  mov    %eax,%esi
  lea    0x1(%rdx),%eax
  cltq
  lea    0x0(%rbp,%rsi,1),%r8
  add    %rsi,%rax
  mov    (%r8),%rsi
  add    %rbp,%rax
  mov    (%rax),%r9
  mov    %r9,(%r8)
  mov    %rsi,(%rax)
  mov    %edi,%eax
  and    $0xfffffff8,%eax
  add    %eax,%ecx
  cmp    %eax,%edi
  je     L228
L1:
  lea    0x1(%rcx,%rdx,1),%eax
  movslq %ecx,%rsi
  cltq
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rax,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rax,1)
  lea    0x1(%rcx),%eax
  cmp    %eax,%edx
  jle    L228
  movslq %eax,%rsi
  lea    0x1(%rax,%rdx,1),%eax
  cltq
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rax,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rax,1)
  lea    0x2(%rcx),%eax
  cmp    %edx,%eax
  jge    L228
  movslq %eax,%rsi
  lea    0x1(%rax,%rdx,1),%eax
  cltq
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rax,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rax,1)
  lea    0x3(%rcx),%eax
  cmp    %eax,%edx
  jle    L228
  movslq %eax,%rsi
  lea    0x1(%rax,%rdx,1),%eax
  cltq
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rax,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rax,1)
  lea    0x4(%rcx),%eax
  cmp    %edx,%eax
  jge    L228
  movslq %eax,%rsi
  lea    0x1(%rax,%rdx,1),%eax
  cltq
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rax,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rax,1)
  lea    0x5(%rcx),%eax
  cmp    %eax,%edx
  jle    L228
  movslq %eax,%rsi
  lea    0x1(%rax,%rdx,1),%eax
  add    $0x6,%ecx
  cltq
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rax,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rax,1)
  cmp    %ecx,%edx
  jle    L228
  lea    0x1(%rcx,%rdx,1),%eax
  movslq %ecx,%rsi
  cltq
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rax,1),%edx
  mov    %dl,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rax,1)
  nop
L228:
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <printf@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L172
  add    $0x78,%rsp
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  ret
L61:
  lea    0xf(%rdx),%esi
  cmp    $0x1e,%esi
  jbe    L260
  cmp    $0xf,%eax
  jle    L260
  cmp    $0x1f,%eax
  jle    L322
  movslq %edx,%rax
  movdqa (%rsp),%xmm0
  mov    %edx,%ecx
  add    %rbp,%rax
  shr    $0x4,%ecx
  movdqu (%rax),%xmm1
  movaps %xmm1,(%rsp)
  movups %xmm0,(%rax)
  cmp    $0x1,%ecx
  je     L360
  movdqa 0x10(%rsp),%xmm0
  movdqu 0x10(%rax),%xmm3
  movaps %xmm3,0x10(%rsp)
  movups %xmm0,0x10(%rax)
  cmp    $0x2,%ecx
  je     L360
  movdqa 0x20(%rsp),%xmm0
  movdqu 0x20(%rax),%xmm5
  movaps %xmm5,0x20(%rsp)
  movups %xmm0,0x20(%rax)
  cmp    $0x3,%ecx
  je     L360
  movdqa 0x30(%rsp),%xmm0
  movdqu 0x30(%rax),%xmm7
  movaps %xmm7,0x30(%rsp)
  movups %xmm0,0x30(%rax)
  cmp    $0x4,%ecx
  je     L360
  movdqa 0x40(%rsp),%xmm0
  movdqu 0x40(%rax),%xmm5
  movaps %xmm5,0x40(%rsp)
  movups %xmm0,0x40(%rax)
  cmp    $0x5,%ecx
  je     L360
  movdqa 0x50(%rsp),%xmm0
  movdqu 0x50(%rax),%xmm3
  movaps %xmm3,0x50(%rsp)
  movups %xmm0,0x50(%rax)
L360:
  mov    %edx,%ecx
  and    $0xfffffff0,%ecx
  mov    %ecx,%eax
  cmp    %ecx,%edx
  je     L228
L304:
  mov    %edx,%edi
  sub    %ecx,%edi
  lea    -0x1(%rdi),%esi
  cmp    $0x6,%esi
  jbe    L34
  mov    %ecx,%ecx
  movslq %edx,%rsi
  lea    0x0(%rbp,%rcx,1),%r8
  add    %rsi,%rcx
  add    %rbp,%rcx
  mov    (%r8),%rsi
  mov    (%rcx),%r9
  mov    %r9,(%r8)
  mov    %rsi,(%rcx)
  mov    %edi,%ecx
  and    $0xfffffff8,%ecx
  add    %ecx,%eax
  cmp    %ecx,%edi
  je     L228
L34:
  lea    (%rdx,%rax,1),%ecx
  movslq %eax,%rsi
  movslq %ecx,%rcx
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rcx,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rcx,1)
  lea    0x1(%rax),%ecx
  cmp    %ecx,%edx
  jle    L228
  movslq %ecx,%rsi
  add    %edx,%ecx
  movslq %ecx,%rcx
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rcx,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rcx,1)
  lea    0x2(%rax),%ecx
  cmp    %ecx,%edx
  jle    L228
  movslq %ecx,%rsi
  add    %edx,%ecx
  movslq %ecx,%rcx
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rcx,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rcx,1)
  lea    0x3(%rax),%ecx
  cmp    %ecx,%edx
  jle    L228
  movslq %ecx,%rsi
  add    %edx,%ecx
  movslq %ecx,%rcx
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rcx,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rcx,1)
  lea    0x4(%rax),%ecx
  cmp    %ecx,%edx
  jle    L228
  movslq %ecx,%rsi
  add    %edx,%ecx
  movslq %ecx,%rcx
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rcx,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rcx,1)
  lea    0x5(%rax),%ecx
  cmp    %ecx,%edx
  jle    L228
  movslq %ecx,%rsi
  add    %edx,%ecx
  add    $0x6,%eax
  movslq %ecx,%rcx
  movzbl (%rsp,%rsi,1),%edi
  movzbl (%rsp,%rcx,1),%r8d
  mov    %r8b,(%rsp,%rsi,1)
  mov    %dil,(%rsp,%rcx,1)
  cmp    %eax,%edx
  jle    L228
  movslq %eax,%rcx
  add    %edx,%eax
  cltq
  movzbl (%rsp,%rcx,1),%esi
  movzbl (%rsp,%rax,1),%edx
  mov    %dl,(%rsp,%rcx,1)
  mov    %sil,(%rsp,%rax,1)
  jmp    L228
L311:
  mov    %rbp,%rax
  xor    %esi,%esi
  movslq %edx,%rcx
  nopl   0x0(%rax)
L18:
  movzbl (%rax),%edi
  movzbl 0x1(%rax,%rcx,1),%r8d
  add    $0x1,%esi
  add    $0x1,%rax
  mov    %r8b,-0x1(%rax)
  mov    %dil,(%rax,%rcx,1)
  cmp    %edx,%esi
  jl     L18
  jmp    L228
L260:
  mov    %rbp,%rax
  xor    %esi,%esi
  movslq %edx,%rcx
  nopl   0x0(%rax)
L83:
  movzbl (%rax),%edi
  movzbl (%rax,%rcx,1),%r8d
  add    $0x1,%esi
  add    $0x1,%rax
  mov    %r8b,-0x1(%rax)
  mov    %dil,-0x1(%rax,%rcx,1)
  cmp    %esi,%edx
  jg     L83
  jmp    L228
L322:
  xor    %eax,%eax
  jmp    L304
L236:
  xor    %eax,%eax
  xor    %ecx,%ecx
  jmp    L410
L172:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D7
type_infered: string

tool: D7: %s

assistant: ```c
int main() {
  int temp, i, len;
  char str[100];
  scanf("%s", str);
  len = str_len(str);
  for (i = 0; i < len / 2; i++) {
    if (len % 2 == 0) {
      temp = str[i];
      str[i] = str[i + len / 2];
      str[i + len / 2] = temp;
    }
  }
  for (i = 0; i < len / 2; i++) {
    if (len % 2 != 0) {
      temp = str[i];
      str[i] = str[i + len / 2 + 1];
      str[i + len / 2 + 1] = temp;
    }
  }
  printf("%s", str);
  return 0;
}
```