// File: /workspace/github_cpp_makefile_star2_O3/chhylp123[P]hifiasm/inter.cpp
// Function: gl_chain_advance_back(kv_ul_ov_t*, ul_ov_t*, ul_idx_t const*, ug_opt_t const*, long, double, long, long, unsigned long*, unsigned long*, unsigned long*, float, All_reads*, ma_ug_t*, void*)
int64_t gl_chain_advance_back(kv_ul_ov_t *res, ul_ov_t *ex, const ul_idx_t *uref, const ug_opt_t *uopt, int64_t bw, 
double diff_ec_ul, int64_t qlen, int64_t max_skip, uint64_t *srt, uint64_t *idx, uint64_t *track, float trans_allow, 
All_reads *ridx, ma_ug_t *ug, void *km)
{
	uint32_t li_v, lj_v, rev_n, is_c, nc, s_nc;
	int64_t mm_ovlp, x, i, j, k, sc, csc, mm_sc, mm_idx, qo, trans_scl = (int64_t)(((float)(1))/trans_allow), nsc[2];
	ul_ov_t *li = NULL, *lj = NULL, rev_t;
	radix_sort_ul_ov_srt_qe(res->a, res->a + res->n);
	for (i = s_nc = 0; i < (int64_t)res->n; ++i) {
		li = &(res->a[i]); li_v = (li->tn<<1)|li->rev;
		mm_ovlp = uref?max_ovlp(uref->ug->g, li_v^1):max_ovlp_src(uopt, li_v^1);
		x = (li->qs + mm_ovlp)*diff_ec_ul; 
		if(x < bw) x = bw; 
		x += li->qs + mm_ovlp;
		if (x > qlen+1) x = qlen+1;
		x = find_ul_ov_max(i, res->a, x); 
		csc = uref?retrieve_u_cov_region(uref, li->tn, 0, li->ts, li->te, NULL):li->te-li->ts;
		if(!(li->el)) {
			csc *= -trans_scl; //trans overlaps
			if(csc >= 0) csc = -1;
		}
		mm_sc = csc; mm_idx = -1; nc = nsc[0] = nsc[1] = 0;
		for (j = x; j >= 0; --j) { // collect potential destination vertices
			lj = &(res->a[j]); lj_v = (lj->tn<<1)|lj->rev;
			// if((lj->qe+gapLen) <= li->qs) break; 
			if(lj->qe <= li->qs) break;//even this pair has a overlap, its length will be very small; just ignore
			// if(lj->qs >= li->qs) continue; // lj is contained in li on the query coordinate
			qo = infer_rovlp(li, lj, NULL, NULL, ridx, ug); ///overlap length in query (UL read)
			if(li_v != lj_v && get_ecov_adv_back(uref, uopt, li_v^1, lj_v^1, bw, diff_ec_ul, qo, &is_c)) {
				if(!is_c) {
					sc = csc + pop_sc(track[j]);
					if(sc > mm_sc) mm_sc = sc, mm_idx = j;
				} else if(!uref) {///with uref, retrieve_u_cov_region has already consider contained reads
					res->a[nc++].sec = j; 
					if(li->el) nsc[0] += lj->te-lj->ts;
					else nsc[!(lj->el)] += lj->te-lj->ts;
				}
			}
		}
		
		if(nc && (!uref) && mm_idx>=0) {///deal with containments
			mm_sc += determine_containment_chain(uopt, track, srt, res, nc, nsc, mm_idx, bw, diff_ec_ul, li->el, ridx, ug);
			s_nc++;
		}

		track[i] = push_sc_pre(mm_sc, mm_idx);
		srt[i] = track[i]>>32; srt[i] <<= 32; srt[i] |= i;
		// fprintf(stderr, "[M::utg%.6d%c] qs->%u; qe->%u\n\n", li->tn+1, "lc"[uref->ug->u.a[li->tn].circ], li->qs, li->qe);
	}

	if(s_nc) {
		for (i = 0; i < (int64_t)res->n; ++i) {
			if(srt[i]&((uint64_t)0x80000000)) srt[i]-=((uint64_t)0x80000000);
		}
	}
	
	int64_t n_v, n_u, n_v0, le, lnv; 
	radix_sort_gfa64(srt, srt+res->n); //ex->n = res->n;
	for (k = (int64_t)res->n-1, n_v = n_u = 0; k >= 0; --k) {
		n_v0 = n_v; i = (uint32_t)srt[k];
		if(i>=0 && (res->a[i].el)) { ///chain must start from cis alignments
			for (le = -1; i >= 0 && (track[i]&((uint64_t)0x80000000)) == 0;) {
				if(res->a[i].el) {
					le = -1;
				}else if(n_v>n_v0 && ex[n_v-1].el) {
					le = i; lnv = n_v;///cut the cis alignments in the end
				}
				ex[n_v++] = res->a[i]; track[i] |= ((uint64_t)0x80000000);
				// fprintf(stderr, "[M::utg%.6d%c] qs->%u; qe->%u\n", res->a[i].tn+1, "lc"[uref->ug->u.a[res->a[i].tn].circ], res->a[i].qs, res->a[i].qe);
				i = pop_pre(track[i]);
			}
		}
		if(n_v0 == n_v) continue;
		if(le >= 0) {
			i = le; n_v = lnv;
		}
		if(n_v0 == n_v) continue;
		///keep the whole score; do not cut score like minigraph
		// sc = pop_sc(srt[k]);
		sc = (i<0?(pop_sc(srt[k])):(pop_sc(srt[k])-pop_sc(track[i])));
		if(sc < 0) {
			n_v = n_v0;
			continue;
		}
		// idx[n_u++] = push_sc_pre(sc, n_v-n_v0);	
		idx[n_u++] = ((uint64_t)sc<<32)|(n_v-n_v0);	
	}

	for (k = 0, n_v = n_v0 = 0; k < n_u; k++) {
		n_v0 = n_v; n_v += (uint32_t)idx[k];
		res->a[k].qn = idx[k]>>32;
		res->a[k].ts = n_v0; res->a[k].te = n_v;
		
		rev_n = ((uint32_t)idx[k])>>1; 
		///we need to consider contained reads; so determining qs is not such easy
		res->a[k].qs = (uint32_t)-1; res->a[k].qe = ex[n_v0].qe;
		for (i = 0; i < rev_n; i++) {
			rev_t = ex[n_v0+i]; 
			ex[n_v0+i] = ex[n_v0+rev_n-i-1];
			ex[n_v0+rev_n-i-1] = rev_t;
			if(res->a[k].qs > ex[n_v0+i].qs) res->a[k].qs = ex[n_v0+i].qs;
			if(res->a[k].qs > ex[n_v0+rev_n-i-1].qs) res->a[k].qs = ex[n_v0+rev_n-i-1].qs;
		}
		if(i < ((uint32_t)idx[k]) && res->a[k].qs < ex[n_v0+i].qs) {
			res->a[k].qs = ex[n_v0+i].qs;
		}
	}
	res->n = n_u;
	radix_sort_ul_ov_srt_qn(res->a, res->a + res->n);
	return n_v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movss %xmm1, 0x4(%rsp)
movq %r9, %rbx
movsd %xmm0, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, %r13
movq 0x108(%rsp), %rbp
movq (%rdi), %rdi
movq 0x8(%r13), %rsi
leaq (%rsi,%rsi,8), %rax
leaq (%rax,%rax,2), %rax
addq %rdi, %rsi
addq %rax, %rsi
callq 0x19e2b4
movq 0x8(%r13), %rax
testq %rax, %rax
movq %r13, 0x10(%rsp)
jle 0x1acb16
movss 0x81a62(%rip), %xmm0    # 0x22e0d0
divss 0x4(%rsp), %xmm0
cvttss2si %xmm0, %rax
movq %rax, 0x88(%rsp)
incq %rbx
movq $0x0, 0x38(%rsp)
xorl %r15d, %r15d
movq %rbx, 0x68(%rsp)
movq (%r13), %r12
leaq (%r15,%r15,8), %rax
leaq (%rax,%rax,2), %r14
movq %r15, 0x40(%rsp)
addq %r15, %r14
movl 0xc(%r12,%r14), %eax
movl 0x18(%r12,%r14), %r15d
shrdl $0x1f, %eax, %r15d
movq 0x30(%rsp), %r13
testq %r13, %r13
je 0x1ac727
movq (%r13), %rax
movq 0x18(%rax), %rax
movl %r15d, %ecx
xorl $0x1, %ecx
movq 0x28(%rax), %rdx
movq (%rdx,%rcx,8), %rcx
movq %rcx, %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
andq %rsi, %rdx
je 0x1ac739
movq 0x8(%rax), %rsi
shrq $0x20, %rcx
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rax
leaq (%rcx,%rcx,2), %rcx
leaq (%rsi,%rcx,8), %rcx
addq $0xc, %rcx
xorl %edx, %edx
xorl %esi, %esi
movl %esi, %edi
movl (%rcx,%rdx), %r8d
cmpl %r8d, %esi
movl %r8d, %esi
cmoval %edi, %esi
testl %r8d, %r8d
cmovsl %edi, %esi
addq $0x18, %rdx
cmpq %rdx, %rax
jne 0x1ac705
movl %esi, %eax
jmp 0x1ac73b
movl %r15d, %esi
xorl $0x1, %esi
movq 0x48(%rsp), %rdi
callq 0x1a4c50
jmp 0x1ac73b
xorl %eax, %eax
addq %r12, %r14
movl 0x4(%r14), %ecx
addq %rax, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
mulsd 0x58(%rsp), %xmm0
cvttsd2si %xmm0, %rdx
movq 0x50(%rsp), %rax
cmpq %rax, %rdx
cmovleq %rax, %rdx
addq %rcx, %rdx
cmpq %rbx, %rdx
cmovgeq %rbx, %rdx
movq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x1a83b5
movl %eax, %r12d
movl 0x10(%r14), %ecx
testq %r13, %r13
je 0x1ac79e
movl 0xc(%r14), %esi
movl 0x14(%r14), %r8d
movq %r13, %rdi
xorl %edx, %edx
xorl %r9d, %r9d
callq 0x363d1
jmp 0x1ac7a4
movl 0x14(%r14), %eax
subl %ecx, %eax
movq %rax, 0x8(%rsp)
testb $0x40, 0x1b(%r14)
jne 0x1ac7d5
movq 0x8(%rsp), %rcx
imulq 0x88(%rsp), %rcx
negq %rcx
cmpq $-0x1, %rcx
movq $-0x1, %rax
cmovgeq %rax, %rcx
movq %rcx, 0x8(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x70(%rsp)
testl %r12d, %r12d
js 0x1aca2c
movslq %r12d, %r13
movl %r15d, %eax
xorl $0x1, %eax
movl %eax, 0x4(%rsp)
leaq (,%r13,8), %rax
addq %r13, %rax
leaq (%rax,%rax,2), %rbp
addq %r13, %rbp
movq $-0x1, 0x20(%rsp)
movl $0x0, (%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rbx
movl 0x8(%rbx,%rbp), %eax
cmpl 0x4(%r14), %eax
jbe 0x1ac97b
leaq (%rbx,%rbp), %rsi
movl 0xc(%rbx,%rbp), %eax
movl 0x18(%rbx,%rbp), %r12d
shrdl $0x1f, %eax, %r12d
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq 0x110(%rsp), %r8
movq 0x118(%rsp), %r9
callq 0x6ea22
cmpl %r12d, %r15d
je 0x1ac967
xorl $0x1, %r12d
subq $0x8, %rsp
movq 0x38(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0xc(%rsp), %edx
movl %r12d, %ecx
movq 0x58(%rsp), %r8
movsd 0x60(%rsp), %xmm0
movq %rax, %r9
leaq 0x6c(%rsp), %rax
pushq %rax
callq 0x1ab134
addq $0x10, %rsp
testq %rax, %rax
je 0x1ac967
cmpl $0x0, 0x64(%rsp)
je 0x1ac918
cmpq $0x0, 0x30(%rsp)
jne 0x1ac967
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl (%rsp), %edx
movl %edx, %ecx
incl %edx
movl %edx, (%rsp)
leaq (%rcx,%rcx,8), %rdx
leaq (%rdx,%rdx,2), %rdx
addq %rcx, %rdx
movl %r13d, %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
movl 0x18(%rax,%rdx), %esi
movl $0xc0000000, %edi       # imm = 0xC0000000
andl %edi, %esi
orl %ecx, %esi
movl %esi, 0x18(%rax,%rdx)
movl 0x14(%rbx,%rbp), %eax
subl 0x10(%rbx,%rbp), %eax
testb $0x40, 0x1b(%r14)
jne 0x1ac962
xorl %ecx, %ecx
btl $0x1e, 0x18(%rbx,%rbp)
setae %cl
addq %rax, 0x70(%rsp,%rcx,8)
jmp 0x1ac967
movq 0x108(%rsp), %rax
movq (%rax,%r13,8), %rax
movq %rax, %rcx
shrq $0x20, %rcx
leaq -0x80000000(%rcx), %rdx
negq %rcx
testq %rax, %rax
cmovsq %rdx, %rcx
addq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rax
cmpq %rax, %rcx
cmovgq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
cmovgq %r13, %rax
movq %rax, 0x20(%rsp)
jmp 0x1ac967
addq %rax, 0x70(%rsp)
leaq -0x1(%r13), %rax
addq $-0x1c, %rbp
testq %r13, %r13
movq %rax, %r13
jg 0x1ac821
cmpq $0x0, 0x30(%rsp)
movq 0x40(%rsp), %r15
movl (%rsp), %r8d
jne 0x1aca5b
testl %r8d, %r8d
je 0x1aca5b
cmpq $0x0, 0x20(%rsp)
js 0x1aca5b
movl 0x18(%r14), %eax
shrl $0x1e, %eax
andl $0x1, %eax
subq $0x8, %rsp
movq 0x50(%rsp), %rdi
movq 0x110(%rsp), %rbp
movq %rbp, %rsi
movq 0x100(%rsp), %rdx
movq 0x18(%rsp), %r13
movq %r13, %rcx
leaq 0x78(%rsp), %r9
movsd 0x60(%rsp), %xmm0
pushq 0x120(%rsp)
pushq 0x120(%rsp)
pushq %rax
pushq 0x70(%rsp)
movq 0x48(%rsp), %r14
pushq %r14
callq 0x1ab9cb
addq $0x30, %rsp
addq 0x28(%rsp), %rax
movq 0x38(%rsp), %rcx
incl %ecx
movq %rcx, 0x38(%rsp)
movq %rax, %rdx
movl $0x80000000, %ecx       # imm = 0x80000000
orq %rcx, %rdx
movq %rax, %rcx
negq %rcx
testq %rax, %rax
cmovnsq %rdx, %rcx
jmp 0x1aca96
movq 0x8(%rsp), %rdx
movq %rdx, %rax
movl $0x80000000, %ecx       # imm = 0x80000000
orq %rcx, %rax
movq %rdx, %rcx
negq %rcx
testq %rdx, %rdx
cmovnsq %rax, %rcx
movl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
movq 0x10(%rsp), %r13
movq 0x40(%rsp), %r15
jmp 0x1aca9b
movq 0x28(%rsp), %rdx
movq %rdx, %rax
movl $0x80000000, %ecx       # imm = 0x80000000
orq %rcx, %rax
movq %rdx, %rcx
negq %rcx
testq %rdx, %rdx
cmovnsq %rax, %rcx
movq 0x20(%rsp), %r14
testq %r14, %r14
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmovsq %rax, %r14
movq 0x10(%rsp), %r13
movq 0x108(%rsp), %rbp
movq 0x68(%rsp), %rbx
shlq $0x20, %rcx
orq %r14, %rcx
movq %rcx, (%rbp,%r15,8)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
orq %r15, %rcx
movq 0xf8(%rsp), %rax
movq %rcx, (%rax,%r15,8)
incq %r15
movq 0x8(%r13), %rax
cmpq %rax, %r15
jl 0x1ac695
cmpl $0x0, 0x38(%rsp)
sete %cl
testq %rax, %rax
setle %dl
orb %cl, %dl
jne 0x1acb16
xorl %ecx, %ecx
movq 0xf8(%rsp), %rdx
movq (%rdx,%rcx,8), %rdx
testl %edx, %edx
jns 0x1acb0e
addq $-0x80000000, %rdx      # imm = 0x80000000
movq 0xf8(%rsp), %rax
movq %rdx, (%rax,%rcx,8)
movq 0x8(%r13), %rax
incq %rcx
cmpq %rax, %rcx
jl 0x1acae7
movq 0xf8(%rsp), %rdi
leaq (%rdi,%rax,8), %rsi
callq 0x19dd99
movq 0x8(%r13), %r11
testq %r11, %r11
jle 0x1ace03
xorl %eax, %eax
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %r9d, %r9d
movq %r11, %r8
movq 0xf8(%rsp), %rcx
movl -0x8(%rcx,%r11,8), %r11d
movq (%r13), %rcx
leaq (%r11,%r11,8), %r10
leaq (%r10,%r10,2), %r10
addq %r11, %r10
testb $0x40, 0x1b(%rcx,%r10)
jne 0x1acb70
movq %r11, %r14
movq %r9, %r10
jmp 0x1acc0c
leaq (%r9,%r9,8), %rcx
leaq (%rcx,%rcx,2), %rbx
movq 0x18(%rsp), %rcx
addq %r9, %rcx
addq %rcx, %rbx
movq $-0x1, %rdi
movq %r9, %r10
testb $-0x80, 0x3(%rbp,%r11,8)
jne 0x1acc09
movq (%r13), %r15
leaq (%r11,%r11,8), %rcx
leaq (%rcx,%rcx,2), %r12
addq %r11, %r12
movq $-0x1, %r14
testb $0x40, 0x1b(%r15,%r12)
jne 0x1acbc6
cmpq %r9, %r10
jle 0x1acbcd
testb $0x40, -0x1(%rbx)
cmovneq %r11, %rdi
cmovneq %r10, %rsi
jmp 0x1acbcd
movq $-0x1, %rdi
incq %r10
movups (%r15,%r12), %xmm0
movups 0xc(%r15,%r12), %xmm1
movups %xmm1, 0xc(%rbx)
movups %xmm0, (%rbx)
movq (%rbp,%r11,8), %rcx
movq %rcx, %r15
movl $0x80000000, %r12d      # imm = 0x80000000
orq %r12, %r15
movq %r15, (%rbp,%r11,8)
andq %rdx, %rcx
addq $0x1c, %rbx
movq %rcx, %r11
cmpq %rdx, %rcx
jne 0x1acb8d
jmp 0x1acc0c
movq %r11, %r14
leaq -0x1(%r8), %r11
cmpq %r10, %r9
je 0x1acc8e
testq %rdi, %rdi
cmovnsq %rdi, %r14
cmovnsq %rsi, %r10
movq %r10, %rbx
subq %r9, %rbx
je 0x1acc8e
movq 0xf8(%rsp), %rcx
movq (%rcx,%r11,8), %rcx
movq %rcx, %r15
shrq $0x20, %r15
leaq -0x80000000(%r15), %r12
negq %r15
testq %rcx, %rcx
cmovsq %r12, %r15
testq %r14, %r14
js 0x1acc71
movq (%rbp,%r14,8), %rcx
movq %rcx, %r14
shrq $0x20, %r14
leaq -0x80000000(%r14), %r12
negq %r14
testq %rcx, %rcx
cmovsq %r12, %r14
subq %r14, %r15
testq %r15, %r15
js 0x1acc8e
shlq $0x20, %r15
orq %rbx, %r15
movq 0x100(%rsp), %rcx
movq %r15, (%rcx,%rax,8)
incq %rax
jmp 0x1acc91
movq %r9, %r10
movq %r10, %r9
cmpq $0x1, %r8
jg 0x1acb3e
movq (%r13), %rdi
testq %rax, %rax
jle 0x1ace09
movq 0x18(%rsp), %rcx
leaq -0x1c(%rcx), %rdx
xorl %r14d, %r14d
xorl %esi, %esi
movq 0x100(%rsp), %r12
movq %r14, %r8
movq (%r12,%rsi,8), %r9
movl %r9d, %r15d
addq %r15, %r14
movq %r9, %rcx
shrq $0x20, %rcx
leaq (%rsi,%rsi,8), %r10
leaq (%r10,%r10,2), %r10
addq %rsi, %r10
movl %ecx, (%rdi,%r10)
movl %r8d, 0x10(%rdi,%r10)
movl %r14d, 0x14(%rdi,%r10)
shrl %r9d
movl $0xffffffff, 0x4(%rdi,%r10) # imm = 0xFFFFFFFF
leaq (%r8,%r8,8), %rcx
leaq (%rcx,%rcx,2), %r11
leaq (%r11,%r8), %rbx
movq 0x18(%rsp), %rcx
movl 0x8(%rcx,%rbx), %ecx
movl %ecx, 0x8(%rdi,%r10)
testl %r9d, %r9d
je 0x1acdc6
movq 0x18(%rsp), %rcx
leaq (%rcx,%rbx), %r15
leaq (%r9,%r9,8), %rcx
leaq (%rcx,%rcx,2), %r12
addq %r9, %r12
addq %rdx, %rbx
movups (%r15), %xmm0
movups 0xc(%r15), %xmm1
movups %xmm1, 0x9c(%rsp)
movaps %xmm0, 0x90(%rsp)
movups (%rbx,%r12), %xmm0
movups 0xc(%rbx,%r12), %xmm1
movups %xmm1, 0xc(%r15)
movups %xmm0, (%r15)
movups 0x9c(%rsp), %xmm0
movups %xmm0, 0xc(%rbx,%r12)
movaps 0x90(%rsp), %xmm0
movups %xmm0, (%rbx,%r12)
movq (%r13), %rdi
leaq (%rdi,%r10), %r13
addq $0x4, %r13
movl (%r13), %ebp
movl 0x4(%r15), %ecx
cmpl %ecx, %ebp
jbe 0x1acd9a
movl %ecx, (%r13)
movl %ecx, %ebp
movl 0x4(%rbx,%r12), %ecx
cmpl %ecx, %ebp
jbe 0x1acda7
movl %ecx, (%r13)
addq $0x1c, %r15
addq $-0x1c, %r12
movq 0x10(%rsp), %r13
jne 0x1acd34
movq 0x100(%rsp), %r12
movl (%r12,%rsi,8), %r15d
cmpl %r15d, %r9d
jae 0x1acdf5
addq 0x18(%rsp), %r8
addq %r11, %r8
leaq (%r9,%r9,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %r9, %rcx
movl 0x4(%r8,%rcx), %ecx
cmpl %ecx, 0x4(%rdi,%r10)
jae 0x1acdf5
leaq (%rdi,%r10), %r8
addq $0x4, %r8
movl %ecx, (%r8)
incq %rsi
cmpq %rax, %rsi
jne 0x1accc1
jmp 0x1ace0c
movq (%r13), %rdi
xorl %eax, %eax
xorl %r14d, %r14d
movq %rax, 0x8(%r13)
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rsi
addq %rax, %rsi
addq %rdi, %rsi
callq 0x19ead4
movq %r14, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq