// File: /workspace/github_c_makefile_star2_O3/zhou-lab[P]tbmate/chunk.c
// Function: tbk_print1
void tbk_print1(tbk_data_t *d, int i, view_conf_t *conf, kstring_t *ks) {

  switch(DATA_TYPE(d->dtype)) {
  case DT_INT1: {
    ksprintf(ks, "\t%d", ((uint8_t*)(d->data))[i]);
    break;
  }
  case DT_INT2: {
    ksprintf(ks, "\t%d", ((uint8_t*)(d->data))[i]);
    break;
  }
  case DT_INT32: {
    int data = ((int32_t*) (d->data))[i];
    if (conf->na_for_negative && data < 0) { kputc('\t', ks); kputs(conf->na_token, ks); }
    else ksprintf(ks, "\t%d", data);
    break;
  }
  case DT_FLOAT: {
    float data = ((float*) (d->data))[i];
    if (conf->na_for_negative && data < 0) { kputc('\t', ks); kputs(conf->na_token, ks); }
    else ksprintf(ks, "\t%f", data);
    break;
  }
  case DT_DOUBLE: {
    double data = ((double*) (d->data))[i];
    if (conf->na_for_negative && data < 0) { kputc('\t', ks); kputs(conf->na_token, ks); }
    else ksprintf(ks, "\t%f", data);
    break;
  }
  case DT_STRINGF: {
    char *data = ((char*) (d->data)) + i*STRING_MAX(d->dtype);
    kputc('\t', ks); kputs(data, ks);
    break;
  }
  case DT_STRINGD: {
    char *data = ((char**) (d->data))[i];
    kputc('\t', ks); kputs(data, ks);
    free(data);
    break;
  }
  case DT_ONES: {
    float data = ((float*) (d->data))[i];
    if (conf->na_for_negative && data < 0) { kputc('\t', ks); kputs(conf->na_token, ks); }
    else ksprintf(ks, "\t%.*f", conf->precision, data);
    break;
  }
  case DT_FLOAT_INT: {
    float data = ((float*) (d->data))[i*2];
    int data2 = ((int32_t*) (d->data))[i*2+1];
    if (conf->na_for_negative && data < 0) {
      kputc('\t', ks); kputs(conf->na_token, ks);
    } else {
      if (conf->min_coverage >= 0 && data2 < conf->min_coverage) {
        kputc('\t', ks); kputs(conf->na_token, ks);
      } else {
        ksprintf(ks, "\t%f", data);
      }
    }
    if (conf->print_all_units) ksprintf(ks, "\t%d", data2);
    break;
  }
  case DT_FLOAT_FLOAT: {
    float data = ((float*) (d->data))[i*2];
    float data2 = ((float*) (d->data))[i*2+1];
    if (conf->na_for_negative && data < 0) {
      kputc('\t', ks); kputs(conf->na_token, ks);
    } else {
      if (conf->max_pval >= 0 && data2 > conf->max_pval) {
        kputc('\t', ks); kputs(conf->na_token, ks);
      } else {
        ksprintf(ks, "\t%f", data);
      }
    }
    if (conf->print_all_units) ksprintf(ks, "\t%f", data2);
    break;
  }
  default: wzfatal("Unrecognized data type: %d.\n", DATA_TYPE(d->dtype));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq (%rdi), %r15
movzbl %r15b, %eax
cmpl $0x1d, %eax
jg 0x7add
decl %eax
cmpl $0x6, %eax
ja 0x8239
leaq 0x45f28(%rip), %rcx     # 0x4d9d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rdi), %rax
movslq %esi, %rcx
movzbl (%rax,%rcx), %edx
leaq 0x4586b(%rip), %rsi     # 0x4d332
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb642
cmpl $0x1e, %eax
je 0x7c57
cmpl $0x1f, %eax
je 0x7bd9
cmpl $0x20, %eax
jne 0x8239
movq 0x8(%rdi), %rax
leal (%rsi,%rsi), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
leal 0x1(,%rsi,2), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm3
cmpl $0x0, 0x10(%r14)
movss %xmm3, 0xc(%rsp)
je 0x7b2b
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x7b46
movss 0x30(%r14), %xmm1
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jb 0x81ea
ucomiss %xmm1, %xmm3
jbe 0x81ea
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0x80c9
movq 0x10(%rbx), %rax
jmp 0x811a
movq 0x8(%rdi), %rax
movslq %esi, %rcx
movsd (%rax,%rcx,8), %xmm0
cmpl $0x0, 0x10(%r14)
je 0x820f
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x7c7a
jmp 0x820f
movq 0x8(%rdi), %rax
movslq %esi, %rcx
movl (%rax,%rcx,4), %edx
cmpl $0x0, 0x10(%r14)
setne %al
testl %edx, %edx
sets %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x7ac0
jmp 0x7c7a
movq 0x8(%rdi), %rax
movslq %esi, %rcx
movss (%rax,%rcx,4), %xmm0
cmpl $0x0, 0x10(%r14)
je 0x7bd0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x7c7a
cvtss2sd %xmm0, %xmm0
jmp 0x820f
movq 0x8(%rdi), %rax
leal (%rsi,%rsi), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
leal 0x1(,%rsi,2), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ebp
cmpl $0x0, 0x10(%r14)
je 0x7c04
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x7c18
movl 0x34(%r14), %eax
testl %eax, %eax
js 0x81bd
cmpl %eax, %ebp
jge 0x81bd
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0x7fce
movq 0x10(%rbx), %rax
jmp 0x801f
movq 0x8(%rdi), %rax
movslq %esi, %rcx
movq (%rax,%rcx,8), %r14
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0x7dd5
movq 0x10(%rbx), %rax
jmp 0x7e26
movq 0x8(%rdi), %rax
movslq %esi, %rcx
movss (%rax,%rcx,4), %xmm0
cmpl $0x0, 0x10(%r14)
je 0x7db1
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x7db1
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0x7c8d
movq 0x10(%rbx), %rax
jmp 0x7cde
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x37b0
testq %rax, %rax
je 0x7cf0
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x9, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movq 0x18(%r14), %r14
movq %r14, %rdi
callq 0x3380
movq (%rbx), %rdi
movslq %eax, %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jae 0x7d15
movq 0x10(%rbx), %rax
jmp 0x7d66
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x37b0
testq %rax, %rax
je 0x822c
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
addq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3850
addq (%rbx), %r15
movq %r15, (%rbx)
movq 0x10(%rbx), %rax
movb $0x0, (%rax,%r15)
jmp 0x822c
movslq %esi, %rax
shrq $0x8, %r15
imulq %rax, %r15
addq 0x8(%rdi), %r15
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x8(%rbx), %rcx
jae 0x7ed7
movq 0x10(%rbx), %rax
jmp 0x7f28
movl (%r14), %edx
cvtss2sd %xmm0, %xmm0
leaq 0x4557b(%rip), %rsi     # 0x4d33a
movq %rbx, %rdi
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb642
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x37b0
testq %rax, %rax
je 0x7e38
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x9, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movq %r14, %rdi
callq 0x3380
movq (%rbx), %rdi
movslq %eax, %r15
leaq (%rdi,%r15), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jae 0x7e59
movq 0x10(%rbx), %rax
jmp 0x7ea6
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x37b0
testq %rax, %rax
je 0x7ec3
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
addq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3850
addq (%rbx), %r15
movq %r15, (%rbx)
movq 0x10(%rbx), %rax
movb $0x0, (%rax,%r15)
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3370
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x37b0
testq %rax, %rax
je 0x7f3a
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x9, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movq %r15, %rdi
callq 0x3380
movq (%rbx), %rdi
movslq %eax, %r14
leaq (%rdi,%r14), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jae 0x7f5b
movq 0x10(%rbx), %rax
jmp 0x7fac
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x37b0
testq %rax, %rax
je 0x822c
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
addq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3850
addq (%rbx), %r14
movq %r14, (%rbx)
movq 0x10(%rbx), %rax
movb $0x0, (%rax,%r14)
jmp 0x822c
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x37b0
testq %rax, %rax
je 0x8031
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x9, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movq 0x18(%r14), %r15
movq %r15, %rdi
callq 0x3380
movq (%rbx), %rdi
movslq %eax, %r12
leaq (%rdi,%r12), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jae 0x8056
movq 0x10(%rbx), %rax
jmp 0x80a7
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x37b0
testq %rax, %rax
je 0x81d2
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
addq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3850
addq (%rbx), %r12
movq %r12, (%rbx)
movq 0x10(%rbx), %rax
movb $0x0, (%rax,%r12)
jmp 0x81d2
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x37b0
testq %rax, %rax
je 0x812c
movq %rax, 0x10(%rbx)
movq (%rbx), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, (%rbx)
movb $0x9, (%rax,%rdx)
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movq 0x18(%r14), %r15
movq %r15, %rdi
callq 0x3380
movq (%rbx), %rdi
movslq %eax, %r12
leaq (%rdi,%r12), %rax
incq %rax
cmpq 0x8(%rbx), %rax
jae 0x8151
movq 0x10(%rbx), %rax
jmp 0x819e
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rbx)
movq 0x10(%rbx), %rdi
callq 0x37b0
testq %rax, %rax
je 0x81ff
movq %rax, 0x10(%rbx)
movq (%rbx), %rdi
addq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3850
addq (%rbx), %r12
movq %r12, (%rbx)
movq 0x10(%rbx), %rax
movb $0x0, (%rax,%r12)
jmp 0x81ff
cvtss2sd %xmm0, %xmm0
leaq 0x4516e(%rip), %rsi     # 0x4d336
movq %rbx, %rdi
movb $0x1, %al
callq 0xb642
cmpl $0x0, 0xc(%r14)
je 0x822c
leaq 0x45152(%rip), %rsi     # 0x4d332
movq %rbx, %rdi
movl %ebp, %edx
jmp 0x7aca
cvtss2sd %xmm0, %xmm0
leaq 0x45141(%rip), %rsi     # 0x4d336
movq %rbx, %rdi
movb $0x1, %al
callq 0xb642
cmpl $0x0, 0xc(%r14)
je 0x822c
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
leaq 0x45120(%rip), %rsi     # 0x4d336
movq %rbx, %rdi
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb642
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movzbl %r15b, %esi
leaq 0x450fc(%rip), %rdi     # 0x4d340
xorl %eax, %eax
callq 0x824b