user: Converte this assembly snippet into its equivalent C code:

```asm
<_p3dReplicatePadding3D_ushort2float>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    %ecx,-0x38(%rbp)
  mov    %r8d,-0x3c(%rbp)
  mov    %r9d,-0x40(%rbp)
  mov    -0x40(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x40(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x40(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x40(%rbp),%r8d
  mov    -0x3c(%rbp),%edi
  mov    -0x38(%rbp),%ecx
  mov    -0x34(%rbp),%edx
  mov    -0x30(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <_p3dZeroPadding3D_ushort2float@plt>
  mov    -0x40(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  jmp    L190
L122:
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L162
L54:
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L121
L184:
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  add    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  add    %eax,%ecx
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
L121:
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  cmp    %eax,-0x18(%rbp)
  jl     L184
  addl   $0x1,-0x1c(%rbp)
L162:
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  cmp    %eax,-0x1c(%rbp)
  jl     L54
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L109
L0:
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L14
L16:
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  add    %eax,%ecx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%ecx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L14:
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L16
  addl   $0x1,-0x18(%rbp)
L109:
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  cmp    %eax,-0x18(%rbp)
  jl     L0
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L131
L124:
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L199
L44:
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  add    %eax,%ecx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  add    %eax,%ecx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L199:
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L44
  addl   $0x1,-0x1c(%rbp)
L131:
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  cmp    %eax,-0x1c(%rbp)
  jl     L124
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L64
L74:
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  add    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  add    %eax,%ecx
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  add    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  add    %eax,%ecx
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L64:
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  cmp    %eax,-0x1c(%rbp)
  jl     L74
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x18(%rbp)
  jmp    L30
L26:
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  add    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  add    %eax,%ecx
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%ecx
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
L30:
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  cmp    %eax,-0x18(%rbp)
  jl     L26
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  jmp    L157
L91:
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  add    %eax,%ecx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%ecx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  add    %eax,%ecx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%ecx
  mov    -0x14(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L157:
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L91
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  add    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  add    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  add    %eax,%ecx
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  add    %eax,%ecx
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%ecx
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0xc(%rbp),%eax
  sub    -0x10(%rbp),%eax
  add    %eax,%ecx
  mov    -0x4(%rbp),%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  subl   $0x1,-0x10(%rbp)
L190:
  cmpl   $0x0,-0x10(%rbp)
  jg     L122
  mov    $0x2,%eax
  leave
  ret
```

assistant: ```c
int _p3dReplicatePadding3D_ushort2float(unsigned short *in_rev, float *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_ushort2float(in_rev, out_rev, dimx, dimy, dimz, size);
#pragma omp parallel for private(i, j, k)
  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))] = (float)out_rev[((j) * (a_dimx) + (i) + (ct) * (a_dimx) * (a_dimy))];
        out_rev[((j) * (a_dimx) + (i) + (a_dimz - ct) * (a_dimx) * (a_dimy))] = (float)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))] = (float)out_rev[((j) * (a_dimx) + (ct) + (k) * (a_dimx) * (a_dimy))];
        out_rev[((j) * (a_dimx) + (a_dimx - ct) + (k) * (a_dimx) * (a_dimy))] = (float)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))] = (float)out_rev[((ct) * (a_dimx) + (i) + (k) * (a_dimx) * (a_dimy))];
        out_rev[((a_dimy - ct) * (a_dimx) + (i) + (k) * (a_dimx) * (a_dimy))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)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))] = (float)out_rev[((a_dimy - 1 - ct) * (a_dimx) + (a_dimx - 1 - ct) + (a_dimz - 1 - ct) * (a_dimx) * (a_dimy))];
  }
  return 2;
}
```