// File: /workspace/github_cpp_makefile_star2_O3/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 0x5c1c3(%rip), %rsi     # 0x69572
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0xf8fc
movl $0x50, %edi
callq 0xb6f0
movq %rax, %r14
movl $0xa, %r13d
movl $0x1, %r12d
movsd 0x5bc2b(%rip), %xmm0    # 0x69008
movsd 0x5bc2b(%rip), %xmm1    # 0x69010
movl $0xa, %esi
movl $0x1, %edx
movq %rax, %rdi
callq 0xda80
leaq 0x5be3f(%rip), %rdi     # 0x6923d
movl $0xa, %edx
movl $0x1, %ecx
movq %r14, %rsi
xorl %eax, %eax
callq 0xb080
movl $0xa, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %r14, 0x18(%rsp)
callq 0x119ad
leaq 0x5bd56(%rip), %rsi     # 0x69186
movl $0xa, %edx
movq %rbx, %rdi
callq 0x10051
leaq 0x5bd48(%rip), %rsi     # 0x6918c
movl $0xa, %ecx
movl $0x1, %r8d
movq %rbx, %rdi
movq %r14, %rdx
callq 0x119b2
movl $0xa0, %edi
callq 0xb6f0
movq %rax, %r14
movl $0x2, %r15d
movsd 0x5bbbb(%rip), %xmm0    # 0x69030
movl $0xa, %esi
movl $0x2, %edx
movq %rax, %rdi
movsd 0x5bb86(%rip), %xmm1    # 0x69010
callq 0xda80
leaq 0x5bdcc(%rip), %rdi     # 0x69262
movl $0xa, %edx
movl $0x2, %ecx
movq %r14, %rsi
xorl %eax, %eax
callq 0xb080
movl $0xa, %esi
movl $0x2, %edx
movq %r14, %rdi
movq %r14, 0x10(%rsp)
callq 0x119ad
leaq 0x5bd16(%rip), %rsi     # 0x691de
movl $0xa, %edx
movq %rbx, %rdi
callq 0x10051
leaq 0x5bd08(%rip), %rsi     # 0x691e4
movl $0xa, %ecx
movl $0x2, %r8d
movq %rbx, %rdi
movq %r14, %rdx
callq 0x119b2
leaq 0x70(%rsp), %r14
movq %r13, (%r14)
leaq 0x68(%rsp), %rax
movq %r12, (%rax)
movl $0x1, %ebp
movl $0x50, %edi
callq 0xb6f0
movq %rax, %r12
leaq 0x8(%rsp), %rax
movq %r12, (%rax)
leaq 0x5bd64(%rip), %rdi     # 0x69287
movl $0xa, %edx
movl $0x1, %ecx
movq %r12, %rsi
xorl %eax, %eax
callq 0xb080
leaq 0x5bdc9(%rip), %rsi     # 0x69307
movl $0xa, %edx
movq %rbx, %rdi
callq 0x10051
leaq 0x5bdbe(%rip), %rsi     # 0x69310
movl $0xa, %ecx
movl $0x1, %r8d
movq %rbx, %rdi
movq %r12, %rdx
callq 0x119bc
leaq 0x60(%rsp), %rax
movq %r13, (%rax)
leaq 0x58(%rsp), %rax
movq %r15, (%rax)
movl $0x2, %r15d
movl $0xa0, %edi
callq 0xb6f0
movq %rax, %r12
leaq 0x50(%rsp), %rax
movq %r12, (%rax)
leaq 0x5bd15(%rip), %rdi     # 0x692af
movl $0xa, %edx
movl $0x2, %ecx
movq %r12, %rsi
xorl %eax, %eax
callq 0xb080
leaq 0x5bd92(%rip), %rsi     # 0x69347
movl $0xa, %edx
movq %rbx, %rdi
callq 0x10051
leaq 0x5bd87(%rip), %rsi     # 0x69350
movl $0xa, %ecx
movl $0x2, %r8d
movq %rbx, %rdi
movq %r12, %rdx
callq 0x119bc
leaq 0x48(%rsp), %rax
movq %r13, (%rax)
leaq 0x40(%rsp), %rax
movq %rbp, (%rax)
movl $0x50, %edi
callq 0xb6f0
movq %rax, %r12
leaq 0x38(%rsp), %rax
movq %r12, (%rax)
movsd 0x5ba2c(%rip), %xmm0    # 0x69038
movl $0xa, %esi
movl $0x1, %edx
movq %r12, %rdi
movsd 0x5b9ef(%rip), %xmm1    # 0x69010
callq 0xda80
leaq 0x5bcaa(%rip), %rdi     # 0x692d7
movl $0xa, %edx
movl $0x1, %ecx
movq %r12, %rsi
xorl %eax, %eax
callq 0xb080
movl $0xa, %esi
movl $0x1, %edx
movq %r12, %rdi
callq 0x119ad
leaq 0x5bcab(%rip), %rsi     # 0x69305
movl $0xa, %edx
movq %rbx, %rdi
callq 0x10051
leaq 0x5bca0(%rip), %rsi     # 0x6930e
movl $0xa, %ecx
movl $0x1, %r8d
movq %rbx, %rdi
movq %r12, %rdx
callq 0x119c6
leaq 0x30(%rsp), %rax
movq %r13, (%rax)
leaq 0x28(%rsp), %rax
movq %r15, (%rax)
movl $0xa0, %edi
callq 0xb6f0
movq %rax, %r12
leaq 0x20(%rsp), %rax
movq %r12, (%rax)
movsd 0x5b98f(%rip), %xmm0    # 0x69040
movl $0xa, %esi
movl $0x2, %edx
movq %r12, %rdi
movsd 0x5b94a(%rip), %xmm1    # 0x69010
callq 0xda80
leaq 0x5bc45(%rip), %rdi     # 0x69317
movl $0xa, %edx
movl $0x2, %ecx
movq %r12, %rsi
xorl %eax, %eax
callq 0xb080
movl $0xa, %esi
movl $0x2, %edx
movq %r12, %rdi
callq 0x119ad
leaq 0x5bc46(%rip), %rsi     # 0x69345
movl $0xa, %edx
movq %rbx, %rdi
callq 0x10051
leaq 0x5bc3b(%rip), %rsi     # 0x6934e
movl $0xa, %ecx
movl $0x2, %r8d
movq %rbx, %rdi
movq %r12, %rdx
callq 0x119c6
movq %rbx, %rdi
callq 0xfa4a
movq %rbx, %rdi
leaq 0x5bbd5(%rip), %rsi     # 0x69310
leaq 0x8(%rsp), %r12
movq %r12, %rdx
movq %r14, %rcx
leaq 0x68(%rsp), %r13
movq %r13, %r8
callq 0x119c1
movq (%r12), %rsi
movq (%r14), %rdx
movq (%r13), %rcx
leaq 0x5bb22(%rip), %rdi     # 0x69287
xorl %eax, %eax
callq 0xb080
movq (%r12), %rdi
movq (%r14), %rsi
movq (%r13), %rdx
callq 0x119ad
movq %rbx, %r12
movq %rbx, %rdi
leaq 0x5bbc7(%rip), %rsi     # 0x69350
leaq 0x50(%rsp), %r13
movq %r13, %rdx
leaq 0x60(%rsp), %r14
movq %r14, %rcx
leaq 0x58(%rsp), %rbp
movq %rbp, %r8
callq 0x119c1
movq (%r13), %rsi
movq (%r14), %rdx
movq (%rbp), %rcx
leaq 0x5baf7(%rip), %rdi     # 0x692af
xorl %eax, %eax
callq 0xb080
movq (%r13), %rdi
movq (%r14), %rsi
movq (%rbp), %rdx
callq 0x119ad
movq %rbx, %rdi
leaq 0x5bb35(%rip), %rsi     # 0x6930e
leaq 0x38(%rsp), %r14
movq %r14, %rdx
leaq 0x48(%rsp), %rbp
movq %rbp, %rcx
leaq 0x40(%rsp), %r15
movq %r15, %r8
callq 0x119c1
movq (%r14), %rsi
movq (%rbp), %rdx
movq (%r15), %rcx
leaq 0x5bad0(%rip), %rdi     # 0x692d7
xorl %eax, %eax
callq 0xb080
movq (%r14), %rdi
movq (%rbp), %rsi
movq (%r15), %rdx
callq 0x119ad
movq %rbx, %rdi
leaq 0x5bb27(%rip), %rsi     # 0x6934e
leaq 0x20(%rsp), %r15
movq %r15, %rdx
leaq 0x30(%rsp), %rbp
movq %rbp, %rcx
leaq 0x28(%rsp), %rbx
movq %rbx, %r8
callq 0x119c1
movq (%r15), %rsi
movq (%rbp), %rdx
movq (%rbx), %rcx
leaq 0x5bac2(%rip), %rdi     # 0x69317
xorl %eax, %eax
callq 0xb080
movq (%r15), %rdi
movq (%rbp), %rsi
movq (%rbx), %rdx
callq 0x119ad
movq 0x18(%rsp), %rdi
callq 0xb650
movq 0x10(%rsp), %rdi
callq 0xb650
leaq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0xb650
movq (%r13), %rdi
callq 0xb650
movq (%r14), %rdi
callq 0xb650
movq (%r15), %rdi
callq 0xb650
movq 0x7e6f4(%rip), %r15     # 0x8bfa0
movq (%r15), %rdi
leaq 0x5b7bc(%rip), %rsi     # 0x69072
leaq 0x5ba9a(%rip), %rdx     # 0x69357
xorl %eax, %eax
callq 0xb7a0
movq (%r15), %r14
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10a7d
leaq 0x5be97(%rip), %rsi     # 0x69771
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xb7a0
movq (%r15), %rsi
movl $0xa, %edi
callq 0xb690
movq %r12, %rdi
callq 0xf9c1
addq $0xc28, %rsp            # imm = 0xC28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq