// File: chhylp123[P]hifiasm/inter.cpp
// Function: cl_trans_gen(unsigned int, unsigned int, ul_vec_t*, kv_ul_ov_t*, ul_idx_t const*, ma_ug_t*, scaf_res_t*, ma_ug_t*, bubble_type*, kv_u_trans_t*, unsigned int, unsigned int)
void cl_trans_gen(uint32_t qid, uint32_t qlen, ul_vec_t *qstr, kv_ul_ov_t *res, const ul_idx_t *uref, ma_ug_t *ref, scaf_res_t *ref_sc, ma_ug_t *gfa, bubble_type *bub, kv_u_trans_t *ta, uint32_t is_self, uint32_t is_exact)
{
    uint64_t k, l, m = 0, mi, z, zn, a_n, bid, nw; uc_block_t *a; uint32_t avid = ((is_self)?(qid):((uint32_t)-1));
    res->n = 0;
	///identify bubble chain first
	for (k = 0, a = qstr->bb.a; k < qstr->bb.n; k++) {
		z = qstr->bb.a[k].ts; a_n = qstr->bb.a[k].te;
		while (z < a_n) {
			zn = 1;
			zn = pick_bubble(a + z, a_n - z, bub, &bid);
			if((!zn) || (!qry_bub_sc(uref, gfa, ref_sc, bub, bid, z, z + zn, qstr, avid, res))) {///found a bubble; a[z] -> beg; a[z + zn] -> sink
				zn = 1;
			}
			z += zn;
		}
	}

	if(res->n) {///matched bubbles
		for (k = 0; k < res->n; k++) res->a[k].tn = (((uint64_t)res->a[k].tn)<<1)|((uint64_t)res->a[k].rev);
		radix_sort_ul_ov_srt_tn(res->a, res->a + res->n);

		for (k = 1, l = m = 0; k <= res->n; k++) {
			if(k == res->n || res->a[k].tn != res->a[l].tn) {///qn <- (tn|rev)
				for (z = l; z < k; z++) res->a[z].tn>>=1;
				a_n = k;
				if(k - l > 1) {///if there is only one alignment for a node, then no need for DP
					a_n = l + cc_bub_match(res->a+l, k-l);
				}
				
				for (z = l; z < a_n; z++) res->a[m++] = res->a[z];
				// fprintf(stderr, "l::%lu, k::%lu, m::%lu\n", l, k, m);
				l = k;
			}
		}
    	res->n = m;
		radix_sort_ul_ov_srt_qe(res->a, res->a + res->n);
		// for (k = 0; k < res->n; k++) {
		// 	fprintf(stderr, "***qsidx::%u(utg%.6u%c), qeidx::%u(utg%.6u%c)\n", res->a[k].qs, (qstr->bb.a[res->a[k].qs].hid)+1, "lc"[gfa->u.a[qstr->bb.a[res->a[k].qs].hid].circ], res->a[k].qe, (qstr->bb.a[res->a[k].qe].hid)+1, "lc"[gfa->u.a[qstr->bb.a[res->a[k].qe].hid].circ]);
		// }
		
	}

	for (k = 0; k < qstr->bb.n; k++) {
		z = qstr->bb.a[k].ts; a_n = qstr->bb.a[k].te;
		for (; z < a_n; z++) {
			///filter by bubble
			for (mi = 0; mi < m && z <= res->a[mi].qe; mi++) {
				if((z >= res->a[mi].qs) && (z <= res->a[mi].qe)) break;
			}
			if((mi < m) && (z >= res->a[mi].qs) && (z <= res->a[mi].qe)) continue;

			///exact match
			if(extract_scaf_res_t(&(qstr->bb.a[z]), uref, ref_sc, avid, res)) continue;

			///trans match
			extract_trans_scaf_res_t(&(qstr->bb.a[z]), uref, ref_sc, gfa, ta, avid, is_exact, res);
		}
	}

	for(k = 0; k < m; k++) {///reset bubble
		res->a[k].el = 1; res->a[k].qn = res->a[k].qs;

		res->a[k].qs = qstr->bb.a[res->a[k].qs].qs;
		res->a[k].qe = qstr->bb.a[res->a[k].qe].qe;

		res->a[k].ts = ref_sc->a[res->a[k].tn].bb.a[res->a[k].ts].qs;
		res->a[k].te = ref_sc->a[res->a[k].tn].bb.a[res->a[k].te].qe;

		nw = MAX(res->a[k].te-res->a[k].ts, res->a[k].qe-res->a[k].qs); nw *= CHAIN_MATCH; 
		res->a[k].sec = ((nw>=0x3fffffff)?(0x3fffffff):(nw));
	}

	// for (k = 0; k < res->n; k++) {
	// 	fprintf(stderr, "[M::%s]\tutg%.6ul(len::%u)\tq::[%u, %u)\t%c\tutg%.6ul(len::%u)\tt::[%u, %u)\tel::%u\ttp::%u\n", __func__, qid + 1, qlen, res->a[k].qs, res->a[k].qe, "+-"[res->a[k].rev], res->a[k].tn+1, ref->u.a[res->a[k].tn].len, res->a[k].ts, res->a[k].te, res->a[k].el, res->a[k].qn);
	// }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xb8, %rsp
movl 0x38(%rbp), %eax
movl 0x30(%rbp), %eax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x48(%rbp)
cmpl $0x0, 0x30(%rbp)
je 0x2e0a11
movl -0xc(%rbp), %eax
movl %eax, -0x88(%rbp)
jmp 0x2e0a1e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x88(%rbp)
jmp 0x2e0a1e
movl -0x88(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x2e0b45
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq %rax, -0x68(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x2e0b32
movq $0x1, -0x60(%rbp)
movq -0x80(%rbp), %rdi
imulq $0x24, -0x58(%rbp), %rax
addq %rax, %rdi
movq -0x68(%rbp), %rsi
subq -0x58(%rbp), %rsi
movq 0x20(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq 0x2df2f0
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x2e0b19
movq -0x28(%rbp), %rdi
movq 0x18(%rbp), %rsi
movq 0x10(%rbp), %rdx
movq 0x20(%rbp), %rcx
movq -0x70(%rbp), %r8
movq -0x58(%rbp), %r9
movq -0x58(%rbp), %rbx
addq -0x60(%rbp), %rbx
movq -0x18(%rbp), %r11
movl -0x84(%rbp), %r10d
movq -0x20(%rbp), %rax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2df440
cmpq $0x0, %rax
jne 0x2e0b21
movq $0x1, -0x60(%rbp)
movq -0x60(%rbp), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x2e0a8a
jmp 0x2e0b34
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2e0a4a
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2e0d6f
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x2e0bbb
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
shlq %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl 0x18(%rcx), %ecx
shrl $0x1f, %ecx
movl %ecx, %ecx
orq %rcx, %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2e0b5c
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
imulq $0x1c, 0x8(%rax), %rax
addq %rax, %rsi
callq 0x27bdd0
movq $0x1, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
ja 0x2e0d44
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x2e0c3c
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x40(%rbp), %rdx
addq %rdx, %rcx
cmpl 0xc(%rcx), %eax
je 0x2e0d31
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x2e0c73
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x58(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %ecx
shrl %ecx
movl %ecx, 0xc(%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2e0c44
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
cmpq $0x1, %rax
jbe 0x2e0cc1
movq -0x40(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
imulq $0x1c, -0x40(%rbp), %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
subq -0x40(%rbp), %rsi
callq 0x2dfe20
movq %rax, %rcx
movq -0x90(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x2e0d29
movq -0x20(%rbp), %rax
movq (%rax), %rcx
imulq $0x1c, -0x58(%rbp), %rax
addq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x48(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x48(%rbp)
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movl 0x18(%rcx), %ecx
movl %ecx, 0x18(%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2e0cc9
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x2e0d33
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2e0bf2
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
imulq $0x1c, 0x8(%rax), %rax
addq %rax, %rsi
callq 0x27b350
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x2e0f2a
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
imulq $0x24, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movq %rax, -0x68(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x2e0f17
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rcx
xorl %eax, %eax
cmpq -0x48(%rbp), %rcx
movb %al, -0x91(%rbp)
jae 0x2e0e01
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x50(%rbp), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
setbe %al
movb %al, -0x91(%rbp)
movb -0x91(%rbp), %al
testb $0x1, %al
jne 0x2e0e0d
jmp 0x2e0e58
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x50(%rbp), %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
jb 0x2e0e45
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x50(%rbp), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
ja 0x2e0e45
jmp 0x2e0e58
jmp 0x2e0e47
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x2e0dcd
movq -0x50(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x2e0e9a
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x50(%rbp), %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
jb 0x2e0e9a
movq -0x58(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x50(%rbp), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
cmpq %rcx, %rax
ja 0x2e0e9a
jmp 0x2e0f06
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
imulq $0x24, -0x58(%rbp), %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movq 0x10(%rbp), %rdx
movl -0x84(%rbp), %ecx
movq -0x20(%rbp), %r8
callq 0x2e0160
cmpq $0x0, %rax
je 0x2e0ec9
jmp 0x2e0f06
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
imulq $0x24, -0x58(%rbp), %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movq 0x10(%rbp), %rdx
movq 0x18(%rbp), %rcx
movq 0x28(%rbp), %r8
movl -0x84(%rbp), %r9d
movl 0x38(%rbp), %r10d
movq -0x20(%rbp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e06e0
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2e0db7
jmp 0x2e0f19
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2e0d77
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jae 0x2e11ae
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
andl $0xbfffffff, %ecx       # imm = 0xBFFFFFFF
orl $0x40000000, %ecx       # imm = 0x40000000
movl %ecx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq 0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl 0xc(%rcx), %ecx
imulq $0x58, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl 0x14(%rcx), %ecx
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
subl 0x10(%rcx), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
movq -0x20(%rbp), %rdx
movq (%rdx), %rdx
imulq $0x1c, -0x38(%rbp), %rsi
addq %rsi, %rdx
subl 0x4(%rdx), %ecx
cmpl %ecx, %eax
jb 0x2e110c
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
subl 0x10(%rcx), %eax
movl %eax, -0x98(%rbp)
jmp 0x2e1136
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
imulq $0x1c, -0x38(%rbp), %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x98(%rbp)
movl -0x98(%rbp), %eax
movl %eax, %eax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
shlq $0x0, %rax
movq %rax, -0x78(%rbp)
cmpq $0x3fffffff, -0x78(%rbp) # imm = 0x3FFFFFFF
jb 0x2e1166
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movq %rax, -0xa0(%rbp)
jmp 0x2e1171
movq -0x78(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movl %eax, %edx
movq -0x20(%rbp), %rax
movq (%rax), %rax
imulq $0x1c, -0x38(%rbp), %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
andl $0xc0000000, %ecx       # imm = 0xC0000000
orl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x2e0f32
addq $0xb8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax,%rax)