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

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

  char input_char = '7';
  redirect_call_put_input_conf_char(&rc, "char", input_char);

  int input_int = 7;
  redirect_call_put_input_conf_int(&rc, "int", input_int);

  void *input_void_p = (void *) 0x77777777;
  redirect_call_put_input_conf_void_p(&rc, "void_p", input_void_p);

  const char *input_str = "7 7 7 7 7 7 7 7";
  rdint_t input_str_n = strlen(input_str);
  redirect_call_put_input_conf_str(&rc, "str", input_str, input_str_n);

  int input_ints[2] = { 7, 77 };
  redirect_call_put_input_conf_ints(&rc, "ints", input_ints, 2);

  long output_long = 7;
  redirect_call_put_output_conf_long(&rc, "long", output_long);

  TRACE_F("input: char: %c, int: %d, void_p: %p, str: '%.*s' (%" rdint_fmt "), ints: [%d, %d]", input_char, input_int, input_void_p, (int) input_str_n, input_str, input_str_n, input_ints[0], input_ints[1]);
  TRACE_F("output: long: %ld", output_long);

  redirect_call_execute(&rc);

  char output_char = 0;
  redirect_call_get_output_conf_char(&rc, "char", &output_char);

  int output_int = 0;
  redirect_call_get_output_conf_int(&rc, "int", &output_int);

  void *output_void_p = NULL;
  redirect_call_get_output_conf_void_p(&rc, "void_p", &output_void_p);

  char output_str[256];
  rdint_t output_str_n = 0;
  redirect_call_get_output_conf_str(&rc, "str", output_str, &output_str_n);

  int output_ints[2] = { 0, 0 };
  redirect_call_get_output_conf_ints(&rc, "ints", output_ints, 2);

  TRACE_F("output: char: %c, int: %d, void_p: %p, str: '%.*s' (%" rdint_fmt "), ints: [%d, %d]", output_char, output_int, output_void_p, (int) output_str_n, output_str, output_str_n, output_ints[0], output_ints[1]);

  redirect_call_destroy_scdc(&rc);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xce8, %rsp            # imm = 0xCE8
movq %rdi, %rdx
leaq 0x5ff34(%rip), %rsi     # 0x6cafa
leaq 0x138(%rsp), %rbx
movq %rbx, %rdi
callq 0xf8fc
leaq 0x5c4b4(%rip), %rsi     # 0x69091
movq %rbx, %rdi
movl $0x37, %edx
callq 0x119f6
leaq 0x5cc1f(%rip), %rsi     # 0x69810
movq %rbx, %rdi
movl $0x7, %edx
callq 0x11ccb
leaq 0x5c491(%rip), %rsi     # 0x69096
movl $0x77777777, %edx       # imm = 0x77777777
movq %rbx, %rdi
callq 0x108e0
leaq 0x5c494(%rip), %rsi     # 0x690ad
leaq 0x5c47d(%rip), %r15     # 0x6909d
movl $0xf, %ecx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1019a
movabsq $0x4d00000007, %rax     # imm = 0x4D00000007
leaq 0x28(%rsp), %r14
movq %rax, (%r14)
leaq 0x5c468(%rip), %rsi     # 0x690b1
movl $0x2, %ecx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x11dc2
leaq 0x5c456(%rip), %rsi     # 0x690b6
movl $0x7, %edx
movq %rbx, %rdi
callq 0x10696
movq 0x7f32c(%rip), %rax     # 0x8bfa0
movq (%rax), %rdi
movq %rax, %r12
leaq 0x5c3f1(%rip), %r13     # 0x69072
leaq 0x5c433(%rip), %rbp     # 0x690bb
movq %r13, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0xb7a0
movq (%r12), %rdi
movl (%r14), %r10d
movl 0x4(%r14), %r11d
leaq 0x5c41e(%rip), %rsi     # 0x690c5
movl $0x77777777, %r8d       # imm = 0x77777777
movl $0x37, %edx
movl $0x7, %ecx
movl $0xf, %r9d
xorl %eax, %eax
pushq %r11
pushq %r10
pushq $0xf
pushq %r15
callq 0xb7a0
addq $0x20, %rsp
movq (%r12), %rsi
movl $0xa, %edi
callq 0xb690
movq (%r12), %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0xb7a0
movq (%r12), %rdi
leaq 0x5c413(%rip), %rsi     # 0x6910d
movl $0x7, %edx
xorl %eax, %eax
callq 0xb7a0
movq (%r12), %rsi
movl $0xa, %edi
callq 0xb690
movq %rbx, %rdi
callq 0xfa4a
leaq 0xb(%rsp), %rdx
movb $0x0, (%rdx)
movq %rbx, %rdi
leaq 0x5c363(%rip), %rsi     # 0x69091
callq 0x11a39
leaq 0xc(%rsp), %rbp
movl $0x0, (%rbp)
movq %rbx, %rdi
leaq 0x5cac7(%rip), %rsi     # 0x69810
movq %rbp, %rdx
callq 0x11d2b
leaq 0x20(%rsp), %r14
xorl %r13d, %r13d
movq %r13, (%r14)
movq %rbx, %rdi
leaq 0x5c330(%rip), %rsi     # 0x69096
movq %r14, %rdx
callq 0x10a20
leaq 0x18(%rsp), %r15
movq %r13, (%r15)
xorl %r12d, %r12d
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
leaq 0x5c325(%rip), %rsi     # 0x690ad
movq %r15, %rcx
callq 0x101bd
leaq 0x10(%rsp), %r13
movq %r12, (%r13)
movl $0x2, %ecx
movq %rbx, %rdi
leaq 0x5c309(%rip), %rsi     # 0x690b1
movq %r13, %rdx
callq 0x11e5b
movq 0x7f1e9(%rip), %r12     # 0x8bfa0
movq (%r12), %rdi
leaq 0x5c2b0(%rip), %rsi     # 0x69072
leaq 0x5c2f2(%rip), %rdx     # 0x690bb
xorl %eax, %eax
callq 0xb7a0
movq (%r12), %rdi
leaq 0xb(%rsp), %rax
movsbl (%rax), %edx
movl (%rbp), %ecx
movq (%r14), %r8
movq (%r15), %r9
movl (%r13), %r10d
movl 0x4(%r13), %r11d
leaq 0x5c32b(%rip), %rsi     # 0x6911f
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %r9
leaq 0x48(%rsp), %r10
pushq %r10
callq 0xb7a0
addq $0x20, %rsp
movq (%r12), %rsi
movl $0xa, %edi
callq 0xb690
movq %rbx, %rdi
callq 0xf9c1
addq $0xce8, %rsp            # imm = 0xCE8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq