// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/nrutil.c
// Function: f3tensor
float ***f3tensor(long nrl, long nrh, long ncl, long nch, long ndl, long ndh)
/* allocate a float 3tensor with range t[nrl..nrh][ncl..nch][ndl..ndh] */
{
  long i,j,nrow=nrh-nrl+1,ncol=nch-ncl+1,ndep=ndh-ndl+1;
  float ***t;

  /* allocate pointers to pointers to rows */
  t=(float ***) malloc((size_t)((nrow+NR_END)*sizeof(float**)));
  if (!t) nrerror("allocation failure 1 in f3tensor()");
  t += NR_END;
  t -= nrl;

  /* allocate pointers to rows and set pointers to them */
  t[nrl]=(float **) malloc((size_t)((nrow*ncol+NR_END)*sizeof(float*)));
  if (!t[nrl]) nrerror("allocation failure 2 in f3tensor()");
  t[nrl] += NR_END;
  t[nrl] -= ncl;

  /* allocate rows and set pointers to them */
  t[nrl][ncl]=(float *) malloc((size_t)((nrow*ncol*ndep+NR_END)*sizeof(float)));
  if (!t[nrl][ncl]) nrerror("allocation failure 3 in f3tensor()");
  t[nrl][ncl] += NR_END;
  t[nrl][ncl] -= ndl;

  for(j=ncl+1;j<=nch;j++) t[nrl][j]=t[nrl][j-1]+ndep;
  for(i=nrl+1;i<=nrh;i++) {
    t[i]=t[i-1]+ncol;
    t[i][ncl]=t[i-1][ncl]+ncol*ndep;
    for(j=ncl+1;j<=nch;j++) t[i][j]=t[i][j-1]+ndep;
  }

  /* return pointer to array of pointers to rows */
  return t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movq %r8, 0x18(%rsp)
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r13
movq %rsi, 0x30(%rsp)
subq %rdi, %r14
leaq 0x10(,%r14,8), %rdi
callq 0x21e0
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x4b4b5
movq %r12, 0x10(%rsp)
subq %r15, %r12
incq %r12
incq %r14
movq %r12, 0x20(%rsp)
imulq %r12, %r14
leaq 0x8(,%r14,8), %rdi
callq 0x21e0
testq %rax, %rax
je 0x4b4c1
movq %rax, %rbp
movq %rbx, %r12
subq 0x18(%rsp), %r12
incq %r12
movq 0x8(%rsp), %rcx
addq $0x8, %rcx
leaq (,%r15,8), %rax
movq %rax, 0x28(%rsp)
negq %rax
addq %rbp, %rax
addq $0x8, %rax
movq %rcx, 0x8(%rsp)
movq %rax, (%rcx)
imulq %r12, %r14
leaq 0x4(,%r14,4), %rdi
callq 0x21e0
movq %rax, 0x8(%rbp)
testq %rax, %rax
je 0x4b4cd
leaq (,%r13,8), %rdx
movq %rbp, %rcx
addq $0x8, %rcx
movq 0x18(%rsp), %r8
shlq $0x2, %r8
subq %r8, %rax
addq $0x4, %rax
movq %rax, (%rcx)
movq 0x10(%rsp), %rcx
subq %r15, %rcx
jle 0x4b401
leaq (,%rbx,4), %rax
subq %r8, %rax
addq $0x4, %rax
movq 0x8(%rbp), %rsi
addq %rax, %rsi
xorl %edi, %edi
movq %rsi, 0x10(%rbp,%rdi,8)
addq %rax, %rsi
incq %rdi
cmpq %rdi, %rcx
jne 0x4b3f1
movq 0x8(%rsp), %rsi
movq %rsi, %rax
subq %rdx, %rax
movq 0x30(%rsp), %rbp
cmpq %r13, %rbp
movq 0x10(%rsp), %r14
jle 0x4b4a6
imulq 0x20(%rsp), %r12
movq (%rsi), %rsi
leaq 0x8(,%r14,8), %rdx
subq 0x28(%rsp), %rdx
leaq (%rsi,%r14,8), %rdi
addq $0x8, %rdi
shlq $0x2, %rbx
subq %r8, %rbx
addq $0x4, %rbx
leaq (%rsi,%r14,8), %r8
addq $0x10, %r8
xorl %r9d, %r9d
shlq $0x2, %r12
movq %rsi, %r10
movq 0x20(%rsp), %rsi
leaq (%r10,%rsi,8), %rsi
movq %rsi, 0x8(%rax,%r13,8)
movq (%r10,%r15,8), %r10
addq %r12, %r10
movq %r10, (%rsi,%r15,8)
cmpq %r15, %r14
jle 0x4b498
movq %rdx, %r10
imulq %r9, %r10
movq (%rdi,%r10), %r10
addq %rbx, %r10
xorl %r11d, %r11d
movq %r10, (%r8,%r11,8)
addq %rbx, %r10
incq %r11
cmpq %r11, %rcx
jne 0x4b489
incq %r13
incq %r9
addq %rdx, %r8
cmpq %rbp, %r13
jne 0x4b457
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12cf8(%rip), %rdi     # 0x5e1b4
callq 0x4ae38
leaq 0x12d0f(%rip), %rdi     # 0x5e1d7
callq 0x4ae38
leaq 0x12d26(%rip), %rdi     # 0x5e1fa
callq 0x4ae38