// File: /workspace/github_cpp_makefile_star2_O2/soccin[P]BIC-RNAseq/tools/MergeFusion/StandardFusion.cpp
// Function: StandardFusion::parseChimerascan(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void StandardFusion::parseChimerascan(string line) //done
{
    vector<string> parsed_item;
    vector<string> breakpoint_reads;
    split(line, '\t', parsed_item);
    chr1 = parsed_item[0];
    start1 = atoi(parsed_item[1].c_str()) + 1;
    end1 = atoi(parsed_item[2].c_str()) + 1;
    chr2 = parsed_item[3];
    start2 = atoi(parsed_item[4].c_str()) + 1;
    end2 = atoi(parsed_item[5].c_str()) + 1;
    strand1 = parsed_item[8];
    strand2 = parsed_item[9];
    breakpoint1 = (strand1 == "+" ? end1 : start1);
    breakpoint2 = (strand2 == "+" ? start2 : end2);
    gene1 = parsed_item[12];
    gene2 = parsed_item[13];
    transcript1 = parsed_item[10];
    transcript2 = parsed_item[11];
    total_coverage = atoi(parsed_item[16].c_str());
    spanning_coverage = atoi(parsed_item[17].c_str());
    split(parsed_item[21], '>', breakpoint_reads, true);
    breakpoint_coverage = static_cast<int>(breakpoint_reads.size());
    caller_id = CHIMERASCAN;
    
    info.append("CHIMERA_CLUSTER_ID=");info.append(parsed_item[6]);
    info.append(";SCORE=");info.append(parsed_item[7]);
    info.append(";TYPE=");info.append(parsed_item[14]);
    info.append(";DISTANCE=");info.append(parsed_item[15]);
    info.append(";UNIQUE_ALIGNMENT_POSITIONS=");info.append(parsed_item[18]);
    info.append(";ISOFORM_FRACTION_5P=");info.append(parsed_item[19]);
    info.append(";ISOFORM_FRACTION_3P=");info.append(parsed_item[20]);
    info.append(";CHIMERA_IDS="); info.append(parsed_item[22]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
movaps %xmm0, -0x60(%rbp)
andq $0x0, -0x50(%rbp)
pushq $0x9
popq %rsi
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x865f
movq -0x40(%rbp), %rsi
leaq 0x8(%rbx), %rdi
callq 0x2120
movq -0x40(%rbp), %r14
movq 0x20(%r14), %rdi
callq 0x2290
incl %eax
movl %eax, 0x48(%rbx)
movq 0x40(%r14), %rdi
callq 0x2290
incl %eax
movl %eax, 0x50(%rbx)
addq $0x60, %r14
leaq 0x28(%rbx), %rdi
movq %r14, %rsi
callq 0x2120
movq -0x40(%rbp), %r15
movq 0x80(%r15), %rdi
callq 0x2290
incl %eax
movl %eax, 0x4c(%rbx)
movq 0xa0(%r15), %rdi
callq 0x2290
incl %eax
movl %eax, 0x54(%rbx)
addq $0x100, %r15            # imm = 0x100
leaq 0x60(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x2120
movl $0x120, %esi            # imm = 0x120
addq -0x40(%rbp), %rsi
leaq 0x80(%rbx), %r15
movq %r15, %rdi
callq 0x2120
leaq 0x2ed9(%rip), %r12      # 0x968b
movq %r14, %rdi
movq %r12, %rsi
callq 0x30c8
movzbl %al, %eax
movl 0x48(%rbx,%rax,8), %eax
movl %eax, 0x58(%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0x30c8
xorb $0x1, %al
movzbl %al, %eax
movl 0x4c(%rbx,%rax,8), %eax
movl %eax, 0x5c(%rbx)
movl $0x180, %esi            # imm = 0x180
addq -0x40(%rbp), %rsi
leaq 0xb0(%rbx), %rdi
callq 0x2120
movl $0x1a0, %esi            # imm = 0x1A0
addq -0x40(%rbp), %rsi
leaq 0xd0(%rbx), %rdi
callq 0x2120
movl $0x140, %esi            # imm = 0x140
addq -0x40(%rbp), %rsi
leaq 0xf0(%rbx), %rdi
callq 0x2120
movl $0x160, %esi            # imm = 0x160
addq -0x40(%rbp), %rsi
leaq 0x110(%rbx), %rdi
callq 0x2120
movq -0x40(%rbp), %r14
movq 0x200(%r14), %rdi
callq 0x2290
movl %eax, 0xa0(%rbx)
movq 0x220(%r14), %rdi
callq 0x2290
movl %eax, 0xa4(%rbx)
addq $0x2a0, %r14            # imm = 0x2A0
pushq $0x3e
popq %rsi
leaq -0x60(%rbp), %rdx
pushq $0x1
popq %rcx
movq %r14, %rdi
callq 0x865f
movq -0x58(%rbp), %rax
subq -0x60(%rbp), %rax
shrq $0x5, %rax
movl %eax, 0xa8(%rbx)
andl $0x0, (%rbx)
addq $0x130, %rbx            # imm = 0x130
leaq 0x2df7(%rip), %rsi      # 0x968d
movq %rbx, %rdi
callq 0x2350
movl $0xc0, %esi
addq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2370
leaq 0x2deb(%rip), %rsi      # 0x96a1
movq %rbx, %rdi
callq 0x2350
movl $0xe0, %esi
addq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2370
leaq 0x2dd3(%rip), %rsi      # 0x96a9
movq %rbx, %rdi
callq 0x2350
movl $0x1c0, %esi            # imm = 0x1C0
addq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2370
leaq 0x2dba(%rip), %rsi      # 0x96b0
movq %rbx, %rdi
callq 0x2350
movl $0x1e0, %esi            # imm = 0x1E0
addq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2370
leaq 0x2da5(%rip), %rsi      # 0x96bb
movq %rbx, %rdi
callq 0x2350
movl $0x240, %esi            # imm = 0x240
addq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2370
leaq 0x2da2(%rip), %rsi      # 0x96d8
movq %rbx, %rdi
callq 0x2350
movl $0x260, %esi            # imm = 0x260
addq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2370
leaq 0x2d98(%rip), %rsi      # 0x96ee
movq %rbx, %rdi
callq 0x2350
movl $0x280, %esi            # imm = 0x280
addq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2370
leaq 0x2d8e(%rip), %rsi      # 0x9704
movq %rbx, %rdi
callq 0x2350
movl $0x2c0, %esi            # imm = 0x2C0
addq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x2370
leaq -0x60(%rbp), %rdi
callq 0x3e58
leaq -0x40(%rbp), %rdi
callq 0x3e58
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x3e58
leaq -0x40(%rbp), %rdi
callq 0x3e58
movq %rbx, %rdi
callq 0x2300
nop