// File: 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
movq %rsp, %rbp
subq $0xc50, %rsp            # imm = 0xC50
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdx
leaq -0xbb8(%rbp), %rdi
leaq 0x970c9(%rip), %rsi     # 0xa555a
callq 0x118e0
movq $0xa, -0xbc0(%rbp)
movq $0x1, -0xbc8(%rbp)
movq -0xbc0(%rbp), %rdi
imulq -0xbc8(%rbp), %rdi
shlq $0x3, %rdi
callq 0xc900
movq %rax, -0xbd0(%rbp)
movq -0xbd0(%rbp), %rdi
movq -0xbc0(%rbp), %rsi
movq -0xbc8(%rbp), %rdx
movsd 0x96b28(%rip), %xmm0    # 0xa5010
movsd 0x96b28(%rip), %xmm1    # 0xa5018
callq 0xedd0
movq -0xbd0(%rbp), %rsi
movq -0xbc0(%rbp), %rdx
movq -0xbc8(%rbp), %rcx
leaq 0x96d2c(%rip), %rdi     # 0xa523d
movb $0x0, %al
callq 0xcd30
movq -0xbd0(%rbp), %rdi
movq -0xbc0(%rbp), %rsi
movq -0xbc8(%rbp), %rdx
callq 0x14f10
movq -0xbc0(%rbp), %rdx
leaq -0xbb8(%rbp), %rdi
leaq 0x96c3f(%rip), %rsi     # 0xa5186
callq 0x12550
movq -0xbd0(%rbp), %rdx
movq -0xbc0(%rbp), %rcx
movq -0xbc8(%rbp), %r8
leaq -0xbb8(%rbp), %rdi
leaq 0x96c1d(%rip), %rsi     # 0xa518c
callq 0x14f40
movq $0xa, -0xbd8(%rbp)
movq $0x2, -0xbe0(%rbp)
movq -0xbd8(%rbp), %rdi
imulq -0xbe0(%rbp), %rdi
shlq $0x3, %rdi
callq 0xc900
movq %rax, -0xbe8(%rbp)
movq -0xbe8(%rbp), %rdi
movq -0xbd8(%rbp), %rsi
movq -0xbe0(%rbp), %rdx
movsd 0x96a5a(%rip), %xmm0    # 0xa5020
movsd 0x96a4a(%rip), %xmm1    # 0xa5018
callq 0xedd0
movq -0xbe8(%rbp), %rsi
movq -0xbd8(%rbp), %rdx
movq -0xbe0(%rbp), %rcx
leaq 0x96c73(%rip), %rdi     # 0xa5262
movb $0x0, %al
callq 0xcd30
movq -0xbe8(%rbp), %rdi
movq -0xbd8(%rbp), %rsi
movq -0xbe0(%rbp), %rdx
callq 0x14f10
movq -0xbd8(%rbp), %rdx
leaq -0xbb8(%rbp), %rdi
leaq 0x96bb9(%rip), %rsi     # 0xa51de
callq 0x12550
movq -0xbe8(%rbp), %rdx
movq -0xbd8(%rbp), %rcx
movq -0xbe0(%rbp), %r8
leaq -0xbb8(%rbp), %rdi
leaq 0x96b97(%rip), %rsi     # 0xa51e4
callq 0x14f40
movq $0xa, -0xbf0(%rbp)
movq $0x1, -0xbf8(%rbp)
movq -0xbf0(%rbp), %rdi
imulq -0xbf8(%rbp), %rdi
shlq $0x3, %rdi
callq 0xc900
movq %rax, -0xc00(%rbp)
movq -0xc00(%rbp), %rsi
movq -0xbf0(%rbp), %rdx
movq -0xbf8(%rbp), %rcx
leaq 0x96be4(%rip), %rdi     # 0xa5287
movb $0x0, %al
callq 0xcd30
movq -0xbf0(%rbp), %rdx
leaq -0xbb8(%rbp), %rdi
leaq 0x96c48(%rip), %rsi     # 0xa5307
callq 0x12550
movq -0xc00(%rbp), %rdx
movq -0xbf0(%rbp), %rcx
movq -0xbf8(%rbp), %r8
leaq -0xbb8(%rbp), %rdi
leaq 0x96c29(%rip), %rsi     # 0xa5310
callq 0x14fc0
movq $0xa, -0xc08(%rbp)
movq $0x2, -0xc10(%rbp)
movq -0xc08(%rbp), %rdi
imulq -0xc10(%rbp), %rdi
shlq $0x3, %rdi
callq 0xc900
movq %rax, -0xc18(%rbp)
movq -0xc18(%rbp), %rsi
movq -0xc08(%rbp), %rdx
movq -0xc10(%rbp), %rcx
leaq 0x96b72(%rip), %rdi     # 0xa52af
movb $0x0, %al
callq 0xcd30
movq -0xc08(%rbp), %rdx
leaq -0xbb8(%rbp), %rdi
leaq 0x96bee(%rip), %rsi     # 0xa5347
callq 0x12550
movq -0xc18(%rbp), %rdx
movq -0xc08(%rbp), %rcx
movq -0xc10(%rbp), %r8
leaq -0xbb8(%rbp), %rdi
leaq 0x96bcf(%rip), %rsi     # 0xa5350
callq 0x14fc0
movq $0xa, -0xc20(%rbp)
movq $0x1, -0xc28(%rbp)
movq -0xc20(%rbp), %rdi
imulq -0xc28(%rbp), %rdi
shlq $0x3, %rdi
callq 0xc900
movq %rax, -0xc30(%rbp)
movq -0xc30(%rbp), %rdi
movq -0xc20(%rbp), %rsi
movq -0xc28(%rbp), %rdx
movsd 0x96858(%rip), %xmm0    # 0xa5030
movsd 0x96838(%rip), %xmm1    # 0xa5018
callq 0xedd0
movq -0xc30(%rbp), %rsi
movq -0xc20(%rbp), %rdx
movq -0xc28(%rbp), %rcx
leaq 0x96ad6(%rip), %rdi     # 0xa52d7
movb $0x0, %al
callq 0xcd30
movq -0xc30(%rbp), %rdi
movq -0xc20(%rbp), %rsi
movq -0xc28(%rbp), %rdx
callq 0x14f10
movq -0xc20(%rbp), %rdx
leaq -0xbb8(%rbp), %rdi
leaq 0x96ace(%rip), %rsi     # 0xa5305
callq 0x12550
movq -0xc30(%rbp), %rdx
movq -0xc20(%rbp), %rcx
movq -0xc28(%rbp), %r8
leaq -0xbb8(%rbp), %rdi
leaq 0x96aaf(%rip), %rsi     # 0xa530e
callq 0x15040
movq $0xa, -0xc38(%rbp)
movq $0x2, -0xc40(%rbp)
movq -0xc38(%rbp), %rdi
imulq -0xc40(%rbp), %rdi
shlq $0x3, %rdi
callq 0xc900
movq %rax, -0xc48(%rbp)
movq -0xc48(%rbp), %rdi
movq -0xc38(%rbp), %rsi
movq -0xc40(%rbp), %rdx
movsd 0x96772(%rip), %xmm0    # 0xa5028
movsd 0x9675a(%rip), %xmm1    # 0xa5018
callq 0xedd0
movq -0xc48(%rbp), %rsi
movq -0xc38(%rbp), %rdx
movq -0xc40(%rbp), %rcx
leaq 0x96a38(%rip), %rdi     # 0xa5317
movb $0x0, %al
callq 0xcd30
movq -0xc48(%rbp), %rdi
movq -0xc38(%rbp), %rsi
movq -0xc40(%rbp), %rdx
callq 0x14f10
movq -0xc38(%rbp), %rdx
leaq -0xbb8(%rbp), %rdi
leaq 0x96a30(%rip), %rsi     # 0xa5345
callq 0x12550
movq -0xc48(%rbp), %rdx
movq -0xc38(%rbp), %rcx
movq -0xc40(%rbp), %r8
leaq -0xbb8(%rbp), %rdi
leaq 0x96a11(%rip), %rsi     # 0xa534e
callq 0x15040
leaq -0xbb8(%rbp), %rdi
callq 0x11af0
leaq -0xbb8(%rbp), %rdi
leaq 0x969b4(%rip), %rsi     # 0xa5310
leaq -0xc00(%rbp), %rdx
leaq -0xbf0(%rbp), %rcx
leaq -0xbf8(%rbp), %r8
callq 0x15000
movq -0xc00(%rbp), %rsi
movq -0xbf0(%rbp), %rdx
movq -0xbf8(%rbp), %rcx
leaq 0x968f5(%rip), %rdi     # 0xa5287
movb $0x0, %al
callq 0xcd30
movq -0xc00(%rbp), %rdi
movq -0xbf0(%rbp), %rsi
movq -0xbf8(%rbp), %rdx
callq 0x14f10
leaq -0xbb8(%rbp), %rdi
leaq 0x9698f(%rip), %rsi     # 0xa5350
leaq -0xc18(%rbp), %rdx
leaq -0xc08(%rbp), %rcx
leaq -0xc10(%rbp), %r8
callq 0x15000
movq -0xc18(%rbp), %rsi
movq -0xc08(%rbp), %rdx
movq -0xc10(%rbp), %rcx
leaq 0x968b8(%rip), %rdi     # 0xa52af
movb $0x0, %al
callq 0xcd30
movq -0xc18(%rbp), %rdi
movq -0xc08(%rbp), %rsi
movq -0xc10(%rbp), %rdx
callq 0x14f10
leaq -0xbb8(%rbp), %rdi
leaq 0x968e8(%rip), %rsi     # 0xa530e
leaq -0xc30(%rbp), %rdx
leaq -0xc20(%rbp), %rcx
leaq -0xc28(%rbp), %r8
callq 0x15000
movq -0xc30(%rbp), %rsi
movq -0xc20(%rbp), %rdx
movq -0xc28(%rbp), %rcx
leaq 0x9687b(%rip), %rdi     # 0xa52d7
movb $0x0, %al
callq 0xcd30
movq -0xc30(%rbp), %rdi
movq -0xc20(%rbp), %rsi
movq -0xc28(%rbp), %rdx
callq 0x14f10
leaq -0xbb8(%rbp), %rdi
leaq 0x968c3(%rip), %rsi     # 0xa534e
leaq -0xc48(%rbp), %rdx
leaq -0xc38(%rbp), %rcx
leaq -0xc40(%rbp), %r8
callq 0x15000
movq -0xc48(%rbp), %rsi
movq -0xc38(%rbp), %rdx
movq -0xc40(%rbp), %rcx
leaq 0x96856(%rip), %rdi     # 0xa5317
movb $0x0, %al
callq 0xcd30
movq -0xc48(%rbp), %rdi
movq -0xc38(%rbp), %rsi
movq -0xc40(%rbp), %rdx
callq 0x14f10
movq -0xbd0(%rbp), %rdi
callq 0xc830
movq -0xbe8(%rbp), %rdi
callq 0xc830
movq -0xc00(%rbp), %rdi
callq 0xc830
movq -0xc18(%rbp), %rdi
callq 0xc830
movq -0xc30(%rbp), %rdi
callq 0xc830
movq -0xc48(%rbp), %rdi
callq 0xc830
movq 0xc547f(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96537(%rip), %rsi     # 0xa5072
leaq 0x96815(%rip), %rdx     # 0xa5357
movb $0x0, %al
callq 0xc9a0
movq 0xc5460(%rip), %rax     # 0xd3fb0
movq (%rax), %rax
movq %rax, -0xc50(%rbp)
leaq -0xbb8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x13700
movq -0xc50(%rbp), %rdi
movq %rax, %rdx
leaq 0x96bdb(%rip), %rsi     # 0xa5759
movb $0x0, %al
callq 0xc9a0
movq 0xc5424(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96d12(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
leaq -0xbb8(%rbp), %rdi
callq 0x11a50
addq $0xc50, %rsp            # imm = 0xC50
popq %rbp
retq
nopw %cs:(%rax,%rax)