// File: /workspace/github_cpp_makefile_star2_O1/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 0x5c2c2(%rip), %rsi     # 0x69543
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0xf8ec
movl $0x50, %edi
callq 0xb6f0
movq %rax, %r14
movsd 0x5bd65(%rip), %xmm0    # 0x69008
movsd 0x5bd65(%rip), %xmm1    # 0x69010
movl $0xa, %esi
movl $0x1, %edx
movq %rax, %rdi
callq 0xdb04
leaq 0x5bf49(%rip), %rdi     # 0x6920d
movl $0xa, %edx
movq %r14, %rsi
xorl %eax, %eax
callq 0xb080
movl $0xa, %esi
movq %r14, %rdi
callq 0x119cb
leaq 0x5bf3b(%rip), %rsi     # 0x69222
movl $0xa, %edx
movq %rbx, %rdi
callq 0x100a4
leaq 0x5bf2c(%rip), %rsi     # 0x69227
movl $0xa, %ecx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x119f1
leaq 0x10(%rsp), %r12
movq $0xa, (%r12)
movl $0x50, %edi
callq 0xb6f0
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
leaq 0x5be61(%rip), %r13     # 0x69192
movl $0xa, %edx
movq %r13, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb080
movq (%r12), %rdx
leaq 0x5be5b(%rip), %rsi     # 0x691a9
movq %rbx, %rdi
callq 0x100a4
movq (%r15), %rdx
movq (%r12), %rcx
leaq 0x5be4b(%rip), %rbp     # 0x691af
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x119fb
movq %rbx, %rdi
callq 0xfa40
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x11a00
movq (%r15), %rsi
movq (%r12), %rdx
movq %r13, %rdi
xorl %eax, %eax
callq 0xb080
movq (%r15), %rdi
movq (%r12), %rsi
callq 0x119cb
movq %r14, %rdi
callq 0xb650
movq (%r15), %rdi
callq 0xb650
movq 0x7ebe4(%rip), %r15     # 0x8bfa0
movq (%r15), %rdi
leaq 0x5bcac(%rip), %rsi     # 0x69072
leaq 0x5be5f(%rip), %rdx     # 0x6922c
xorl %eax, %eax
callq 0xb7a0
movq (%r15), %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10ace
leaq 0x5c367(%rip), %rsi     # 0x69751
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xb7a0
movq (%r15), %rsi
movl $0xa, %edi
callq 0xb690
movq %rbx, %rdi
callq 0xf9b1
addq $0xbc8, %rsp            # imm = 0xBC8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq