// File: 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
movq %rsp, %rbp
pushq %rbx
subq $0xd28, %rsp            # imm = 0xD28
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdx
leaq -0xbc0(%rbp), %rdi
leaq 0x9b0d0(%rip), %rsi     # 0xa8a82
callq 0x118e0
movb $0x37, -0xbc1(%rbp)
leaq -0xbc0(%rbp), %rdi
leaq 0x976c5(%rip), %rsi     # 0xa5091
movsbl -0xbc1(%rbp), %edx
callq 0x152f0
movl $0x7, -0xbc8(%rbp)
movl -0xbc8(%rbp), %edx
leaq -0xbc0(%rbp), %rdi
leaq 0x97e02(%rip), %rsi     # 0xa57f8
callq 0x15890
movl $0x77777777, %eax       # imm = 0x77777777
movq %rax, -0xbd0(%rbp)
movq -0xbd0(%rbp), %rdx
leaq -0xbc0(%rbp), %rdi
leaq 0x9767a(%rip), %rsi     # 0xa5096
callq 0x13490
leaq 0x97675(%rip), %rax     # 0xa509d
movq %rax, -0xbd8(%rbp)
movq -0xbd8(%rbp), %rdi
callq 0xc280
movq %rax, -0xbe0(%rbp)
movq -0xbd8(%rbp), %rdx
movq -0xbe0(%rbp), %rcx
leaq -0xbc0(%rbp), %rdi
leaq 0x9764f(%rip), %rsi     # 0xa50ad
callq 0x127b0
movq 0x975d6(%rip), %rax     # 0xa5040
movq %rax, -0xbe8(%rbp)
leaq -0xbe8(%rbp), %rdx
leaq -0xbc0(%rbp), %rdi
leaq 0x9762b(%rip), %rsi     # 0xa50b1
movl $0x2, %ecx
callq 0x159a0
movq $0x7, -0xbf0(%rbp)
movq -0xbf0(%rbp), %rdx
leaq -0xbc0(%rbp), %rdi
leaq 0x97606(%rip), %rsi     # 0xa50b6
callq 0x13140
movq 0xc64f4(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x975ac(%rip), %rsi     # 0xa5072
leaq 0x975ee(%rip), %rdx     # 0xa50bb
movb $0x0, %al
callq 0xc9a0
movq 0xc64d5(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movsbl -0xbc1(%rbp), %edx
movl -0xbc8(%rbp), %ecx
movq -0xbd0(%rbp), %r8
movq -0xbe0(%rbp), %rax
movl %eax, %r9d
movq -0xbd8(%rbp), %rbx
movq -0xbe0(%rbp), %r11
movl -0xbe8(%rbp), %r10d
movl -0xbe4(%rbp), %eax
leaq 0x975a7(%rip), %rsi     # 0xa50c5
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0xc9a0
movq 0xc6472(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x97d60(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
jmp 0xdb51
movq 0xc6458(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x97510(%rip), %rsi     # 0xa5072
leaq 0x97552(%rip), %rdx     # 0xa50bb
movb $0x0, %al
callq 0xc9a0
movq 0xc6439(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movq -0xbf0(%rbp), %rdx
leaq 0x97585(%rip), %rsi     # 0xa510d
movb $0x0, %al
callq 0xc9a0
movq 0xc641a(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x97d08(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
leaq -0xbc0(%rbp), %rdi
callq 0x11af0
movb $0x0, -0xbf1(%rbp)
leaq -0xbc0(%rbp), %rdi
leaq 0x974c9(%rip), %rsi     # 0xa5091
leaq -0xbf1(%rbp), %rdx
callq 0x15380
movl $0x0, -0xbf8(%rbp)
leaq -0xbc0(%rbp), %rdi
leaq 0x97c0c(%rip), %rsi     # 0xa57f8
leaq -0xbf8(%rbp), %rdx
callq 0x15910
movq $0x0, -0xc00(%rbp)
leaq -0xbc0(%rbp), %rdi
leaq 0x97485(%rip), %rsi     # 0xa5096
leaq -0xc00(%rbp), %rdx
callq 0x13610
movq $0x0, -0xd08(%rbp)
leaq -0xd00(%rbp), %rdx
leaq -0xbc0(%rbp), %rdi
leaq 0x97470(%rip), %rsi     # 0xa50ad
leaq -0xd08(%rbp), %rcx
callq 0x12810
leaq -0xd10(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0xc350
leaq -0xd10(%rbp), %rdx
leaq -0xbc0(%rbp), %rdi
leaq 0x97440(%rip), %rsi     # 0xa50b1
movl $0x2, %ecx
callq 0x15a40
movq 0xc632e(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x973e6(%rip), %rsi     # 0xa5072
leaq 0x97428(%rip), %rdx     # 0xa50bb
movb $0x0, %al
callq 0xc9a0
movq 0xc630f(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movsbl -0xbf1(%rbp), %edx
movl -0xbf8(%rbp), %ecx
movq -0xc00(%rbp), %r8
movq -0xd08(%rbp), %rax
movl %eax, %r9d
leaq -0xd00(%rbp), %rbx
movq -0xd08(%rbp), %r11
movl -0xd10(%rbp), %r10d
movl -0xd0c(%rbp), %eax
leaq 0x9743b(%rip), %rsi     # 0xa511f
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq 0xc9a0
movq 0xc62ac(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x97b9a(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
leaq -0xbc0(%rbp), %rdi
callq 0x11a50
addq $0xd28, %rsp            # imm = 0xD28
popq %rbx
popq %rbp
retq
nopl (%rax,%rax)