// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_call.cc
// Function: void redirect_call_put_input_param_blocks_val<float>(_redirect_call_t*, char const*, float const*, long, long, long)
static void redirect_call_put_input_param_blocks_val(redirect_call_t *rc, const char *id, const T *b, rdint_t count, rdint_t size, rdint_t stride)
{
  TRACE_F("rc: %p, id: '%s', b: %p, count: %" rdint_fmt ", size: %" rdint_fmt ", stride: %" rdint_fmt, rc, id, b, count, size, stride);

  /* client only */
  ASSERT(rc->client);

  bool transfer_dense = false;
  rdint_t send_stride = stride;
  rdint_t transfer_stride = stride;

  if (size < stride)
  {
#if REDIRECT_CALL_INPUT_PARAM_BLOCKS == REDIRECT_CALL_BLOCKS_PLAIN
    TRACE_F("transfer plain");
    transfer_dense = true;
    send_stride = stride;
    transfer_stride = stride;
#elif REDIRECT_CALL_INPUT_PARAM_BLOCKS == REDIRECT_CALL_BLOCKS_PACK_IP
    TRACE_F("transform in-place to stride %" rdint_fmt, size);
    redirect_data_blocks_transform_val<T>(count, size, stride, const_cast<T *>(b), size, NULL);
    transfer_dense = true;
    send_stride = size;
    transfer_stride = size;
#elif REDIRECT_CALL_INPUT_PARAM_BLOCKS == REDIRECT_CALL_BLOCKS_PACK_OP
    TRACE_F("transform out-of-place to stride %" rdint_fmt, size);
    T *b_tmp = static_cast<T *>(redirect_call_alloc_buf(rc, count * size * sizeof(T)));
    redirect_data_blocks_transform_val<T>(count, size, stride, const_cast<T *>(b), size, b_tmp);
    b = b_tmp;
    transfer_dense = true;
    send_stride = size;
    transfer_stride = size;
#elif REDIRECT_CALL_INPUT_PARAM_BLOCKS == REDIRECT_CALL_BLOCKS_PIECES
    TRACE_F("process in pieces");
    transfer_dense = false;
    send_stride = stride;
    transfer_stride = size;
#endif
  }

  TRACE_F("send stride: %" rdint_fmt ", transfer stride: %" rdint_fmt, send_stride, transfer_stride);
  redirect_call_put_input_conf_rdint(rc, "stride", transfer_stride);

  if (size >= send_stride || transfer_dense)
  {
    TRACE_F("dense: %" rdint_fmt, get_blocks_cont_size(count, size, send_stride));
    register_param_dense<T>(rc, b, get_blocks_cont_size(count, size, send_stride));

  } else
  {
    TRACE_F("blocks: %" rdint_fmt " x %" rdint_fmt " / %" rdint_fmt, count, size, send_stride);
    register_param_blocks<T>(rc, b, count, size, send_stride);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movq %r8, %r13
movq %rcx, (%rsp)
movq %rdx, %rbx
movq %rsi, %rbp
movq %rdi, %r14
movq 0x79357(%rip), %r12     # 0x8bfa0
movq (%r12), %rdi
leaq 0x56bb5(%rip), %rsi     # 0x69809
leaq 0x570db(%rip), %rdx     # 0x69d36
xorl %eax, %eax
callq 0xb7a0
movq (%r12), %rdi
leaq 0x570f2(%rip), %rsi     # 0x69d5f
movq %r14, %rdx
movq %rbp, %rcx
movq %rbx, 0x10(%rsp)
movq %rbx, %r8
movq %r12, %rbx
movq (%rsp), %r12
movq %r12, %r9
xorl %eax, %eax
pushq %r15
pushq %r13
callq 0xb7a0
addq $0x10, %rsp
movq (%rbx), %rsi
movl $0xa, %edi
callq 0xb690
movq %r14, 0x8(%rsp)
cmpl $0x0, (%r14)
je 0x12dc0
cmpq %r15, %r13
jge 0x12cf3
movq (%rbx), %rdi
leaq 0x56b4a(%rip), %rsi     # 0x69809
leaq 0x57070(%rip), %rdx     # 0x69d36
xorl %eax, %eax
callq 0xb7a0
movq (%rbx), %rcx
leaq 0x570c4(%rip), %rdi     # 0x69d9b
movl $0xe, %esi
movl $0x1, %edx
callq 0xba90
movq (%rbx), %rsi
movl $0xa, %edi
callq 0xb690
leaq -0x1(%r12), %rax
imulq %r15, %rax
addq %r13, %rax
testq %r13, %r13
cmoveq %r13, %rax
cmpq $0x1, %r12
movq (%rbx), %rdi
leaq 0x57022(%rip), %rdx     # 0x69d36
leaq 0x56aee(%rip), %rbp     # 0x69809
movl $0x0, %r12d
cmovaeq %rax, %r12
movq %rbp, %rsi
xorl %eax, %eax
callq 0xb7a0
movq (%rbx), %rdi
leaq 0x57071(%rip), %rsi     # 0x69daa
movq %r15, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xb7a0
movq (%rbx), %rsi
leaq 0x57081(%rip), %r13     # 0x69dd1
movl $0xa, %edi
callq 0xb690
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x100a9
movq (%rbx), %rdi
movq %rbp, %rsi
leaq 0x56fbc(%rip), %rdx     # 0x69d36
xorl %eax, %eax
callq 0xb7a0
movq (%rbx), %rdi
leaq 0x570cb(%rip), %rsi     # 0x69e56
movq %r12, %rdx
xorl %eax, %eax
callq 0xb7a0
movq (%rbx), %rsi
movl $0xa, %edi
callq 0xb690
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12516
callq 0xbfbc
jmp 0x12cb0