// File: /workspace/github_c_makefile_star2_O1/xiongxu[P]bam2bedGraph2/samtools-0.1.19/bam_md.c
// Function: bam_prob_realn_core
int bam_prob_realn_core(bam1_t *b, const char *ref, int flag)
{
	int k, i, bw, x, y, yb, ye, xb, xe, apply_baq = flag&1, extend_baq = flag>>1&1, redo_baq = flag&4;
	uint32_t *cigar = bam1_cigar(b);
	bam1_core_t *c = &b->core;
	kpa_par_t conf = kpa_par_def;
	uint8_t *bq = 0, *zq = 0, *qual = bam1_qual(b);
	if ((c->flag & BAM_FUNMAP) || b->core.l_qseq == 0) return -1; // do nothing
	// test if BQ or ZQ is present
	if ((bq = bam_aux_get(b, "BQ")) != 0) ++bq;
	if ((zq = bam_aux_get(b, "ZQ")) != 0 && *zq == 'Z') ++zq;
	if (bq && redo_baq)
	{
	    bam_aux_del(b, bq-1);
	    bq = 0;
	}
	if (bq && zq) { // remove the ZQ tag
		bam_aux_del(b, zq-1);
		zq = 0;
	}
	if (bq || zq) {
		if ((apply_baq && zq) || (!apply_baq && bq)) return -3; // in both cases, do nothing
		if (bq && apply_baq) { // then convert BQ to ZQ
			for (i = 0; i < c->l_qseq; ++i)
				qual[i] = qual[i] + 64 < bq[i]? 0 : qual[i] - ((int)bq[i] - 64);
			*(bq - 3) = 'Z';
		} else if (zq && !apply_baq) { // then convert ZQ to BQ
			for (i = 0; i < c->l_qseq; ++i)
				qual[i] += (int)zq[i] - 64;
			*(zq - 3) = 'B';
		}
		return 0;
	}
	// find the start and end of the alignment	
	x = c->pos, y = 0, yb = ye = xb = xe = -1;
	for (k = 0; k < c->n_cigar; ++k) {
		int op, l;
		op = cigar[k]&0xf; l = cigar[k]>>4;
		if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
			if (yb < 0) yb = y;
			if (xb < 0) xb = x;
			ye = y + l; xe = x + l;
			x += l; y += l;
		} else if (op == BAM_CSOFT_CLIP || op == BAM_CINS) y += l;
		else if (op == BAM_CDEL) x += l;
		else if (op == BAM_CREF_SKIP) return -1; // do nothing if there is a reference skip
	}
	// set bandwidth and the start and the end
	bw = 7;
	if (abs((xe - xb) - (ye - yb)) > bw)
		bw = abs((xe - xb) - (ye - yb)) + 3;
	conf.bw = bw;
	xb -= yb + bw/2; if (xb < 0) xb = 0;
	xe += c->l_qseq - ye + bw/2;
	if (xe - xb - c->l_qseq > bw)
		xb += (xe - xb - c->l_qseq - bw) / 2, xe -= (xe - xb - c->l_qseq - bw) / 2;
	{ // glocal
		uint8_t *s, *r, *q, *seq = bam1_seq(b), *bq;
		int *state;
		bq = calloc(c->l_qseq + 1, 1);
		memcpy(bq, qual, c->l_qseq);
		s = calloc(c->l_qseq, 1);
		for (i = 0; i < c->l_qseq; ++i) s[i] = bam_nt16_nt4_table[bam1_seqi(seq, i)];
		r = calloc(xe - xb, 1);
		for (i = xb; i < xe; ++i) {
			if (ref[i] == 0) { xe = i; break; }
			r[i-xb] = bam_nt16_nt4_table[bam_nt16_table[(int)ref[i]]];
		}
		state = calloc(c->l_qseq, sizeof(int));
		q = calloc(c->l_qseq, 1);
		kpa_glocal(r, xe-xb, s, c->l_qseq, qual, &conf, state, q);
		if (!extend_baq) { // in this block, bq[] is capped by base quality qual[]
			for (k = 0, x = c->pos, y = 0; k < c->n_cigar; ++k) {
				int op = cigar[k]&0xf, l = cigar[k]>>4;
				if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
					for (i = y; i < y + l; ++i) {
						if ((state[i]&3) != 0 || state[i]>>2 != x - xb + (i - y)) bq[i] = 0;
						else bq[i] = bq[i] < q[i]? bq[i] : q[i];
					}
					x += l; y += l;
				} else if (op == BAM_CSOFT_CLIP || op == BAM_CINS) y += l;
				else if (op == BAM_CDEL) x += l;
			}
			for (i = 0; i < c->l_qseq; ++i) bq[i] = qual[i] - bq[i] + 64; // finalize BQ
		} else { // in this block, bq[] is BAQ that can be larger than qual[] (different from the above!)
			uint8_t *left, *rght;
			left = calloc(c->l_qseq, 1); rght = calloc(c->l_qseq, 1);
			for (k = 0, x = c->pos, y = 0; k < c->n_cigar; ++k) {
				int op = cigar[k]&0xf, l = cigar[k]>>4;
				if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) {
					for (i = y; i < y + l; ++i)
						bq[i] = ((state[i]&3) != 0 || state[i]>>2 != x - xb + (i - y))? 0 : q[i];
					for (left[y] = bq[y], i = y + 1; i < y + l; ++i)
						left[i] = bq[i] > left[i-1]? bq[i] : left[i-1];
					for (rght[y+l-1] = bq[y+l-1], i = y + l - 2; i >= y; --i)
						rght[i] = bq[i] > rght[i+1]? bq[i] : rght[i+1];
					for (i = y; i < y + l; ++i)
						bq[i] = left[i] < rght[i]? left[i] : rght[i];
					x += l; y += l;
				} else if (op == BAM_CSOFT_CLIP || op == BAM_CINS) y += l;
				else if (op == BAM_CDEL) x += l;
			}
			for (i = 0; i < c->l_qseq; ++i) bq[i] = 64 + (qual[i] <= bq[i]? 0 : qual[i] - bq[i]); // finalize BQ
			free(left); free(rght);
		}
		if (apply_baq) {
			for (i = 0; i < c->l_qseq; ++i) qual[i] -= bq[i] - 64; // modify qual
			bam_aux_append(b, "ZQ", 'Z', c->l_qseq + 1, bq);
		} else bam_aux_append(b, "BQ", 'Z', c->l_qseq + 1, bq);
		free(bq); free(s); free(r); free(q); free(state);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r13
movl %r13d, %edi
shrl $0x18, %edi
leaq 0x22b35(%rip), %rcx     # 0x50300
movl 0x8(%rcx), %r8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq 0x30(%rbx), %rdi
movq %rdi, 0x28(%rsp)
movl %r8d, 0x50(%rsp)
movq (%rcx), %rcx
movq %rcx, 0x48(%rsp)
movl 0x10(%rbx), %ebp
movq %r13, %rcx
shrq $0x22, %rcx
andl $0x1, %ecx
testl %ebp, %ebp
sete %dil
orb %cl, %dil
jne 0x2dfc3
movq %rsi, 0x20(%rsp)
movl %edx, 0x4(%rsp)
incl %ebp
leaq 0x15f22(%rip), %rsi     # 0x4373a
movq %rbx, %rdi
callq 0x21c82
movq %rax, %r14
leaq 0x1(%rax), %r15
testq %rax, %rax
cmoveq %rax, %r15
leaq 0x13441(%rip), %rsi     # 0x40c76
movq %rbx, %rdi
callq 0x21c82
xorl %r12d, %r12d
testq %rax, %rax
je 0x2d84f
cmpb $0x5a, (%rax)
sete %r12b
addq %rax, %r12
shrq $0x30, %r13
sarl %ebp
testq %r14, %r14
sete %al
movl 0x4(%rsp), %r14d
testb $0x4, %r14b
sete %cl
orb %al, %cl
jne 0x2d87c
decq %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21e01
xorl %r15d, %r15d
movq 0x28(%rsp), %rax
leaq (%rax,%r13,4), %r8
movslq %ebp, %r13
testq %r15, %r15
je 0x2d8a9
testq %r12, %r12
je 0x2d8a9
decq %r12
movq %rbx, %rdi
movq %r12, %rsi
movq %r8, %r12
callq 0x21e01
movq %r12, %r8
xorl %r12d, %r12d
addq %r13, %r8
movq %r15, %rax
orq %r12, %rax
je 0x2d939
testq %r12, %r12
setne %cl
testq %r15, %r15
setne %dl
testb $0x1, %r14b
sete %sil
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
testb %dl, %sil
jne 0x2dfc3
andb %r14b, %cl
jne 0x2dfc3
testb $0x1, %r14b
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0x2db84
cmpl $0x0, 0x10(%rbx)
jle 0x2d92f
xorl %eax, %eax
xorl %ecx, %ecx
movzbl (%r8,%rcx), %edx
movl %edx, %esi
addl $0x40, %esi
movzbl (%r15,%rcx), %edi
subb %dil, %dl
addb $0x40, %dl
cmpl %edi, %esi
movzbl %dl, %edx
cmovbl %eax, %edx
movb %dl, (%r8,%rcx)
incq %rcx
movslq 0x10(%rbx), %rdx
cmpq %rdx, %rcx
jl 0x2d902
movb $0x5a, -0x3(%r15)
jmp 0x2dfc1
movq %r8, 0x18(%rsp)
movq 0x8(%rbx), %rbp
movq %rbp, 0x30(%rsp)
shrq $0x30, %rbp
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
je 0x2d9ff
movl 0x4(%rbx), %edi
xorl %r8d, %r8d
leaq 0x15cea(%rip), %r9      # 0x4365c
xorl %r10d, %r10d
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq 0x28(%rsp), %r11
movl (%r11,%r8,4), %r12d
movl %r12d, %r15d
andl $0xf, %r15d
movl %r12d, %r11d
shrl $0x4, %r11d
cmpl $0x7, %r15d
setne %r13b
testb $0x7, %r12b
setne %r12b
testb %r13b, %r12b
jne 0x2d9cb
testl %ecx, %ecx
cmovsl %r10d, %ecx
testl %edx, %edx
cmovsl %edi, %edx
addl %r11d, %r10d
addl %r11d, %edi
movb $0x1, %r11b
movl %edi, %eax
movl %r10d, %esi
jmp 0x2d9ee
decl %r15d
cmpl $0x3, %r15d
ja 0x2d9e6
movslq (%r9,%r15,4), %r15
addq %r9, %r15
jmpq *%r15
addl %r11d, %r10d
jmp 0x2d9e6
addl %r11d, %edi
movb $0x1, %r11b
jmp 0x2d9ee
xorl %r11d, %r11d
testb %r11b, %r11b
je 0x2db7a
incq %r8
cmpq %r8, %rbp
jne 0x2d984
movl %eax, %r8d
subl %edx, %r8d
subl %esi, %r8d
addl %ecx, %r8d
movl %r8d, %edi
negl %edi
cmovsl %r8d, %edi
leal 0x3(%rdi), %r8d
cmpl $0x8, %edi
movl $0x7, %edi
cmovael %r8d, %edi
movl %edi, %r8d
shrl %r8d
addl %r8d, %ecx
subl %ecx, %edx
xorl %r9d, %r9d
testl %edx, %edx
cmovgl %edx, %r9d
movl %edi, 0x50(%rsp)
movslq 0x10(%rbx), %r12
subl %esi, %eax
addl %r8d, %eax
leal (%rax,%r12), %esi
movl %eax, %ecx
subl %r9d, %ecx
subl %edi, %ecx
jle 0x2da7a
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
addl %r9d, %edx
addl %edx, %edi
subl %edi, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
subl %ecx, %esi
movl %esi, 0x10(%rsp)
movl %edx, %eax
movq %rax, 0x8(%rsp)
jmp 0x2da83
movl %esi, 0x10(%rsp)
movq %r9, 0x8(%rsp)
shlq $0x2, %rbp
addq 0x30(%rbx), %rbp
leaq 0x1(%r12), %rdi
movl $0x1, %esi
callq 0x3610
movq %rax, %r13
movq %rax, %rdi
movq 0x18(%rsp), %rsi
movq %r12, %rdx
callq 0x37d0
movl $0x1, %esi
movq %r12, %rdi
callq 0x3610
leaq 0x2262f(%rip), %r15     # 0x500f0
testl %r12d, %r12d
jle 0x2dafc
movq 0x30(%rsp), %rcx
shrl $0x18, %ecx
addq %rcx, %rbp
xorl %edi, %edi
xorl %edx, %edx
movl %edx, %ecx
shrl %ecx
movzbl (%rbp,%rcx), %esi
movl %edi, %ecx
notb %cl
andb $0x4, %cl
shrl %cl, %esi
andl $0xf, %esi
movb (%rsi,%r15), %cl
movb %cl, (%rax,%rdx)
incq %rdx
addl $0x4, %edi
cmpq %rdx, %r12
jne 0x2dad5
movq %rax, 0x40(%rsp)
movl 0x10(%rsp), %r14d
movl %r14d, %eax
movq 0x8(%rsp), %rbp
subl %ebp, %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x3610
cmpl %ebp, %r14d
movq %rax, 0x38(%rsp)
jle 0x2db70
movslq %ebp, %rcx
movq 0x20(%rsp), %r8
addq %rcx, %r8
movl %ebp, %ecx
movl %r14d, %edi
negl %edi
addq %rcx, %rdi
xorl %ecx, %ecx
leaq 0x2229b(%rip), %rdx     # 0x4fde0
movl 0x4(%rsp), %r14d
movsbq (%r8,%rcx), %rsi
testq %rsi, %rsi
je 0x2dbc7
movzbl (%rdx,%rsi), %esi
movb (%rsi,%r15), %sil
movb %sil, (%rax,%rcx)
incq %rcx
movl %edi, %esi
addl %ecx, %esi
jne 0x2db4a
movl 0x10(%rsp), %r15d
jmp 0x2dbce
movl %r14d, %r15d
movl 0x4(%rsp), %r14d
jmp 0x2dbce
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2dfc3
xorl %eax, %eax
testb $0x1, %r14b
jne 0x2dfc3
testq %r12, %r12
je 0x2dfc3
cmpl $0x0, 0x10(%rbx)
jle 0x2dbbc
xorl %ecx, %ecx
movb (%r12,%rcx), %dl
addb (%r8,%rcx), %dl
addb $-0x40, %dl
movb %dl, (%r8,%rcx)
incq %rcx
movslq 0x10(%rbx), %rdx
cmpq %rdx, %rcx
jl 0x2dba1
movb $0x42, -0x3(%r12)
jmp 0x2dfc3
addl 0x8(%rsp), %ecx
movl %ecx, %r15d
movl $0x4, %esi
movq %r12, %rdi
callq 0x3610
movq %rax, %rbp
movl $0x1, %esi
movq %r12, %rdi
callq 0x3610
subl 0x8(%rsp), %r15d
leaq 0x48(%rsp), %r9
movq 0x38(%rsp), %rdi
movl %r15d, %esi
movq 0x40(%rsp), %rdx
movl %r12d, %ecx
movq 0x18(%rsp), %r8
movq %rax, 0x20(%rsp)
pushq %rax
pushq %rbp
callq 0x37a34
addq $0x10, %rsp
testb $0x2, %r14b
jne 0x2dd35
movq 0x8(%rbx), %rax
movabsq $0x1000000000000, %rcx  # imm = 0x1000000000000
cmpq %rcx, %rax
movq 0x8(%rsp), %r12
jb 0x2dd04
shrq $0x30, %rax
movl 0x4(%rbx), %edx
negl %r12d
xorl %ecx, %ecx
xorl %r8d, %r8d
movq 0x28(%rsp), %rsi
movl (%rsi,%rcx,4), %r9d
movl %r9d, %edi
andl $0xf, %edi
movl %r9d, %esi
shrl $0x4, %esi
cmpl $0x7, %edi
setne %r10b
testb $0x7, %r9b
setne %r11b
testb %r10b, %r11b
jne 0x2dcd5
leal (%rsi,%r8), %edi
cmpl $0x10, %r9d
jb 0x2dccf
movslq %r8d, %r8
movslq %edi, %r9
leal (%r12,%rdx), %r10d
movl (%rbp,%r8,4), %r11d
testb $0x3, %r11b
jne 0x2dcbe
sarl $0x2, %r11d
cmpl %r11d, %r10d
jne 0x2dcbe
movzbl (%r13,%r8), %r11d
movq 0x20(%rsp), %r15
movzbl (%r15,%r8), %r15d
cmpb %r15b, %r11b
cmovbl %r11d, %r15d
movb %r15b, (%r13,%r8)
jmp 0x2dcc4
movb $0x0, (%r13,%r8)
incq %r8
incl %r10d
cmpq %r9, %r8
jl 0x2dc8c
addl %edx, %esi
movl %esi, %edx
jmp 0x2dcf5
cmpl $0x4, %edi
je 0x2dce4
cmpl $0x2, %edi
je 0x2dceb
cmpl $0x1, %edi
jne 0x2dcf2
addl %r8d, %esi
movl %esi, %edi
jmp 0x2dcf5
addl %edx, %esi
movl %r8d, %edi
jmp 0x2dcd1
movl %r8d, %edi
incq %rcx
movl %edi, %r8d
cmpq %rax, %rcx
jne 0x2dc4f
movslq 0x10(%rbx), %rax
testq %rax, %rax
movq 0x18(%rsp), %rsi
jle 0x2df48
xorl %ecx, %ecx
movb (%rsi,%rcx), %dl
subb (%r13,%rcx), %dl
addb $0x40, %dl
movb %dl, (%r13,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x2dd18
jmp 0x2df48
movslq 0x10(%rbx), %r15
movl $0x1, %esi
movq %r15, %rdi
callq 0x3610
movq %rax, %r12
movl $0x1, %esi
movq %r15, 0x58(%rsp)
movq %r15, %rdi
callq 0x3610
movq %rax, %r15
movq 0x8(%rbx), %r10
movabsq $0x1000000000000, %rax  # imm = 0x1000000000000
cmpq %rax, %r10
jb 0x2def4
shrq $0x30, %r10
movl 0x4(%rbx), %r11d
movq 0x8(%rsp), %rax
negl %eax
movq %rax, 0x8(%rsp)
xorl %ecx, %ecx
xorl %edx, %edx
movq %rbx, 0x60(%rsp)
movq %r10, 0x30(%rsp)
movq 0x28(%rsp), %rax
movl (%rax,%rcx,4), %r9d
movl %r9d, %eax
andl $0xf, %eax
movl %r9d, %esi
shrl $0x4, %esi
cmpl $0x7, %eax
setne %dil
testb $0x7, %r9b
setne %r8b
testb %dil, %r8b
jne 0x2dec5
movq %r11, 0x10(%rsp)
leal (%rsi,%rdx), %edi
movslq %edi, %r8
cmpl $0x10, %r9d
jb 0x2de16
movslq %edx, %r11
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %r10
addl %r10d, %eax
movl (%rbp,%r11,4), %r10d
testb $0x3, %r10b
jne 0x2de04
sarl $0x2, %r10d
cmpl %r10d, %eax
jne 0x2de04
movq 0x20(%rsp), %r10
movb (%r10,%r11), %r10b
jmp 0x2de07
xorl %r10d, %r10d
movb %r10b, (%r13,%r11)
incq %r11
incl %eax
cmpq %r8, %r11
jl 0x2dde5
movslq %edx, %r11
movb (%r13,%r11), %al
movb %al, (%r12,%r11)
cmpl $0x20, %r9d
jb 0x2de54
leal 0x1(%rdx), %eax
cltq
movl %edx, %r10d
movzbl (%r13,%rax), %ebx
movslq %r10d, %r10
movzbl (%r12,%r10), %r14d
cmpb %r14b, %bl
cmoval %ebx, %r14d
movb %r14b, (%r12,%rax)
incq %rax
incl %r10d
cmpq %r8, %rax
jl 0x2de30
movb -0x1(%r13,%r8), %al
movb %al, -0x1(%r15,%r8)
leaq -0x2(%r8), %rax
cmpl %edx, %eax
jl 0x2de8b
movb 0x1(%r15,%rax), %dl
incq %rax
movzbl -0x1(%r13,%rax), %r10d
movzbl %dl, %edx
cmpb %dl, %r10b
cmoval %r10d, %edx
movb %dl, -0x1(%r15,%rax)
decq %rax
cmpq %r11, %rax
jg 0x2de6e
cmpl $0x10, %r9d
movq 0x60(%rsp), %rbx
movl 0x4(%rsp), %r14d
jb 0x2deb7
movzbl (%r12,%r11), %eax
movzbl (%r15,%r11), %edx
cmpb %dl, %al
cmovbl %eax, %edx
movb %dl, (%r13,%r11)
incq %r11
cmpq %r8, %r11
jl 0x2de9b
addl 0x10(%rsp), %esi
movl %esi, %r11d
movq 0x30(%rsp), %r10
jmp 0x2dee6
cmpl $0x4, %eax
je 0x2ded4
cmpl $0x2, %eax
je 0x2deda
cmpl $0x1, %eax
jne 0x2dee4
addl %edx, %esi
movl %esi, %edi
jmp 0x2dee6
addl %r11d, %esi
movl %edx, %edi
movl %esi, %r11d
jmp 0x2dee6
movl %edx, %edi
incq %rcx
movl %edi, %edx
cmpq %r10, %rcx
jne 0x2dd97
movq 0x58(%rsp), %r9
testl %r9d, %r9d
movq 0x18(%rsp), %r8
jle 0x2df33
xorl %eax, %eax
movl $0x40, %ecx
movb (%r8,%rax), %dl
movb (%r13,%rax), %sil
movl %edx, %edi
subb %sil, %dil
addb $0x40, %dil
cmpb %sil, %dl
movzbl %dil, %edx
cmovbel %ecx, %edx
movb %dl, (%r13,%rax)
incq %rax
cmpq %rax, %r9
jne 0x2df0a
movq %r12, %rdi
callq 0x3350
movq %r15, %rdi
callq 0x3350
movq 0x18(%rsp), %rsi
movl 0x10(%rbx), %ecx
testb $0x1, %r14b
jne 0x2df5a
leaq 0x157e2(%rip), %rsi     # 0x4373a
jmp 0x2df81
testl %ecx, %ecx
jle 0x2df7a
xorl %eax, %eax
movb (%rsi,%rax), %cl
subb (%r13,%rax), %cl
addb $0x40, %cl
movb %cl, (%rsi,%rax)
incq %rax
movslq 0x10(%rbx), %rcx
cmpq %rcx, %rax
jl 0x2df60
leaq 0x12cf5(%rip), %rsi     # 0x40c76
incl %ecx
movq %rbx, %rdi
movl $0x5a, %edx
movq %r13, %r8
callq 0x21bc8
movq %r13, %rdi
callq 0x3350
movq 0x40(%rsp), %rdi
callq 0x3350
movq 0x38(%rsp), %rdi
callq 0x3350
movq 0x20(%rsp), %rdi
callq 0x3350
movq %rbp, %rdi
callq 0x3350
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq