// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_call.cc
// Function: void redirect_call_get_input_param_dense_val<int>(_redirect_call_t*, char const*, int**, long)
static void redirect_call_get_input_param_dense_val(redirect_call_t *rc, const char *id, T **b, rdint_t n)
{
  TRACE_F("rc: %p, id: '%s', b: %p, n: %" rdint_fmt, rc, id, *b, n);

  /* server only */
  ASSERT(!rc->client);

#if REDIRECT_CALL_PARAMS_CACHE
  if (rc->cache)
  {
    rdint_t entry_index = redirect_cache_get_next_param_entry_index(rc->cache);

    if (entry_index >= 0)
    {
      TRACE_F("using cache entry %" rdint_fmt, entry_index);
      if (*b)
      {
        /* copy cache entry to buffer */
        memcpy(*b, redirect_cache_get_entry_buf(rc->cache, entry_index), n * sizeof(T));

      } else
      {
        /* reuse buffer of cache entry */
        *b = static_cast<T *>(redirect_cache_get_entry_buf(rc->cache, entry_index));
      }

      return;
    }
  }
#endif

  if (*b == NULL)
  {
    /* allocate buffer */
    *b = static_cast<T *>(redirect_call_alloc_buf(rc, n * sizeof(T)));
  }

  /* copy data from input to buffer */
  consume_input_dense<T>(rc, *b, n);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x77c22(%rip), %r14     # 0x8bfa0
movq (%r14), %rdi
leaq 0x55481(%rip), %rsi     # 0x69809
leaq 0x556ec(%rip), %rdx     # 0x69a7b
xorl %eax, %eax
callq 0xb7a0
movq (%r14), %rdi
movq (%r15), %r8
leaq 0x55658(%rip), %rsi     # 0x699fb
movq %rbx, %rdx
movq %r12, %rcx
movq %rbp, %r9
xorl %eax, %eax
callq 0xb7a0
movq (%r14), %rsi
movl $0xa, %edi
callq 0xb690
cmpl $0x0, (%rbx)
jne 0x14667
movq 0xba8(%rbx), %rdi
testq %rdi, %rdi
je 0x1445e
callq 0xf8c6
testq %rax, %rax
js 0x1445e
movq %rax, %r12
movq 0x77bb3(%rip), %r14     # 0x8bfa0
movq (%r14), %rdi
leaq 0x55412(%rip), %rsi     # 0x69809
leaq 0x5567d(%rip), %rdx     # 0x69a7b
xorl %eax, %eax
callq 0xb7a0
movq (%r14), %rdi
leaq 0x556b3(%rip), %rsi     # 0x69ac2
movq %r12, %rdx
xorl %eax, %eax
callq 0xb7a0
movq (%r14), %rsi
movl $0xa, %edi
callq 0xb690
movq (%r15), %r13
movq 0xba8(%rbx), %rdi
movq %r12, %rsi
callq 0xf87e
testq %r13, %r13
je 0x14452
leaq (,%rbp,4), %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0xb3f0
jmp 0x14455
movq %rax, (%r15)
testq %r12, %r12
jns 0x14658
cmpq $0x0, (%r15)
jne 0x14497
movslq 0xb20(%rbx), %r14
cmpq $0xf, %r14
jle 0x14475
xorl %eax, %eax
jmp 0x14494
leaq (,%rbp,4), %rdi
callq 0xb6f0
movq %rax, 0xb28(%rbx,%r14,8)
leal 0x1(%r14), %ecx
movl %ecx, 0xb20(%rbx)
movq %rax, (%r15)
movq (%r15), %r12
shlq $0x2, %rbp
movq 0xb08(%rbx), %rax
movq %rbp, %r14
movq 0x10(%rax), %rbp
movq %r12, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq 0xb08(%rbx), %rax
movq 0x20(%rax), %r13
movslq 0xb00(%rbx), %rsi
subq %rsi, %r13
cmpq %r13, %r14
cmovlq %r14, %r13
addq %rbp, %rsi
cmpq %rsi, %r12
je 0x144e5
movq %r12, %rdi
movq %r13, %rdx
callq 0xb3f0
addl %r13d, 0xb00(%rbx)
subq %r13, %r14
jle 0x14528
movq 0xb08(%rbx), %rdi
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0x14528
xorl %r15d, %r15d
xorl %esi, %esi
callq *%rax
cmpq $0x1, %rax
jne 0x1452b
movq 0xb08(%rbx), %rax
movq 0x10(%rax), %rbp
movl $0x0, 0xb00(%rbx)
movb $0x1, %r15b
jmp 0x1452b
xorl %r15d, %r15d
addq %r13, %r12
testb %r15b, %r15b
jne 0x144b6
movq 0xba8(%rbx), %rdi
testq %rdi, %rdi
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %rbp
je 0x14658
movslq 0xb20(%rbx), %rax
movq $-0x1, %r13
testq %rax, %rax
jle 0x14579
xorl %ecx, %ecx
cmpq %rbp, 0xb28(%rbx,%rcx,8)
je 0x14576
incq %rcx
cmpq %rcx, %rax
jne 0x14562
jmp 0x14579
movq %rcx, %r13
movl $0x1, %esi
movq %r14, %rdx
movq %rbp, %rcx
callq 0xf830
testq %rax, %r13
js 0x14658
movq %rax, %r12
movq 0x77a04(%rip), %r15     # 0x8bfa0
movq (%r15), %rdi
leaq 0x55263(%rip), %rsi     # 0x69809
leaq 0x5552b(%rip), %rdx     # 0x69ad8
xorl %eax, %eax
callq 0xb7a0
movq (%r15), %rdi
testq %r12, %r12
js 0x145eb
leaq 0x55529(%rip), %rsi     # 0x69aec
movq %r12, %rdx
xorl %eax, %eax
callq 0xb7a0
movq (%r15), %rsi
movl $0xa, %edi
callq 0xb690
movq 0xba8(%rbx), %rdi
movq %r12, %rsi
callq 0xf86e
jmp 0x14628
leaq 0x55516(%rip), %rsi     # 0x69b08
movl $0x1, %edx
movq %r14, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0xb7a0
movq (%r15), %rsi
movl $0xa, %edi
callq 0xb690
movq 0xba8(%rbx), %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %rbp, %rcx
callq 0xf6db
testq %r13, %r13
js 0x14658
movslq 0xb20(%rbx), %rax
cmpq %rax, %r13
jge 0x14658
leaq -0x1(%rax), %rcx
movl %ecx, 0xb20(%rbx)
cmpq %rcx, %r13
je 0x14658
movq 0xb20(%rbx,%rax,8), %rax
movq %rax, 0xb28(%rbx,%r13,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xc0b8
jmp 0x143c9