// File: mh0fm4[P]SCDC/test/units/redirect/redirect_test.c
// Function: redirect_test_dataset_cmd
scdcint_t redirect_test_dataset_cmd(void *dataprov, void *dataset, const char *cmd, const char *params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result_t *result)
{
  TRACE_F("dataprov: %p, dataset: %p, cmd: '%s', params: '%s', input: %p, output: %p, result: %p", dataprov, dataset, cmd, params, input, output, result);

  printf("input: "); scdc_dataset_input_print(input); printf("\n");
  printf("output: "); scdc_dataset_output_print(output); printf("\n");

  redirect_call_t *rc = dataprov;

  redirect_call_init_scdc(rc);

#if REDIRECT_CALL_PARAMS_CACHE
  redirect_cache_t *rch = (redirect_cache_t *) (rc + 1);

  redirect_call_set_cache_ptr(rc, rch);
#endif

  if (redirect_call_cmd(rc, cmd, params, input, output, result))
  {
    if (strcmp(cmd, "result") == 0) do_result(rc); else
    if (strcmp(cmd, "conf") == 0) do_conf(rc); else
    if (strncmp(cmd, "cache", 5) == 0) do_cache(rc, cmd[5]); else
    if (strcmp(cmd, "param_array") == 0) do_param_array(rc); else
    if (strcmp(cmd, "param_vector") == 0) do_param_vector(rc); else
    if (strcmp(cmd, "param_matrix") == 0) do_param_matrix(rc); else
    {
      TRACE_F("command '%s' not supported!", cmd);
    }
  }

  redirect_call_release_scdc(rc);

  TRACE_F("return");

  return SCDC_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq 0xc4f35(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96353(%rip), %rsi     # 0xa53d8
leaq 0x963b1(%rip), %rdx     # 0xa543d
movb $0x0, %al
callq 0xc9a0
movq 0xc4f16(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
movq -0x28(%rbp), %r11
movq -0x30(%rbp), %r10
movq 0x10(%rbp), %rax
leaq 0x96397(%rip), %rsi     # 0xa5457
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0xc9a0
movq 0xc4ed4(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x967c2(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
leaq 0x963b9(%rip), %rdi     # 0xa54ad
movb $0x0, %al
callq 0xcd30
movq -0x28(%rbp), %rdi
callq 0x43280
leaq 0x9679d(%rip), %rdi     # 0xa58a8
movb $0x0, %al
callq 0xcd30
leaq 0x9639c(%rip), %rdi     # 0xa54b5
movb $0x0, %al
callq 0xcd30
movq -0x30(%rbp), %rdi
callq 0x432b0
leaq 0x96778(%rip), %rdi     # 0xa58a8
movb $0x0, %al
callq 0xcd30
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x12870
movq -0x38(%rbp), %rax
addq $0xbb0, %rax            # imm = 0xBB0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x133a0
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x12e90
cmpl $0x0, %eax
je 0xf2c5
movq -0x18(%rbp), %rdi
leaq 0x99474(%rip), %rsi     # 0xa8608
callq 0xc970
cmpl $0x0, %eax
jne 0xf1ac
movq -0x38(%rbp), %rdi
callq 0xf330
jmp 0xf2c3
movq -0x18(%rbp), %rdi
leaq 0x998cb(%rip), %rsi     # 0xa8a82
callq 0xc970
cmpl $0x0, %eax
jne 0xf1cf
movq -0x38(%rbp), %rdi
callq 0xf460
jmp 0xf2c1
movq -0x18(%rbp), %rdi
leaq 0x96930(%rip), %rsi     # 0xa5b0a
movl $0x5, %edx
callq 0xc2d0
cmpl $0x0, %eax
jne 0xf1ff
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movsbl 0x5(%rax), %esi
callq 0xf8c0
jmp 0xf2bf
movq -0x18(%rbp), %rdi
leaq 0x96341(%rip), %rsi     # 0xa554b
callq 0xc970
cmpl $0x0, %eax
jne 0xf222
movq -0x38(%rbp), %rdi
callq 0xfbd0
jmp 0xf2bd
movq -0x18(%rbp), %rdi
leaq 0x9632d(%rip), %rsi     # 0xa555a
callq 0xc970
cmpl $0x0, %eax
jne 0xf242
movq -0x38(%rbp), %rdi
callq 0xfe00
jmp 0xf2bb
movq -0x18(%rbp), %rdi
leaq 0x9631d(%rip), %rsi     # 0xa556a
callq 0xc970
cmpl $0x0, %eax
jne 0xf262
movq -0x38(%rbp), %rdi
callq 0x10350
jmp 0xf2b9
jmp 0xf264
movq 0xc4d45(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96163(%rip), %rsi     # 0xa53d8
leaq 0x961c1(%rip), %rdx     # 0xa543d
movb $0x0, %al
callq 0xc9a0
movq 0xc4d26(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x96226(%rip), %rsi     # 0xa54be
movb $0x0, %al
callq 0xc9a0
movq 0xc4d0a(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x965f8(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
jmp 0xf2b9
jmp 0xf2bb
jmp 0xf2bd
jmp 0xf2bf
jmp 0xf2c1
jmp 0xf2c3
jmp 0xf2c5
movq -0x38(%rbp), %rdi
callq 0x12980
movq 0xc4cdb(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x960f9(%rip), %rsi     # 0xa53d8
leaq 0x96157(%rip), %rdx     # 0xa543d
movb $0x0, %al
callq 0xc9a0
movq 0xc4cbc(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96138(%rip), %rsi     # 0xa5436
movb $0x0, %al
callq 0xc9a0
movq 0xc4ca4(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96592(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
movl $0x1, %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)