// File: /workspace/github_cpp_makefile_star2_O1/chhylp123[P]hifiasm/inter.cpp
// Function: gen_trans_aln(overlap_region_alloc*, All_reads*, ul_idx_t const*, ug_opt_t const*, long, double, long, unsigned long*, long, ul_ov_t*, long, unsigned long, unsigned long, long*, int*, int*, int*, int*, int*, long*, long*, long, long, long, bit_extz_t*, long, char*, UC_Read*, double, kv_rtrace_t*, unsigned int, ul_ov_t*, ul_ov_t*)
int64_t gen_trans_aln(overlap_region_alloc* ol, All_reads *ridx, const ul_idx_t *uref, 
const ug_opt_t *uopt, int64_t bw, double diff_ec_ul, int64_t qlen, uint64_t *id, int64_t idn, 
ul_ov_t *a, int64_t a_n, uint64_t qs, uint64_t qe, int64_t *vis, int32_t *f0, int32_t *c_n0, 
int32_t *c_sc0, int32_t *rch0, int32_t *ssc0, int64_t *p0, int64_t *t0, int64_t max_skip, 
int64_t max_iter, int64_t max_dis, bit_extz_t *exz, int64_t trans_sc, char* qstr, UC_Read *tu, 
double e_rate, kv_rtrace_t *trace, uint32_t rechain_w, ul_ov_t *res, ul_ov_t *rr)
{
	if(idn == 0) return 0;
	int64_t k, l, i, j, z, nv = 0, qo, is_c, nf; 
	ul_ov_t *li, *lj; uint32_t li_v, lj_v, update, tipl = 0, mm = ((uint32_t)(0x20000000U));
	// for (i = 0; i < idn; i++) {
	// 	li = &(a[id[i]]);
	// 	fprintf(stderr, "[i::%ld] (id::%u)%.*s\t%c\tq::[%u, %u)\tt::[%u, %u)\tc::%u\n", 
	// 			i, li->tn,
    //                 (int)Get_NAME_LENGTH(R_INF, li->tn), Get_NAME(R_INF, li->tn), 
	// 				"+-"[li->rev], li->qs, li->qe, li->ts, li->te, !li->el);
	// }
	for (i = nf = 0; i < idn; i++) {
		if(a[id[i]].el) break;
		if((a[id[i]].ts == 0) && (a[id[i]].te == Get_READ_LENGTH(R_INF, a[id[i]].tn))) nf++;
	}
	if(i < idn && nf > 0) {
		if((a[id[i]].qs > qs) && (qs <= rechain_w)) {
			tipl = qs; ///there are contained chains beforehand
		}
	}

	for (i = 0, k = l = -1; i < idn; i++) {
		k = id[i]; 
		if(k - l > 1) {
			if(l < 0) {
				for (l = k-1; l >= 0 && a[l].qe > qs; l--);
			}

			for (z = l + 1; z < k; z++) {
				li = &(a[z]); li_v = (li->tn<<1)|li->rev;
				if((!(li->el))||(vis[z]&1)) continue;
				if(!(((li->qs + tipl) >= qs) && (li->qe < qe))) continue;
				for (j = i-1, update = 1; j >= 0; --j) {
					lj = &(a[id[j]]); lj_v = (lj->tn<<1)|lj->rev;
            		if(lj->qe <= li->qs) break;
					qo = infer_rovlp(li, lj, NULL, NULL, ridx, NULL); ///overlap length in query (UL read)
            		if((li_v == lj_v) || (!get_ecov_contain_adv(uref, uopt, li_v^1, lj_v^1, 
																			bw, diff_ec_ul, qo, &is_c))) {
						update = 0; break;
					}
				}
				// if(li->tn == 6312) {
				// 	fprintf(stderr, "[z::%ld] (id::%u)%.*s\t%c\tq::[%u, %u)\tt::[%u, %u)\tc::%u\tnf::%ld\ttipl::%u\tl::%ld\tk::%ld\tupdate::%u\n", z, li->tn,
                //     (int)Get_NAME_LENGTH(R_INF, li->tn), Get_NAME(R_INF, li->tn), 
				// 	"+-"[li->rev], li->qs, li->qe, li->ts, li->te, !li->el, nf, tipl, l, k, update);
				// }
				if(update) {
					res[nv] = a[z]; res[nv].sec = (z<<1) + ((li->qs>=qs)?0:1); nv++;
				}
			}
		}
		l = k; 

		li = &(a[k]); li_v = (li->tn<<1)|li->rev;
		for (j = nv-1; j >= 0; --j) {
			lj = &(res[j]); lj_v = (lj->tn<<1)|lj->rev;
			if(lj->qe <= li->qs) break;
			if(lj->qn == (uint32_t)-1) continue;//deleted
			if((lj->sec&mm)) continue;//could not be deleted
			qo = infer_rovlp(li, lj, NULL, NULL, ridx, NULL); ///overlap length in query (UL read)
			if((li_v == lj_v) || (!get_ecov_contain_adv(uref, uopt, li_v^1, lj_v^1, 
																	bw, diff_ec_ul, qo, &is_c))) {
				// if(lj->tn == 6312) {
				// 	fprintf(stderr, "delete::(id::%u)%.*s\t%c\tq::[%u, %u)\tt::[%u, %u)\tc::%u\n", 
				// 	li->tn, (int)Get_NAME_LENGTH(R_INF, li->tn), Get_NAME(R_INF, li->tn), 
				// 	"+-"[li->rev], li->qs, li->qe, li->ts, li->te, !li->el);
				// }
				res[j].qn = res[j].tn = (uint32_t)-1;
			}
		}
		res[nv] = a[k]; res[nv].sec = k; res[nv].sec<<=1; res[nv].sec |= mm; nv++;
	}

	k = a_n; i = idn;
	if(k - l > 1) {
		for (z = l + 1; z < k; z++) {
			li = &(a[z]); li_v = (li->tn<<1)|li->rev;
			if((!(li->el))||(vis[z]&1)) continue;
			if(!(((li->qs + tipl) >= qs) && (li->qe < qe))) continue;
			for (j = i-1, update = 1; j >= 0; --j) {
				lj = &(a[id[j]]); lj_v = (lj->tn<<1)|lj->rev;
				if(lj->qe <= li->qs) break;
				qo = infer_rovlp(li, lj, NULL, NULL, ridx, NULL); ///overlap length in query (UL read)
				if((li_v == lj_v) || (!get_ecov_contain_adv(uref, uopt, li_v^1, lj_v^1, 
																		bw, diff_ec_ul, qo, &is_c))) {
					update = 0; break;
				}
			}
			if(update) {
				res[nv] = a[z]; res[nv].sec = (z<<1) + ((li->qs>=qs)?0:1); nv++;
			}
		}
	}
	// fprintf(stderr, "\n[M::%s::] old_n::%ld, new_n::%ld\n", __func__, idn, nv);
	for (i = k = 0; i < nv; i++) {
		if(res[i].qn == (uint32_t)-1) continue;
		res[k] = res[i]; 
		if(res[k].sec&mm) res[k].sec -= mm; k++;
		// res[k] = res[i]; 
		// id[k] = res[k].sec; 
		// if(id[k]&mm) id[k] -= mm; 
		// id[k] >>= 1;
		// if(res[k].sec&1) id[k] |= ((uint64_t)(0x100000000U));///low prority
		// // if(res[k].sec&mm) id[k] |= ((uint64_t)(0x200000000U));//orignal alignments
		// k++;

		// fprintf(stderr, "[k::%ld] (id::%u)%.*s\t%c\tq::[%u, %u)\tt::[%u, %u)\tc::%u\tnew::%u\n", k, 
		// 			res[k].tn,(int)Get_NAME_LENGTH(R_INF, res[k].tn), Get_NAME(R_INF, res[k].tn), 
		// 			"+-"[res[k].rev], res[k].qs, res[k].qe, res[k].ts, res[k].te, !res[k].el, 
		// 			(res[k].sec != SEC_MODE));
		// if(res[k].sec != SEC_MODE) vis[res[k].sec>>1] |= 1;
		// res[k].sec = SEC_MODE; k++;
	}
	nv = idn = k;
	nv = flat_contain_adv(ol, ridx, uref, uopt, bw, diff_ec_ul, qlen, max_skip, max_iter, max_dis, 
        exz, trans_sc, qstr, tu, e_rate, trace, res, nv, f0, c_n0, c_sc0, rch0, ssc0, p0, t0, a, id, 
		rechain_w, vis, rr);
		// f, ssc, p, t, &(res->a[k]));
	// for (k = 0; k < idn; k++) {
	// 	if(((uint32_t)id[k])&1) continue;
	// 	vis[((uint32_t)id[k])>>1] |= 1;
	// }
	return nv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movsd %xmm1, 0x120(%rsp)
movsd %xmm0, 0xd8(%rsp)
movq %r8, 0xc8(%rsp)
movq %rcx, 0xd0(%rsp)
movq %rsi, 0xe0(%rsp)
movq 0x178(%rsp), %r11
testq %r11, %r11
je 0x1b79d1
movq %rdi, 0x108(%rsp)
movq %rdx, 0x110(%rsp)
movq %r9, 0x118(%rsp)
movl 0x220(%rsp), %eax
movq 0x180(%rsp), %r10
movq 0x170(%rsp), %rbx
movq $0x0, 0xe8(%rsp)
testq %r11, %r11
jle 0x1b79cb
movq (%rbx), %rcx
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %r8
addq %rcx, %r8
testb $0x40, 0x1b(%r10,%r8)
jne 0x1b79cb
leaq 0xd38bc(%rip), %rcx     # 0x28b230
movq 0x18(%rcx), %rsi
addq %r10, %r8
movl $0x1, %edx
xorl %ecx, %ecx
movq %rdx, %rdi
cmpl $0x0, 0x10(%r8)
jne 0x1b79a2
movl 0xc(%r8), %edx
movl 0x14(%r8), %r8d
xorl %r9d, %r9d
cmpq %r8, (%rsi,%rdx,8)
sete %r9b
addq %r9, %rcx
cmpq %rdi, %r11
je 0x1b79d8
movq (%rbx,%rdi,8), %rdx
leaq (%rdx,%rdx,8), %r8
leaq (%r8,%r8,2), %r9
addq %rdx, %r9
leaq (%r10,%r9), %r8
leaq 0x1(%rdi), %rdx
testb $0x40, 0x1b(%r10,%r9)
je 0x1b7982
decq %rdx
jmp 0x1b79db
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x1b79eb
xorl %eax, %eax
jmp 0x1b8221
movq %r11, %rdx
cmpq %r11, %rdi
setl %sil
testq %rcx, %rcx
setg %cl
andb %sil, %cl
movq 0x190(%rsp), %r8
movl %eax, %esi
testb %cl, %cl
je 0x1b7a26
movq (%rbx,%rdx,8), %rax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movl 0x4(%r10,%rcx), %eax
xorl %ecx, %ecx
cmpq %r8, %rax
movl %r8d, %eax
cmovbel %ecx, %eax
cmpq %r8, %rsi
cmovbl %ecx, %eax
movq %rax, 0xe8(%rsp)
movq %rsi, 0x100(%rsp)
movq 0x228(%rsp), %rax
movq 0x1a0(%rsp), %rsi
testq %r11, %r11
jle 0x1b7e4c
leaq -0x14(%r10), %rcx
movq %rcx, 0x128(%rsp)
addq $-0x1c, %rax
movq %rax, 0x130(%rsp)
movq $-0x1, %r9
movq $0x0, 0xb0(%rsp)
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rdi
movq %rdi, %rax
subq %r9, %rax
cmpq $0x2, %rax
movq %r13, 0xc0(%rsp)
movq %rdi, 0xb8(%rsp)
jl 0x1b7c99
movq %r9, %r15
testq %r9, %r9
jns 0x1b7adf
movq %rdi, %rax
sarq $0x3f, %rax
andq %rdi, %rax
decq %rax
leaq (%rdi,%rdi,8), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x128(%rsp), %rdx
addq %rdi, %rdx
addq %rdx, %rcx
movq %rdi, %r15
testq %r15, %r15
jle 0x1b7adc
decq %r15
movl (%rcx), %edx
addq $-0x1c, %rcx
cmpq %r8, %rdx
ja 0x1b7ac7
jmp 0x1b7adf
movq %rax, %r15
incq %r15
cmpq %rdi, %r15
jge 0x1b7c99
leaq (%r15,%r15,8), %rax
leaq (%rax,%rax,2), %rax
addq %r15, %rax
movl 0x18(%r10,%rax), %ecx
btl $0x1e, %ecx
jae 0x1b7c8d
testb $0x1, (%rsi,%r15,8)
jne 0x1b7c8d
leaq (%r10,%rax), %r14
movl 0x4(%r14), %edx
addl 0xe8(%rsp), %edx
cmpq %r8, %rdx
jb 0x1b7c8d
movl 0x8(%r14), %edx
cmpq 0x198(%rsp), %rdx
jae 0x1b7c8d
movl 0xc(%r10,%rax), %r12d
shldl $0x1, %ecx, %r12d
movl %r12d, %ebp
xorl $0x1, %ebp
testq %r13, %r13
jle 0x1b7bf2
movq 0x170(%rsp), %rax
movq -0x8(%rax,%r13,8), %rcx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rax
addq %rcx, %rax
movl 0x8(%r10,%rax), %ecx
cmpl 0x4(%r14), %ecx
jbe 0x1b7bf2
leaq (%r10,%rax), %rsi
movl 0xc(%r10,%rax), %ecx
movl 0x18(%r10,%rax), %ebx
shrdl $0x1f, %ecx, %ebx
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq 0xe0(%rsp), %r8
xorl %r9d, %r9d
callq 0x6f050
cmpl %ebx, %r12d
je 0x1b7c65
xorl $0x1, %ebx
leaq 0xf8(%rsp), %rcx
movq %rcx, (%rsp)
movq 0xd0(%rsp), %rsi
movl %ebp, %edx
movl %ebx, %ecx
movq 0xc8(%rsp), %r8
movsd 0xd8(%rsp), %xmm0
movq %rax, %r9
callq 0x1b3728
decq %r13
testq %rax, %rax
movq 0x180(%rsp), %r10
jne 0x1b7b4a
jmp 0x1b7c6d
movq 0xb0(%rsp), %rdi
leaq (%rdi,%rdi,8), %rax
leaq (%rax,%rax,2), %rax
addq %rdi, %rax
movups (%r14), %xmm0
movups 0xc(%r14), %xmm1
movq 0x228(%rsp), %rsi
movups %xmm1, 0xc(%rsi,%rax)
movups %xmm0, (%rsi,%rax)
movl 0x4(%r14), %ecx
xorl %edx, %edx
movq 0x190(%rsp), %r8
cmpq %r8, %rcx
setb %dl
leal (%rdx,%r15,2), %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
movl 0x18(%rsi,%rax), %edx
movl $0xc0000000, %r9d       # imm = 0xC0000000
andl %r9d, %edx
orl %ecx, %edx
movl %edx, 0x18(%rsi,%rax)
incq %rdi
movq %rdi, 0xb0(%rsp)
movq 0x1a0(%rsp), %rsi
jmp 0x1b7c7d
movq 0x180(%rsp), %r10
movq 0x1a0(%rsp), %rsi
movq 0x190(%rsp), %r8
movq 0xb8(%rsp), %rdi
movq 0xc0(%rsp), %r13
incq %r15
cmpq %rdi, %r15
jne 0x1b7aeb
leaq (%rdi,%rdi,8), %rax
leaq (%rax,%rax,2), %rax
addq %rdi, %rax
leaq (%r10,%rax), %r14
movq 0xb0(%rsp), %rcx
leaq (%rcx,%rcx,8), %rdx
movq %rdx, 0xf0(%rsp)
testq %rcx, %rcx
jle 0x1b7da9
movq 0x180(%rsp), %rdx
movl 0xc(%rdx,%rax), %ecx
movl 0x18(%rdx,%rax), %r15d
shrdl $0x1f, %ecx, %r15d
movl %r15d, %r13d
xorl $0x1, %r13d
movq 0xb0(%rsp), %rax
leaq 0x1(%rax), %r12
movq 0xf0(%rsp), %rcx
leaq (%rcx,%rcx,2), %rbp
movq 0x130(%rsp), %rcx
addq %rcx, %rax
addq %rax, %rbp
movl 0x8(%rbp), %eax
cmpl 0x4(%r14), %eax
jbe 0x1b7da9
movl 0x18(%rbp), %eax
cmpl $-0x1, (%rbp)
setne %cl
btl $0x1d, %eax
setae %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1b7d98
movl 0xc(%rbp), %ebx
shldl $0x1, %eax, %ebx
movq %r14, %rdi
movq %rbp, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq 0xe0(%rsp), %r8
xorl %r9d, %r9d
callq 0x6f050
cmpl %ebx, %r15d
je 0x1b7d8d
xorl $0x1, %ebx
leaq 0xf8(%rsp), %rcx
movq %rcx, (%rsp)
movq 0xd0(%rsp), %rsi
movl %r13d, %edx
movl %ebx, %ecx
movq 0xc8(%rsp), %r8
movsd 0xd8(%rsp), %xmm0
movq %rax, %r9
callq 0x1b3728
testq %rax, %rax
jne 0x1b7d98
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0xc(%rbp)
movl %eax, (%rbp)
decq %r12
addq $-0x1c, %rbp
cmpq $0x1, %r12
jg 0x1b7d08
movq 0xf0(%rsp), %rax
leaq (%rax,%rax,2), %rax
movq 0xb0(%rsp), %rdi
addq %rdi, %rax
movups (%r14), %xmm0
movups 0xc(%r14), %xmm1
movq 0x228(%rsp), %rsi
movups %xmm1, 0xc(%rsi,%rax)
movups %xmm0, (%rsi,%rax)
movl 0x18(%rsi,%rax), %ecx
movl $0xc0000000, %edx       # imm = 0xC0000000
andl %edx, %ecx
movq 0xb8(%rsp), %r9
movl %r9d, %edx
andl $0xfffffff, %edx        # imm = 0xFFFFFFF
leal (%rcx,%rdx,2), %ecx
addl $0x20000000, %ecx       # imm = 0x20000000
movl %ecx, 0x18(%rsi,%rax)
incq %rdi
movq %rdi, 0xb0(%rsp)
movq 0xc0(%rsp), %r13
incq %r13
movq 0x178(%rsp), %rax
cmpq %rax, %r13
movq 0x180(%rsp), %r10
movq 0x1a0(%rsp), %rsi
movq 0x190(%rsp), %r8
movq 0x170(%rsp), %rbx
jne 0x1b7a75
jmp 0x1b7e5f
movq $-0x1, %r9
movq $0x0, 0xb0(%rsp)
movq 0x188(%rsp), %rdi
movq %rdi, %rax
subq %r9, %rax
cmpq $0x2, %rax
setge %al
incq %r9
cmpq %rdi, %r9
setl %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1b8059
leaq 0xf8(%rsp), %r15
leaq (%r9,%r9,8), %rax
leaq (%rax,%rax,2), %rax
addq %r9, %rax
movl 0x18(%r10,%rax), %ecx
btl $0x1e, %ecx
jae 0x1b804d
testb $0x1, (%rsi,%r9,8)
jne 0x1b804d
leaq (%r10,%rax), %r14
movl 0x4(%r14), %edx
addl 0xe8(%rsp), %edx
cmpq %r8, %rdx
jb 0x1b804d
movl 0x8(%r14), %edx
cmpq 0x198(%rsp), %rdx
jae 0x1b804d
movq %r9, 0xb8(%rsp)
movl 0xc(%r10,%rax), %r12d
shldl $0x1, %ecx, %r12d
movl %r12d, %ebp
xorl $0x1, %ebp
movq 0x178(%rsp), %r13
testq %r13, %r13
jle 0x1b7fa2
movq 0x170(%rsp), %rax
movq -0x8(%rax,%r13,8), %rcx
leaq (%rcx,%rcx,8), %rax
leaq (%rax,%rax,2), %rax
addq %rcx, %rax
movl 0x8(%r10,%rax), %ecx
cmpl 0x4(%r14), %ecx
jbe 0x1b7fa2
leaq (%r10,%rax), %rsi
movl 0xc(%r10,%rax), %ecx
movl 0x18(%r10,%rax), %ebx
shrdl $0x1f, %ecx, %ebx
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq 0xe0(%rsp), %r8
xorl %r9d, %r9d
callq 0x6f050
cmpl %ebx, %r12d
je 0x1b8025
xorl $0x1, %ebx
movq %r15, (%rsp)
movq 0xd0(%rsp), %rsi
movl %ebp, %edx
movl %ebx, %ecx
movq 0xc8(%rsp), %r8
movsd 0xd8(%rsp), %xmm0
movq %rax, %r9
callq 0x1b3728
decq %r13
testq %rax, %rax
movq 0x180(%rsp), %r10
jne 0x1b7eff
jmp 0x1b802d
movq 0xb0(%rsp), %rdi
leaq (%rdi,%rdi,8), %rax
leaq (%rax,%rax,2), %rax
addq %rdi, %rax
movups (%r14), %xmm0
movups 0xc(%r14), %xmm1
movq 0x228(%rsp), %rsi
movups %xmm1, 0xc(%rsi,%rax)
movups %xmm0, (%rsi,%rax)
movl 0x4(%r14), %ecx
xorl %edx, %edx
movq 0x190(%rsp), %r8
cmpq %r8, %rcx
setb %dl
movq 0xb8(%rsp), %r9
leal (%rdx,%r9,2), %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
movl 0x18(%rsi,%rax), %edx
movl $0xc0000000, %r11d      # imm = 0xC0000000
andl %r11d, %edx
orl %ecx, %edx
movl %edx, 0x18(%rsi,%rax)
incq %rdi
movq %rdi, 0xb0(%rsp)
movq 0x1a0(%rsp), %rsi
movq 0x188(%rsp), %rdi
jmp 0x1b804d
movq 0x180(%rsp), %r10
movq 0x1a0(%rsp), %rsi
movq 0x190(%rsp), %r8
movq 0x188(%rsp), %rdi
movq 0xb8(%rsp), %r9
incq %r9
cmpq %rdi, %r9
jne 0x1b7e90
movq 0x230(%rsp), %r11
movq 0x218(%rsp), %r10
movq 0x210(%rsp), %r9
movq 0x208(%rsp), %r8
movq 0x200(%rsp), %rdi
movq 0x1f8(%rsp), %rsi
movq 0x1d8(%rsp), %r13
movq 0x1d0(%rsp), %r12
movq 0x1c0(%rsp), %r15
movq 0x1b0(%rsp), %r14
movq 0x1a8(%rsp), %rbx
cmpq $0x0, 0xb0(%rsp)
jle 0x1b8123
xorl %ebp, %ebp
movq 0x228(%rsp), %rax
cmpl $-0x1, (%rax)
je 0x1b8113
leaq (,%rbp,8), %rcx
addq %rbp, %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rbp, %rcx
movups (%rax), %xmm0
movups 0xc(%rax), %xmm1
movq 0x228(%rsp), %rdx
movups %xmm1, 0xc(%rdx,%rcx)
movups %xmm0, (%rdx,%rcx)
movl 0x18(%rdx,%rcx), %edx
btl $0x1d, %edx
jae 0x1b8110
addq 0x228(%rsp), %rcx
andl $0xdfffffff, %edx       # imm = 0xDFFFFFFF
movl %edx, 0x18(%rcx)
incq %rbp
addq $0x1c, %rax
decq 0xb0(%rsp)
jne 0x1b80c6
jmp 0x1b8125
xorl %ebp, %ebp
movq %r11, 0xa8(%rsp)
movq 0x1a0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x170(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x88(%rsp)
movq %r13, 0x80(%rsp)
movq %r12, 0x78(%rsp)
movq %r15, 0x68(%rsp)
movq %r14, 0x58(%rsp)
movq %rbx, 0x50(%rsp)
movq %rbp, 0x48(%rsp)
movq 0x228(%rsp), %rax
movq %rax, 0x40(%rsp)
movq %r10, 0x38(%rsp)
movq %r9, 0x30(%rsp)
movq %r8, 0x28(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x1f0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x1e8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x1e0(%rsp), %rax
movq %rax, (%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xc8(%rsp), %r8
movq 0x118(%rsp), %r9
movq 0x108(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movq 0x110(%rsp), %rdx
movq 0xd0(%rsp), %rcx
movsd 0xd8(%rsp), %xmm0
movsd 0x120(%rsp), %xmm1
callq 0x1b55ff
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq