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

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

  rdint_t in_n = 10;
  double *in_v = malloc(in_n * sizeof(*in_v));
  vector_init(in_v, in_n, 1, 1.0, NAN);
  printf("in_v: %p, in_n: %" rdint_fmt "\n", in_v, in_n);
  redirect_call_print_param_array_double(in_v, in_n);
  redirect_call_put_input_conf_rdint(&rc, "in_n", in_n);
  redirect_call_put_input_param_array_double(&rc, "in_v", in_v, in_n);

  rdint_t out_n = 10;
  double *out_v = malloc(out_n * sizeof(*out_v));
  printf("out_v: %p, out_n: %" rdint_fmt "\n", out_v, out_n);
  redirect_call_put_input_conf_rdint(&rc, "out_n", out_n);
  redirect_call_put_output_param_array_double(&rc, "out_v", out_v, out_n);

  redirect_call_execute(&rc);

  redirect_call_get_output_param_array_double(&rc, "out_v", &out_v, &out_n);
  printf("out_v: %p, out_n: %" rdint_fmt "\n", out_v, out_n);
  redirect_call_print_param_array_double(out_v, out_n);

  free(in_v);
  free(out_v);

  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 $0xbc8, %rsp            # imm = 0xBC8
movq %rdi, %rdx
leaq 0x5c372(%rip), %rsi     # 0x69563
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0xf8fc
movl $0x50, %edi
callq 0xb6f0
movq %rax, %r14
movsd 0x5bdf5(%rip), %xmm0    # 0x69008
movsd 0x5bdf5(%rip), %xmm1    # 0x69010
movl $0xa, %esi
movl $0x1, %edx
movq %rax, %rdi
callq 0xda80
leaq 0x5bfd9(%rip), %rdi     # 0x6920d
movl $0xa, %edx
movq %r14, %rsi
xorl %eax, %eax
callq 0xb080
movl $0xa, %esi
movq %r14, %rdi
callq 0x11969
leaq 0x5bfcb(%rip), %rsi     # 0x69222
movl $0xa, %edx
movq %rbx, %rdi
callq 0x10051
leaq 0x5bfbc(%rip), %rsi     # 0x69227
movl $0xa, %ecx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1198f
leaq 0x10(%rsp), %r12
movq $0xa, (%r12)
movl $0x50, %edi
callq 0xb6f0
movq %rax, %rbp
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
leaq 0x5beee(%rip), %rdi     # 0x69192
movl $0xa, %edx
movq %rax, %rsi
xorl %eax, %eax
callq 0xb080
leaq 0x5beef(%rip), %rsi     # 0x691a9
movl $0xa, %edx
movq %rbx, %rdi
callq 0x10051
leaq 0x5bee1(%rip), %r13     # 0x691af
movl $0xa, %ecx
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x11999
movq %rbx, %rdi
callq 0xfa4a
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x1199e
movq (%r15), %rsi
movq (%r12), %rdx
leaq 0x5be8a(%rip), %rdi     # 0x69192
xorl %eax, %eax
callq 0xb080
movq (%r15), %rdi
movq (%r12), %rsi
callq 0x11969
movq %r14, %rdi
callq 0xb650
movq (%r15), %rdi
callq 0xb650
movq 0x7ec6e(%rip), %r15     # 0x8bfa0
movq (%r15), %rdi
leaq 0x5bd36(%rip), %rsi     # 0x69072
leaq 0x5bee9(%rip), %rdx     # 0x6922c
xorl %eax, %eax
callq 0xb7a0
movq (%r15), %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10a7d
leaq 0x5c411(%rip), %rsi     # 0x69771
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xb7a0
movq (%r15), %rsi
movl $0xa, %edi
callq 0xb690
movq %rbx, %rdi
callq 0xf9c1
addq $0xbc8, %rsp            # imm = 0xBC8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq