// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/test/test-vcf-api.c
// Function: write_bcf
void write_bcf(char *fname)
{
    // Init
    htsFile *fp    = hts_open(fname,"wb");
    if (!fp) error("Failed to open \"%s\" : %s", fname, strerror(errno));
    bcf_hdr_t *hdr = bcf_hdr_init("w");
    if (!hdr) error("bcf_hdr_init : %s", strerror(errno));
    bcf1_t *rec    = bcf_init1();
    if (!rec) error("bcf_init1 : %s", strerror(errno));

    // Check no-op on fresh bcf1_t
    check0(bcf_update_alleles(hdr, rec, NULL, 0));

    // Create VCF header
    kstring_t str = {0,0,0};
    check0(bcf_hdr_append(hdr, "##fileDate=20090805"));
    check0(bcf_hdr_append(hdr, "##FORMAT=<ID=UF,Number=1,Type=Integer,Description=\"Unused FORMAT\">"));
    check0(bcf_hdr_append(hdr, "##INFO=<ID=UI,Number=1,Type=Integer,Description=\"Unused INFO\">"));
    check0(bcf_hdr_append(hdr, "##FILTER=<ID=Flt,Description=\"Unused FILTER\">"));
    check0(bcf_hdr_append(hdr, "##unused=<XX=AA,Description=\"Unused generic\">"));
    check0(bcf_hdr_append(hdr, "##unused=<ID=BB,Description=\"Unused generic with ID\">"));
    check0(bcf_hdr_append(hdr, "##unused=unformatted text 1"));
    check0(bcf_hdr_append(hdr, "##unused=unformatted text 2"));
    check0(bcf_hdr_append(hdr, "##contig=<ID=Unused,length=1>"));
    check0(bcf_hdr_append(hdr, "##source=myImputationProgramV3.1"));
    check0(bcf_hdr_append(hdr, "##reference=file:///seq/references/1000GenomesPilot-NCBI36.fasta"));
    check0(bcf_hdr_append(hdr, "##contig=<ID=20,length=62435964,assembly=B36,md5=f126cdf8a6e0c7f379d618ff66beb2da,species=\"Homo sapiens\",taxonomy=x>"));
    check0(bcf_hdr_append(hdr, "##phasing=partial"));
    check0(bcf_hdr_append(hdr, "##INFO=<ID=NS,Number=1,Type=Integer,Description=\"Number of Samples With Data\">"));
    check0(bcf_hdr_append(hdr, "##INFO=<ID=DP,Number=1,Type=Integer,Description=\"Total Depth\">"));
    check0(bcf_hdr_append(hdr, "##INFO=<ID=NEG,Number=.,Type=Integer,Description=\"Test -ve Numbers\">"));
    check0(bcf_hdr_append(hdr, "##INFO=<ID=AF,Number=A,Type=Float,Description=\"Allele Frequency\">"));
    check0(bcf_hdr_append(hdr, "##INFO=<ID=AA,Number=1,Type=String,Description=\"Ancestral Allele\">"));
    check0(bcf_hdr_append(hdr, "##INFO=<ID=DB,Number=0,Type=Flag,Description=\"dbSNP membership, build 129\">"));
    check0(bcf_hdr_append(hdr, "##INFO=<ID=H2,Number=0,Type=Flag,Description=\"HapMap2 membership\">"));
    check0(bcf_hdr_append(hdr, "##FILTER=<ID=q10,Description=\"Quality below 10\">"));
    check0(bcf_hdr_append(hdr, "##FILTER=<ID=s50,Description=\"Less than half of samples have data\">"));
    check0(bcf_hdr_append(hdr, "##FORMAT=<ID=GT,Number=1,Type=String,Description=\"Genotype\">"));
    check0(bcf_hdr_append(hdr, "##FORMAT=<ID=GQ,Number=1,Type=Integer,Description=\"Genotype Quality\">"));
    check0(bcf_hdr_append(hdr, "##FORMAT=<ID=DP,Number=1,Type=Integer,Description=\"Read Depth\">"));
    check0(bcf_hdr_append(hdr, "##FORMAT=<ID=HQ,Number=2,Type=Integer,Description=\"Haplotype Quality\">"));
    check0(bcf_hdr_append(hdr, "##FORMAT=<ID=TS,Number=1,Type=String,Description=\"Test String 1\">"));

    // Try a few header modifications
    bcf_hdr_remove(hdr, BCF_HL_CTG, "Unused");
    check0(bcf_hdr_append(hdr, "##contig=<ID=Unused,length=62435964>"));
    bcf_hdr_remove(hdr, BCF_HL_FMT, "TS");
    check0(bcf_hdr_append(hdr, "##FORMAT=<ID=TS,Number=1,Type=String,Description=\"Test String\">"));
    bcf_hdr_remove(hdr, BCF_HL_INFO, "NEG");
    check0(bcf_hdr_append(hdr, "##INFO=<ID=NEG,Number=.,Type=Integer,Description=\"Test Negative Numbers\">"));
    bcf_hdr_remove(hdr, BCF_HL_FLT, "s50");
    check0(bcf_hdr_append(hdr, "##FILTER=<ID=s50,Description=\"Less than 50% of samples have data\">"));

    check0(bcf_hdr_add_sample(hdr, "NA00001"));
    check0(bcf_hdr_add_sample(hdr, "NA00002"));
    check0(bcf_hdr_add_sample(hdr, "NA00003"));
    check0(bcf_hdr_add_sample(hdr, NULL));      // to update internal structures
    if ( bcf_hdr_write(fp, hdr)!=0 ) error("Failed to write to %s\n", fname);


    // Add a record
    // 20     14370   rs6054257 G      A       29   PASS   NS=3;DP=14;NEG=-127;AF=0.5;DB;H2           GT:GQ:DP:HQ 0|0:48:1:51,51 1|0:48:8:51,51 1/1:43:5:.,.
    // .. CHROM
    rec->rid = bcf_hdr_name2id(hdr, "20");
    // .. POS
    rec->pos = 14369;
    // .. ID
    check0(bcf_update_id(hdr, rec, "rs6054257"));
    // .. REF and ALT
    test_update_alleles(hdr, rec);
    const char *alleles[2] = { "G", "A" };
    check0(bcf_update_alleles_str(hdr, rec, "G,A"));
    check0(check_alleles(rec, alleles, 2));
    // .. QUAL
    rec->qual = 29;
    // .. FILTER
    int32_t tmpi = bcf_hdr_id2int(hdr, BCF_DT_ID, "PASS");
    check0(bcf_update_filter(hdr, rec, &tmpi, 1));
    // .. INFO
    tmpi = 3;
    check0(bcf_update_info_int32(hdr, rec, "NS", &tmpi, 1));
    tmpi = 500;
    check0(bcf_update_info_int32(hdr, rec, "DP", &tmpi, 1));
    tmpi = 100000;
    check0(bcf_update_info_int32(hdr, rec, "DP", &tmpi, 1));
    tmpi = 14;
    check0(bcf_update_info_int32(hdr, rec, "DP", &tmpi, 1));
    tmpi = -127;
    check0(bcf_update_info_int32(hdr, rec, "NEG", &tmpi, 1));
    float tmpf = 0.5;
    check0(bcf_update_info_float(hdr, rec, "AF", &tmpf, 1));
    check0(bcf_update_info_flag(hdr, rec, "DB", NULL, 1));
    check0(bcf_update_info_flag(hdr, rec, "H2", NULL, 1));
    // .. FORMAT
    int32_t *tmpia = (int*)malloc(bcf_hdr_nsamples(hdr)*2*sizeof(int));
    tmpia[0] = bcf_gt_phased(0);
    tmpia[1] = bcf_gt_phased(0);
    tmpia[2] = bcf_gt_phased(1);
    tmpia[3] = bcf_gt_phased(0);
    tmpia[4] = bcf_gt_unphased(1);
    tmpia[5] = bcf_gt_unphased(1);
    check0(bcf_update_genotypes(hdr, rec, tmpia, bcf_hdr_nsamples(hdr)*2));
    tmpia[0] = 48;
    tmpia[1] = 48;
    tmpia[2] = 43;
    check0(bcf_update_format_int32(hdr, rec, "GQ", tmpia, bcf_hdr_nsamples(hdr)));
    tmpia[0] = 0;
    tmpia[1] = 0;
    tmpia[2] = 1;
    check0(bcf_update_format_int32(hdr, rec, "DP", tmpia, bcf_hdr_nsamples(hdr)));
    tmpia[0] = 1;
    tmpia[1] = 100000;
    tmpia[2] = 1;
    check0(bcf_update_format_int32(hdr, rec, "DP", tmpia, bcf_hdr_nsamples(hdr)));
    tmpia[0] = 1;
    tmpia[1] = 8;
    tmpia[2] = 5;
    check0(bcf_update_format_int32(hdr, rec, "DP", tmpia, bcf_hdr_nsamples(hdr)));
    tmpia[0] = 51;
    tmpia[1] = 51;
    tmpia[2] = 51;
    tmpia[3] = 51;
    tmpia[4] = bcf_int32_missing;
    tmpia[5] = bcf_int32_missing;
    check0(bcf_update_format_int32(hdr, rec, "HQ", tmpia, bcf_hdr_nsamples(hdr)*2));
    char *tmp_str[] = {"String1","SomeOtherString2","YetAnotherString3"};
    check0(bcf_update_format_string(hdr, rec, "TS", (const char**)tmp_str, 3));
    tmp_str[0] = "LongerStringRequiringBufferReallocation";
    check0(bcf_update_format_string(hdr, rec, "TS", (const char**)tmp_str, 3));
    tmp_str[0] = "String1";
    check0(bcf_update_format_string(hdr, rec, "TS", (const char**)tmp_str, 3));
    if ( bcf_write1(fp, hdr, rec)!=0 ) error("Failed to write to %s\n", fname);

    // 20     1110696 . A      G,T     67   .   NS=2;DP=10;NEG=-128;AF=0.333,.;AA=T;DB GT 2 1   ./.
    bcf_clear1(rec);
    rec->rid = bcf_hdr_name2id(hdr, "20");
    rec->pos = 1110695;
    check0(bcf_update_alleles_str(hdr, rec, "A,G,T"));
    rec->qual = 67;
    tmpi = 2;
    check0(bcf_update_info_int32(hdr, rec, "NS", &tmpi, 1));
    tmpi = 10;
    check0(bcf_update_info_int32(hdr, rec, "DP", &tmpi, 1));
    tmpi = -128;
    check0(bcf_update_info_int32(hdr, rec, "NEG", &tmpi, 1));
    float *tmpfa = (float*)malloc(2*sizeof(float));
    tmpfa[0] = 0.333;
    bcf_float_set_missing(tmpfa[1]);
    check0(bcf_update_info_float(hdr, rec, "AF", tmpfa, 2));
    check0(bcf_update_info_string(hdr, rec, "AA", "SHORT"));
    check0(bcf_update_info_string(hdr, rec, "AA", "LONGSTRING"));
    check0(bcf_update_info_string(hdr, rec, "AA", "T"));
    check0(bcf_update_info_flag(hdr, rec, "DB", NULL, 1));
    tmpia[0] = bcf_gt_phased(2);
    tmpia[1] = bcf_int32_vector_end;
    tmpia[2] = bcf_gt_phased(1);
    tmpia[3] = bcf_int32_vector_end;
    tmpia[4] = bcf_gt_missing;
    tmpia[5] = bcf_gt_missing;
    check0(bcf_update_genotypes(hdr, rec, tmpia, bcf_hdr_nsamples(hdr)*2));
    if ( bcf_write1(fp, hdr, rec)!=0 ) error("Failed to write to %s\n", fname);

    free(tmpia);
    free(tmpfa);

    // Clean
    free(str.s);
    bcf_destroy1(rec);
    bcf_hdr_destroy(hdr);
    int ret;
    if ( (ret=hts_close(fp)) )
    {
        fprintf(stderr,"hts_close(%s): non-zero status %d\n",fname,ret);
        exit(ret);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0xa5f6c(%rip), %rsi     # 0xac04c
callq 0xbee7
testq %rax, %rax
je 0x6df6
movq %rax, %r14
leaq 0xaa6c9(%rip), %rdi     # 0xb07c1
callq 0x317a9
testq %rax, %rax
je 0x6e16
movq %rax, %r15
callq 0x32e93
testq %rax, %rax
je 0x6e2b
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x431ad
testl %eax, %eax
jne 0x6d73
leaq 0xa5f88(%rip), %rsi     # 0xac0c0
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6e46
leaq 0xa5fb0(%rip), %rsi     # 0xac0ff
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6e59
leaq 0xa6038(%rip), %rsi     # 0xac19e
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6e6c
leaq 0xa60b8(%rip), %rsi     # 0xac235
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6e7f
leaq 0xa6116(%rip), %rsi     # 0xac2aa
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6e92
leaq 0xa6174(%rip), %rsi     # 0xac31f
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6ea5
leaq 0xa762b(%rip), %rsi     # 0xad7ed
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6eb8
leaq 0xa61fe(%rip), %rsi     # 0xac3d7
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6ecb
leaq 0xa7737(%rip), %rsi     # 0xad927
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6ede
leaq 0xa6254(%rip), %rsi     # 0xac45b
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6ef1
leaq 0xa6296(%rip), %rsi     # 0xac4b4
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6f04
leaq 0xa6318(%rip), %rsi     # 0xac54d
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6f17
leaq 0xa6404(%rip), %rsi     # 0xac650
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6f2a
leaq 0xa6428(%rip), %rsi     # 0xac68b
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6f3d
leaq 0xa64c8(%rip), %rsi     # 0xac742
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6f50
leaq 0xa6548(%rip), %rsi     # 0xac7d9
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6f63
leaq 0xa65d4(%rip), %rsi     # 0xac87c
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6f76
leaq 0xa665a(%rip), %rsi     # 0xac919
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6f89
leaq 0xa66e2(%rip), %rsi     # 0xac9b8
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6f9c
leaq 0xa677c(%rip), %rsi     # 0xaca69
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6faf
leaq 0xa6804(%rip), %rsi     # 0xacb08
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6fc2
leaq 0xa6868(%rip), %rsi     # 0xacb83
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6fd5
leaq 0xa68f2(%rip), %rsi     # 0xacc24
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6fe8
leaq 0xa696e(%rip), %rsi     # 0xaccb7
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x6ffb
leaq 0xa69fc(%rip), %rsi     # 0xacd5c
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x700e
leaq 0xa6a7e(%rip), %rsi     # 0xacdf5
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x7021
leaq 0xa6b0e(%rip), %rsi     # 0xace9c
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x7034
leaq 0xa6b94(%rip), %rdx     # 0xacf39
movq %r15, %rdi
movl $0x3, %esi
callq 0x30f91
leaq 0xa6b87(%rip), %rsi     # 0xacf40
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x7047
leaq 0xa6bd1(%rip), %rdx     # 0xacfa1
movq %r15, %rdi
movl $0x2, %esi
callq 0x30f91
leaq 0xa6bc0(%rip), %rsi     # 0xacfa4
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x705a
leaq 0xa6c42(%rip), %rdx     # 0xad03d
movq %r15, %rdi
movl $0x1, %esi
callq 0x30f91
leaq 0xa6c32(%rip), %rsi     # 0xad041
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x706d
leaq 0xa6cc8(%rip), %rdx     # 0xad0ee
movq %r15, %rdi
xorl %esi, %esi
callq 0x30f91
leaq 0xa6cbb(%rip), %rsi     # 0xad0f2
movq %r15, %rdi
callq 0x30f5f
testl %eax, %eax
jne 0x7080
leaq 0xa6d43(%rip), %rsi     # 0xad191
movq %r15, %rdi
callq 0x2dfec
testl %eax, %eax
jne 0x7093
leaq 0xa6d57(%rip), %rsi     # 0xad1bc
movq %r15, %rdi
callq 0x2dfec
testl %eax, %eax
jne 0x70a6
leaq 0xa6d6b(%rip), %rsi     # 0xad1e7
movq %r15, %rdi
callq 0x2dfec
testl %eax, %eax
jne 0x70b9
movq %r15, %rdi
xorl %esi, %esi
callq 0x2dfec
testl %eax, %eax
jne 0x70cc
movq %r14, %rdi
movq %r15, %rsi
callq 0x32ad4
testl %eax, %eax
jne 0x70df
leaq 0xa6d95(%rip), %rdx     # 0xad24d
movq %r15, %rdi
movl $0x1, %esi
callq 0x30be5
movl %eax, 0x10(%r12)
movq $0x3821, (%r12)         # imm = 0x3821
leaq 0xa6d77(%rip), %rdx     # 0xad250
movq %r15, %rdi
movq %r12, %rsi
callq 0x43615
testl %eax, %eax
jne 0x70ee
movaps 0xcd1dd(%rip), %xmm0    # 0xd36d0
leaq 0x60(%rsp), %rdx
movaps %xmm0, (%rdx)
movq 0xcd1ee(%rip), %rax     # 0xd36f0
movq %rax, 0x30(%rsp)
movaps 0xcd1d2(%rip), %xmm0    # 0xd36e0
movaps %xmm0, 0x20(%rsp)
movq 0xcd1f6(%rip), %rax     # 0xd3710
movq %rax, 0x10(%rsp)
movaps 0xcd1da(%rip), %xmm0    # 0xd3700
movaps %xmm0, (%rsp)
movq %rax, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movq (%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movl $0x2, %ecx
callq 0x431ad
testl %eax, %eax
jne 0x7101
leaq 0x60(%rsp), %rsi
movq %r12, %rdi
movl $0x2, %edx
callq 0x7293
testl %eax, %eax
jne 0x7114
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x431ad
testl %eax, %eax
jne 0x6d73
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7293
testl %eax, %eax
jne 0x7127
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
movl $0x3, %ecx
callq 0x431ad
testl %eax, %eax
jne 0x713a
leaq 0x20(%rsp), %rsi
movq %r12, %rdi
movl $0x3, %edx
callq 0x7293
testl %eax, %eax
jne 0x6d86
movq %rsp, %rdx
movq %r15, %rdi
movq %r12, %rsi
movl $0x3, %ecx
callq 0x431ad
testl %eax, %eax
jne 0x714d
movq %rsp, %rsi
movq %r12, %rdi
movl $0x3, %edx
callq 0x7293
testl %eax, %eax
jne 0x7160
movq 0x88(%r12), %rax
movq 0x8(%rax), %rax
leaq 0x40(%rsp), %rdx
movq %rax, 0x8(%rdx)
movq %r15, %rdi
movq %r12, %rsi
movl $0x3, %ecx
callq 0x431ad
testl %eax, %eax
jne 0x7173
movq %rbx, 0x18(%rsp)
movq 0x8(%rsp), %rax
leaq 0x40(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq %r12, %rdi
movl $0x3, %edx
callq 0x7293
testl %eax, %eax
jne 0x7186
movq 0x88(%r12), %rbp
movq (%rbp), %r13
movq %r13, %rdi
callq 0x41c0
leaq (%rax,%r13), %rbx
addq $-0x4, %rbx
movq 0x10(%rbp), %r13
movq %r13, %rdi
callq 0x41c0
addq %r13, %rax
decq %rax
movq %rax, (%rbp)
movq 0x88(%r12), %rax
movq %rbx, 0x10(%rax)
movq 0x88(%r12), %rdx
movq %r15, %rdi
movq %r12, %rsi
movl $0x3, %ecx
callq 0x431ad
testl %eax, %eax
jne 0x7199
leaq 0x20(%rsp), %rsi
movq %r12, %rdi
movl $0x3, %edx
callq 0x7293
testl %eax, %eax
jne 0x6d86
leaq 0xa6ba3(%rip), %rdx     # 0xad27f
movq %r15, %rdi
movq %r12, %rsi
callq 0x4348f
testl %eax, %eax
jne 0x71ac
leaq 0xccfda(%rip), %rsi     # 0xd36d0
movq %r12, %rdi
movl $0x2, %edx
callq 0x7293
testl %eax, %eax
jne 0x71bf
movl $0x41e80000, 0x14(%r12) # imm = 0x41E80000
leaq 0xa6baf(%rip), %rdx     # 0xad2ca
movq %r15, %rdi
xorl %esi, %esi
callq 0x30be5
movq %rsp, %rdx
movl %eax, (%rdx)
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %ecx
callq 0x42f11
testl %eax, %eax
jne 0x71d2
movq %rsp, %rcx
movl $0x3, (%rcx)
leaq 0xa886c(%rip), %rdx     # 0xaefbe
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x6d99
movq %rsp, %rcx
movl $0x1f4, (%rcx)          # imm = 0x1F4
leaq 0xa6ba6(%rip), %rdx     # 0xad327
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x6d3a
movq %rsp, %rcx
movl $0x186a0, (%rcx)        # imm = 0x186A0
leaq 0xa6b77(%rip), %rdx     # 0xad327
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x6d3a
movq %rsp, %rcx
movl $0xe, (%rcx)
leaq 0xa6b48(%rip), %rdx     # 0xad327
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x6d3a
movq %rsp, %rcx
movl $0xffffff81, (%rcx)     # imm = 0xFFFFFF81
leaq 0xa682f(%rip), %rdx     # 0xad03d
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x6dac
leaq 0x40(%rsp), %rcx
movl $0x3f000000, (%rcx)     # imm = 0x3F000000
leaq 0xb7908(%rip), %rdx     # 0xbe147
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x2, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x71e5
leaq 0xa6b5c(%rip), %rdx     # 0xad3c1
movq %r15, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x6dbf
leaq 0xa6b71(%rip), %rdx     # 0xad3fb
movq %r15, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x71f5
movslq 0x8(%r15), %rdi
shlq $0x3, %rdi
callq 0x46a0
movq %rax, %r13
movaps 0xa5751(%rip), %xmm0    # 0xac010
movups %xmm0, (%rax)
movabsq $0x400000004, %rax      # imm = 0x400000004
movq %rax, 0x10(%r13)
movl 0x8(%r15), %r8d
addl %r8d, %r8d
leaq 0xae7d2(%rip), %rdx     # 0xb50b0
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
movl $0x1, %r9d
callq 0x42483
testl %eax, %eax
jne 0x6dd2
movabsq $0x3000000030, %rax     # imm = 0x3000000030
movq %rax, (%r13)
movl $0x2b, 0x8(%r13)
movl 0x8(%r15), %r8d
leaq 0xa6b58(%rip), %rdx     # 0xad473
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
movl $0x1, %r9d
callq 0x42483
testl %eax, %eax
jne 0x7205
movq $0x0, (%r13)
movl $0x1, 0x8(%r13)
movl 0x8(%r15), %r8d
leaq 0xa69d5(%rip), %rdx     # 0xad327
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
movl $0x1, %r9d
callq 0x42483
testl %eax, %eax
jne 0x6d4d
movabsq $0x186a000000001, %rax  # imm = 0x186A000000001
movq %rax, (%r13)
movl $0x1, 0x8(%r13)
movl 0x8(%r15), %r8d
leaq 0xa6998(%rip), %rdx     # 0xad327
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
movl $0x1, %r9d
callq 0x42483
testl %eax, %eax
jne 0x6d4d
movabsq $0x800000001, %rax      # imm = 0x800000001
movq %rax, (%r13)
movl $0x5, 0x8(%r13)
movl 0x8(%r15), %r8d
leaq 0xa695b(%rip), %rdx     # 0xad327
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
movl $0x1, %r9d
callq 0x42483
testl %eax, %eax
jne 0x6d4d
movaps 0xa5631(%rip), %xmm0    # 0xac020
movups %xmm0, (%r13)
movabsq $-0x7fffffff80000000, %rax # imm = 0x8000000080000000
movq %rax, 0x10(%r13)
movl 0x8(%r15), %r8d
addl %r8d, %r8d
leaq 0xa6ae2(%rip), %rdx     # 0xad4f2
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
movl $0x1, %r9d
callq 0x42483
testl %eax, %eax
jne 0x7215
movq 0xccc6d(%rip), %rax     # 0xd36a0
leaq 0x20(%rsp), %rcx
movq %rax, 0x10(%rcx)
movaps 0xccc4d(%rip), %xmm0    # 0xd3690
movaps %xmm0, (%rcx)
leaq 0xa6554(%rip), %rdx     # 0xacfa1
movq %r15, %rdi
movq %r12, %rsi
movl $0x3, %r8d
callq 0x4234b
testl %eax, %eax
jne 0x6d60
leaq 0xa6b36(%rip), %rax     # 0xad5a3
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
leaq 0xa6525(%rip), %rdx     # 0xacfa1
movq %r15, %rdi
movq %r12, %rsi
movl $0x3, %r8d
callq 0x4234b
testl %eax, %eax
jne 0x6d60
leaq 0xa6a99(%rip), %rax     # 0xad535
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
leaq 0xa64f6(%rip), %rdx     # 0xacfa1
movq %r15, %rdi
movq %r12, %rsi
movl $0x3, %r8d
callq 0x4234b
testl %eax, %eax
jne 0x6d60
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x34dc3
testl %eax, %eax
jne 0x6de5
movq %r12, %rdi
callq 0x32ea2
leaq 0xa6764(%rip), %rdx     # 0xad24d
movq %r15, %rdi
movl $0x1, %esi
callq 0x30be5
movl %eax, 0x10(%r12)
movq $0x10f2a7, (%r12)       # imm = 0x10F2A7
leaq 0xa6ac1(%rip), %rdx     # 0xad5cb
movq %r15, %rdi
movq %r12, %rsi
callq 0x4348f
testl %eax, %eax
jne 0x7225
movl $0x42860000, 0x14(%r12) # imm = 0x42860000
movq %rsp, %rcx
movl $0x2, (%rcx)
leaq 0xa8488(%rip), %rdx     # 0xaefbe
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x6d99
movq %rsp, %rcx
movl $0xa, (%rcx)
leaq 0xa67c2(%rip), %rdx     # 0xad327
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x6d3a
movq %rsp, %rcx
movl $0xffffff80, (%rcx)     # imm = 0xFFFFFF80
leaq 0xa64a9(%rip), %rdx     # 0xad03d
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x6dac
movl $0x8, %edi
callq 0x46a0
movq %rax, %rbp
movl $0x3eaa7efa, (%rax)     # imm = 0x3EAA7EFA
leaq 0xce903(%rip), %rax     # 0xd54d0
movl (%rax), %eax
movl %eax, 0x4(%rbp)
leaq 0xb756e(%rip), %rdx     # 0xbe147
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rcx
movl $0x2, %r8d
movl $0x2, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x7235
leaq 0xa6a2b(%rip), %rdx     # 0xad62d
leaq 0xa6a27(%rip), %rcx     # 0xad630
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x3, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x7245
leaq 0xa69fe(%rip), %rdx     # 0xad62d
leaq 0xa6a32(%rip), %rcx     # 0xad668
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x3, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x7255
leaq 0xa69d1(%rip), %rdx     # 0xad62d
leaq 0xa696c(%rip), %rcx     # 0xad5cf
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %r8d
movl $0x3, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x7265
leaq 0xa6738(%rip), %rdx     # 0xad3c1
movq %r15, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x41ced
testl %eax, %eax
jne 0x6dbf
movaps 0xa5382(%rip), %xmm0    # 0xac030
movups %xmm0, (%r13)
movq $0x0, 0x10(%r13)
movl 0x8(%r15), %r8d
addl %r8d, %r8d
leaq 0xae3e7(%rip), %rdx     # 0xb50b0
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
movl $0x1, %r9d
callq 0x42483
testl %eax, %eax
jne 0x6dd2
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x34dc3
testl %eax, %eax
jne 0x6de5
movq %r13, %rdi
callq 0x45c0
movq %rbp, %rdi
callq 0x45c0
movq %r12, %rdi
callq 0x33036
movq %r15, %rdi
callq 0x31cf6
movq %r14, %rdi
callq 0xd151
testl %eax, %eax
jne 0x727a
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa5348(%rip), %rdi     # 0xac089
leaq 0xa65e2(%rip), %rsi     # 0xad32a
jmp 0x7273
leaq 0xa5335(%rip), %rdi     # 0xac089
leaq 0xa6759(%rip), %rsi     # 0xad4b4
jmp 0x7273
leaq 0xa5322(%rip), %rdi     # 0xac089
leaq 0xa67f2(%rip), %rsi     # 0xad560
jmp 0x7273
leaq 0xa530f(%rip), %rdi     # 0xac089
leaq 0xa5313(%rip), %rsi     # 0xac094
jmp 0x7273
leaq 0xa52fc(%rip), %rdi     # 0xac089
leaq 0xa76b4(%rip), %rsi     # 0xae448
jmp 0x7273
leaq 0xa52e9(%rip), %rdi     # 0xac089
leaq 0xa654e(%rip), %rsi     # 0xad2f5
jmp 0x7273
leaq 0xa52d6(%rip), %rdi     # 0xac089
leaq 0xa65a2(%rip), %rsi     # 0xad35c
jmp 0x7273
leaq 0xa52c3(%rip), %rdi     # 0xac089
leaq 0xa65f7(%rip), %rsi     # 0xad3c4
jmp 0x7273
leaq 0xa52b0(%rip), %rdi     # 0xac089
leaq 0xa6655(%rip), %rsi     # 0xad435
jmp 0x7273
leaq 0xa644a(%rip), %rdi     # 0xad236
movq 0x18(%rsp), %rsi
jmp 0x7273
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0xa5246(%rip), %rdi     # 0xac04f
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x600c
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0xa523f(%rip), %rdi     # 0xac068
jmp 0x6e3e
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0xa523c(%rip), %rdi     # 0xac07a
movq %rax, %rsi
jmp 0x7273
leaq 0xa523c(%rip), %rdi     # 0xac089
leaq 0xa5280(%rip), %rsi     # 0xac0d4
jmp 0x7273
leaq 0xa5229(%rip), %rdi     # 0xac089
leaq 0xa52db(%rip), %rsi     # 0xac142
jmp 0x7273
leaq 0xa5216(%rip), %rdi     # 0xac089
leaq 0xa5363(%rip), %rsi     # 0xac1dd
jmp 0x7273
leaq 0xa5203(%rip), %rdi     # 0xac089
leaq 0xa53d6(%rip), %rsi     # 0xac263
jmp 0x7273
leaq 0xa51f0(%rip), %rdi     # 0xac089
leaq 0xa5438(%rip), %rsi     # 0xac2d8
jmp 0x7273
leaq 0xa51dd(%rip), %rdi     # 0xac089
leaq 0xa54a2(%rip), %rsi     # 0xac355
jmp 0x7273
leaq 0xa51ca(%rip), %rdi     # 0xac089
leaq 0xa54de(%rip), %rsi     # 0xac3a4
jmp 0x7273
leaq 0xa51b7(%rip), %rdi     # 0xac089
leaq 0xa551a(%rip), %rsi     # 0xac3f3
jmp 0x7273
leaq 0xa51a4(%rip), %rdi     # 0xac089
leaq 0xa553a(%rip), %rsi     # 0xac426
jmp 0x7273
leaq 0xa5191(%rip), %rdi     # 0xac089
leaq 0xa557d(%rip), %rsi     # 0xac47c
jmp 0x7273
leaq 0xa517e(%rip), %rdi     # 0xac089
leaq 0xa55e3(%rip), %rsi     # 0xac4f5
jmp 0x7273
leaq 0xa516b(%rip), %rdi     # 0xac089
leaq 0xa569d(%rip), %rsi     # 0xac5c2
jmp 0x7273
leaq 0xa5158(%rip), %rdi     # 0xac089
leaq 0xa572a(%rip), %rsi     # 0xac662
jmp 0x7273
leaq 0xa5145(%rip), %rdi     # 0xac089
leaq 0xa578f(%rip), %rsi     # 0xac6da
jmp 0x7273
leaq 0xa5132(%rip), %rdi     # 0xac089
leaq 0xa5823(%rip), %rsi     # 0xac781
jmp 0x7273
leaq 0xa511f(%rip), %rdi     # 0xac089
leaq 0xa58ad(%rip), %rsi     # 0xac81e
jmp 0x7273
leaq 0xa510c(%rip), %rdi     # 0xac089
leaq 0xa593a(%rip), %rsi     # 0xac8be
jmp 0x7273
leaq 0xa50f9(%rip), %rdi     # 0xac089
leaq 0xa59c5(%rip), %rsi     # 0xac95c
jmp 0x7273
leaq 0xa50e6(%rip), %rdi     # 0xac089
leaq 0xa5a5a(%rip), %rsi     # 0xaca04
jmp 0x7273
leaq 0xa50d3(%rip), %rdi     # 0xac089
leaq 0xa5aef(%rip), %rsi     # 0xacaac
jmp 0x7273
leaq 0xa50c0(%rip), %rdi     # 0xac089
leaq 0xa5b69(%rip), %rsi     # 0xacb39
jmp 0x7273
leaq 0xa50ad(%rip), %rdi     # 0xac089
leaq 0xa5be4(%rip), %rsi     # 0xacbc7
jmp 0x7273
leaq 0xa509a(%rip), %rdi     # 0xac089
leaq 0xa5c6b(%rip), %rsi     # 0xacc61
jmp 0x7273
leaq 0xa5087(%rip), %rdi     # 0xac089
leaq 0xa5cf4(%rip), %rsi     # 0xaccfd
jmp 0x7273
leaq 0xa5074(%rip), %rdi     # 0xac089
leaq 0xa5d80(%rip), %rsi     # 0xacd9c
jmp 0x7273
leaq 0xa5061(%rip), %rdi     # 0xac089
leaq 0xa5e0d(%rip), %rsi     # 0xace3c
jmp 0x7273
leaq 0xa504e(%rip), %rdi     # 0xac089
leaq 0xa5e9c(%rip), %rsi     # 0xacede
jmp 0x7273
leaq 0xa503b(%rip), %rdi     # 0xac089
leaq 0xa5f10(%rip), %rsi     # 0xacf65
jmp 0x7273
leaq 0xa5028(%rip), %rdi     # 0xac089
leaq 0xa5f7c(%rip), %rsi     # 0xacfe4
jmp 0x7273
leaq 0xa5015(%rip), %rdi     # 0xac089
leaq 0xa6010(%rip), %rsi     # 0xad08b
jmp 0x7273
leaq 0xa5002(%rip), %rdi     # 0xac089
leaq 0xa60a7(%rip), %rsi     # 0xad135
jmp 0x7273
leaq 0xa4fef(%rip), %rdi     # 0xac089
leaq 0xa60f8(%rip), %rsi     # 0xad199
jmp 0x7273
leaq 0xa4fdc(%rip), %rdi     # 0xac089
leaq 0xa6110(%rip), %rsi     # 0xad1c4
jmp 0x7273
leaq 0xa4fc9(%rip), %rdi     # 0xac089
leaq 0xa6128(%rip), %rsi     # 0xad1ef
jmp 0x7273
leaq 0xa4fb6(%rip), %rdi     # 0xac089
leaq 0xa6138(%rip), %rsi     # 0xad212
jmp 0x7273
leaq 0xa6150(%rip), %rdi     # 0xad236
movq %rbx, %rsi
jmp 0x7273
leaq 0xa4f94(%rip), %rdi     # 0xac089
leaq 0xa615e(%rip), %rsi     # 0xad25a
jmp 0x7273
leaq 0xa4f81(%rip), %rdi     # 0xac089
leaq 0xa72a3(%rip), %rsi     # 0xae3b2
jmp 0x7273
leaq 0xa4f6e(%rip), %rdi     # 0xac089
leaq 0xa72ba(%rip), %rsi     # 0xae3dc
jmp 0x7273
leaq 0xa4f5b(%rip), %rdi     # 0xac089
leaq 0xa72c7(%rip), %rsi     # 0xae3fc
jmp 0x7273
leaq 0xa4f48(%rip), %rdi     # 0xac089
leaq 0xa72d6(%rip), %rsi     # 0xae41e
jmp 0x7273
leaq 0xa4f35(%rip), %rdi     # 0xac089
leaq 0xa730d(%rip), %rsi     # 0xae468
jmp 0x7273
leaq 0xa4f22(%rip), %rdi     # 0xac089
leaq 0xa7324(%rip), %rsi     # 0xae492
jmp 0x7273
leaq 0xa4f0f(%rip), %rdi     # 0xac089
leaq 0xa7331(%rip), %rsi     # 0xae4b2
jmp 0x7273
leaq 0xa4efc(%rip), %rdi     # 0xac089
leaq 0xa7348(%rip), %rsi     # 0xae4dc
jmp 0x7273
leaq 0xa4ee9(%rip), %rdi     # 0xac089
leaq 0xa7355(%rip), %rsi     # 0xae4fc
jmp 0x7273
leaq 0xa4ed6(%rip), %rdi     # 0xac089
leaq 0xa60c9(%rip), %rsi     # 0xad283
jmp 0x7273
leaq 0xa4ec3(%rip), %rdi     # 0xac089
leaq 0xa60de(%rip), %rsi     # 0xad2ab
jmp 0x7273
leaq 0xa4eb0(%rip), %rdi     # 0xac089
leaq 0xa60ef(%rip), %rsi     # 0xad2cf
jmp 0x7273
leaq 0xa4e9d(%rip), %rdi     # 0xac089
leaq 0xa619c(%rip), %rsi     # 0xad38f
jmp 0x7273
leaq 0xa4e8d(%rip), %rdi     # 0xac089
leaq 0xa61fb(%rip), %rsi     # 0xad3fe
jmp 0x7273
leaq 0xa4e7d(%rip), %rdi     # 0xac089
leaq 0xa6263(%rip), %rsi     # 0xad476
jmp 0x7273
leaq 0xa4e6d(%rip), %rdi     # 0xac089
leaq 0xa62d2(%rip), %rsi     # 0xad4f5
jmp 0x7273
leaq 0xa4e5d(%rip), %rdi     # 0xac089
leaq 0xa639e(%rip), %rsi     # 0xad5d1
jmp 0x7273
leaq 0xa4e4d(%rip), %rdi     # 0xac089
leaq 0xa63b8(%rip), %rsi     # 0xad5fb
jmp 0x7273
leaq 0xa4e3d(%rip), %rdi     # 0xac089
leaq 0xa63e3(%rip), %rsi     # 0xad636
jmp 0x7273
leaq 0xa4e2d(%rip), %rdi     # 0xac089
leaq 0xa6410(%rip), %rsi     # 0xad673
jmp 0x7273
leaq 0xa4e1d(%rip), %rdi     # 0xac089
leaq 0xa6437(%rip), %rsi     # 0xad6aa
xorl %eax, %eax
callq 0x600c
movq 0x18(%rsp), %rdi
movl %eax, %esi
callq 0x49e0