// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %r9, %rbx
movq %r8, 0x8(%rsp)
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r13
movq %rsi, 0x20(%rsp)
subq %rdi, %r14
leaq 0x10(,%r14,8), %rdi
callq 0x21d0
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x4b42b
movq %r12, (%rsp)
subq %r15, %r12
incq %r12
incq %r14
movq %r12, 0x18(%rsp)
imulq %r12, %r14
leaq 0x8(,%r14,8), %rdi
callq 0x21d0
movq %rax, %rbp
movq 0x10(%rsp), %rax
movq %rbp, 0x8(%rax)
testq %rbp, %rbp
je 0x4b437
movq %rbx, %r12
subq 0x8(%rsp), %r12
incq %r12
addq $0x8, %rax
leaq (,%r15,8), %rcx
negq %rcx
addq %rbp, %rcx
addq $0x8, %rcx
movq %rcx, (%rax)
imulq %r12, %r14
leaq 0x4(,%r14,4), %rdi
callq 0x21d0
movq %rax, 0x8(%rbp)
testq %rax, %rax
je 0x4b443
leaq (,%r13,8), %rax
negq %rax
movq %rbp, %rcx
addq $0x8, %rcx
movq (%rcx), %rdx
movq 0x8(%rsp), %r8
shlq $0x2, %r8
movq %r8, %rsi
negq %rsi
addq %rsi, %rdx
addq $0x4, %rdx
movq %rdx, (%rcx)
movq (%rsp), %rcx
subq %r15, %rcx
movq 0x20(%rsp), %r11
movq 0x18(%rsp), %r14
jle 0x4b3a2
leaq (,%rbx,4), %rdx
subq %r8, %rdx
addq $0x4, %rdx
movq 0x8(%rbp), %rsi
addq %rdx, %rsi
xorl %edi, %edi
movq %rsi, 0x10(%rbp,%rdi,8)
addq %rdx, %rsi
incq %rdi
cmpq %rdi, %rcx
jne 0x4b392
movq 0x10(%rsp), %rdx
addq %rdx, %rax
addq $0x8, %rax
cmpq %r13, %r11
movq (%rsp), %r10
jle 0x4b41c
imulq %r14, %r12
leaq (,%r10,8), %rdx
shlq $0x2, %rbx
subq %r8, %rbx
addq $0x4, %rbx
leaq 0x10(,%r10,8), %rsi
shlq $0x2, %r12
movq (%rax,%r13,8), %rdi
leaq (%rdi,%r14,8), %r8
movq %r8, 0x8(%rax,%r13,8)
movq (%rdi,%r15,8), %r9
addq %r12, %r9
movq %r9, (%r8,%r15,8)
cmpq %r15, %r10
jle 0x4b414
movq 0x8(%rdi,%rdx), %r8
addq %rbx, %r8
addq %rsi, %rdi
xorl %r9d, %r9d
movq %r8, (%rdi,%r9,8)
addq %rbx, %r8
incq %r9
cmpq %r9, %rcx
jne 0x4b405
incq %r13
cmpq %r11, %r13
jne 0x4b3da
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12da4(%rip), %rdi     # 0x5e1d6
callq 0x4ad9c
leaq 0x12dbb(%rip), %rdi     # 0x5e1f9
callq 0x4ad9c
leaq 0x12dd2(%rip), %rdi     # 0x5e21c
callq 0x4ad9c