user: Translate the below assembly code into C programming language:

```asm
<rotate1>:
  endbr64
  cmp    $0x1,%esi
  jle    L43
  mov    %edx,%eax
  push   %r14
  cltd
  push   %r13
  idiv   %esi
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  test   %edx,%edx
  je     L4
  lea    0x0(,%rsi,4),%r14d
  lea    (%rdx,%rsi,1),%r13d
  mov    %rdi,%rbp
  mov    %r14d,%edi
  cmovns %edx,%r13d
  call   <malloc@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L4
  test   %r13d,%r13d
  jle    L129
  movslq %ebx,%rdx
  movslq %r13d,%rsi
  lea    -0x1(%r13),%ecx
  mov    %ebx,%edi
  sub    %rsi,%rdx
  sub    %r13d,%edi
  lea    0x4(,%rdx,4),%r8
  lea    0x0(%rbp,%r8,1),%r9
  sub    %r9,%rax
  cmp    $0x8,%rax
  jbe    L11
  cmp    $0x2,%ecx
  jbe    L11
  mov    %r13d,%eax
  mov    %rbp,%rdx
  shr    $0x2,%eax
  sub    %r12,%rdx
  sub    $0x1,%eax
  lea    -0x4(%rdx,%r8,1),%rdx
  shl    $0x4,%rax
  lea    0x10(%r12,%rax,1),%rcx
  mov    %r12,%rax
  nopl   0x0(%rax)
L197:
  movdqu (%rax,%rdx,1),%xmm0
  add    $0x10,%rax
  movups %xmm0,-0x10(%rax)
  cmp    %rcx,%rax
  jne    L197
  mov    %r13d,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%r13b
  je     L3
  lea    (%rdi,%rax,1),%edx
  mov    %eax,%r8d
  movslq %edx,%rdx
  lea    0x0(,%r8,4),%rcx
  mov    0x0(%rbp,%rdx,4),%edx
  mov    %edx,(%r12,%r8,4)
  lea    0x1(%rax),%edx
  cmp    %edx,%r13d
  jle    L3
  add    %edi,%edx
  add    $0x2,%eax
  movslq %edx,%rdx
  mov    0x0(%rbp,%rdx,4),%edx
  mov    %edx,0x4(%r12,%rcx,1)
  cmp    %eax,%r13d
  jle    L3
  add    %eax,%edi
  movslq %edi,%rdi
  mov    0x0(%rbp,%rdi,4),%eax
  mov    %eax,0x8(%r12,%rcx,1)
L3:
  mov    %r13d,%ecx
  cmp    %ebx,%r13d
  jge    L109
L183:
  movslq %ecx,%rdi
  mov    %ebx,%r8d
  sub    %ecx,%r8d
  lea    (%r12,%rdi,4),%rdx
  sub    %rsi,%rdi
  lea    0x4(,%rdi,4),%r9
  lea    -0x1(%r8),%edi
  mov    %rdx,%rax
  cmp    $0x2,%edi
  seta   %r10b
  cmp    %ebx,%ecx
  setl   %dil
  test   %dil,%r10b
  je     L120
  lea    0x0(%rbp,%r9,1),%r10
  mov    %rdx,%rdi
  sub    %r10,%rdi
  cmp    $0x8,%rdi
  jbe    L120
  cmp    %ebx,%ecx
  mov    $0x1,%edi
  cmovl  %r8d,%edi
  mov    %edi,%edx
  shr    $0x2,%edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%rax,%rdx,1),%rsi
  mov    %rbp,%rdx
  sub    %rax,%rdx
  lea    -0x4(%rdx,%r9,1),%rdx
L74:
  movdqu (%rax,%rdx,1),%xmm1
  add    $0x10,%rax
  movups %xmm1,-0x10(%rax)
  cmp    %rax,%rsi
  jne    L74
  mov    %edi,%eax
  and    $0xfffffffc,%eax
  add    %eax,%ecx
  cmp    %eax,%edi
  je     L109
  mov    %ecx,%eax
  sub    %r13d,%eax
  cltq
  mov    0x0(%rbp,%rax,4),%edx
  movslq %ecx,%rax
  mov    %edx,(%r12,%rax,4)
  lea    0x1(%rcx),%eax
  cmp    %ebx,%eax
  jge    L109
  movslq %eax,%rdx
  sub    %r13d,%eax
  add    $0x2,%ecx
  cltq
  lea    0x0(,%rdx,4),%rsi
  mov    0x0(%rbp,%rax,4),%eax
  mov    %eax,(%r12,%rdx,4)
  cmp    %ecx,%ebx
  jle    L109
  sub    %r13d,%ecx
  movslq %ecx,%rcx
  mov    0x0(%rbp,%rcx,4),%eax
  mov    %eax,0x4(%r12,%rsi,1)
L109:
  mov    %rbp,%rdi
  mov    %r14d,%edx
  mov    %r12,%rsi
  call   <memcpy@plt>
  pop    %rbx
  mov    %r12,%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1070 <free@plt>
  nopw   0x0(%rax,%rax,1)
L4:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L43:
  ret
  nopl   0x0(%rax)
L120:
  neg    %rsi
  lea    0x0(%rbp,%rsi,4),%rsi
  sub    %r12,%rsi
  nopl   0x0(%rax,%rax,1)
L71:
  mov    (%rsi,%rdx,1),%eax
  add    $0x1,%ecx
  add    $0x4,%rdx
  mov    %eax,-0x4(%rdx)
  cmp    %ecx,%ebx
  jg     L71
  jmp    L109
  nopl   0x0(%rax,%rax,1)
L11:
  lea    0x4(%r12,%rcx,4),%rdi
  lea    0x0(%rbp,%rdx,4),%rcx
  mov    %r12,%rax
  sub    %r12,%rcx
  nopl   0x0(%rax,%rax,1)
L121:
  mov    (%rcx,%rax,1),%edx
  add    $0x4,%rax
  mov    %edx,-0x4(%rax)
  cmp    %rdi,%rax
  jne    L121
  jmp    L3
  nopl   0x0(%rax)
L129:
  xor    %ecx,%ecx
  movslq %r13d,%rsi
  jmp    L183
```

assistant: ```c
void rotate1(int nums[], int n, int k) {
  int i;
  int *nums_dup;
  if (n <= 1)
    return;
  k %= n;
  if (k == 0)
    return;
  if (k < 0)
    k += n;
  nums_dup = (int *)malloc(sizeof(int) * n);
  if (nums_dup == NULL)
    return;
  for (i = 0; i < k; ++i)
    nums_dup[i] = nums[n - k + i];
  for (; i < n; ++i)
    nums_dup[i] = nums[i - k];
  memcpy(nums, nums_dup, sizeof(int) * n);
  free(nums_dup);
}
```