// File: /workspace/github_c_makefile_star2_O0/yhg926[P]public_kssd/command_dist.c
// Function: output_ctrl
static inline void output_ctrl (unsigned int X_size, unsigned int XnY_size, print_ctrl_t* outfield, char *rname, prt_line_t* linebuf ){
 double rs = 0;
 if(outfield->correction){
  unsigned int X_XnY_size = X_size - XnY_size;
  unsigned int Y_XnY_size = outfield->Y_size - XnY_size;
  double P_K_in_X_XnY = 1 - pow( (1- 1/pow(alp_size,(kmerlen - dim_reduct_len) )), X_XnY_size );
  double P_K_in_Y_XnY = 1 - pow( (1- 1/pow(alp_size,(kmerlen - dim_reduct_len) )), Y_XnY_size );
  rs = P_K_in_X_XnY * P_K_in_Y_XnY * ( X_XnY_size + Y_XnY_size )
       /(P_K_in_X_XnY + P_K_in_Y_XnY - 2*P_K_in_X_XnY * P_K_in_Y_XnY);
 }
 unsigned int tmp = outfield->metric == Jcd ? X_size + outfield->Y_size - XnY_size
                   :(X_size < outfield->Y_size ? X_size : outfield->Y_size);
 double metric = ((double)XnY_size - rs) / tmp;
 double dist = log( GET_MATRIC(outfield->metric,metric) ) / kmerlen;
 if (dist > 1) dist = 1 ;
  if( dist > outfield->dthreshold ) { linebuf->len = 0 ; return; };
#define LST_PRT_LEN 27
 snprintf(linebuf->line,LINE_LEN,"%s\t%s\t%u-%u|%u|%u\t%.6lf\t%.6lf",outfield->qname,rname,XnY_size,(unsigned int)rs,X_size, outfield->Y_size, metric, dist);
 linebuf->len = LST_PRT_LEN + outfield->qry_len + strlen(linebuf->line + LST_PRT_LEN + outfield->qry_len);
 if(outfield->pfield > Dst) {
  double sd = pow(metric*(1 - metric) / tmp, 0.5) ;
  double pv = 0.5 * erfc( metric / sd * pow(0.5,0.5) ) ;
  snprintf(linebuf->line + linebuf->len, LINE_LEN - linebuf->len,"\t%E\t%E", pv, pv * outfield->cmprsn_num );
  linebuf->len += 4 + strlen(linebuf->line + linebuf->len + 4);
  if(outfield->pfield >Qv){
   double CI95_mtrc_1 = metric - 1.96*sd;
   double CI95_mtrc_2 = metric + 1.96*sd;
   double CI95_dist_1 = log( GET_MATRIC(outfield->metric,CI95_mtrc_2) ) / kmerlen;
   double CI95_dist_2 = log( GET_MATRIC(outfield->metric,CI95_mtrc_1) ) / kmerlen;
   snprintf(linebuf->line + linebuf->len, LINE_LEN - linebuf->len,"\t[%.6lf,%.6lf]\t[%.6lf,%.6lf]", CI95_mtrc_1, CI95_mtrc_2, CI95_dist_1, CI95_dist_2);
   linebuf->len += 20 + strlen(linebuf->line + linebuf->len + 20);
  }
 }
 snprintf(linebuf->line + linebuf->len, LINE_LEN - linebuf->len,"\n");
 linebuf->len += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movl %edi, -0x84(%rbp)
movl %esi, -0x88(%rbp)
movq %rdx, -0x90(%rbp)
movq %rcx, -0x98(%rbp)
movq %r8, -0xa0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xa8(%rbp)
movq -0x90(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0xfb42
movl -0x84(%rbp), %eax
movl -0x88(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0xac(%rbp)
movq -0x90(%rbp), %rax
movl 0x18(%rax), %eax
movl -0x88(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0xb0(%rbp)
cvtsi2sdl 0x12e2c(%rip), %xmm1 # 0x227e8
movl 0x54b26(%rip), %eax     # 0x644e8
movl 0x54b24(%rip), %ecx     # 0x644ec
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm1, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd -0x10(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
callq 0x30d0
movaps %xmm0, %xmm2
movsd 0xccc6(%rip), %xmm1     # 0x1c6b8
movsd %xmm1, -0x110(%rbp)
movaps %xmm1, %xmm0
divsd %xmm2, %xmm0
subsd %xmm0, %xmm1
movl -0xac(%rbp), %eax
cvtsi2sd %rax, %xmm0
movsd %xmm1, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x30d0
movaps %xmm0, %xmm1
movsd -0x110(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0xb8(%rbp)
cvtsi2sdl 0x12da0(%rip), %xmm1 # 0x227e8
movl 0x54a9a(%rip), %eax     # 0x644e8
movl 0x54a98(%rip), %ecx     # 0x644ec
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm1, -0x30(%rbp)
movsd %xmm0, -0x38(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
callq 0x30d0
movsd -0x110(%rbp), %xmm1
movaps %xmm0, %xmm2
movaps %xmm1, %xmm0
divsd %xmm2, %xmm0
subsd %xmm0, %xmm1
movl -0xb0(%rbp), %eax
cvtsi2sd %rax, %xmm0
movsd %xmm1, -0x40(%rbp)
movsd %xmm0, -0x48(%rbp)
movsd -0x40(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
callq 0x30d0
movaps %xmm0, %xmm1
movsd -0x110(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0xb8(%rbp), %xmm0
movsd -0xc0(%rbp), %xmm1
mulsd %xmm1, %xmm0
movl -0xac(%rbp), %eax
movl -0xb0(%rbp), %ecx
addl %ecx, %eax
cvtsi2sd %rax, %xmm1
mulsd %xmm1, %xmm0
movsd -0xb8(%rbp), %xmm2
addsd -0xc0(%rbp), %xmm2
movsd 0xcbb9(%rip), %xmm1     # 0x1c6c0
mulsd -0xb8(%rbp), %xmm1
movsd -0xc0(%rbp), %xmm3
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
movq -0x90(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xfb6c
movl -0x84(%rbp), %eax
movq -0x90(%rbp), %rcx
addl 0x18(%rcx), %eax
subl -0x88(%rbp), %eax
movl %eax, -0x114(%rbp)
jmp 0xfba8
movl -0x84(%rbp), %eax
movq -0x90(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0xfb8c
movl -0x84(%rbp), %eax
movl %eax, -0x118(%rbp)
jmp 0xfb9c
movq -0x90(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x118(%rbp)
movl -0x118(%rbp), %eax
movl %eax, -0x114(%rbp)
movl -0x114(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0x88(%rbp), %eax
cvtsi2sd %rax, %xmm0
movsd -0xa8(%rbp), %xmm1
subsd %xmm1, %xmm0
movl -0xc4(%rbp), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0xd0(%rbp)
movq -0x90(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xfc20
movsd 0xcaca(%rip), %xmm1     # 0x1c6c0
mulsd -0xd0(%rbp), %xmm1
movsd 0xcab2(%rip), %xmm0     # 0x1c6b8
divsd %xmm1, %xmm0
movsd 0xcac6(%rip), %xmm1     # 0x1c6d8
addsd %xmm1, %xmm0
movsd %xmm0, -0x120(%rbp)
jmp 0xfc38
movsd 0xca90(%rip), %xmm0     # 0x1c6b8
divsd -0xd0(%rbp), %xmm0
movsd %xmm0, -0x120(%rbp)
movsd -0x120(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
callq 0x3210
cvtsi2sdl 0x54891(%rip), %xmm1 # 0x644e8
divsd %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
movsd -0xd8(%rbp), %xmm0
movsd 0xca45(%rip), %xmm1     # 0x1c6b8
ucomisd %xmm1, %xmm0
jbe 0xfc89
movsd 0xca37(%rip), %xmm0     # 0x1c6b8
movsd %xmm0, -0xd8(%rbp)
movsd -0xd8(%rbp), %xmm0
movq -0x90(%rbp), %rax
ucomisd 0x10(%rax), %xmm0
jbe 0xfcb1
movq -0xa0(%rbp), %rax
movl $0x0, (%rax)
jmp 0x1011c
movq -0xa0(%rbp), %rdi
addq $0x4, %rdi
movq -0x90(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x98(%rbp), %r8
movl -0x88(%rbp), %r9d
cvttsd2si -0xa8(%rbp), %rax
movl %eax, %r11d
movl -0x84(%rbp), %r10d
movq -0x90(%rbp), %rax
movl 0x18(%rax), %eax
movsd -0xd0(%rbp), %xmm0
movsd -0xd8(%rbp), %xmm1
movl $0x400, %esi            # imm = 0x400
leaq 0xd7e1(%rip), %rdx      # 0x1d4ef
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x2, %al
callq 0x3190
movq -0x90(%rbp), %rax
movl 0x30(%rax), %eax
addl $0x1b, %eax
cltq
movq %rax, -0x128(%rbp)
movq -0xa0(%rbp), %rdi
addq $0x4, %rdi
addq $0x1b, %rdi
movq -0x90(%rbp), %rax
movslq 0x30(%rax), %rax
addq %rax, %rdi
callq 0x3110
movq %rax, %rcx
movq -0x128(%rbp), %rax
addq %rcx, %rax
movl %eax, %ecx
movq -0xa0(%rbp), %rax
movl %ecx, (%rax)
movq -0x90(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jbe 0x100d7
movsd -0xd0(%rbp), %xmm0
movsd 0xc925(%rip), %xmm1     # 0x1c6b8
subsd %xmm0, %xmm1
mulsd %xmm1, %xmm0
movl -0xc4(%rbp), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, -0x138(%rbp)
movq %rax, -0x58(%rbp)
movsd -0x50(%rbp), %xmm0
movsd -0x58(%rbp), %xmm1
callq 0x30d0
movq -0x138(%rbp), %rax
movsd %xmm0, -0xe0(%rbp)
movsd -0xd0(%rbp), %xmm0
movsd -0xe0(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x130(%rbp)
movq %rax, -0x60(%rbp)
movq %rax, -0x68(%rbp)
movsd -0x60(%rbp), %xmm0
movsd -0x68(%rbp), %xmm1
callq 0x30d0
movaps %xmm0, %xmm1
movsd -0x130(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x3030
movsd 0xc89d(%rip), %xmm1     # 0x1c6d8
mulsd %xmm1, %xmm0
movsd %xmm0, -0xe8(%rbp)
movq -0xa0(%rbp), %rax
movslq (%rax), %rdx
movl %edx, %ecx
leaq 0x4(%rax,%rdx), %rdi
movl $0x400, %eax            # imm = 0x400
subl %ecx, %eax
movslq %eax, %rsi
movsd -0xe8(%rbp), %xmm1
movaps %xmm1, %xmm0
movq -0x90(%rbp), %rax
movq 0x20(%rax), %xmm2
movaps 0xc1a0(%rip), %xmm3     # 0x1c020
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movapd 0xc1a4(%rip), %xmm3     # 0x1c030
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm1
leaq 0xd667(%rip), %rdx      # 0x1d50d
movb $0x2, %al
callq 0x3190
movq -0xa0(%rbp), %rdi
addq $0x4, %rdi
movq -0xa0(%rbp), %rax
movslq (%rax), %rax
addq %rax, %rdi
addq $0x4, %rdi
callq 0x3110
movq %rax, %rdx
addq $0x4, %rdx
movq -0xa0(%rbp), %rax
movslq (%rax), %rcx
addq %rdx, %rcx
movl %ecx, (%rax)
movq -0x90(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jbe 0x100d5
movsd -0xd0(%rbp), %xmm1
movsd -0xe0(%rbp), %xmm0
movsd 0xc7c3(%rip), %xmm2     # 0x1c6d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xf0(%rbp)
movsd -0xd0(%rbp), %xmm1
movsd -0xe0(%rbp), %xmm0
movsd 0xc793(%rip), %xmm2     # 0x1c6c8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xf8(%rbp)
movq -0x90(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xff83
movsd 0xc767(%rip), %xmm1     # 0x1c6c0
mulsd -0xf8(%rbp), %xmm1
movsd 0xc74f(%rip), %xmm0     # 0x1c6b8
divsd %xmm1, %xmm0
movsd 0xc763(%rip), %xmm1     # 0x1c6d8
addsd %xmm1, %xmm0
movsd %xmm0, -0x140(%rbp)
jmp 0xff9b
movsd 0xc72d(%rip), %xmm0     # 0x1c6b8
divsd -0xf8(%rbp), %xmm0
movsd %xmm0, -0x140(%rbp)
movsd -0x140(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
callq 0x3210
cvtsi2sdl 0x5452e(%rip), %xmm1 # 0x644e8
divsd %xmm1, %xmm0
movsd %xmm0, -0x100(%rbp)
movq -0x90(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x10004
movsd 0xc6e6(%rip), %xmm1     # 0x1c6c0
mulsd -0xf0(%rbp), %xmm1
movsd 0xc6ce(%rip), %xmm0     # 0x1c6b8
divsd %xmm1, %xmm0
movsd 0xc6e2(%rip), %xmm1     # 0x1c6d8
addsd %xmm1, %xmm0
movsd %xmm0, -0x148(%rbp)
jmp 0x1001c
movsd 0xc6ac(%rip), %xmm0     # 0x1c6b8
divsd -0xf0(%rbp), %xmm0
movsd %xmm0, -0x148(%rbp)
movsd -0x148(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
callq 0x3210
cvtsi2sdl 0x544ad(%rip), %xmm1 # 0x644e8
divsd %xmm1, %xmm0
movsd %xmm0, -0x108(%rbp)
movq -0xa0(%rbp), %rdi
addq $0x4, %rdi
movq -0xa0(%rbp), %rax
movslq (%rax), %rax
addq %rax, %rdi
movq -0xa0(%rbp), %rcx
movl $0x400, %eax            # imm = 0x400
subl (%rcx), %eax
movslq %eax, %rsi
movsd -0xf0(%rbp), %xmm0
movsd -0xf8(%rbp), %xmm1
movsd -0x100(%rbp), %xmm2
movsd -0x108(%rbp), %xmm3
leaq 0xd47d(%rip), %rdx      # 0x1d514
movb $0x4, %al
callq 0x3190
movq -0xa0(%rbp), %rdi
addq $0x4, %rdi
movq -0xa0(%rbp), %rax
movslq (%rax), %rax
addq %rax, %rdi
addq $0x14, %rdi
callq 0x3110
movq %rax, %rdx
addq $0x14, %rdx
movq -0xa0(%rbp), %rax
movslq (%rax), %rcx
addq %rdx, %rcx
movl %ecx, (%rax)
jmp 0x100d7
movq -0xa0(%rbp), %rdi
addq $0x4, %rdi
movq -0xa0(%rbp), %rax
movslq (%rax), %rax
addq %rax, %rdi
movq -0xa0(%rbp), %rcx
movl $0x400, %eax            # imm = 0x400
subl (%rcx), %eax
movslq %eax, %rsi
leaq 0xeea8(%rip), %rdx      # 0x1efaf
movb $0x0, %al
callq 0x3190
movq -0xa0(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw %cs:(%rax,%rax)