// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/test/units/redirect/redirect_cli.c
// Function: test_param_vector
void test_param_vector(const char *uri)
{
  redirect_call_t rc;

  redirect_call_create_scdc(&rc, "param_vector", uri);

  /* input */
#if REDIRECT_TEST_PARAM_VECTOR_INPUT
  rdint_t in_n0 = 10, in_inc0 = 1;
  double *in_v0 = malloc(in_n0 * in_inc0 * sizeof(*in_v0));
  vector_init(in_v0, in_n0, in_inc0, 1.0, NAN);
  printf("in_v0: %p, in_n0: %" rdint_fmt ", in_inc0: %" rdint_fmt "\n", in_v0, in_n0, in_inc0);
  redirect_call_print_param_vector_double(in_v0, in_n0, in_inc0);
  redirect_call_put_input_conf_rdint(&rc, "in_n0", in_n0);
  redirect_call_put_input_param_vector_double(&rc, "in_v0", in_v0, in_n0, in_inc0);

  rdint_t in_n1 = 10, in_inc1 = 2;
  double *in_v1 = malloc(in_n1 * in_inc1 * sizeof(*in_v1));
  vector_init(in_v1, in_n1, in_inc1, 2.0, NAN);
  printf("in_v1: %p, in_n1: %" rdint_fmt ", in_inc1: %" rdint_fmt "\n", in_v1, in_n1, in_inc1);
  redirect_call_print_param_vector_double(in_v1, in_n1, in_inc1);
  redirect_call_put_input_conf_rdint(&rc, "in_n1", in_n1);
  redirect_call_put_input_param_vector_double(&rc, "in_v1", in_v1, in_n1, in_inc1);
#endif /* REDIRECT_TEST_PARAM_VECTOR_INPUT */

  /* output */
#if REDIRECT_TEST_PARAM_VECTOR_OUTPUT
  rdint_t out_n0 = 10, out_inc0 = 1;
  double *out_v0 = malloc(out_n0 * out_inc0 * sizeof(*out_v0));
  printf("out_v0: %p, out_n0: %" rdint_fmt ", out_inc0: %" rdint_fmt "\n", out_v0, out_n0, out_inc0);
  redirect_call_put_input_conf_rdint(&rc, "out_n0", out_n0);
  redirect_call_put_output_param_vector_double(&rc, "out_v0", out_v0, out_n0, out_inc0);

  rdint_t out_n1 = 10, out_inc1 = 2;
  double *out_v1 = malloc(out_n1 * out_inc1 * sizeof(*out_v1));
  printf("out_v1: %p, out_n1: %" rdint_fmt ", out_inc1: %" rdint_fmt "\n", out_v1, out_n1, out_inc1);
  redirect_call_put_input_conf_rdint(&rc, "out_n1", out_n1);
  redirect_call_put_output_param_vector_double(&rc, "out_v1", out_v1, out_n1, out_inc1);
#endif

  /* inout */
#if REDIRECT_TEST_PARAM_VECTOR_INOUT
  rdint_t inout_n0 = 10, inout_inc0 = 1;
  double *inout_v0 = malloc(inout_n0 * inout_inc0 * sizeof(*inout_v0));
  vector_init(inout_v0, inout_n0, inout_inc0, 3.0, NAN);
  printf("inout_v0: %p, inout_n0: %" rdint_fmt ", inout_inc0: %" rdint_fmt "\n", inout_v0, inout_n0, inout_inc0);
  redirect_call_print_param_vector_double(inout_v0, inout_n0, inout_inc0);
  redirect_call_put_input_conf_rdint(&rc, "inout_n0", inout_n0);
  redirect_call_put_inout_param_vector_double(&rc, "inout_v0", inout_v0, inout_n0, inout_inc0);

  rdint_t inout_n1 = 10, inout_inc1 = 2;
  double *inout_v1 = malloc(inout_n1 * inout_inc1 * sizeof(*inout_v1));
  vector_init(inout_v1, inout_n1, inout_inc1, 4.0, NAN);
  printf("inout_v1: %p, inout_n1: %" rdint_fmt ", inout_inc1: %" rdint_fmt "\n", inout_v1, inout_n1, inout_inc1);
  redirect_call_print_param_vector_double(inout_v1, inout_n1, inout_inc1);
  redirect_call_put_input_conf_rdint(&rc, "inout_n1", inout_n1);
  redirect_call_put_inout_param_vector_double(&rc, "inout_v1", inout_v1, inout_n1, inout_inc1);
#endif /* REDIRECT_TEST_PARAM_VECTOR_INOUT */

  redirect_call_execute(&rc);

  /* output */
#if REDIRECT_TEST_PARAM_VECTOR_OUTPUT
  redirect_call_get_output_param_vector_double(&rc, "out_v0", &out_v0, &out_n0, &out_inc0);
  printf("out_v0: %p, out_n0: %" rdint_fmt ", out_inc0: %" rdint_fmt "\n", out_v0, out_n0, out_inc0);
  redirect_call_print_param_vector_double(out_v0, out_n0, out_inc0);

  redirect_call_get_output_param_vector_double(&rc, "out_v1", &out_v1, &out_n1, &out_inc1);
  printf("out_v1: %p, out_n1: %" rdint_fmt ", out_inc1: %" rdint_fmt "\n", out_v1, out_n1, out_inc1);
  redirect_call_print_param_vector_double(out_v1, out_n1, out_inc1);
#endif /* REDIRECT_TEST_PARAM_VECTOR_OUTPUT */

  /* inout */
#if REDIRECT_TEST_PARAM_VECTOR_INOUT
  redirect_call_get_output_param_vector_double(&rc, "inout_v0", &inout_v0, &inout_n0, &inout_inc0);
  printf("inout_v0: %p, inout_n0: %" rdint_fmt ", inout_inc0: %" rdint_fmt "\n", inout_v0, inout_n0, inout_inc0);
  redirect_call_print_param_vector_double(inout_v0, inout_n0, inout_inc0);

  redirect_call_get_output_param_vector_double(&rc, "inout_v1", &inout_v1, &inout_n1, &inout_inc1);
  printf("inout_v1: %p, inout_n1: %" rdint_fmt ", inout_inc1: %" rdint_fmt "\n", inout_v1, inout_n1, inout_inc1);
  redirect_call_print_param_vector_double(inout_v1, inout_n1, inout_inc1);
#endif /* REDIRECT_TEST_PARAM_VECTOR_INOUT */

#if REDIRECT_TEST_PARAM_VECTOR_INPUT
  free(in_v0);
  free(in_v1);
#endif /* REDIRECT_TEST_PARAM_VECTOR_INPUT */
#if REDIRECT_TEST_PARAM_VECTOR_OUTPUT
  free(out_v0);
  free(out_v1);
#endif /* REDIRECT_TEST_PARAM_VECTOR_OUTPUT */
#if REDIRECT_TEST_PARAM_VECTOR_INOUT
  free(inout_v0);
  free(inout_v1);
#endif /* REDIRECT_TEST_PARAM_VECTOR_INOUT */

  TRACE_F("result: '%s'", redirect_call_get_result_str(&rc, NULL, 0));

  redirect_call_destroy_scdc(&rc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc28, %rsp            # imm = 0xC28
movq %rdi, %rdx
leaq 0x43a9a(%rip), %rsi     # 0x50552
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0xed28
pushq $0x50
popq %r15
movq %r15, %rdi
callq 0xb720
movq %rax, %r14
pushq $0xa
popq %r13
pushq $0x1
popq %r12
movsd 0x43524(%rip), %xmm0    # 0x50008
movsd 0x43524(%rip), %xmm1    # 0x50010
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xd144
leaq 0x4373c(%rip), %rdi     # 0x5023d
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xb070
movq %r14, %rdi
movq %r14, 0x10(%rsp)
movq %r13, %rsi
movq %r12, %rdx
callq 0x10a23
leaq 0x4365b(%rip), %rsi     # 0x50186
movq %rbx, %rdi
movq %r13, %rdx
callq 0xf486
leaq 0x4364f(%rip), %rsi     # 0x5018c
movq %rbx, %rdi
movq %r14, %rdx
movq %r13, %rcx
movq %r12, %r8
callq 0x10a28
movl $0xa0, %edi
callq 0xb720
movq %rax, %r14
pushq $0x2
popq %rbp
movsd 0x434c2(%rip), %xmm0    # 0x50028
movq %rax, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movsd 0x43499(%rip), %xmm1    # 0x50010
callq 0xd144
leaq 0x436df(%rip), %rdi     # 0x50262
movq %r14, %rsi
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0xb070
movq %r14, %rdi
movq %r14, 0x8(%rsp)
movq %r13, %rsi
movq %rbp, %rdx
callq 0x10a23
leaq 0x43631(%rip), %rsi     # 0x501de
movq %rbx, %rdi
movq %r13, %rdx
callq 0xf486
leaq 0x43625(%rip), %rsi     # 0x501e4
movq %rbx, %rdi
movq %r14, %rdx
movq %r13, %rcx
movq %rbp, %r8
callq 0x10a28
leaq 0x70(%rsp), %rax
movq %r13, (%rax)
leaq 0x68(%rsp), %rax
movq %r12, (%rax)
movq %r15, %rdi
callq 0xb720
movq %rax, %r14
leaq 0x60(%rsp), %rax
movq %r14, (%rax)
leaq 0x4368d(%rip), %rdi     # 0x50287
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xb070
leaq 0x436f6(%rip), %rsi     # 0x50307
movq %rbx, %rdi
movq %r13, %rdx
callq 0xf486
leaq 0x436ed(%rip), %rsi     # 0x50310
movq %rbx, %rdi
movq %r14, %rdx
movq %r13, %rcx
movq %r12, %r8
callq 0x10a32
leaq 0x58(%rsp), %rax
movq %r13, (%rax)
leaq 0x50(%rsp), %rax
movq %rbp, (%rax)
movl $0xa0, %edi
callq 0xb720
movq %rax, %r14
leaq 0x48(%rsp), %rax
movq %r14, (%rax)
leaq 0x4364f(%rip), %rdi     # 0x502af
movq %r14, %rsi
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0xb070
leaq 0x436d0(%rip), %rsi     # 0x50347
movq %rbx, %rdi
movq %r13, %rdx
callq 0xf486
leaq 0x436c7(%rip), %rsi     # 0x50350
movq %rbx, %rdi
movq %r14, %rdx
movq %r13, %rcx
movq %rbp, %r8
callq 0x10a32
leaq 0x40(%rsp), %rax
movq %r13, (%rax)
leaq 0x38(%rsp), %rax
movq %r12, (%rax)
movq %r15, %rdi
callq 0xb720
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq %r14, (%rax)
movsd 0x4336b(%rip), %xmm0    # 0x50030
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
movsd 0x4333a(%rip), %xmm1    # 0x50010
callq 0xd144
leaq 0x435f5(%rip), %rdi     # 0x502d7
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0xb070
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x10a23
leaq 0x435fe(%rip), %rsi     # 0x50305
movq %rbx, %rdi
movq %r13, %rdx
callq 0xf486
leaq 0x435f5(%rip), %rsi     # 0x5030e
movq %rbx, %rdi
movq %r14, %rdx
movq %r13, %rcx
movq %r12, %r8
callq 0x10a3c
leaq 0x28(%rsp), %rax
movq %r13, (%rax)
leaq 0x20(%rsp), %rax
movq %rbp, (%rax)
movl $0xa0, %edi
callq 0xb720
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq %r14, (%rax)
movsd 0x432e1(%rip), %xmm0    # 0x50038
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movsd 0x432a8(%rip), %xmm1    # 0x50010
callq 0xd144
leaq 0x435a3(%rip), %rdi     # 0x50317
movq %r14, %rsi
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0xb070
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x10a23
leaq 0x435ac(%rip), %rsi     # 0x50345
movq %rbx, %rdi
movq %r13, %rdx
callq 0xf486
leaq 0x435a3(%rip), %rsi     # 0x5034e
movq %rbx, %rdi
movq %r14, %rdx
movq %r13, %rcx
movq %rbp, %r8
callq 0x10a3c
movq %rbx, %rdi
callq 0xee69
movq %rbx, %rdi
leaq 0x43542(%rip), %rsi     # 0x50310
leaq 0x60(%rsp), %r14
movq %r14, %rdx
leaq 0x70(%rsp), %r13
movq %r13, %rcx
leaq 0x68(%rsp), %rbp
movq %rbp, %r8
callq 0x10a37
movq (%r14), %rsi
movq (%r13), %rdx
movq (%rbp), %rcx
leaq 0x4348a(%rip), %rdi     # 0x50287
xorl %eax, %eax
callq 0xb070
movq (%r14), %rdi
movq (%r13), %rsi
movq (%rbp), %rdx
callq 0x10a23
movq %rbx, %rdi
leaq 0x43532(%rip), %rsi     # 0x50350
leaq 0x48(%rsp), %r13
movq %r13, %rdx
leaq 0x58(%rsp), %rbp
movq %rbp, %rcx
leaq 0x50(%rsp), %r12
movq %r12, %r8
callq 0x10a37
movq (%r13), %rsi
movq (%rbp), %rdx
movq (%r12), %rcx
leaq 0x43461(%rip), %rdi     # 0x502af
xorl %eax, %eax
callq 0xb070
movq (%r13), %rdi
movq (%rbp), %rsi
movq (%r12), %rdx
callq 0x10a23
movq %rbx, %rdi
leaq 0x4349e(%rip), %rsi     # 0x5030e
leaq 0x30(%rsp), %rbp
movq %rbp, %rdx
leaq 0x40(%rsp), %r12
movq %r12, %rcx
leaq 0x38(%rsp), %r15
movq %r15, %r8
callq 0x10a37
movq (%rbp), %rsi
movq (%r12), %rdx
movq (%r15), %rcx
leaq 0x43438(%rip), %rdi     # 0x502d7
xorl %eax, %eax
callq 0xb070
movq (%rbp), %rdi
movq (%r12), %rsi
movq (%r15), %rdx
callq 0x10a23
movq %rbx, %rdi
leaq 0x4348e(%rip), %rsi     # 0x5034e
leaq 0x18(%rsp), %r15
movq %r15, %rdx
leaq 0x28(%rsp), %r12
movq %r12, %rcx
leaq 0x20(%rsp), %rbx
movq %rbx, %r8
callq 0x10a37
movq (%r15), %rsi
movq (%r12), %rdx
movq (%rbx), %rcx
leaq 0x43429(%rip), %rdi     # 0x50317
xorl %eax, %eax
callq 0xb070
movq (%r15), %rdi
movq (%r12), %rsi
movq (%rbx), %rdx
callq 0x10a23
movq 0x10(%rsp), %rdi
callq 0xb670
movq 0x8(%rsp), %rdi
callq 0xb670
movq (%r14), %rdi
callq 0xb670
movq (%r13), %rdi
callq 0xb670
movq (%rbp), %rdi
callq 0xb670
movq (%r15), %rdi
callq 0xb670
movq 0x68077(%rip), %r15     # 0x74fb8
movq (%r15), %rdi
leaq 0x43127(%rip), %rsi     # 0x50072
leaq 0x43405(%rip), %rdx     # 0x50357
xorl %eax, %eax
callq 0xb7c0
movq (%r15), %r14
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xfc63
leaq 0x437dd(%rip), %rsi     # 0x50751
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xb7c0
movq (%r15), %rsi
pushq $0xa
popq %rdi
callq 0xb6b0
movq %rbx, %rdi
callq 0xede5
addq $0xc28, %rsp            # imm = 0xC28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq