// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../source/output.c
// Function: output_open_cl_file
int output_open_cl_file(
                        struct harmonic * phr,
                        struct output * pop,
                        FILE * * clfile,
                        FileName filename,
                        char * first_line,
                        int lmax
                        ) {
  /** Summary */

  int index_d1,index_d2;
  int colnum = 1;
  char tmp[60]; //A fixed number here is ok, since it should just correspond to the largest string which is printed to tmp.

  class_open(*clfile,filename,"w",pop->error_message);

  if (pop->write_header == _TRUE_) {

    /** - First we deal with the entries that are dependent of format type */

    if (pop->output_format == class_format) {
      fprintf(*clfile,"# dimensionless %s\n",first_line);
    }
    if (pop->output_format == camb_format) {
      fprintf(*clfile,"# %s (units: [microK]^2)\n",first_line);
    }

    fprintf(*clfile,"# for l=2 to %d, i.e. number of multipoles equal to %d\n",lmax,lmax-1);
    fprintf(*clfile,"#\n");

    if (pop->output_format == class_format) {
      fprintf(*clfile,"# -> if you prefer output in CAMB/HealPix/LensPix units/order, set 'format' to 'camb' in input file\n");
    }

    fprintf(*clfile,"# -> if you don't want to see such a header, set 'headers' to 'no' in input file\n");

    if (phr->has_pp == _TRUE_) {
      if (pop->output_format == class_format) {
        fprintf(*clfile,"# -> for CMB lensing (phi), these are C_l^phi-phi for the lensing potential.\n");
      }
      if (pop->output_format == camb_format) {
        fprintf(*clfile,"# -> for CMB lensing (d), these are C_l^dd for the deflection field.\n");
      }
    }

    if (phr->has_ll == _TRUE_) {
      fprintf(*clfile,"# -> for galaxy lensing (lens[i]), these are C_l^phi-phi for the lensing potential.\n");
    }

    if (phr->has_pp == _TRUE_ || phr->has_ll == _TRUE_) {
      fprintf(*clfile,"#    Remember the conversion factors:\n");
      fprintf(*clfile,"#    C_l^dd (deflection) = l(l+1) C_l^phi-phi\n");
      fprintf(*clfile,"#    C_l^gg (shear/convergence) = 1/4 (l(l+1))^2 C_l^phi-phi\n");
    }

    fprintf(*clfile,"#\n");

    if (0==1){
      fprintf(*clfile,"#");
      class_fprintf_columntitle(*clfile,"l",_TRUE_,colnum);
    }
    else{
      fprintf(*clfile,"# 1:l ");
      colnum++;
    }
    if (pop->output_format == class_format) {
      class_fprintf_columntitle(*clfile,"TT",phr->has_tt,colnum);
      class_fprintf_columntitle(*clfile,"EE",phr->has_ee,colnum);
      class_fprintf_columntitle(*clfile,"TE",phr->has_te,colnum);
      class_fprintf_columntitle(*clfile,"BB",phr->has_bb,colnum);
      class_fprintf_columntitle(*clfile,"phiphi",phr->has_pp,colnum);
      class_fprintf_columntitle(*clfile,"TPhi",phr->has_tp,colnum);
      class_fprintf_columntitle(*clfile,"Ephi",phr->has_ep,colnum);
    }
    else if (pop->output_format == camb_format) {
      class_fprintf_columntitle(*clfile,"TT",phr->has_tt,colnum);
      class_fprintf_columntitle(*clfile,"EE",phr->has_ee,colnum);
      class_fprintf_columntitle(*clfile,"BB",phr->has_bb,colnum);
      class_fprintf_columntitle(*clfile,"TE",phr->has_te,colnum);
      class_fprintf_columntitle(*clfile,"dd",phr->has_pp,colnum);
      class_fprintf_columntitle(*clfile,"dT",phr->has_tp,colnum);
      class_fprintf_columntitle(*clfile,"dE",phr->has_ep,colnum);
    }

    /** - Next deal with entries that are independent of format type */

    if (phr->has_dd == _TRUE_){
      for (index_d1=0; index_d1<phr->d_size; index_d1++){
        for (index_d2=index_d1; index_d2<=MIN(index_d1+phr->non_diag,phr->d_size-1); index_d2++){
          class_sprintf(tmp,"dens[%d]-dens[%d]",index_d1+1,index_d2+1);
          class_fprintf_columntitle(*clfile,tmp,_TRUE_,colnum);
        }
      }
    }
    if (phr->has_td == _TRUE_){
      for (index_d1=0; index_d1<phr->d_size; index_d1++){
        class_sprintf(tmp,"T-dens[%d]",index_d1+1);
        class_fprintf_columntitle(*clfile,tmp,_TRUE_,colnum);
      }
    }
    if (phr->has_pd == _TRUE_){
      for (index_d1=0; index_d1<phr->d_size; index_d1++){
        class_sprintf(tmp,"phi-dens[%d]",index_d1+1);
        class_fprintf_columntitle(*clfile,tmp,_TRUE_,colnum);
      }
    }
    if (phr->has_ll == _TRUE_){
      for (index_d1=0; index_d1<phr->d_size; index_d1++){
        for (index_d2=index_d1; index_d2<=MIN(index_d1+phr->non_diag,phr->d_size-1); index_d2++){
          class_sprintf(tmp,"lens[%d]-lens[%d]",index_d1+1,index_d2+1);
          class_fprintf_columntitle(*clfile,tmp,_TRUE_,colnum);
        }
      }
    }
    if (phr->has_tl == _TRUE_){
      for (index_d1=0; index_d1<phr->d_size; index_d1++){
        class_sprintf(tmp,"T-lens[%d]",index_d1+1);
        class_fprintf_columntitle(*clfile,tmp,_TRUE_,colnum);
      }
    }
    if (phr->has_dl == _TRUE_){
      for (index_d1=0; index_d1<phr->d_size; index_d1++){
        for (index_d2=MAX(index_d1-phr->non_diag,0); index_d2<=MIN(index_d1+phr->non_diag,phr->d_size-1); index_d2++) {
          class_sprintf(tmp,"dens[%d]-lens[%d]",index_d1+1,index_d2+1);
          class_fprintf_columntitle(*clfile,tmp,_TRUE_,colnum);
        }
      }
    }
    fprintf(*clfile,"\n");
  }

  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x838, %rsp            # imm = 0x838
movl %r9d, %ebx
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, 0x10(%rsp)
leaq 0x53dc(%rip), %rsi      # 0xf1421
movq %rcx, %rdi
callq 0x8400
movq %rax, (%r13)
testq %rax, %rax
je 0xec3de
xorl %ecx, %ecx
cmpw $0x1, 0x408(%r15)
jne 0xecba1
movl 0x40c(%r15), %ecx
testl %ecx, %ecx
jne 0xec095
leaq 0x448a0(%rip), %rsi     # 0x13091d
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x84e0
movl 0x40c(%r15), %ecx
movq (%r13), %rax
movq 0x10(%rsp), %r14
cmpl $0x1, %ecx
jne 0xec0b7
leaq 0x4488b(%rip), %rsi     # 0x130931
movq %rax, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x84e0
movq (%r13), %rax
leal -0x1(%rbx), %ecx
leaq 0x4488a(%rip), %rsi     # 0x13094b
movq %rax, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x84e0
movq (%r13), %rcx
leaq 0x1e3fd(%rip), %rdi     # 0x10a4d5
movl $0x2, %esi
movl $0x1, %edx
callq 0x86d0
cmpl $0x0, 0x40c(%r15)
jne 0xec10b
movq (%r13), %rcx
leaq 0x44887(%rip), %rdi     # 0x130983
movl $0x64, %esi
movl $0x1, %edx
callq 0x86d0
movq (%r13), %rcx
leaq 0x448d2(%rip), %rdi     # 0x1309e8
movl $0x51, %esi
movl $0x1, %edx
callq 0x86d0
cmpl $0x1, 0x40(%r14)
jne 0xec177
movl 0x40c(%r15), %eax
testl %eax, %eax
jne 0xec158
movq (%r13), %rcx
leaq 0x448f8(%rip), %rdi     # 0x130a3a
movl $0x4d, %esi
movl $0x1, %edx
callq 0x86d0
movl 0x40c(%r15), %eax
cmpl $0x1, %eax
jne 0xec177
movq (%r13), %rcx
leaq 0x44920(%rip), %rdi     # 0x130a88
movl $0x45, %esi
movl $0x1, %edx
callq 0x86d0
cmpl $0x1, 0x58(%r14)
jne 0xec198
movq (%r13), %rcx
leaq 0x44945(%rip), %rdi     # 0x130ace
movl $0x54, %esi
movl $0x1, %edx
callq 0x86d0
cmpl $0x1, 0x40(%r14)
je 0xec1a6
cmpl $0x1, 0x58(%r14)
jne 0xec1f4
movq (%r13), %rcx
leaq 0x44972(%rip), %rdi     # 0x130b23
movl $0x26, %esi
movl $0x1, %edx
callq 0x86d0
movq (%r13), %rcx
leaq 0x4497f(%rip), %rdi     # 0x130b4a
movl $0x2e, %esi
movl $0x1, %edx
callq 0x86d0
movq (%r13), %rcx
leaq 0x44994(%rip), %rdi     # 0x130b79
movl $0x3d, %esi
movl $0x1, %edx
callq 0x86d0
movq (%r13), %rcx
leaq 0x1e2d6(%rip), %rdi     # 0x10a4d5
movl $0x2, %esi
movl $0x1, %edx
callq 0x86d0
movq (%r13), %rcx
leaq 0x4499e(%rip), %rdi     # 0x130bb7
movl $0x6, %esi
movl $0x1, %edx
callq 0x86d0
movl 0x40c(%r15), %eax
movl $0x2, %r8d
cmpl $0x1, %eax
je 0xec436
testl %eax, %eax
jne 0xec5e6
movl $0x2, %r8d
cmpl $0x1, 0x30(%r14)
jne 0xec28e
movq (%r13), %rdi
leaq 0x44960(%rip), %rax     # 0x130bbe
movq %rax, (%rsp)
leaq 0x44684(%rip), %rsi     # 0x1308ed
leaq 0x4467c(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x2, %r8d
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl $0x3, %r8d
cmpl $0x1, 0x34(%r14)
jne 0xec2cb
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x1bb68(%rip), %rax     # 0x107e0c
movq %rax, (%rsp)
leaq 0x4463e(%rip), %rsi     # 0x1308ed
leaq 0x44636(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebx, %r8d
cmpl $0x1, 0x38(%r14)
jne 0xec308
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x448e0(%rip), %rax     # 0x130bc1
movq %rax, (%rsp)
leaq 0x44601(%rip), %rsi     # 0x1308ed
leaq 0x445f9(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebx, %r8d
cmpl $0x1, 0x3c(%r14)
jne 0xec345
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x448a6(%rip), %rax     # 0x130bc4
movq %rax, (%rsp)
leaq 0x445c4(%rip), %rsi     # 0x1308ed
leaq 0x445bc(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebx, %r8d
cmpl $0x1, 0x40(%r14)
jne 0xec382
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x4486c(%rip), %rax     # 0x130bc7
movq %rax, (%rsp)
leaq 0x44587(%rip), %rsi     # 0x1308ed
leaq 0x4457f(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebx, %r8d
cmpl $0x1, 0x44(%r14)
jne 0xec3bf
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x44836(%rip), %rax     # 0x130bce
movq %rax, (%rsp)
leaq 0x4454a(%rip), %rsi     # 0x1308ed
leaq 0x44542(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebx, %r8d
cmpl $0x1, 0x48(%r14)
jne 0xec5e6
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x447fa(%rip), %rax     # 0x130bd3
jmp 0xec5bf
leaq 0x4603(%rip), %rsi      # 0xf09e8
leaq 0x44515(%rip), %rdx     # 0x130901
leaq 0x1e039(%rip), %r8      # 0x10a42c
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x420, %r15            # imm = 0x420
leaq 0x1c21(%rip), %rsi      # 0xee034
leaq 0x444ef(%rip), %rdx     # 0x130909
movq %r15, %rdi
movl $0x673, %ecx            # imm = 0x673
movq %rbx, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %ecx
jmp 0xecba1
cmpl $0x1, 0x30(%r14)
jne 0xec478
movq (%r13), %rdi
leaq 0x44776(%rip), %rax     # 0x130bbe
movq %rax, (%rsp)
leaq 0x4449a(%rip), %rsi     # 0x1308ed
leaq 0x44492(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x2, %r8d
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl $0x3, %r8d
cmpl $0x1, 0x34(%r14)
jne 0xec4b5
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x1b97e(%rip), %rax     # 0x107e0c
movq %rax, (%rsp)
leaq 0x44454(%rip), %rsi     # 0x1308ed
leaq 0x4444c(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebx, %r8d
cmpl $0x1, 0x3c(%r14)
jne 0xec4f2
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x446f9(%rip), %rax     # 0x130bc4
movq %rax, (%rsp)
leaq 0x44417(%rip), %rsi     # 0x1308ed
leaq 0x4440f(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebx, %r8d
cmpl $0x1, 0x38(%r14)
jne 0xec52f
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x446b9(%rip), %rax     # 0x130bc1
movq %rax, (%rsp)
leaq 0x443da(%rip), %rsi     # 0x1308ed
leaq 0x443d2(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebx, %r8d
cmpl $0x1, 0x40(%r14)
jne 0xec56c
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x3cbc3(%rip), %rax     # 0x129108
movq %rax, (%rsp)
leaq 0x4439d(%rip), %rsi     # 0x1308ed
leaq 0x44395(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebx, %r8d
cmpl $0x1, 0x44(%r14)
jne 0xec5a9
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x44656(%rip), %rax     # 0x130bd8
movq %rax, (%rsp)
leaq 0x44360(%rip), %rsi     # 0x1308ed
leaq 0x44358(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebx, %r8d
cmpl $0x1, 0x48(%r14)
jne 0xec5e6
movq (%r13), %rdi
leal 0x1(%r8), %ebx
leaq 0x4461c(%rip), %rax     # 0x130bdb
movq %rax, (%rsp)
leaq 0x44323(%rip), %rsi     # 0x1308ed
leaq 0x4431b(%rip), %rcx     # 0x1308ec
movl $0x3, %edx
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebx, %r8d
cmpl $0x1, 0x4c(%r14)
movq %r13, 0x18(%rsp)
jne 0xec710
movl 0x98(%r14), %eax
testl %eax, %eax
jle 0xec710
movl (%r14), %ecx
xorl %ebx, %ebx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
leal (%rcx,%rbx), %edx
leal -0x1(%rax), %esi
cmpl %esi, %edx
cmovll %edx, %esi
leal 0x1(%rbx), %edx
movl %edx, 0xc(%rsp)
cmpl %esi, %ebx
movl %edi, 0x24(%rsp)
jle 0xec631
movl %r8d, %r12d
jmp 0xec6f7
movl %edi, %r13d
leaq 0x30(%rsp), %r15
movq %r8, 0x28(%rsp)
leal 0x2(%r13), %r14d
xorl %edi, %edi
xorl %esi, %esi
leaq 0x44591(%rip), %r12     # 0x130bde
movq %r12, %rdx
movl 0xc(%rsp), %ebp
movl %ebp, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x8550
incl %eax
movslq %eax, %rsi
movq %r15, %rdi
movq %r12, %rdx
movl %ebp, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x8550
movq 0x18(%rsp), %rax
movq (%rax), %r14
movq %r15, %rdi
callq 0x8180
movl $0x15, %edx
subl %eax, %edx
cmpl $0x3, %edx
jl 0xec698
movl $0x3, %edx
testl %edx, %edx
movq 0x28(%rsp), %r8
jg 0xec6a3
xorl %edx, %edx
leal 0x1(%r8), %r12d
leaq 0x30(%rsp), %r15
movq %r15, (%rsp)
movq %r14, %rdi
leaq 0x44233(%rip), %rsi     # 0x1308ed
leaq 0x4422b(%rip), %rcx     # 0x1308ec
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movq 0x10(%rsp), %r14
movl (%r14), %ecx
movl 0x98(%r14), %eax
leal (%rcx,%rbx), %edx
leal -0x1(%rax), %esi
cmpl %esi, %edx
cmovll %edx, %esi
incl %r13d
movl %r12d, %r8d
cmpl %esi, %r13d
jl 0xec639
movl 0x24(%rsp), %edi
incl %edi
movl 0xc(%rsp), %edx
movl %edx, %ebx
movl %r12d, %r8d
cmpl %eax, %edx
jl 0xec60f
jmp 0xec713
movl %r8d, %r12d
cmpl $0x1, 0x50(%r14)
jne 0xec7ca
cmpl $0x0, 0x98(%r14)
jle 0xec7ca
xorl %r13d, %r13d
leaq 0x444ba(%rip), %rbx     # 0x130bf0
leaq 0x30(%rsp), %r15
leal 0x1(%r13), %ebp
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8550
incl %eax
movslq %eax, %rsi
movq %r15, %rdi
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8550
movq 0x18(%rsp), %rax
movq (%rax), %r14
movq %r15, %rdi
callq 0x8180
movl $0x15, %edx
subl %eax, %edx
cmpl $0x3, %edx
jl 0xec784
movl $0x3, %edx
testl %edx, %edx
jg 0xec78a
xorl %edx, %edx
addl %r12d, %r13d
movq %r15, (%rsp)
movq %r14, %rdi
leaq 0x44152(%rip), %rsi     # 0x1308ed
leaq 0x4414a(%rip), %rcx     # 0x1308ec
movl %r13d, %r8d
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebp, %r13d
movq 0x10(%rsp), %r14
cmpl 0x98(%r14), %ebp
jl 0xec73b
addl %ebp, %r12d
cmpl $0x1, 0x54(%r14)
jne 0xec881
cmpl $0x0, 0x98(%r14)
jle 0xec881
xorl %r13d, %r13d
leaq 0x4440e(%rip), %rbx     # 0x130bfb
leaq 0x30(%rsp), %r15
leal 0x1(%r13), %ebp
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8550
incl %eax
movslq %eax, %rsi
movq %r15, %rdi
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8550
movq 0x18(%rsp), %rax
movq (%rax), %r14
movq %r15, %rdi
callq 0x8180
movl $0x15, %edx
subl %eax, %edx
cmpl $0x3, %edx
jl 0xec83b
movl $0x3, %edx
testl %edx, %edx
jg 0xec841
xorl %edx, %edx
addl %r12d, %r13d
movq %r15, (%rsp)
movq %r14, %rdi
leaq 0x4409b(%rip), %rsi     # 0x1308ed
leaq 0x44093(%rip), %rcx     # 0x1308ec
movl %r13d, %r8d
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebp, %r13d
movq 0x10(%rsp), %r14
cmpl 0x98(%r14), %ebp
jl 0xec7f2
addl %ebp, %r12d
cmpl $0x1, 0x58(%r14)
jne 0xec9a9
movl 0x98(%r14), %eax
testl %eax, %eax
jle 0xec9a9
movl (%r14), %ecx
xorl %ebx, %ebx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
leal (%rcx,%rbx), %edx
leal -0x1(%rax), %esi
cmpl %esi, %edx
cmovll %edx, %esi
leal 0x1(%rbx), %edx
movl %edx, 0xc(%rsp)
cmpl %esi, %ebx
movl %edi, 0x24(%rsp)
jle 0xec8c7
movl %r12d, %r15d
jmp 0xec990
movl %edi, %r13d
leaq 0x30(%rsp), %rbp
movq %r12, 0x28(%rsp)
leal 0x2(%r13), %r14d
xorl %edi, %edi
xorl %esi, %esi
leaq 0x44325(%rip), %r15     # 0x130c08
movq %r15, %rdx
movl 0xc(%rsp), %r12d
movl %r12d, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x8550
incl %eax
movslq %eax, %rsi
movq %rbp, %rdi
movq %r15, %rdx
movl %r12d, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x8550
movq 0x18(%rsp), %rax
movq (%rax), %r14
movq %rbp, %rdi
callq 0x8180
movl $0x15, %edx
subl %eax, %edx
cmpl $0x3, %edx
jl 0xec931
movl $0x3, %edx
testl %edx, %edx
movq 0x28(%rsp), %r8
jg 0xec93c
xorl %edx, %edx
leal 0x1(%r8), %r15d
leaq 0x30(%rsp), %rbp
movq %rbp, (%rsp)
movq %r14, %rdi
leaq 0x43f9a(%rip), %rsi     # 0x1308ed
leaq 0x43f92(%rip), %rcx     # 0x1308ec
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movq 0x10(%rsp), %r14
movl (%r14), %ecx
movl 0x98(%r14), %eax
leal (%rcx,%rbx), %edx
leal -0x1(%rax), %esi
cmpl %esi, %edx
cmovll %edx, %esi
incl %r13d
movl %r15d, %r12d
cmpl %esi, %r13d
jl 0xec8cf
movl 0x24(%rsp), %edi
incl %edi
movl 0xc(%rsp), %edx
movl %edx, %ebx
movl %r15d, %r12d
cmpl %eax, %edx
jl 0xec8a5
jmp 0xec9ac
movl %r12d, %r15d
cmpl $0x1, 0x5c(%r14)
jne 0xeca63
cmpl $0x0, 0x98(%r14)
jle 0xeca63
xorl %r13d, %r13d
leaq 0x4424b(%rip), %rbx     # 0x130c1a
leaq 0x30(%rsp), %r12
leal 0x1(%r13), %ebp
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8550
incl %eax
movslq %eax, %rsi
movq %r12, %rdi
movq %rbx, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8550
movq 0x18(%rsp), %rax
movq (%rax), %r14
movq %r12, %rdi
callq 0x8180
movl $0x15, %edx
subl %eax, %edx
cmpl $0x3, %edx
jl 0xeca1d
movl $0x3, %edx
testl %edx, %edx
jg 0xeca23
xorl %edx, %edx
addl %r15d, %r13d
movq %r12, (%rsp)
movq %r14, %rdi
leaq 0x43eb9(%rip), %rsi     # 0x1308ed
leaq 0x43eb1(%rip), %rcx     # 0x1308ec
movl %r13d, %r8d
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movl %ebp, %r13d
movq 0x10(%rsp), %r14
cmpl 0x98(%r14), %ebp
jl 0xec9d4
addl %ebp, %r15d
cmpl $0x1, 0x60(%r14)
jne 0xecb8d
movl 0x98(%r14), %eax
testl %eax, %eax
jle 0xecb8d
movl (%r14), %ecx
xorl %ebp, %ebp
movl %ebp, %ebx
subl %ecx, %ebx
testl %ebx, %ebx
movl $0x0, %edx
cmovgl %ebx, %edx
leal (%rcx,%rbp), %esi
leal -0x1(%rax), %edi
cmpl %edi, %esi
cmovll %esi, %edi
leal 0x1(%rbp), %esi
movl %esi, 0xc(%rsp)
cmpl %edi, %edx
jle 0xecaae
movl %r15d, %r13d
jmp 0xecb7c
testl %ebx, %ebx
movl $0x0, %eax
cmovlel %eax, %ebx
decl %ebx
leaq 0x30(%rsp), %r12
movq %r15, 0x28(%rsp)
leal 0x2(%rbx), %r14d
xorl %edi, %edi
xorl %esi, %esi
leaq 0x44152(%rip), %r13     # 0x130c25
movq %r13, %rdx
movl 0xc(%rsp), %r15d
movl %r15d, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x8550
incl %eax
movslq %eax, %rsi
movq %r12, %rdi
movq %r13, %rdx
movl %r15d, %ecx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x8550
movq 0x18(%rsp), %rax
movq (%rax), %r14
movq %r12, %rdi
callq 0x8180
movl $0x15, %edx
subl %eax, %edx
cmpl $0x3, %edx
jl 0xecb21
movl $0x3, %edx
testl %edx, %edx
movq 0x28(%rsp), %r8
jg 0xecb2c
xorl %edx, %edx
leal 0x1(%r8), %r13d
leaq 0x30(%rsp), %r12
movq %r12, (%rsp)
movq %r14, %rdi
leaq 0x43daa(%rip), %rsi     # 0x1308ed
leaq 0x43da2(%rip), %rcx     # 0x1308ec
movl $0x12, %r9d
xorl %eax, %eax
callq 0x84e0
movq 0x10(%rsp), %rax
movl (%rax), %ecx
movl 0x98(%rax), %eax
leal (%rcx,%rbp), %edx
leal -0x1(%rax), %esi
cmpl %esi, %edx
cmovll %edx, %esi
incl %ebx
movl %r13d, %r15d
cmpl %esi, %ebx
jl 0xecabf
movl 0xc(%rsp), %edx
movl %edx, %ebp
movl %r13d, %r15d
cmpl %eax, %edx
jl 0xeca82
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movl $0xa, %edi
callq 0x8440
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x838, %rsp            # imm = 0x838
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq