// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../external/heating/injection.c
// Function: injection_deposition_at_z
int injection_deposition_at_z(struct thermodynamics* pth,
                              double z){

  /** - Define local variables */
  struct injection* pin = &(pth->in);
  int index_dep;
  double h,a,b;

  /** - Interpolate at required z in the table */
  class_test(z < pin->filled_until_z,
             pin->error_message,
             "injection is not yet calculated beyond %.10e (asked for at %.10e)",pin->filled_until_z,z);

  class_call(array_spline_hunt(pin->z_table,
                               pin->z_size,
                               z,
                               &(pin->last_index_z),
                               &h,&a,&b,
                               pin->error_message),
           pin->error_message,
           pin->error_message);

  for(index_dep=0; index_dep<pin->dep_size; ++index_dep){
    pin->pvecdeposition[index_dep] = ( a*pin->deposition_table[index_dep][pin->last_index_z]+
                                        b*pin->deposition_table[index_dep][pin->last_index_z+1] );
  }

  return _SUCCESS_;
}

// Assembly:
subq $0x1858, %rsp           # imm = 0x1858
movq %rdi, 0x1848(%rsp)
movsd %xmm0, 0x1840(%rsp)
movq 0x1848(%rsp), %rax
addq $0xc0, %rax
movq %rax, 0x1838(%rsp)
movsd 0x1840(%rsp), %xmm1
movq 0x1838(%rsp), %rax
movsd 0x468(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1a3396
leaq 0x1010(%rsp), %rdi
movq 0x1838(%rsp), %rax
movsd 0x468(%rax), %xmm0
movsd 0x1840(%rsp), %xmm1
leaq 0x6a1f5(%rip), %rsi     # 0x20d51e
movb $0x2, %al
callq 0x5b9c0
leaq 0x810(%rsp), %rdi
leaq 0x1010(%rsp), %rcx
leaq 0x2ed3b(%rip), %rsi     # 0x1d2082
leaq 0x6a212(%rip), %rdx     # 0x20d560
movb $0x0, %al
callq 0x5b9c0
movq 0x1838(%rsp), %rdi
addq $0x570, %rdi            # imm = 0x570
leaq 0x810(%rsp), %r8
leaq 0x2ecc1(%rip), %rsi     # 0x1d2034
leaq 0x6a1fe(%rip), %rdx     # 0x20d578
movl $0x29b, %ecx            # imm = 0x29B
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1854(%rsp)
jmp 0x1a3546
movq 0x1838(%rsp), %rax
movq 0x448(%rax), %rdi
movq 0x1838(%rsp), %rax
movl 0x450(%rax), %esi
movsd 0x1840(%rsp), %xmm0
movq 0x1838(%rsp), %rdx
addq $0x47c, %rdx            # imm = 0x47C
movq 0x1838(%rsp), %rax
addq $0x570, %rax            # imm = 0x570
leaq 0x1828(%rsp), %rcx
leaq 0x1820(%rsp), %r8
leaq 0x1818(%rsp), %r9
movq %rax, (%rsp)
callq 0x27de0
cmpl $0x1, %eax
jne 0x1a3466
leaq 0x10(%rsp), %rdi
movq 0x1838(%rsp), %rcx
addq $0x570, %rcx            # imm = 0x570
leaq 0x2efbe(%rip), %rsi     # 0x1d23d8
leaq 0x6a171(%rip), %rdx     # 0x20d592
movb $0x0, %al
callq 0x5b9c0
movq 0x1838(%rsp), %rdi
addq $0x570, %rdi            # imm = 0x570
leaq 0x10(%rsp), %r8
leaq 0x2ebf1(%rip), %rsi     # 0x1d2034
leaq 0x6a12e(%rip), %rdx     # 0x20d578
movl $0x2a4, %ecx            # imm = 0x2A4
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1854(%rsp)
jmp 0x1a3546
movl $0x0, 0x1834(%rsp)
movl 0x1834(%rsp), %eax
movq 0x1838(%rsp), %rcx
cmpl 0x54c(%rcx), %eax
jge 0x1a353b
movsd 0x1820(%rsp), %xmm0
movq 0x1838(%rsp), %rax
movq 0x528(%rax), %rax
movslq 0x1834(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x1838(%rsp), %rcx
movslq 0x47c(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x1818(%rsp), %xmm1
movq 0x1838(%rsp), %rax
movq 0x528(%rax), %rax
movslq 0x1834(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x1838(%rsp), %rcx
movl 0x47c(%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x1838(%rsp), %rax
movq 0x550(%rax), %rax
movslq 0x1834(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x1834(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1834(%rsp)
jmp 0x1a3471
movl $0x0, 0x1854(%rsp)
movl 0x1854(%rsp), %eax
addq $0x1858, %rsp           # imm = 0x1858
retq
nopw %cs:(%rax,%rax)