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

```asm
<p3dReplicatePadding3D_uchar2uchar>:
  endbr64
  push   %r15
  lea    (%r9,%r9,1),%eax
  push   %r14
  lea    (%rax,%rdx,1),%r15d
  push   %r13
  push   %r12
  mov    %r9d,%r12d
  push   %rbp
  lea    (%rax,%r8,1),%ebp
  push   %rbx
  lea    (%rax,%rcx,1),%ebx
  xor    %eax,%eax
  sub    $0x128,%rsp
  mov    %r15d,0xf8(%rsp)
  mov    %rsi,(%rsp)
  call   <p3dZeroPadding3D_uchar2uchar@plt>
  test   %r12d,%r12d
  jle    L54
  mov    %r15d,%r14d
  mov    %r12d,%esi
  lea    -0x1(%r15),%r9d
  sub    %r12d,%r15d
  mov    %r14d,%r8d
  mov    %r14d,%eax
  lea    -0x1(%rsi),%ecx
  mov    %r15d,0x10(%rsp)
  imul   %ebx,%r8d
  not    %eax
  mov    %r9d,0xe0(%rsp)
  mov    0xe0(%rsp),%r9d
  mov    %esi,0x1c(%rsp)
  sub    0x1c(%rsp),%ebp
  sub    %esi,%r9d
  sub    %r8d,%eax
  mov    %r8d,%r10d
  mov    %r8d,%r13d
  mov    %r8d,0xec(%rsp)
  mov    %eax,0x100(%rsp)
  imul   %r12d,%r13d
  lea    0x1(%r14),%eax
  mov    %eax,%edi
  imul   %ecx,%r10d
  mov    %eax,%edx
  mov    %eax,0xe4(%rsp)
  imul   %esi,%edi
  imul   %ecx,%edx
  mov    %r13d,%r12d
  mov    %r13d,0x14(%rsp)
  mov    %edi,0x98(%rsp)
  add    %r13d,%edi
  mov    %r10d,%r13d
  mov    %edx,0x9c(%rsp)
  add    %r10d,%edx
  mov    $0x1,%r10d
  sub    %r14d,%r10d
  mov    %edi,0x88(%rsp)
  lea    0x1(%rbx),%edi
  mov    %r10d,%r11d
  mov    %edx,0x84(%rsp)
  mov    %r9d,%edx
  sub    %r8d,%r11d
  mov    %r10d,0xe8(%rsp)
  mov    %r8d,%r10d
  mov    %r11d,0x104(%rsp)
  mov    %r14d,%r11d
  imul   %esi,%r14d
  mov    %r13d,0x24(%rsp)
  mov    %r14d,%r9d
  mov    %r14d,0x18(%rsp)
  mov    %r14d,%eax
  mov    %r11d,%r14d
  imul   %ecx,%r14d
  imul   %edi,%eax
  mov    %r14d,0xc0(%rsp)
  lea    (%rax,%rdx,1),%r8d
  mov    %r14d,%eax
  imul   %edi,%eax
  mov    %r8d,0x80(%rsp)
  mov    %r15d,%r8d
  add    %r15d,%eax
  mov    0xe0(%rsp),%r15d
  mov    %eax,0x7c(%rsp)
  sub    %r10d,%r15d
  mov    %r15d,0xfc(%rsp)
  mov    %ebx,%r15d
  sub    %esi,%r15d
  lea    -0x1(%r15),%eax
  mov    %r15d,%esi
  imul   %r11d,%eax
  mov    %eax,%r15d
  mov    0x1c(%rsp),%eax
  mov    %r15d,0x54(%rsp)
  add    %r12d,%eax
  add    %r15d,%eax
  mov    %esi,%r15d
  mov    %r11d,%esi
  mov    %eax,0x78(%rsp)
  mov    %r11d,%eax
  imul   %r15d,%eax
  add    %eax,%ecx
  mov    %eax,%r11d
  mov    %eax,0xc4(%rsp)
  lea    -0x1(%rbx),%eax
  mov    %ecx,0xa0(%rsp)
  add    %r13d,%ecx
  mov    %esi,%r13d
  mov    %ecx,0x74(%rsp)
  mov    %eax,%ecx
  lea    -0x1(%rbp),%eax
  imul   %esi,%ecx
  lea    -0x1(%rcx),%esi
  mov    %esi,0x108(%rsp)
  mov    %ebp,%esi
  mov    %eax,%ebp
  imul   %r10d,%ebp
  mov    %ebp,%eax
  mov    0x98(%rsp),%ebp
  mov    %eax,0x20(%rsp)
  add    %eax,%ebp
  mov    %r10d,%eax
  imul   %esi,%r10d
  mov    %ebp,0x8c(%rsp)
  mov    0x9c(%rsp),%ebp
  add    %r10d,%ebp
  mov    %r10d,0x50(%rsp)
  mov    %eax,%r10d
  mov    %ebp,0x58(%rsp)
  mov    0xe4(%rsp),%ebp
  sub    %eax,%ebp
  lea    (%rdx,%r12,1),%eax
  mov    0x54(%rsp),%r12d
  mov    %ebp,0x114(%rsp)
  mov    %r11d,%ebp
  add    %r12d,%eax
  imul   %r13d,%edi
  add    $0x1,%ecx
  add    %r8d,%ebp
  mov    %eax,0x70(%rsp)
  mov    %r11d,%eax
  mov    0x24(%rsp),%r11d
  mov    %ecx,0xf0(%rsp)
  mov    %r9d,%ecx
  add    %r11d,%eax
  mov    %ebp,0xb4(%rsp)
  add    %r8d,%eax
  mov    %eax,0x90(%rsp)
  mov    %edi,%eax
  lea    -0x1(%rdi),%edi
  mov    %edi,0xf4(%rsp)
  mov    0x1c(%rsp),%edi
  add    %r12d,%edi
  mov    0x50(%rsp),%r12d
  mov    %edi,0xac(%rsp)
  add    0x20(%rsp),%edi
  mov    %edi,0x6c(%rsp)
  mov    0xa0(%rsp),%edi
  add    %r12d,%ebp
  mov    %ebp,0x94(%rsp)
  add    %r12d,%edi
  mov    %edi,0x5c(%rsp)
  lea    (%rdx,%r9,1),%edi
  mov    0x20(%rsp),%r9d
  mov    %edi,0xa4(%rsp)
  add    0x54(%rsp),%edx
  add    %r9d,%edi
  mov    %edx,0xb0(%rsp)
  add    %r9d,%edx
  mov    %edi,0x60(%rsp)
  mov    %r14d,%edi
  add    %r8d,%r14d
  mov    %r14d,0xa8(%rsp)
  add    %r12d,%r14d
  mov    %r14d,0x64(%rsp)
  lea    0x1(%rax),%r14d
  movslq 0x1c(%rsp),%rax
  mov    %r14d,0x10c(%rsp)
  mov    %r13d,%r14d
  not    %r13d
  mov    %rax,%r8
  mov    %edx,0x68(%rsp)
  mov    %r8,%r9
  mov    %r13d,0x110(%rsp)
  mov    %rax,0x8(%rsp)
  movslq 0xe0(%rsp),%rax
  neg    %r9
  mov    %r9,0xb8(%rsp)
  movslq %r14d,%r9
  sub    %r8,%rax
  mov    %r11d,0xc8(%rsp)
  mov    %rax,0x28(%rsp)
  mov    %r8,%rax
  mov    %r9,%r8
  sub    %rax,%r8
  mov    %r14d,%eax
  mov    (%rsp),%r14
  mov    %r12d,0xcc(%rsp)
  neg    %eax
  mov    %r8,0x30(%rsp)
  imul   %ebx,%eax
  mov    %edi,0xd0(%rsp)
  movslq %r10d,%rdi
  cltq
  mov    %rax,0x118(%rsp)
  mov    %ebx,%eax
  imul   %ecx,%eax
  cltq
  add    %r14,%rax
  mov    %rax,0x48(%rsp)
  nopl   0x0(%rax,%rax,1)
L80:
  mov    0x1c(%rsp),%eax
  mov    0x10(%rsp),%edx
  mov    %eax,%ecx
  sub    $0x1,%eax
  mov    %eax,0x1c(%rsp)
  cmp    %ecx,%edx
  jle    L158
  cmp    %r15d,%ecx
  jge    L148
  movslq 0x18(%rsp),%r10
  movslq 0x14(%rsp),%r11
  mov    %ecx,%r13d
  mov    %rdi,0x38(%rsp)
  movslq 0xc8(%rsp),%rbp
  movslq 0x20(%rsp),%rax
  lea    (%r10,%r11,1),%r12
  movslq 0xcc(%rsp),%rbx
  add    0x8(%rsp),%r12
  mov    %edx,%r10d
  add    %r14,%r12
  nopl   0x0(%rax,%rax,1)
L97:
  mov    %ecx,(%rsp)
  mov    %r12,%rdx
  mov    %ecx,%r8d
  nopl   0x0(%rax)
L2:
  movzbl (%rdx),%ecx
  mov    %rdx,%rdi
  add    $0x1,%r8d
  add    %r9,%rdx
  sub    %r11,%rdi
  mov    %cl,(%rdi,%rbp,1)
  movzbl (%rdi,%rax,1),%ecx
  mov    %cl,(%rdi,%rbx,1)
  cmp    %r15d,%r8d
  jne    L2
  add    $0x1,%r13d
  mov    (%rsp),%ecx
  add    $0x1,%r12
  cmp    %r10d,%r13d
  jne    L97
  mov    0x38(%rsp),%rdi
L159:
  cmp    %esi,%ecx
  jge    L103
  movslq 0x18(%rsp),%r10
  mov    0x8(%rsp),%rax
  mov    %ecx,%r12d
  mov    0x1c(%rsp),%ebx
  mov    0x48(%rsp),%r13
  lea    (%r10,%rax,1),%r11
  mov    0x28(%rsp),%rax
  add    %r10,%rbx
  lea    (%r10,%rax,1),%rbp
  add    0x30(%rsp),%r10
  nopl   0x0(%rax,%rax,1)
L150:
  mov    %ecx,(%rsp)
  lea    (%r11,%r13,1),%rax
  mov    %ecx,%r8d
  nopw   0x0(%rax,%rax,1)
L33:
  movzbl (%rax),%ecx
  mov    %rax,%rdx
  add    $0x1,%r8d
  add    %rdi,%rax
  sub    %r11,%rdx
  mov    %cl,(%rdx,%rbx,1)
  movzbl (%rdx,%rbp,1),%ecx
  mov    %cl,(%rdx,%r10,1)
  cmp    %esi,%r8d
  jne    L33
  add    $0x1,%r12d
  mov    (%rsp),%ecx
  add    %r9,%r11
  add    %r9,%rbx
  add    %r9,%rbp
  add    %r9,%r10
  cmp    %r15d,%r12d
  jl     L150
L103:
  cmp    %ecx,0x10(%rsp)
  jle    L61
L148:
  movslq 0x18(%rsp),%r10
  cmp    %esi,%ecx
  jge    L209
  movslq 0xc4(%rsp),%rdx
  mov    0x8(%rsp),%rax
  mov    %r15d,0xd4(%rsp)
  mov    %ecx,%r13d
  movslq 0x54(%rsp),%r12
  movslq 0xd0(%rsp),%rbx
  mov    %r9,0xd8(%rsp)
  mov    %rdx,0x40(%rsp)
  mov    %rdx,%rbp
  mov    0x10(%rsp),%r9d
  lea    (%r10,%rax,1),%r11
  mov    0x48(%rsp),%r15
  mov    %r12,0x38(%rsp)
  add    %rax,%rbx
  add    %rax,%r12
  add    %rax,%rbp
  nopl   0x0(%rax,%rax,1)
L47:
  mov    %ecx,(%rsp)
  lea    (%r11,%r15,1),%rax
  mov    %ecx,%r8d
  nopw   0x0(%rax,%rax,1)
L32:
  movzbl (%rax),%ecx
  mov    %rax,%rdx
  add    $0x1,%r8d
  add    %rdi,%rax
  sub    %r11,%rdx
  mov    %cl,(%rdx,%rbx,1)
  movzbl (%rdx,%r12,1),%ecx
  mov    %cl,(%rdx,%rbp,1)
  cmp    %esi,%r8d
  jne    L32
  add    $0x1,%r13d
  mov    (%rsp),%ecx
  add    $0x1,%r11
  add    $0x1,%rbx
  add    $0x1,%r12
  add    $0x1,%rbp
  cmp    %r9d,%r13d
  jl     L47
  mov    0xd4(%rsp),%r15d
  mov    0xd8(%rsp),%r9
L69:
  movslq 0x20(%rsp),%rax
  movslq 0x14(%rsp),%r11
  mov    %ecx,(%rsp)
  movslq 0x24(%rsp),%r8
  movslq 0xc0(%rsp),%rbp
  movslq 0x50(%rsp),%rbx
  lea    (%r10,%r11,1),%r13
  add    %rax,%r10
  add    0x38(%rsp),%r11
  add    0x38(%rsp),%rax
  mov    %esi,0x38(%rsp)
  add    %r14,%r13
  add    %r14,%r10
  lea    0x0(%rbp,%r8,1),%r12
  mov    0x8(%rsp),%rdx
  add    %rbx,%rbp
  add    %r14,%r11
  add    0x40(%rsp),%r8
  add    0x40(%rsp),%rbx
  add    %r14,%r12
  add    %r14,%rbp
  mov    0x10(%rsp),%ecx
  add    %r14,%r8
  add    %r14,%rax
  add    %r14,%rbx
  nopl   0x0(%rax,%rax,1)
L108:
  movzbl 0x0(%r13,%rdx,1),%esi
  mov    %sil,(%r12,%rdx,1)
  movzbl (%r10,%rdx,1),%esi
  mov    %sil,0x0(%rbp,%rdx,1)
  movzbl (%r11,%rdx,1),%esi
  mov    %sil,(%r8,%rdx,1)
  movzbl (%rax,%rdx,1),%esi
  mov    %sil,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %edx,%ecx
  jg     L108
  mov    (%rsp),%ecx
  mov    0x38(%rsp),%esi
L61:
  cmp    %r15d,%ecx
  jge    L96
  mov    0x8(%rsp),%rbp
  mov    0x30(%rsp),%r11
  mov    %ecx,0x38(%rsp)
  mov    %ecx,%r10d
  movslq 0x14(%rsp),%r12
  movslq 0x18(%rsp),%rdx
  mov    %rdi,0x40(%rsp)
  sub    %rbp,%r11
  movslq 0x20(%rsp),%rax
  movslq 0x24(%rsp),%r8
  mov    %esi,0xd4(%rsp)
  sub    %r12,%r11
  add    %rbp,%rdx
  movslq 0x50(%rsp),%rbx
  mov    %r11,(%rsp)
  mov    0x28(%rsp),%r11
  add    %r12,%rdx
  add    %r14,%rdx
  mov    %r11,%r13
  mov    %r11,%rdi
  mov    0xb8(%rsp),%r11
  sub    %rbp,%r13
  mov    (%rsp),%rbp
  sub    %r12,%r13
  nopl   0x0(%rax,%rax,1)
L195:
  movzbl (%rdx),%esi
  mov    %rdx,%rcx
  add    $0x1,%r10d
  sub    %r12,%rcx
  mov    %sil,-0x1(%rcx,%r8,1)
  movzbl (%rcx,%rax,1),%esi
  mov    %sil,-0x1(%rcx,%rbx,1)
  lea    (%rdx,%rdi,1),%rcx
  movzbl (%rcx,%r11,1),%esi
  lea    0x0(%rbp,%rdx,1),%rcx
  mov    %sil,(%rcx,%r8,1)
  lea    0x0(%r13,%rdx,1),%rsi
  add    %r9,%rdx
  movzbl (%rsi,%rax,1),%esi
  mov    %sil,(%rcx,%rbx,1)
  cmp    %r15d,%r10d
  jne    L195
  mov    0x38(%rsp),%ecx
  mov    0x40(%rsp),%rdi
  mov    0xd4(%rsp),%esi
L96:
  cmp    %esi,%ecx
  jge    L111
  movslq 0x98(%rsp),%r8
  movslq 0x14(%rsp),%rdx
  mov    %r9,0x38(%rsp)
  movslq 0x9c(%rsp),%rax
  movslq 0xa4(%rsp),%r13
  mov    %r15d,(%rsp)
  add    %r8,%rdx
  movslq 0xa8(%rsp),%r12
  movslq 0xac(%rsp),%rbp
  movslq 0xa0(%rsp),%rbx
  movslq 0xb0(%rsp),%r11
  add    %r14,%rdx
  mov    %rax,%r15
  movslq 0xb4(%rsp),%r10
  nopl   0x0(%rax)
L91:
  movzbl (%rdx),%r9d
  mov    %rdx,%rax
  add    $0x1,%ecx
  add    %rdi,%rdx
  sub    %r8,%rax
  mov    %r9b,(%rax,%r15,1)
  movzbl (%rax,%r13,1),%r9d
  mov    %r9b,(%rax,%r12,1)
  movzbl (%rax,%rbp,1),%r9d
  mov    %r9b,(%rax,%rbx,1)
  movzbl (%rax,%r11,1),%r9d
  mov    %r9b,(%rax,%r10,1)
  cmp    %esi,%ecx
  jne    L91
  mov    (%rsp),%r15d
  mov    0x38(%rsp),%r9
L111:
  movslq 0x88(%rsp),%rax
  add    $0x1,%esi
  movzbl (%r14,%rax,1),%edx
  mov    %rax,%rbx
  movslq 0x84(%rsp),%rax
  mov    %dl,(%r14,%rax,1)
  mov    %rax,%rcx
  movslq 0x80(%rsp),%rax
  movzbl (%r14,%rax,1),%edx
  mov    %rax,%r10
  movslq 0x7c(%rsp),%rax
  mov    %dl,(%r14,%rax,1)
  mov    %rax,%r11
  movslq 0x78(%rsp),%rax
  movzbl (%r14,%rax,1),%edx
  mov    %rax,%r8
  movslq 0x74(%rsp),%rax
  mov    %dl,(%r14,%rax,1)
  mov    %rax,%rbp
  movslq 0x8c(%rsp),%rax
  movzbl (%r14,%rax,1),%edx
  mov    %rax,%r13
  movslq 0x58(%rsp),%rax
  mov    %dl,(%r14,%rax,1)
  mov    %rax,%r12
  movslq 0x70(%rsp),%rax
  movzbl (%r14,%rax,1),%edx
  movslq 0x90(%rsp),%rax
  mov    %dl,(%r14,%rax,1)
  movslq 0x6c(%rsp),%rax
  movzbl (%r14,%rax,1),%edx
  movslq 0x5c(%rsp),%rax
  mov    %dl,(%r14,%rax,1)
  movslq 0x60(%rsp),%rax
  movzbl (%r14,%rax,1),%edx
  movslq 0x64(%rsp),%rax
  mov    %dl,(%r14,%rax,1)
  movslq 0x68(%rsp),%rax
  movzbl (%r14,%rax,1),%edx
  movslq 0x94(%rsp),%rax
  mov    %dl,(%r14,%rax,1)
  addl   $0x1,0x10(%rsp)
  mov    0x100(%rsp),%edx
  add    %edx,%ebx
  add    %edx,%ecx
  mov    %ebx,0x88(%rsp)
  mov    0x104(%rsp),%ebx
  mov    %ecx,0x84(%rsp)
  add    %ebx,%r10d
  add    %ebx,%r11d
  mov    0xfc(%rsp),%ebx
  mov    %r10d,0x80(%rsp)
  add    %ebx,%r8d
  add    %ebx,%ebp
  mov    0x108(%rsp),%ebx
  mov    %r11d,0x7c(%rsp)
  mov    %r8d,0x78(%rsp)
  add    %ebx,%r13d
  add    %ebx,%r12d
  mov    %ebp,0x74(%rsp)
  mov    0x114(%rsp),%ebx
  mov    %r13d,0x8c(%rsp)
  add    %ebx,0x70(%rsp)
  add    %ebx,0x90(%rsp)
  mov    0xf4(%rsp),%ebx
  mov    %r12d,0x58(%rsp)
  add    %ebx,0x6c(%rsp)
  add    %ebx,0x5c(%rsp)
  mov    0xf0(%rsp),%ebx
  add    %ebx,0x60(%rsp)
  add    %ebx,0x64(%rsp)
  mov    0x10c(%rsp),%ebx
  add    %ebx,0x68(%rsp)
  add    %ebx,0x94(%rsp)
  mov    0xec(%rsp),%eax
  mov    0x110(%rsp),%ebx
  sub    %eax,0x14(%rsp)
  add    %ebx,0x98(%rsp)
  add    %ebx,0x9c(%rsp)
  mov    0xe8(%rsp),%ebx
  sub    %eax,0x24(%rsp)
  add    %ebx,0xa4(%rsp)
  add    %ebx,0xa8(%rsp)
  mov    0xe0(%rsp),%ebx
  add    %ebx,0xac(%rsp)
  add    %ebx,0xa0(%rsp)
  mov    0xe4(%rsp),%ebx
  add    %ebx,0xb0(%rsp)
  add    %ebx,0xb4(%rsp)
  mov    0xf8(%rsp),%ebx
  sub    %ebx,0x18(%rsp)
  sub    %ebx,0xc0(%rsp)
  add    %eax,0x20(%rsp)
  mov    0x118(%rsp),%rcx
  add    %eax,0x50(%rsp)
  add    %ebx,0x54(%rsp)
  add    $0x1,%r15d
  sub    %eax,0xc8(%rsp)
  add    %eax,0xcc(%rsp)
  mov    0x1c(%rsp),%eax
  add    %ebx,0xc4(%rsp)
  addq   $0x1,0x28(%rsp)
  addq   $0x1,0xb8(%rsp)
  addq   $0x1,0x30(%rsp)
  subq   $0x1,0x8(%rsp)
  add    %rcx,0x48(%rsp)
  sub    %ebx,0xd0(%rsp)
  test   %eax,%eax
  jne    L80
L54:
  add    $0x128,%rsp
  mov    $0x2,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L158:
  cmp    %r15d,%ecx
  jl     L159
  jmp    L96
L209:
  movslq 0x54(%rsp),%rax
  mov    %rax,0x38(%rsp)
  movslq 0xc4(%rsp),%rax
  mov    %rax,0x40(%rsp)
  jmp    L69
```

assistant: ```c
int p3dReplicatePadding3D_uchar2uchar(unsigned char *in_rev, unsigned char *out_rev, const int dimx, const int dimy, const int dimz, const int size) {
  int a_dimx, a_dimy, a_dimz;
  int i, j, k, ct;
  a_dimx = dimx + size * 2;
  a_dimy = dimy + size * 2;
  a_dimz = dimz + size * 2;
  p3dZeroPadding3D_uchar2uchar(in_rev, out_rev, dimx, dimy, dimz, size);
  for (ct = size; ct > 0; ct--) {
    for (i = ct; i < (a_dimx - ct); i++)
      for (j = ct; j < (a_dimy - ct); j++) {
        out_rev[((j) * (a_dimx) + (i) + (ct - 1) * (a_dimx) * (a_dimy))] = out_rev[((j) * (a_dimx) + (i) + (ct) * (a_dimx) * (a_dimy))];
        out_rev[((j) * (a_dimx) + (i) + (a_dimz - ct) * (a_dimx) * (a_dimy))] = out_rev[((j) * (a_dimx) + (i) + (a_dimz - 1 - ct) * (a_dimx) * (a_dimy))];
      }
    for (j = ct; j < (a_dimy - ct); j++)
      for (k = ct; k < (a_dimz - ct); k++) {
        out_rev[((j) * (a_dimx) + (ct - 1) + (k) * (a_dimx) * (a_dimy))] = out_rev[((j) * (a_dimx) + (ct) + (k) * (a_dimx) * (a_dimy))];
        out_rev[((j) * (a_dimx) + (a_dimx - ct) + (k) * (a_dimx) * (a_dimy))] = out_rev[((j) * (a_dimx) + (a_dimx - 1 - ct) + (k) * (a_dimx) * (a_dimy))];
      }
    for (i = ct; i < (a_dimx - ct); i++)
      for (k = ct; k < (a_dimz - ct); k++) {
        out_rev[((ct - 1) * (a_dimx) + (i) + (k) * (a_dimx) * (a_dimy))] = out_rev[((ct) * (a_dimx) + (i) + (k) * (a_dimx) * (a_dimy))];
        out_rev[((a_dimy - ct) * (a_dimx) + (i) + (k) * (a_dimx) * (a_dimy))] = out_rev[((a_dimy - 1 - ct) * (a_dimx) + (i) + (k) * (a_dimx) * (a_dimy))];
      }
    for (i = ct; i < (a_dimx - ct); i++) {
      out_rev[((ct - 1) * (a_dimx) + (i) + (ct - 1) * (a_dimx) * (a_dimy))] = out_rev[((ct) * (a_dimx) + (i) + (ct) * (a_dimx) * (a_dimy))];
      out_rev[((ct - 1) * (a_dimx) + (i) + (a_dimz - ct) * (a_dimx) * (a_dimy))] = out_rev[((ct) * (a_dimx) + (i) + (a_dimz - 1 - ct) * (a_dimx) * (a_dimy))];
      out_rev[((a_dimy - ct) * (a_dimx) + (i) + (ct - 1) * (a_dimx) * (a_dimy))] = out_rev[((a_dimy - 1 - ct) * (a_dimx) + (i) + (ct) * (a_dimx) * (a_dimy))];
      out_rev[((a_dimy - ct) * (a_dimx) + (i) + (a_dimz - ct) * (a_dimx) * (a_dimy))] = out_rev[((a_dimy - 1 - ct) * (a_dimx) + (i) + (a_dimz - 1 - ct) * (a_dimx) * (a_dimy))];
    }
    for (j = ct; j < (a_dimy - ct); j++) {
      out_rev[((j) * (a_dimx) + (ct - 1) + (ct - 1) * (a_dimx) * (a_dimy))] = out_rev[((j) * (a_dimx) + (ct) + (ct) * (a_dimx) * (a_dimy))];
      out_rev[((j) * (a_dimx) + (ct - 1) + (a_dimz - ct) * (a_dimx) * (a_dimy))] = out_rev[((j) * (a_dimx) + (ct) + (a_dimz - 1 - ct) * (a_dimx) * (a_dimy))];
      out_rev[((j) * (a_dimx) + (a_dimx - ct) + (ct - 1) * (a_dimx) * (a_dimy))] = out_rev[((j) * (a_dimx) + (a_dimx - 1 - ct) + (ct) * (a_dimx) * (a_dimy))];
      out_rev[((j) * (a_dimx) + (a_dimx - ct) + (a_dimz - ct) * (a_dimx) * (a_dimy))] = out_rev[((j) * (a_dimx) + (a_dimx - 1 - ct) + (a_dimz - 1 - ct) * (a_dimx) * (a_dimy))];
    }
    for (k = ct; k < (a_dimz - ct); k++) {
      out_rev[((ct - 1) * (a_dimx) + (ct - 1) + (k) * (a_dimx) * (a_dimy))] = out_rev[((ct) * (a_dimx) + (ct) + (k) * (a_dimx) * (a_dimy))];
      out_rev[((ct - 1) * (a_dimx) + (a_dimx - ct) + (k) * (a_dimx) * (a_dimy))] = out_rev[((ct) * (a_dimx) + (a_dimx - 1 - ct) + (k) * (a_dimx) * (a_dimy))];
      out_rev[((a_dimy - ct) * (a_dimx) + (ct - 1) + (k) * (a_dimx) * (a_dimy))] = out_rev[((a_dimy - 1 - ct) * (a_dimx) + (ct) + (k) * (a_dimx) * (a_dimy))];
      out_rev[((a_dimy - ct) * (a_dimx) + (a_dimx - ct) + (k) * (a_dimx) * (a_dimy))] = out_rev[((a_dimy - 1 - ct) * (a_dimx) + (a_dimx - 1 - ct) + (k) * (a_dimx) * (a_dimy))];
    }
    out_rev[((ct - 1) * (a_dimx) + (ct - 1) + (ct - 1) * (a_dimx) * (a_dimy))] = out_rev[((ct) * (a_dimx) + (ct) + (ct) * (a_dimx) * (a_dimy))];
    out_rev[((ct - 1) * (a_dimx) + (a_dimx - ct) + (ct - 1) * (a_dimx) * (a_dimy))] = out_rev[((ct) * (a_dimx) + (a_dimx - 1 - ct) + (ct) * (a_dimx) * (a_dimy))];
    out_rev[((a_dimy - ct) * (a_dimx) + (ct - 1) + (ct - 1) * (a_dimx) * (a_dimy))] = out_rev[((a_dimy - 1 - ct) * (a_dimx) + (ct) + (ct) * (a_dimx) * (a_dimy))];
    out_rev[((ct - 1) * (a_dimx) + (ct - 1) + (a_dimz - ct) * (a_dimx) * (a_dimy))] = out_rev[((ct) * (a_dimx) + (ct) + (a_dimz - 1 - ct) * (a_dimx) * (a_dimy))];
    out_rev[((a_dimy - ct) * (a_dimx) + (a_dimx - ct) + (ct - 1) * (a_dimx) * (a_dimy))] = out_rev[((a_dimy - 1 - ct) * (a_dimx) + (a_dimx - 1 - ct) + (ct) * (a_dimx) * (a_dimy))];
    out_rev[((a_dimy - ct) * (a_dimx) + (ct - 1) + (a_dimz - ct) * (a_dimx) * (a_dimy))] = out_rev[((a_dimy - 1 - ct) * (a_dimx) + (ct) + (a_dimz - 1 - ct) * (a_dimx) * (a_dimy))];
    out_rev[((ct - 1) * (a_dimx) + (a_dimx - ct) + (a_dimz - ct) * (a_dimx) * (a_dimy))] = out_rev[((ct) * (a_dimx) + (a_dimx - 1 - ct) + (a_dimz - 1 - ct) * (a_dimx) * (a_dimy))];
    out_rev[((a_dimy - ct) * (a_dimx) + (a_dimx - ct) + (a_dimz - ct) * (a_dimx) * (a_dimy))] = out_rev[((a_dimy - 1 - ct) * (a_dimx) + (a_dimx - 1 - ct) + (a_dimz - 1 - ct) * (a_dimx) * (a_dimy))];
  }
  return 2;
}
```