// File: /workspace/github_cpp_makefile_star2_O2/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 0x43c3f(%rip), %rsi     # 0x50543
leaq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0xed28
pushq $0x50
popq %r12
movq %r12, %rdi
callq 0xb720
movq %rax, %r14
pushq $0xa
popq %r15
pushq $0x1
popq %rdx
movsd 0x436d9(%rip), %xmm0    # 0x50008
movsd 0x436d9(%rip), %xmm1    # 0x50010
movq %rax, %rdi
movq %r15, %rsi
callq 0xd144
leaq 0x438c4(%rip), %rdi     # 0x5020d
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xb070
movq %r14, %rdi
movq %r15, %rsi
callq 0x109fb
leaq 0x438ba(%rip), %rsi     # 0x50222
movq %r13, %rdi
movq %r15, %rdx
callq 0xf486
leaq 0x438ad(%rip), %rsi     # 0x50227
movq %r13, %rdi
movq %r14, %rdx
movq %r15, %rcx
callq 0x10a05
leaq 0x8(%rsp), %rax
movq $0xa, (%rax)
movq %r12, %rdi
callq 0xb720
movq %rax, %rbp
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
leaq 0x437e3(%rip), %rdi     # 0x50192
movq %rax, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xb070
leaq 0x437e6(%rip), %rsi     # 0x501a9
movq %r13, %rdi
movq %r15, %rdx
callq 0xf486
leaq 0x437da(%rip), %rbx     # 0x501af
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x10a0f
movq %r13, %rdi
callq 0xee69
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rcx
callq 0x10a14
movq (%r12), %rsi
movq (%rbx), %rdx
leaq 0x43780(%rip), %rdi     # 0x50192
xorl %eax, %eax
callq 0xb070
movq (%r12), %rdi
movq (%rbx), %rsi
callq 0x109fb
movq %r14, %rdi
callq 0xb670
movq (%r12), %rdi
callq 0xb670
movq 0x6857b(%rip), %r14     # 0x74fb8
movq (%r14), %rdi
leaq 0x4362b(%rip), %rsi     # 0x50072
leaq 0x437de(%rip), %rdx     # 0x5022c
xorl %eax, %eax
callq 0xb7c0
movq (%r14), %rbx
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xfc63
leaq 0x43ce6(%rip), %rsi     # 0x50751
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xb7c0
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0xb6b0
movq %r13, %rdi
callq 0xede5
addq $0xbc8, %rsp            # imm = 0xBC8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq