// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/distortions.c
// Function: distortions_generate_detector
int distortions_generate_detector(struct precision * ppr,
                                  struct distortions * psd){

  /** Define local variables*/
  int is_success;
  char temporary_string[2*_FILENAMESIZE_+2*_MAX_DETECTOR_NAME_LENGTH_+1024];


  /* Test first whether or not python exists*/
  if (psd->distortions_verbose > 0) {
    printf(" -> Testing python\n");
  }
  is_success = system("python --version");
  class_test(is_success == -1,
             psd->error_message,
             "The command 'python --version' failed.\nPlease install a valid version of python.");

  /* Then activate the PCA generator*/
  if (psd->distortions_verbose > 0) {
    printf(" -> Executing the PCA generator\n");
  }

  if (psd->has_detector_file == _TRUE_) {
    class_sprintf(temporary_string,"python %s %s %s %s %.10e %.10e %i %i %.10e %.10e %.10e",
            psd->sd_PCA_file_generator,
            psd->sd_detector_name,
            ppr->sd_external_path,
            psd->sd_detector_file_name,
            ppr->sd_z_min,
            ppr->sd_z_max,
            ppr->sd_z_size,
            6,
            psd->z_th,
            psd->DI_units,
            psd->x_to_nu);

  }
  else {
    class_sprintf(temporary_string,"python %s %s %.10e %.10e %.10e  %i %.10e %.10e %i %.10e %i %.10e %.10e %.10e",
            psd->sd_PCA_file_generator,
            psd->sd_detector_name,
            psd->sd_detector_nu_min,
            psd->sd_detector_nu_max,
            psd->sd_detector_nu_delta,
            psd->sd_detector_bin_number,
            ppr->sd_z_min,
            ppr->sd_z_max,
            ppr->sd_z_size,
            psd->sd_detector_delta_Ic,
            6,
            psd->z_th,
            psd->DI_units,
            psd->x_to_nu);
  }
  is_success = system(temporary_string);
  class_test(is_success == -1,
             psd->error_message,
             "The command 'python %s' failed.\nPlease make sure the file exists.",psd->sd_PCA_file_generator);

  return _SUCCESS_;
}

// Assembly:
subq $0x2718, %rsp           # imm = 0x2718
movq %rdi, 0x2708(%rsp)
movq %rsi, 0x2700(%rsp)
movq 0x2700(%rsp), %rax
movswl 0x1600(%rax), %eax
cmpl $0x0, %eax
jle 0x193729
leaq 0x77830(%rip), %rdi     # 0x20af52
movb $0x0, %al
callq 0x8030
leaq 0x77836(%rip), %rdi     # 0x20af66
callq 0x8320
movl %eax, 0x26fc(%rsp)
cmpl $-0x1, 0x26fc(%rsp)
jne 0x1937c2
leaq 0x1830(%rsp), %rdi
leaq 0x77822(%rip), %rsi     # 0x20af77
movb $0x0, %al
callq 0x5b9c0
leaq 0x1030(%rsp), %rdi
leaq 0x1830(%rsp), %rcx
leaq 0x3e90f(%rip), %rsi     # 0x1d2082
leaq 0x7784e(%rip), %rdx     # 0x20afc8
movb $0x0, %al
callq 0x5b9c0
movq 0x2700(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x1030(%rsp), %r8
leaq 0x3e895(%rip), %rsi     # 0x1d2034
leaq 0x77833(%rip), %rdx     # 0x20afd9
movl $0x185, %ecx            # imm = 0x185
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2714(%rsp)
jmp 0x193c3b
movq 0x2700(%rsp), %rax
movswl 0x1600(%rax), %eax
cmpl $0x0, %eax
jle 0x1937e4
leaq 0x7781a(%rip), %rdi     # 0x20aff7
movb $0x0, %al
callq 0x8030
movq 0x2700(%rsp), %rax
cmpl $0x1, 0xcdc(%rax)
jne 0x19398d
jmp 0x1937fb
movq 0x2700(%rsp), %rcx
addq $0x6f4, %rcx            # imm = 0x6F4
movq 0x2700(%rsp), %r8
addq $0x26c, %r8             # imm = 0x26C
movq 0x2708(%rsp), %r9
addq $0x928, %r9             # imm = 0x928
movq 0x2700(%rsp), %r10
addq $0x8, %r10
movq 0x2708(%rsp), %rax
movsd 0x8f0(%rax), %xmm0
movq 0x2708(%rsp), %rax
movsd 0x8f8(%rax), %xmm1
movq 0x2708(%rsp), %rax
movl 0x900(%rax), %eax
movq 0x2700(%rsp), %rdx
movsd 0x318(%rdx), %xmm2
movq 0x2700(%rsp), %rdx
movsd 0x388(%rdx), %xmm3
movq 0x2700(%rsp), %rdx
movsd 0x380(%rdx), %xmm4
xorl %edx, %edx
movl %edx, %esi
leaq 0x7777b(%rip), %rdx     # 0x20b018
movq %rsi, %rdi
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
movl $0x6, 0x10(%rsp)
movb $0x5, %al
callq 0x8540
movl %eax, 0x102c(%rsp)
leaq 0x2030(%rsp), %rdi
movl 0x102c(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq 0x2700(%rsp), %rcx
addq $0x6f4, %rcx            # imm = 0x6F4
movq 0x2700(%rsp), %r8
addq $0x26c, %r8             # imm = 0x26C
movq 0x2708(%rsp), %r9
addq $0x928, %r9             # imm = 0x928
movq 0x2700(%rsp), %r10
addq $0x8, %r10
movq 0x2708(%rsp), %rax
movsd 0x8f0(%rax), %xmm0
movq 0x2708(%rsp), %rax
movsd 0x8f8(%rax), %xmm1
movq 0x2708(%rsp), %rax
movl 0x900(%rax), %eax
movq 0x2700(%rsp), %rdx
movsd 0x318(%rdx), %xmm2
movq 0x2700(%rsp), %rdx
movsd 0x388(%rdx), %xmm3
movq 0x2700(%rsp), %rdx
movsd 0x380(%rdx), %xmm4
leaq 0x776a7(%rip), %rdx     # 0x20b018
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
movl $0x6, 0x10(%rsp)
movb $0x5, %al
callq 0x8540
jmp 0x193b8c
jmp 0x19398f
movq 0x2700(%rsp), %rcx
addq $0x6f4, %rcx            # imm = 0x6F4
movq 0x2700(%rsp), %r8
addq $0x26c, %r8             # imm = 0x26C
movq 0x2700(%rsp), %rax
movsd 0x2d0(%rax), %xmm0
movq 0x2700(%rsp), %rax
movsd 0x2d8(%rax), %xmm1
movq 0x2700(%rsp), %rax
movsd 0x2e0(%rax), %xmm2
movq 0x2700(%rsp), %rax
movl 0x2e8(%rax), %r9d
movq 0x2708(%rsp), %rax
movsd 0x8f0(%rax), %xmm3
movq 0x2708(%rsp), %rax
movsd 0x8f8(%rax), %xmm4
movq 0x2708(%rsp), %rax
movl 0x900(%rax), %eax
movq 0x2700(%rsp), %rdx
movsd 0x2f0(%rdx), %xmm5
movq 0x2700(%rsp), %rdx
movsd 0x318(%rdx), %xmm6
movq 0x2700(%rsp), %rdx
movsd 0x388(%rdx), %xmm7
movq 0x2700(%rsp), %rdx
movsd 0x380(%rdx), %xmm8
xorl %edx, %edx
movl %edx, %esi
leaq 0x775e9(%rip), %rdx     # 0x20b04f
movq %rsi, %rdi
movl %eax, (%rsp)
movl $0x6, 0x8(%rsp)
movsd %xmm8, 0x10(%rsp)
movb $0x8, %al
callq 0x8540
movl %eax, 0x1028(%rsp)
leaq 0x2030(%rsp), %rdi
movl 0x1028(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq 0x2700(%rsp), %rcx
addq $0x6f4, %rcx            # imm = 0x6F4
movq 0x2700(%rsp), %r8
addq $0x26c, %r8             # imm = 0x26C
movq 0x2700(%rsp), %rax
movsd 0x2d0(%rax), %xmm0
movq 0x2700(%rsp), %rax
movsd 0x2d8(%rax), %xmm1
movq 0x2700(%rsp), %rax
movsd 0x2e0(%rax), %xmm2
movq 0x2700(%rsp), %rax
movl 0x2e8(%rax), %r9d
movq 0x2708(%rsp), %rax
movsd 0x8f0(%rax), %xmm3
movq 0x2708(%rsp), %rax
movsd 0x8f8(%rax), %xmm4
movq 0x2708(%rsp), %rax
movl 0x900(%rax), %eax
movq 0x2700(%rsp), %rdx
movsd 0x2f0(%rdx), %xmm5
movq 0x2700(%rsp), %rdx
movsd 0x318(%rdx), %xmm6
movq 0x2700(%rsp), %rdx
movsd 0x388(%rdx), %xmm7
movq 0x2700(%rsp), %rdx
movsd 0x380(%rdx), %xmm8
leaq 0x774de(%rip), %rdx     # 0x20b04f
movl %eax, (%rsp)
movl $0x6, 0x8(%rsp)
movsd %xmm8, 0x10(%rsp)
movb $0x8, %al
callq 0x8540
jmp 0x193b8c
leaq 0x2030(%rsp), %rdi
callq 0x8320
movl %eax, 0x26fc(%rsp)
cmpl $-0x1, 0x26fc(%rsp)
jne 0x193c30
leaq 0x820(%rsp), %rdi
movq 0x2700(%rsp), %rdx
addq $0x6f4, %rdx            # imm = 0x6F4
leaq 0x774d0(%rip), %rsi     # 0x20b09c
movb $0x0, %al
callq 0x5b9c0
leaq 0x20(%rsp), %rdi
leaq 0x820(%rsp), %rcx
leaq 0x3e49b(%rip), %rsi     # 0x1d2082
leaq 0x773da(%rip), %rdx     # 0x20afc8
movb $0x0, %al
callq 0x5b9c0
movq 0x2700(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x20(%rsp), %r8
leaq 0x3e424(%rip), %rsi     # 0x1d2034
leaq 0x773c2(%rip), %rdx     # 0x20afd9
movl $0x1af, %ecx            # imm = 0x1AF
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x2714(%rsp)
jmp 0x193c3b
movl $0x0, 0x2714(%rsp)
movl 0x2714(%rsp), %eax
addq $0x2718, %rsp           # imm = 0x2718
retq
nopw (%rax,%rax)