// File: /workspace/github_c_makefile_star2_O2/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 0x7e4c2(%rip), %rsi     # 0x8404c
callq 0xa70f
testq %rax, %rax
je 0x681a
movq %rax, %r14
leaq 0x82b8f(%rip), %rdi     # 0x88731
callq 0x275a7
testq %rax, %rax
je 0x683a
movq %rax, %r15
callq 0x2849e
testq %rax, %rax
je 0x684f
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x31d22
testl %eax, %eax
jne 0x6797
leaq 0x7e4de(%rip), %rsi     # 0x840c0
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x686a
leaq 0x7e506(%rip), %rsi     # 0x840ff
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x687d
leaq 0x7e58e(%rip), %rsi     # 0x8419e
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6890
leaq 0x7e60e(%rip), %rsi     # 0x84235
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x68a3
leaq 0x7e66c(%rip), %rsi     # 0x842aa
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x68b6
leaq 0x7e6ca(%rip), %rsi     # 0x8431f
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x68c9
leaq 0x7fb81(%rip), %rsi     # 0x857ed
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x68dc
leaq 0x7e754(%rip), %rsi     # 0x843d7
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x68ef
leaq 0x7fc8d(%rip), %rsi     # 0x85927
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6902
leaq 0x7e7aa(%rip), %rsi     # 0x8445b
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6915
leaq 0x7e7ec(%rip), %rsi     # 0x844b4
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6928
leaq 0x7e86e(%rip), %rsi     # 0x8454d
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x693b
leaq 0x7e95a(%rip), %rsi     # 0x84650
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x694e
leaq 0x7e97e(%rip), %rsi     # 0x8468b
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6961
leaq 0x7ea1e(%rip), %rsi     # 0x84742
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6974
leaq 0x7ea9e(%rip), %rsi     # 0x847d9
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6987
leaq 0x7eb2a(%rip), %rsi     # 0x8487c
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x699a
leaq 0x7ebb0(%rip), %rsi     # 0x84919
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x69ad
leaq 0x7ec38(%rip), %rsi     # 0x849b8
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x69c0
leaq 0x7ecd2(%rip), %rsi     # 0x84a69
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x69d3
leaq 0x7ed5a(%rip), %rsi     # 0x84b08
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x69e6
leaq 0x7edbe(%rip), %rsi     # 0x84b83
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x69f9
leaq 0x7ee48(%rip), %rsi     # 0x84c24
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6a0c
leaq 0x7eec4(%rip), %rsi     # 0x84cb7
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6a1f
leaq 0x7ef52(%rip), %rsi     # 0x84d5c
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6a32
leaq 0x7efd4(%rip), %rsi     # 0x84df5
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6a45
leaq 0x7f064(%rip), %rsi     # 0x84e9c
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6a58
leaq 0x7f0ea(%rip), %rdx     # 0x84f39
pushq $0x3
popq %rsi
movq %r15, %rdi
callq 0x26ff2
leaq 0x7f0df(%rip), %rsi     # 0x84f40
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6a6b
leaq 0x7f129(%rip), %rdx     # 0x84fa1
pushq $0x2
popq %rsi
movq %r15, %rdi
callq 0x26ff2
leaq 0x7f11a(%rip), %rsi     # 0x84fa4
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6a7e
leaq 0x7f19c(%rip), %rdx     # 0x8503d
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x26ff2
leaq 0x7f18e(%rip), %rsi     # 0x85041
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6a91
leaq 0x7f224(%rip), %rdx     # 0x850ee
movq %r15, %rdi
xorl %esi, %esi
callq 0x26ff2
leaq 0x7f217(%rip), %rsi     # 0x850f2
movq %r15, %rdi
callq 0x26fc2
testl %eax, %eax
jne 0x6aa4
leaq 0x7f29f(%rip), %rsi     # 0x85191
movq %r15, %rdi
callq 0x249dc
testl %eax, %eax
jne 0x6ab7
leaq 0x7f2b3(%rip), %rsi     # 0x851bc
movq %r15, %rdi
callq 0x249dc
testl %eax, %eax
jne 0x6aca
leaq 0x7f2c7(%rip), %rsi     # 0x851e7
movq %r15, %rdi
callq 0x249dc
testl %eax, %eax
jne 0x6add
movq %r15, %rdi
xorl %esi, %esi
callq 0x249dc
testl %eax, %eax
jne 0x6af0
movq %r14, %rdi
movq %r15, %rsi
callq 0x281c9
testl %eax, %eax
jne 0x6b03
leaq 0x7f2f1(%rip), %rsi     # 0x8524d
movq %r15, %rdi
callq 0x6cc6
movl %eax, 0x10(%r12)
movq $0x3821, (%r12)         # imm = 0x3821
leaq 0x7f2d8(%rip), %rdx     # 0x85250
movq %r15, %rdi
movq %r12, %rsi
callq 0x32064
testl %eax, %eax
jne 0x6b12
movaps 0xac76e(%rip), %xmm0    # 0xb2700
leaq 0x60(%rsp), %rdx
movaps %xmm0, (%rdx)
movq 0xac77f(%rip), %rax     # 0xb2720
movq %rax, 0x30(%rsp)
movaps 0xac763(%rip), %xmm0    # 0xb2710
movaps %xmm0, 0x20(%rsp)
movq 0xac787(%rip), %rax     # 0xb2740
movq %rax, 0x10(%rsp)
movaps 0xac76b(%rip), %xmm0    # 0xb2730
movaps %xmm0, (%rsp)
leaq 0x80319(%rip), %rax     # 0x862e9
movq %rax, 0x40(%rsp)
leaq 0x802a8(%rip), %rax     # 0x86284
movq %rax, 0x50(%rsp)
pushq $0x2
popq %rcx
movq %r15, %rdi
movq %r12, %rsi
callq 0x31d22
testl %eax, %eax
jne 0x6b25
leaq 0x60(%rsp), %rsi
pushq $0x2
popq %rdx
movq %r12, %rdi
callq 0x6cd1
testl %eax, %eax
jne 0x6b38
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x31d22
testl %eax, %eax
jne 0x6797
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6cd1
testl %eax, %eax
jne 0x6b4b
leaq 0x20(%rsp), %rdx
pushq $0x3
popq %rcx
movq %r15, %rdi
movq %r12, %rsi
callq 0x31d22
testl %eax, %eax
jne 0x6b5e
leaq 0x20(%rsp), %rsi
pushq $0x3
popq %rdx
movq %r12, %rdi
callq 0x6cd1
testl %eax, %eax
jne 0x67aa
movq %rsp, %rdx
pushq $0x3
popq %rcx
movq %r15, %rdi
movq %r12, %rsi
callq 0x31d22
testl %eax, %eax
jne 0x6b71
movq %rsp, %rsi
pushq $0x3
popq %rdx
movq %r12, %rdi
callq 0x6cd1
testl %eax, %eax
jne 0x6b84
movq 0x88(%r12), %rax
movq 0x8(%rax), %rax
leaq 0x40(%rsp), %rdx
movq %rax, 0x8(%rdx)
pushq $0x3
popq %rcx
movq %r15, %rdi
movq %r12, %rsi
callq 0x31d22
testl %eax, %eax
jne 0x6b97
movq %rbx, 0x18(%rsp)
movq 0x8(%rsp), %rax
leaq 0x40(%rsp), %rsi
movq %rax, 0x8(%rsi)
pushq $0x3
popq %rdx
movq %r12, %rdi
callq 0x6cd1
testl %eax, %eax
jne 0x6baa
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
pushq $0x3
popq %rcx
movq %r15, %rdi
movq %r12, %rsi
callq 0x31d22
testl %eax, %eax
jne 0x6bbd
leaq 0x20(%rsp), %rsi
pushq $0x3
popq %rdx
movq %r12, %rdi
callq 0x6cd1
testl %eax, %eax
jne 0x67aa
leaq 0x7f117(%rip), %rdx     # 0x8527f
movq %r15, %rdi
movq %r12, %rsi
callq 0x31fcc
testl %eax, %eax
jne 0x6bd0
leaq 0xac57e(%rip), %rsi     # 0xb2700
pushq $0x2
popq %rdx
movq %r12, %rdi
callq 0x6cd1
testl %eax, %eax
jne 0x6be3
movl $0x41e80000, 0x14(%r12) # imm = 0x41E80000
leaq 0x7f125(%rip), %rdx     # 0x852ca
movq %r15, %rdi
xorl %esi, %esi
callq 0x26d7c
movq %rsp, %rdx
movl %eax, (%rdx)
pushq $0x1
popq %rcx
movq %r15, %rdi
movq %r12, %rsi
callq 0x31a9f
testl %eax, %eax
jne 0x6bf6
movq %rsp, %rcx
movl $0x3, (%rcx)
leaq 0x80e8e(%rip), %rdx     # 0x87068
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r12, %rsi
movl %r8d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x67bd
movq %rsp, %rcx
movl $0x1f4, (%rcx)          # imm = 0x1F4
leaq 0x7f123(%rip), %rdx     # 0x85327
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r12, %rsi
movl %r8d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x675e
movq %rsp, %rcx
movl $0x186a0, (%rcx)        # imm = 0x186A0
leaq 0x7f0f9(%rip), %rdx     # 0x85327
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r12, %rsi
movl %r8d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x675e
movq %rsp, %rcx
movl $0xe, (%rcx)
leaq 0x7f0cf(%rip), %rdx     # 0x85327
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r12, %rsi
movl %r8d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x675e
movq %rsp, %rcx
movl $0xffffff81, (%rcx)     # imm = 0xFFFFFF81
leaq 0x7edbb(%rip), %rdx     # 0x8503d
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r12, %rsi
movl %r8d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x67d0
leaq 0x40(%rsp), %rcx
movl $0x3f000000, (%rcx)     # imm = 0x3F000000
leaq 0x8fca9(%rip), %rdx     # 0x95f57
pushq $0x1
popq %r8
pushq $0x2
popq %r9
movq %r15, %rdi
movq %r12, %rsi
callq 0x30f42
testl %eax, %eax
jne 0x6c09
leaq 0x7f0f1(%rip), %rdx     # 0x853c1
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x67e3
leaq 0x7f108(%rip), %rdx     # 0x853fb
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x6c19
movslq 0x8(%r15), %rdi
shlq $0x3, %rdi
callq 0x46a0
movq %rax, %r13
movaps 0x7dcea(%rip), %xmm0    # 0x84010
movups %xmm0, (%rax)
movabsq $0x400000004, %rax      # imm = 0x400000004
movq %rax, 0x10(%r13)
movl 0x8(%r15), %r8d
addl %r8d, %r8d
leaq 0x86af3(%rip), %rdx     # 0x8ce38
pushq $0x1
popq %r9
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x3156c
testl %eax, %eax
jne 0x67f6
movabsq $0x3000000030, %rax     # imm = 0x3000000030
movq %rax, (%r13)
movl $0x2b, 0x8(%r13)
movl 0x8(%r15), %r8d
leaq 0x7f0f3(%rip), %rdx     # 0x85473
pushq $0x1
popq %r9
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x3156c
testl %eax, %eax
jne 0x6c29
andq $0x0, (%r13)
movl $0x1, 0x8(%r13)
movl 0x8(%r15), %r8d
leaq 0x7ef75(%rip), %rdx     # 0x85327
pushq $0x1
popq %r9
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x3156c
testl %eax, %eax
jne 0x6771
movabsq $0x186a000000001, %rax  # imm = 0x186A000000001
movq %rax, (%r13)
movl $0x1, 0x8(%r13)
movl 0x8(%r15), %r8d
leaq 0x7ef3a(%rip), %rdx     # 0x85327
pushq $0x1
popq %r9
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x3156c
testl %eax, %eax
jne 0x6771
movabsq $0x800000001, %rax      # imm = 0x800000001
movq %rax, (%r13)
movl $0x5, 0x8(%r13)
movl 0x8(%r15), %r8d
leaq 0x7eeff(%rip), %rdx     # 0x85327
pushq $0x1
popq %r9
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x3156c
testl %eax, %eax
jne 0x6771
movaps 0x7dbd7(%rip), %xmm0    # 0x84020
movups %xmm0, (%r13)
movabsq $-0x7fffffff80000000, %rax # imm = 0x8000000080000000
movq %rax, 0x10(%r13)
movl 0x8(%r15), %r8d
addl %r8d, %r8d
leaq 0x7f088(%rip), %rdx     # 0x854f2
pushq $0x1
popq %r9
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x3156c
testl %eax, %eax
jne 0x6c39
movq 0xac245(%rip), %rax     # 0xb26d0
leaq 0x20(%rsp), %rcx
movq %rax, 0x10(%rcx)
movaps 0xac225(%rip), %xmm0    # 0xb26c0
movaps %xmm0, (%rcx)
leaq 0x7eafc(%rip), %rdx     # 0x84fa1
pushq $0x3
popq %r8
movq %r15, %rdi
movq %r12, %rsi
callq 0x31451
testl %eax, %eax
jne 0x6784
leaq 0x7f0e0(%rip), %rax     # 0x855a3
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x7eacf(%rip), %rdx     # 0x84fa1
pushq $0x3
popq %r8
movq %r15, %rdi
movq %r12, %rsi
callq 0x31451
testl %eax, %eax
jne 0x6784
leaq 0x7f045(%rip), %rax     # 0x85535
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x7eaa2(%rip), %rdx     # 0x84fa1
pushq $0x3
popq %r8
movq %r15, %rdi
movq %r12, %rsi
callq 0x31451
testl %eax, %eax
jne 0x6784
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x298d5
testl %eax, %eax
jne 0x6809
movq %r12, %rdi
callq 0x284ab
leaq 0x7ed12(%rip), %rsi     # 0x8524d
movq %r15, %rdi
callq 0x6cc6
movl %eax, 0x10(%r12)
movq $0x10f2a7, (%r12)       # imm = 0x10F2A7
leaq 0x7f074(%rip), %rdx     # 0x855cb
movq %r15, %rdi
movq %r12, %rsi
callq 0x31fcc
testl %eax, %eax
jne 0x6c49
movl $0x42860000, 0x14(%r12) # imm = 0x42860000
movq %rsp, %rcx
movl $0x2, (%rcx)
leaq 0x80ae5(%rip), %rdx     # 0x87068
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r12, %rsi
movl %r8d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x67bd
movq %rsp, %rcx
movl $0xa, (%rcx)
leaq 0x7ed7a(%rip), %rdx     # 0x85327
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r12, %rsi
movl %r8d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x675e
movq %rsp, %rcx
movl $0xffffff80, (%rcx)     # imm = 0xFFFFFF80
leaq 0x7ea66(%rip), %rdx     # 0x8503d
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r12, %rsi
movl %r8d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x67d0
pushq $0x8
popq %rdi
callq 0x46a0
movq %rax, %rbp
movl $0x3eaa7efa, (%rax)     # imm = 0x3EAA7EFA
leaq 0xadec7(%rip), %rax     # 0xb44d0
movl (%rax), %eax
movl %eax, 0x4(%rbp)
leaq 0x8f942(%rip), %rdx     # 0x95f57
pushq $0x2
popq %r8
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rcx
movl %r8d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x6c59
leaq 0x7eff4(%rip), %rdx     # 0x8562d
leaq 0x7eff0(%rip), %rcx     # 0x85630
pushq $0x1
popq %r8
pushq $0x3
popq %r9
movq %r15, %rdi
movq %r12, %rsi
callq 0x30f42
testl %eax, %eax
jne 0x6c69
leaq 0x7efcb(%rip), %rdx     # 0x8562d
leaq 0x7efff(%rip), %rcx     # 0x85668
pushq $0x1
popq %r8
pushq $0x3
popq %r9
movq %r15, %rdi
movq %r12, %rsi
callq 0x30f42
testl %eax, %eax
jne 0x6c79
leaq 0x7efa2(%rip), %rdx     # 0x8562d
leaq 0x7ef3d(%rip), %rcx     # 0x855cf
pushq $0x1
popq %r8
pushq $0x3
popq %r9
movq %r15, %rdi
movq %r12, %rsi
callq 0x30f42
testl %eax, %eax
jne 0x6c89
leaq 0x7ed0d(%rip), %rdx     # 0x853c1
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x30f42
testl %eax, %eax
jne 0x67e3
movaps 0x7d959(%rip), %xmm0    # 0x84030
movups %xmm0, (%r13)
andq $0x0, 0x10(%r13)
movl 0x8(%r15), %r8d
addl %r8d, %r8d
leaq 0x86749(%rip), %rdx     # 0x8ce38
pushq $0x1
popq %r9
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x3156c
testl %eax, %eax
jne 0x67f6
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x298d5
testl %eax, %eax
jne 0x6809
movq %r13, %rdi
callq 0x45c0
movq %rbp, %rdi
callq 0x45c0
movq %r12, %rdi
callq 0x28630
movq %r15, %rdi
callq 0x27a34
movq %r14, %rdi
callq 0xb8e5
testl %eax, %eax
jne 0x6c9e
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7d924(%rip), %rdi     # 0x84089
leaq 0x7ebbe(%rip), %rsi     # 0x8532a
jmp 0x6c97
leaq 0x7d911(%rip), %rdi     # 0x84089
leaq 0x7ed35(%rip), %rsi     # 0x854b4
jmp 0x6c97
leaq 0x7d8fe(%rip), %rdi     # 0x84089
leaq 0x7edce(%rip), %rsi     # 0x85560
jmp 0x6c97
leaq 0x7d8eb(%rip), %rdi     # 0x84089
leaq 0x7d8ef(%rip), %rsi     # 0x84094
jmp 0x6c97
leaq 0x7d8d8(%rip), %rdi     # 0x84089
leaq 0x7fc90(%rip), %rsi     # 0x86448
jmp 0x6c97
leaq 0x7d8c5(%rip), %rdi     # 0x84089
leaq 0x7eb2a(%rip), %rsi     # 0x852f5
jmp 0x6c97
leaq 0x7d8b2(%rip), %rdi     # 0x84089
leaq 0x7eb7e(%rip), %rsi     # 0x8535c
jmp 0x6c97
leaq 0x7d89f(%rip), %rdi     # 0x84089
leaq 0x7ebd3(%rip), %rsi     # 0x853c4
jmp 0x6c97
leaq 0x7d88c(%rip), %rdi     # 0x84089
leaq 0x7ec31(%rip), %rsi     # 0x85435
jmp 0x6c97
leaq 0x7ea26(%rip), %rdi     # 0x85236
movq 0x18(%rsp), %rsi
jmp 0x6c97
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x7d822(%rip), %rdi     # 0x8404f
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5abc
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x7d81b(%rip), %rdi     # 0x84068
jmp 0x6862
callq 0x4050
movl (%rax), %edi
callq 0x4140
leaq 0x7d818(%rip), %rdi     # 0x8407a
movq %rax, %rsi
jmp 0x6c97
leaq 0x7d818(%rip), %rdi     # 0x84089
leaq 0x7d85c(%rip), %rsi     # 0x840d4
jmp 0x6c97
leaq 0x7d805(%rip), %rdi     # 0x84089
leaq 0x7d8b7(%rip), %rsi     # 0x84142
jmp 0x6c97
leaq 0x7d7f2(%rip), %rdi     # 0x84089
leaq 0x7d93f(%rip), %rsi     # 0x841dd
jmp 0x6c97
leaq 0x7d7df(%rip), %rdi     # 0x84089
leaq 0x7d9b2(%rip), %rsi     # 0x84263
jmp 0x6c97
leaq 0x7d7cc(%rip), %rdi     # 0x84089
leaq 0x7da14(%rip), %rsi     # 0x842d8
jmp 0x6c97
leaq 0x7d7b9(%rip), %rdi     # 0x84089
leaq 0x7da7e(%rip), %rsi     # 0x84355
jmp 0x6c97
leaq 0x7d7a6(%rip), %rdi     # 0x84089
leaq 0x7daba(%rip), %rsi     # 0x843a4
jmp 0x6c97
leaq 0x7d793(%rip), %rdi     # 0x84089
leaq 0x7daf6(%rip), %rsi     # 0x843f3
jmp 0x6c97
leaq 0x7d780(%rip), %rdi     # 0x84089
leaq 0x7db16(%rip), %rsi     # 0x84426
jmp 0x6c97
leaq 0x7d76d(%rip), %rdi     # 0x84089
leaq 0x7db59(%rip), %rsi     # 0x8447c
jmp 0x6c97
leaq 0x7d75a(%rip), %rdi     # 0x84089
leaq 0x7dbbf(%rip), %rsi     # 0x844f5
jmp 0x6c97
leaq 0x7d747(%rip), %rdi     # 0x84089
leaq 0x7dc79(%rip), %rsi     # 0x845c2
jmp 0x6c97
leaq 0x7d734(%rip), %rdi     # 0x84089
leaq 0x7dd06(%rip), %rsi     # 0x84662
jmp 0x6c97
leaq 0x7d721(%rip), %rdi     # 0x84089
leaq 0x7dd6b(%rip), %rsi     # 0x846da
jmp 0x6c97
leaq 0x7d70e(%rip), %rdi     # 0x84089
leaq 0x7ddff(%rip), %rsi     # 0x84781
jmp 0x6c97
leaq 0x7d6fb(%rip), %rdi     # 0x84089
leaq 0x7de89(%rip), %rsi     # 0x8481e
jmp 0x6c97
leaq 0x7d6e8(%rip), %rdi     # 0x84089
leaq 0x7df16(%rip), %rsi     # 0x848be
jmp 0x6c97
leaq 0x7d6d5(%rip), %rdi     # 0x84089
leaq 0x7dfa1(%rip), %rsi     # 0x8495c
jmp 0x6c97
leaq 0x7d6c2(%rip), %rdi     # 0x84089
leaq 0x7e036(%rip), %rsi     # 0x84a04
jmp 0x6c97
leaq 0x7d6af(%rip), %rdi     # 0x84089
leaq 0x7e0cb(%rip), %rsi     # 0x84aac
jmp 0x6c97
leaq 0x7d69c(%rip), %rdi     # 0x84089
leaq 0x7e145(%rip), %rsi     # 0x84b39
jmp 0x6c97
leaq 0x7d689(%rip), %rdi     # 0x84089
leaq 0x7e1c0(%rip), %rsi     # 0x84bc7
jmp 0x6c97
leaq 0x7d676(%rip), %rdi     # 0x84089
leaq 0x7e247(%rip), %rsi     # 0x84c61
jmp 0x6c97
leaq 0x7d663(%rip), %rdi     # 0x84089
leaq 0x7e2d0(%rip), %rsi     # 0x84cfd
jmp 0x6c97
leaq 0x7d650(%rip), %rdi     # 0x84089
leaq 0x7e35c(%rip), %rsi     # 0x84d9c
jmp 0x6c97
leaq 0x7d63d(%rip), %rdi     # 0x84089
leaq 0x7e3e9(%rip), %rsi     # 0x84e3c
jmp 0x6c97
leaq 0x7d62a(%rip), %rdi     # 0x84089
leaq 0x7e478(%rip), %rsi     # 0x84ede
jmp 0x6c97
leaq 0x7d617(%rip), %rdi     # 0x84089
leaq 0x7e4ec(%rip), %rsi     # 0x84f65
jmp 0x6c97
leaq 0x7d604(%rip), %rdi     # 0x84089
leaq 0x7e558(%rip), %rsi     # 0x84fe4
jmp 0x6c97
leaq 0x7d5f1(%rip), %rdi     # 0x84089
leaq 0x7e5ec(%rip), %rsi     # 0x8508b
jmp 0x6c97
leaq 0x7d5de(%rip), %rdi     # 0x84089
leaq 0x7e683(%rip), %rsi     # 0x85135
jmp 0x6c97
leaq 0x7d5cb(%rip), %rdi     # 0x84089
leaq 0x7e6d4(%rip), %rsi     # 0x85199
jmp 0x6c97
leaq 0x7d5b8(%rip), %rdi     # 0x84089
leaq 0x7e6ec(%rip), %rsi     # 0x851c4
jmp 0x6c97
leaq 0x7d5a5(%rip), %rdi     # 0x84089
leaq 0x7e704(%rip), %rsi     # 0x851ef
jmp 0x6c97
leaq 0x7d592(%rip), %rdi     # 0x84089
leaq 0x7e714(%rip), %rsi     # 0x85212
jmp 0x6c97
leaq 0x7e72c(%rip), %rdi     # 0x85236
movq %rbx, %rsi
jmp 0x6c97
leaq 0x7d570(%rip), %rdi     # 0x84089
leaq 0x7e73a(%rip), %rsi     # 0x8525a
jmp 0x6c97
leaq 0x7d55d(%rip), %rdi     # 0x84089
leaq 0x7f87f(%rip), %rsi     # 0x863b2
jmp 0x6c97
leaq 0x7d54a(%rip), %rdi     # 0x84089
leaq 0x7f896(%rip), %rsi     # 0x863dc
jmp 0x6c97
leaq 0x7d537(%rip), %rdi     # 0x84089
leaq 0x7f8a3(%rip), %rsi     # 0x863fc
jmp 0x6c97
leaq 0x7d524(%rip), %rdi     # 0x84089
leaq 0x7f8b2(%rip), %rsi     # 0x8641e
jmp 0x6c97
leaq 0x7d511(%rip), %rdi     # 0x84089
leaq 0x7f8e9(%rip), %rsi     # 0x86468
jmp 0x6c97
leaq 0x7d4fe(%rip), %rdi     # 0x84089
leaq 0x7f900(%rip), %rsi     # 0x86492
jmp 0x6c97
leaq 0x7d4eb(%rip), %rdi     # 0x84089
leaq 0x7f90d(%rip), %rsi     # 0x864b2
jmp 0x6c97
leaq 0x7d4d8(%rip), %rdi     # 0x84089
leaq 0x7f924(%rip), %rsi     # 0x864dc
jmp 0x6c97
leaq 0x7d4c5(%rip), %rdi     # 0x84089
leaq 0x7f931(%rip), %rsi     # 0x864fc
jmp 0x6c97
leaq 0x7d4b2(%rip), %rdi     # 0x84089
leaq 0x7e6a5(%rip), %rsi     # 0x85283
jmp 0x6c97
leaq 0x7d49f(%rip), %rdi     # 0x84089
leaq 0x7e6ba(%rip), %rsi     # 0x852ab
jmp 0x6c97
leaq 0x7d48c(%rip), %rdi     # 0x84089
leaq 0x7e6cb(%rip), %rsi     # 0x852cf
jmp 0x6c97
leaq 0x7d479(%rip), %rdi     # 0x84089
leaq 0x7e778(%rip), %rsi     # 0x8538f
jmp 0x6c97
leaq 0x7d469(%rip), %rdi     # 0x84089
leaq 0x7e7d7(%rip), %rsi     # 0x853fe
jmp 0x6c97
leaq 0x7d459(%rip), %rdi     # 0x84089
leaq 0x7e83f(%rip), %rsi     # 0x85476
jmp 0x6c97
leaq 0x7d449(%rip), %rdi     # 0x84089
leaq 0x7e8ae(%rip), %rsi     # 0x854f5
jmp 0x6c97
leaq 0x7d439(%rip), %rdi     # 0x84089
leaq 0x7e97a(%rip), %rsi     # 0x855d1
jmp 0x6c97
leaq 0x7d429(%rip), %rdi     # 0x84089
leaq 0x7e994(%rip), %rsi     # 0x855fb
jmp 0x6c97
leaq 0x7d419(%rip), %rdi     # 0x84089
leaq 0x7e9bf(%rip), %rsi     # 0x85636
jmp 0x6c97
leaq 0x7d409(%rip), %rdi     # 0x84089
leaq 0x7e9ec(%rip), %rsi     # 0x85673
jmp 0x6c97
leaq 0x7d3f9(%rip), %rdi     # 0x84089
leaq 0x7ea13(%rip), %rsi     # 0x856aa
xorl %eax, %eax
callq 0x5abc
movl %eax, %ebp
movq 0xac339(%rip), %rax     # 0xb2fe0
movq (%rax), %rdi
leaq 0x7ea27(%rip), %rsi     # 0x856d8
movq 0x18(%rsp), %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x4720
movl %ebp, %edi
callq 0x45f0