/*
 *  misc.cpp
 *  GSPAN
 *
 *  Created by Jinseung KIM on 09. 07. 19.
 *  Copyright 2009 KyungHee. All rights reserved.
 *
 */

#include "gspan.cuh"

using namespace std;
const RMPath& DFSCode::buildRMPath() //buildRMPath là một phương thức của DFSCODE
{
	rmpath.clear();
	int old_from = -1;
	for(int i = size() -1;i>=0;--i) //Duyệt qua tất cả các cạnh của DFS_CODE theo thứ tự từ cạnh cuối đến cạnh đầu (Duyệt ngược)
	{
		if ((*this)[i].from < (*this)[i].to && (rmpath.empty() || old_from == (*this)[i].to)) //nếu from < to và rmpath rỗng hoặc 
		{
			rmpath.push_back(i);
			old_from = (*this)[i].from;
		}
	}
	return rmpath;
}

void History::build(Graph& g,PDFS* e)
{
	clear(); //cái này là đối tượng history kế thừa từ vector<Edge*>, nên lệnh clear này là dọn dẹp vector<Edge*> của history.
	edge.clear();
	edge.resize(g.edge_size());
	vertex.clear();
	vertex.resize(g.size());
	
	if(e){ //e ở đây chính là tham số thứ 2 A_1, e là một con trỏ lưu trử địa chỉ của A_1
		push_back(e->edge);		//Đưa embedding đang xét vào vector<Edge*> của g
		edge[e->edge->id] = vertex[e->edge->from] = vertex[e->edge->to] = 1; //đồng thời đánh dấu các cạnh và đỉnh của g liên quan đến Embedding đó
		
		for(PDFS* p = e->prev; p; p=p->prev){
			push_back(p->edge);
			edge[p->edge->id] = vertex[p->edge->from] = vertex[p->edge->to] = 1; //đánh dấu các cạnh trước đó đã kết nối với embedding đang xét.
		}
		
		std::reverse(begin(),end());
	}
}
//Tìm các mở rộng cho các đỉnh còn lại trên Right Most Path, ngoại trừ đỉnh cuối cùng của DFS_CODE
bool get_forward_rmpath (Graph &graph, Edge *e, int minlabel, History& history, EdgeList &result) //Phát triển right most path, từ mỗi đỉnh của rightmostpath sẽ thêm vào các cạnh nào? Danh dách các cạnh sẽ được lưu vào result
{
	result.clear ();


	
	int tolabel = graph[e->to].label;
	
	for (Vertex::edge_iterator it = graph[e->from].edge.begin() ; //Duyệt qua các cạnh kề với đỉnh 0 trong đồ thị có id=0
		 it != graph[e->from].edge.end() ; ++it)
	{
		int tolabel2 = graph[it->to].label;
		if (e->to == it->to || minlabel > tolabel2 || history.hasVertex (it->to))//Cạnh không hợp lệ khi: có id của đỉnh to bằng với id của cạnh thuộc rmpath chính là e->to.
			continue; //hoặc là những cạnh có nhãn đỉnh to nhỏ hơn minlabel hoặc là những cạnh đã thuộc DFS_CODE rồi.
		
		if (e->elabel < it->elabel || (e->elabel == it->elabel && tolabel <= tolabel2)) //nhãn cạnh của cạnh đang xét nhỏ hơn nhãn cạnh mở rộng, hoặc nhãn cạnh đang xét phải bằng với nhãn cạnh mở rộng và nhãn đỉnh của đỉnh đang xét nhỏ hơn nhãn đỉnh mở rộng
			result.push_back (&(*it));
	}
	
	return (! result.empty());
}

bool get_forward_pure (Graph &graph, Edge *e, int minlabel, History& history, EdgeList &result)
{
	result.clear (); //Tìm các forward edge và lưu kết quả trong result.
	for (Vertex::edge_iterator it = graph[e->to].edge.begin() ; //bắt đầu mở rộng cạnh từ đỉnh to, lưu ý đỉnh này phải thuộc right most path
		 it != graph[e->to].edge.end() ; ++it) //ở đây là duyệt qua tất cả các cạnh kề với đỉnh to trên right most path
	{
		if (minlabel > graph[it->to].label || history.hasVertex (it->to)) //Nếu đỉnh của cạnh muốn thêm đã thuộc DFS_CODE hoặc nhãn đỉnh mới < minlabel của DFS_CODE thì bỏ qua cạnh đó
			continue; //bỏ qua cạnh đó.
		
		result.push_back (&(*it));
	}
	
	return (! result.empty());
}

bool get_forward_root (Graph &g, Vertex &v, EdgeList &result)
{
	result.clear (); //xóa tất cả các phần tử trong result, tức là làm rỗng result.
	for (Vertex::edge_iterator it = v.edge.begin(); it != v.edge.end(); ++it) { //duyệt qua tất cả các cạnh của đỉnh v đang xét
		if (v.label <= g[it->to].label) //nếu như nhãn của đỉnh v nhỏ hơn nhãn đỉnh 'to' kề với nó thì lưu cạnh đó vào EdgeList &result.
			result.push_back (&(*it)); //it là một edge_iterator, về mặt kỹ thuật nó là một con trỏ, nó trỏ đến tất cả các cạnh kết nối với đỉnh v.
	}
	
	return (! result.empty()); //nếu result không rỗng tức là tồn tại forward_edge
}

Edge *get_backward (Graph &graph, Edge* e1, Edge* e2, History& history)
{
	if (e1 == e2)
		return 0;
	
	for (Vertex::edge_iterator it = graph[e2->to].edge.begin() ;
		 it != graph[e2->to].edge.end() ; ++it)
	{
		if (history.hasEdge (it->id))
			continue;
		
		if ( (it->to == e1->from) &&
			( (e1->elabel < it->elabel) ||
			 (e1->elabel == it->elabel) &&
			 (graph[e1->to].label <= graph[e2->to].label)
			 ) )
		{
			return &(*it);
		}
	}
	
	return 0;
}

	.file	"tmpxft_00254d3e_00000000-6_misc.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB5001:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE5001:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSt12_Vector_baseIP4EdgeSaIS1_EE11_M_allocateEm.isra.0, @function
_ZNSt12_Vector_baseIP4EdgeSaIS1_EE11_M_allocateEm.isra.0:
.LFB6037:
	.cfi_startproc
	testq	%rdi, %rdi
	je	.L3
	movabsq	$1152921504606846975, %rax
	cmpq	%rdi, %rax
	jnb	.L4
	pushq	%rax
	.cfi_def_cfa_offset 16
	movabsq	$2305843009213693951, %rax
	cmpq	%rdi, %rax
	jnb	.L5
	call	_ZSt28__throw_bad_array_new_lengthv@PLT
.L5:
	call	_ZSt17__throw_bad_allocv@PLT
.L4:
	.cfi_def_cfa_offset 8
	salq	$3, %rdi
	jmp	_Znwm@PLT
.L3:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE6037:
	.size	_ZNSt12_Vector_baseIP4EdgeSaIS1_EE11_M_allocateEm.isra.0, .-_ZNSt12_Vector_baseIP4EdgeSaIS1_EE11_M_allocateEm.isra.0
	.align 2
	.type	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0, @function
_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0:
.LFB6040:
	.cfi_startproc
	testq	%rdi, %rdi
	je	.L11
	movabsq	$2305843009213693951, %rax
	cmpq	%rdi, %rax
	jnb	.L12
	pushq	%rax
	.cfi_def_cfa_offset 16
	movabsq	$4611686018427387903, %rax
	cmpq	%rdi, %rax
	jnb	.L13
	call	_ZSt28__throw_bad_array_new_lengthv@PLT
.L13:
	call	_ZSt17__throw_bad_allocv@PLT
.L12:
	.cfi_def_cfa_offset 8
	salq	$2, %rdi
	jmp	_Znwm@PLT
.L11:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE6040:
	.size	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0, .-_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0
	.globl	_Z12get_backwardR5GraphP4EdgeS2_R7History
	.type	_Z12get_backwardR5GraphP4EdgeS2_R7History, @function
_Z12get_backwardR5GraphP4EdgeS2_R7History:
.LFB4998:
	.cfi_startproc
	endbr64
	xorl	%r8d, %r8d
	cmpq	%rdx, %rsi
	je	.L17
	movslq	4(%rdx), %rax
	movq	(%rdi), %r9
	salq	$5, %rax
	addq	%r9, %rax
	movq	16(%rax), %r10
	movq	8(%rax), %rdx
.L19:
	movq	%rdx, %r8
	cmpq	%r10, %rdx
	je	.L23
	movl	12(%rdx), %r11d
	movq	24(%rcx), %rdi
	cmpl	$0, (%rdi,%r11,4)
	jne	.L20
	movl	(%rsi), %edi
	cmpl	%edi, 4(%rdx)
	jne	.L20
	movl	8(%rdx), %edi
	cmpl	%edi, 8(%rsi)
	jl	.L17
	jne	.L20
	movslq	4(%rsi), %rdi
	movl	(%rax), %r11d
	salq	$5, %rdi
	cmpl	%r11d, (%r9,%rdi)
	jle	.L17
.L20:
	addq	$16, %rdx
	jmp	.L19
.L23:
	xorl	%r8d, %r8d
.L17:
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE4998:
	.size	_Z12get_backwardR5GraphP4EdgeS2_R7History, .-_Z12get_backwardR5GraphP4EdgeS2_R7History
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB5024:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE5024:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt6vectorIP4EdgeSaIS1_EE5clearEv,"axG",@progbits,_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv,comdat
	.align 2
	.weak	_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv
	.type	_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv, @function
_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv:
.LFB5391:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	cmpq	8(%rdi), %rax
	je	.L26
	movq	%rax, 8(%rdi)
.L26:
	ret
	.cfi_endproc
.LFE5391:
	.size	_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv, .-_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv
	.section	.text._ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,comdat
	.align 2
	.weak	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.type	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc, @function
_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc:
.LFB5770:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rdx, %rdi
	movq	8(%rax), %rcx
	subq	(%rax), %rcx
	movabsq	$2305843009213693951, %rax
	sarq	$2, %rcx
	movq	%rax, %rdx
	subq	%rcx, %rdx
	cmpq	%rsi, %rdx
	jnb	.L29
	pushq	%rax
	.cfi_def_cfa_offset 16
	call	_ZSt20__throw_length_errorPKc@PLT
.L29:
	.cfi_def_cfa_offset 8
	cmpq	%rcx, %rsi
	cmovb	%rcx, %rsi
	addq	%rsi, %rcx
	jc	.L28
	movabsq	$2305843009213693951, %rax
	cmpq	%rax, %rcx
	cmovbe	%rcx, %rax
.L28:
	ret
	.cfi_endproc
.LFE5770:
	.size	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc, .-_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"vector::_M_realloc_insert"
	.text
	.align 2
	.globl	_ZN7DFSCode11buildRMPathEv
	.type	_ZN7DFSCode11buildRMPathEv, @function
_ZN7DFSCode11buildRMPathEv:
.LFB4993:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	56(%rdi), %rax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%rax, 16(%rsp)
	movq	56(%rdi), %rax
	cmpq	64(%rdi), %rax
	je	.L38
	movq	%rax, 64(%rdi)
.L38:
	movq	8(%r14), %rax
	subq	(%r14), %rax
	sarq	$2, %rax
	imull	$-858993459, %eax, %eax
	leal	-1(%rax), %ebp
	orl	$-1, %eax
	movslq	%ebp, %r12
	imulq	$20, %r12, %r12
.L39:
	testl	%ebp, %ebp
	js	.L56
	movq	(%r14), %rsi
	addq	%r12, %rsi
	movl	4(%rsi), %edx
	cmpl	%edx, (%rsi)
	jge	.L40
	movq	64(%r14), %r13
	cmpq	%r13, 56(%r14)
	je	.L48
	cmpl	%eax, %edx
	jne	.L40
.L48:
	cmpq	72(%r14), %r13
	je	.L42
	leaq	4(%r13), %r8
	movl	%ebp, 0(%r13)
	movq	%r8, 64(%r14)
	jmp	.L43
.L42:
	movq	16(%rsp), %rdi
	leaq	.LC0(%rip), %rdx
	movl	$1, %esi
	movq	%r13, %r15
	call	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	movq	%rax, 8(%rsp)
	movq	56(%r14), %rax
	movq	8(%rsp), %rdi
	movq	%rax, (%rsp)
	movq	64(%r14), %rax
	movq	%rax, 24(%rsp)
	movq	(%rsp), %rax
	subq	%rax, %r15
	call	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0
	movl	%ebp, (%rax,%r15)
	movq	%rax, %rbx
	testq	%r15, %r15
	jle	.L44
	movq	(%rsp), %rsi
	movq	%r15, %rdx
	movq	%rax, %rdi
	call	memmove@PLT
.L44:
	leaq	4(%rbx,%r15), %rdi
	movq	24(%rsp), %r15
	subq	%r13, %r15
	testq	%r15, %r15
	jle	.L45
	movq	%r15, %rdx
	movq	%r13, %rsi
	call	memmove@PLT
	movq	%rax, %rdi
.L45:
	addq	%rdi, %r15
	cmpq	$0, (%rsp)
	je	.L46
	movq	(%rsp), %rax
	movq	72(%r14), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	call	_ZdlPvm@PLT
.L46:
	movq	8(%rsp), %rax
	movq	%rbx, 56(%r14)
	movq	%r15, 64(%r14)
	leaq	(%rbx,%rax,4), %rax
	movq	%rax, 72(%r14)
.L43:
	movq	(%r14), %rax
	movl	(%rax,%r12), %eax
.L40:
	decl	%ebp
	subq	$20, %r12
	jmp	.L39
.L56:
	movq	16(%rsp), %rax
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4993:
	.size	_ZN7DFSCode11buildRMPathEv, .-_ZN7DFSCode11buildRMPathEv
	.section	.text._ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc,comdat
	.align 2
	.weak	_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc
	.type	_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc, @function
_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc:
.LFB5781:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movq	%rdx, %rdi
	movq	8(%rax), %rcx
	subq	(%rax), %rcx
	movabsq	$1152921504606846975, %rax
	sarq	$3, %rcx
	movq	%rax, %rdx
	subq	%rcx, %rdx
	cmpq	%rsi, %rdx
	jnb	.L58
	pushq	%rax
	.cfi_def_cfa_offset 16
	call	_ZSt20__throw_length_errorPKc@PLT
.L58:
	.cfi_def_cfa_offset 8
	cmpq	%rcx, %rsi
	cmovb	%rcx, %rsi
	addq	%rsi, %rcx
	jc	.L57
	movabsq	$1152921504606846975, %rax
	cmpq	%rax, %rcx
	cmovbe	%rcx, %rax
.L57:
	ret
	.cfi_endproc
.LFE5781:
	.size	_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc, .-_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc
	.section	.text._ZNSt6vectorIP4EdgeSaIS1_EE9push_backERKS1_,"axG",@progbits,_ZNSt6vectorIP4EdgeSaIS1_EE9push_backERKS1_,comdat
	.align 2
	.weak	_ZNSt6vectorIP4EdgeSaIS1_EE9push_backERKS1_
	.type	_ZNSt6vectorIP4EdgeSaIS1_EE9push_backERKS1_, @function
_ZNSt6vectorIP4EdgeSaIS1_EE9push_backERKS1_:
.LFB5393:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rbx
	cmpq	16(%rdi), %rbx
	je	.L67
	movq	(%rsi), %rax
	addq	$8, %rbx
	movq	%rax, -8(%rbx)
	movq	%rbx, 8(%rdi)
	jmp	.L66
.L67:
	movq	%rsi, 8(%rsp)
	leaq	.LC0(%rip), %rdx
	movl	$1, %esi
	movq	%rbx, %r15
	call	_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc
	movq	(%r14), %r12
	movq	8(%r14), %r13
	movq	%rax, %rdi
	movq	%rax, (%rsp)
	call	_ZNSt12_Vector_baseIP4EdgeSaIS1_EE11_M_allocateEm.isra.0
	movq	8(%rsp), %r8
	subq	%r12, %r15
	movq	%rax, %rbp
	movq	(%r8), %rax
	movq	%rax, 0(%rbp,%r15)
	testq	%r15, %r15
	jle	.L69
	movq	%r15, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	memmove@PLT
.L69:
	subq	%rbx, %r13
	leaq	8(%rbp,%r15), %rdi
	testq	%r13, %r13
	jle	.L70
	movq	%r13, %rdx
	movq	%rbx, %rsi
	call	memmove@PLT
	movq	%rax, %rdi
.L70:
	addq	%rdi, %r13
	testq	%r12, %r12
	je	.L71
	movq	16(%r14), %rsi
	movq	%r12, %rdi
	subq	%r12, %rsi
	call	_ZdlPvm@PLT
.L71:
	movq	(%rsp), %rax
	movq	%rbp, (%r14)
	movq	%r13, 8(%r14)
	leaq	0(%rbp,%rax,8), %rax
	movq	%rax, 16(%r14)
.L66:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5393:
	.size	_ZNSt6vectorIP4EdgeSaIS1_EE9push_backERKS1_, .-_ZNSt6vectorIP4EdgeSaIS1_EE9push_backERKS1_
	.text
	.align 2
	.type	_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_.isra.0, @function
_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_.isra.0:
.LFB6051:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rbx
	cmpq	16(%rdi), %rbx
	je	.L77
	movq	(%rsi), %rax
	addq	$8, %rbx
	movq	%rax, -8(%rbx)
	movq	%rbx, 8(%rdi)
	jmp	.L76
.L77:
	movq	%rsi, 8(%rsp)
	leaq	.LC0(%rip), %rdx
	movl	$1, %esi
	movq	%rbx, %r15
	call	_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc
	movq	(%r14), %r12
	movq	8(%r14), %r13
	movq	%rax, %rdi
	movq	%rax, (%rsp)
	call	_ZNSt12_Vector_baseIP4EdgeSaIS1_EE11_M_allocateEm.isra.0
	movq	8(%rsp), %r8
	subq	%r12, %r15
	movq	%rax, %rbp
	movq	(%r8), %rax
	movq	%rax, 0(%rbp,%r15)
	testq	%r15, %r15
	jle	.L79
	movq	%r15, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	memmove@PLT
.L79:
	subq	%rbx, %r13
	leaq	8(%rbp,%r15), %rdi
	testq	%r13, %r13
	jle	.L80
	movq	%r13, %rdx
	movq	%rbx, %rsi
	call	memmove@PLT
	movq	%rax, %rdi
.L80:
	addq	%rdi, %r13
	testq	%r12, %r12
	je	.L81
	movq	16(%r14), %rsi
	movq	%r12, %rdi
	subq	%r12, %rsi
	call	_ZdlPvm@PLT
.L81:
	movq	(%rsp), %rax
	movq	%rbp, (%r14)
	movq	%r13, 8(%r14)
	leaq	0(%rbp,%rax,8), %rax
	movq	%rax, 16(%r14)
.L76:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE6051:
	.size	_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_.isra.0, .-_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_.isra.0
	.globl	_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE
	.type	_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE, @function
_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE:
.LFB4997:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%rdi, %r13
	movq	%rdx, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rdx, %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r14
	call	_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv
	movq	8(%rbp), %r12
.L87:
	cmpq	16(%rbp), %r12
	je	.L92
	movslq	4(%r12), %rax
	salq	$5, %rax
	addq	0(%r13), %rax
	movl	(%rax), %eax
	cmpl	%eax, 0(%rbp)
	jg	.L88
	movq	%r14, %rsi
	movq	%rbx, %rdi
	movq	%r12, (%rsp)
	call	_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_.isra.0
.L88:
	addq	$16, %r12
	jmp	.L87
.L92:
	movq	(%rbx), %rax
	cmpq	%rax, 8(%rbx)
	setne	%al
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L90
	call	__stack_chk_fail@PLT
.L90:
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4997:
	.size	_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE, .-_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE
	.globl	_Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE
	.type	_Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE, @function
_Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE:
.LFB4996:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rcx, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	movq	%r8, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%r8, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv
	movslq	4(%rbp), %rax
	salq	$5, %rax
	addq	(%r12), %rax
	movq	8(%rax), %r15
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
.L94:
	movslq	4(%rbp), %rdx
	movq	(%r12), %rsi
	salq	$5, %rdx
	cmpq	%r15, 16(%rsi,%rdx)
	je	.L99
	movslq	4(%r15), %rcx
	movq	%rcx, %rdx
	salq	$5, %rcx
	cmpl	%r13d, (%rsi,%rcx)
	jl	.L95
	movq	48(%r14), %rcx
	movl	%edx, %edx
	cmpl	$0, (%rcx,%rdx,4)
	jne	.L95
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%r15, 16(%rsp)
	call	_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_.isra.0
.L95:
	addq	$16, %r15
	jmp	.L94
.L99:
	movq	(%rbx), %rax
	cmpq	%rax, 8(%rbx)
	setne	%al
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L97
	call	__stack_chk_fail@PLT
.L97:
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4996:
	.size	_Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE, .-_Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE
	.globl	_Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE
	.type	_Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE, @function
_Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE:
.LFB4995:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rdi, %r14
	movq	%r8, %rdi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rcx, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r8, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv
	movslq	4(%rbx), %rax
	movq	(%r14), %rdx
	salq	$5, %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, 4(%rsp)
	movslq	(%rbx), %rax
	salq	$5, %rax
	movq	8(%rdx,%rax), %r15
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
.L101:
	movslq	(%rbx), %rdx
	movq	(%r14), %rsi
	salq	$5, %rdx
	cmpq	%r15, 16(%rsi,%rdx)
	je	.L113
	movslq	4(%r15), %rcx
	movq	%rcx, %rdx
	salq	$5, %rcx
	movl	(%rsi,%rcx), %esi
	cmpl	%edx, 4(%rbx)
	je	.L102
	cmpl	%r12d, %esi
	jl	.L102
	movq	48(%r13), %rcx
	movl	%edx, %edx
	cmpl	$0, (%rcx,%rdx,4)
	jne	.L102
	movl	8(%rbx), %ecx
	movl	8(%r15), %edx
	cmpl	%edx, %ecx
	jl	.L103
	cmpl	%esi, 4(%rsp)
	jg	.L102
	cmpl	%edx, %ecx
	jne	.L102
.L103:
	movq	8(%rsp), %rsi
	movq	%rbp, %rdi
	movq	%r15, 16(%rsp)
	call	_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_.isra.0
.L102:
	addq	$16, %r15
	jmp	.L101
.L113:
	movq	0(%rbp), %rax
	cmpq	%rax, 8(%rbp)
	setne	%al
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	je	.L105
	call	__stack_chk_fail@PLT
.L105:
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4995:
	.size	_Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE, .-_Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE
	.section	.text._ZNSt27__uninitialized_default_n_1ILb1EE18__uninit_default_nIPimEET_S3_T0_,"axG",@progbits,_ZNSt27__uninitialized_default_n_1ILb1EE18__uninit_default_nIPimEET_S3_T0_,comdat
	.weak	_ZNSt27__uninitialized_default_n_1ILb1EE18__uninit_default_nIPimEET_S3_T0_
	.type	_ZNSt27__uninitialized_default_n_1ILb1EE18__uninit_default_nIPimEET_S3_T0_, @function
_ZNSt27__uninitialized_default_n_1ILb1EE18__uninit_default_nIPimEET_S3_T0_:
.LFB5952:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	testq	%rsi, %rsi
	je	.L114
	xorl	%r8d, %r8d
	leaq	4(%rdi), %rax
	movl	%r8d, (%rdi)
	decq	%rsi
	je	.L114
	leaq	(%rax,%rsi,4), %rdx
	movq	%rax, %rcx
.L116:
	cmpq	%rcx, %rdx
	je	.L123
	xorl	%esi, %esi
	addq	$4, %rcx
	movl	%esi, -4(%rcx)
	jmp	.L116
.L123:
	subq	%rdi, %rdx
	leaq	-4(%rax,%rdx), %rax
.L114:
	ret
	.cfi_endproc
.LFE5952:
	.size	_ZNSt27__uninitialized_default_n_1ILb1EE18__uninit_default_nIPimEET_S3_T0_, .-_ZNSt27__uninitialized_default_n_1ILb1EE18__uninit_default_nIPimEET_S3_T0_
	.section	.rodata._ZNSt6vectorIiSaIiEE17_M_default_appendEm.str1.1,"aMS",@progbits,1
.LC1:
	.string	"vector::_M_default_append"
	.section	.text._ZNSt6vectorIiSaIiEE17_M_default_appendEm,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_default_appendEm,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEE17_M_default_appendEm
	.type	_ZNSt6vectorIiSaIiEE17_M_default_appendEm, @function
_ZNSt6vectorIiSaIiEE17_M_default_appendEm:
.LFB5614:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	je	.L137
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	pushq	%rdx
	.cfi_def_cfa_offset 64
	movq	8(%rdi), %rdi
	movq	16(%rbp), %rax
	movq	0(%rbp), %r15
	subq	%rdi, %rax
	sarq	$2, %rax
	cmpq	%rsi, %rax
	jb	.L126
	call	_ZNSt27__uninitialized_default_n_1ILb1EE18__uninit_default_nIPimEET_S3_T0_
	movq	%rax, 8(%rbp)
	jmp	.L124
.L126:
	movq	%rdi, %rbx
	leaq	.LC1(%rip), %rdx
	movq	%rbp, %rdi
	call	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	subq	%r15, %rbx
	movq	%rax, %rdi
	movq	%rax, %r13
	call	_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.isra.0
	movq	%r14, %rsi
	leaq	(%rax,%rbx), %rdi
	movq	%rax, %r12
	call	_ZNSt27__uninitialized_default_n_1ILb1EE18__uninit_default_nIPimEET_S3_T0_
	testq	%rbx, %rbx
	je	.L127
	movq	%rbx, %rdx
	movq	%r15, %rsi
	movq	%r12, %rdi
	call	memmove@PLT
	jmp	.L128
.L127:
	testq	%r15, %r15
	je	.L129
.L128:
	movq	16(%rbp), %rsi
	movq	%r15, %rdi
	subq	%r15, %rsi
	call	_ZdlPvm@PLT
.L129:
	sarq	$2, %rbx
	movq	%r12, 0(%rbp)
	addq	%r14, %rbx
	leaq	(%r12,%rbx,4), %rax
	movq	%rax, 8(%rbp)
	leaq	(%r12,%r13,4), %rax
	movq	%rax, 16(%rbp)
.L124:
	popq	%rax
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L137:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE5614:
	.size	_ZNSt6vectorIiSaIiEE17_M_default_appendEm, .-_ZNSt6vectorIiSaIiEE17_M_default_appendEm
	.section	.text._ZNSt6vectorIiSaIiEE6resizeEm,"axG",@progbits,_ZNSt6vectorIiSaIiEE6resizeEm,comdat
	.align 2
	.weak	_ZNSt6vectorIiSaIiEE6resizeEm
	.type	_ZNSt6vectorIiSaIiEE6resizeEm, @function
_ZNSt6vectorIiSaIiEE6resizeEm:
.LFB5392:
	.cfi_startproc
	endbr64
	movq	8(%rdi), %rdx
	movq	(%rdi), %rcx
	movq	%rdx, %rax
	subq	%rcx, %rax
	sarq	$2, %rax
	cmpq	%rsi, %rax
	jnb	.L141
	subq	%rax, %rsi
	jmp	_ZNSt6vectorIiSaIiEE17_M_default_appendEm
.L141:
	cmpq	%rax, %rsi
	jnb	.L140
	leaq	(%rcx,%rsi,4), %rax
	cmpq	%rdx, %rax
	je	.L140
	movq	%rax, 8(%rdi)
.L140:
	ret
	.cfi_endproc
.LFE5392:
	.size	_ZNSt6vectorIiSaIiEE6resizeEm, .-_ZNSt6vectorIiSaIiEE6resizeEm
	.text
	.align 2
	.globl	_ZN7History5buildER5GraphP4PDFS
	.type	_ZN7History5buildER5GraphP4PDFS, @function
_ZN7History5buildER5GraphP4PDFS:
.LFB4994:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	call	_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv
	movq	24(%rbx), %rax
	leaq	24(%rbx), %rdi
	cmpq	32(%rbx), %rax
	je	.L144
	movq	%rax, 32(%rbx)
.L144:
	movl	24(%r12), %esi
	call	_ZNSt6vectorIiSaIiEE6resizeEm
	movq	48(%rbx), %rax
	leaq	48(%rbx), %rdi
	cmpq	56(%rbx), %rax
	je	.L145
	movq	%rax, 56(%rbx)
.L145:
	movq	8(%r12), %rsi
	subq	(%r12), %rsi
	sarq	$5, %rsi
	call	_ZNSt6vectorIiSaIiEE6resizeEm
	testq	%rbp, %rbp
	je	.L143
.L148:
	leaq	8(%rbp), %rsi
	movq	%rbx, %rdi
	call	_ZNSt6vectorIP4EdgeSaIS1_EE9push_backERKS1_
	movq	8(%rbp), %rax
	movq	48(%rbx), %rdx
	movq	16(%rbp), %rbp
	movslq	4(%rax), %rcx
	movl	$1, (%rdx,%rcx,4)
	movslq	(%rax), %rcx
	movl	$1, (%rdx,%rcx,4)
	movl	12(%rax), %edx
	movq	24(%rbx), %rax
	movl	$1, (%rax,%rdx,4)
	testq	%rbp, %rbp
	jne	.L148
	movq	8(%rbx), %rax
	movq	(%rbx), %rdx
	cmpq	%rax, %rdx
	je	.L143
.L153:
	subq	$8, %rax
	cmpq	%rax, %rdx
	jnb	.L143
	movq	(%rdx), %rcx
	movq	(%rax), %rsi
	addq	$8, %rdx
	movq	%rsi, -8(%rdx)
	movq	%rcx, (%rax)
	jmp	.L153
.L143:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4994:
	.size	_ZN7History5buildER5GraphP4PDFS, .-_ZN7History5buildER5GraphP4PDFS
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

/*
 *  misc.cpp
 *  GSPAN
 *
 *  Created by Jinseung KIM on 09. 07. 19.
 *  Copyright 2009 KyungHee. All rights reserved.
 *
 */


#include <hip/hip_runtime.h>
#include "gspan.cuh"

using namespace std;
const RMPath& DFSCode::buildRMPath() //buildRMPath là một phương thức của DFSCODE
{
	rmpath.clear();
	int old_from = -1;
	for(int i = size() -1;i>=0;--i) //Duyệt qua tất cả các cạnh của DFS_CODE theo thứ tự từ cạnh cuối đến cạnh đầu (Duyệt ngược)
	{
		if ((*this)[i].from < (*this)[i].to && (rmpath.empty() || old_from == (*this)[i].to)) //nếu from < to và rmpath rỗng hoặc 
		{
			rmpath.push_back(i);
			old_from = (*this)[i].from;
		}
	}
	return rmpath;
}

void History::build(Graph& g,PDFS* e)
{
	clear(); //cái này là đối tượng history kế thừa từ vector<Edge*>, nên lệnh clear này là dọn dẹp vector<Edge*> của history.
	edge.clear();
	edge.resize(g.edge_size());
	vertex.clear();
	vertex.resize(g.size());
	
	if(e){ //e ở đây chính là tham số thứ 2 A_1, e là một con trỏ lưu trử địa chỉ của A_1
		push_back(e->edge);		//Đưa embedding đang xét vào vector<Edge*> của g
		edge[e->edge->id] = vertex[e->edge->from] = vertex[e->edge->to] = 1; //đồng thời đánh dấu các cạnh và đỉnh của g liên quan đến Embedding đó
		
		for(PDFS* p = e->prev; p; p=p->prev){
			push_back(p->edge);
			edge[p->edge->id] = vertex[p->edge->from] = vertex[p->edge->to] = 1; //đánh dấu các cạnh trước đó đã kết nối với embedding đang xét.
		}
		
		std::reverse(begin(),end());
	}
}
//Tìm các mở rộng cho các đỉnh còn lại trên Right Most Path, ngoại trừ đỉnh cuối cùng của DFS_CODE
bool get_forward_rmpath (Graph &graph, Edge *e, int minlabel, History& history, EdgeList &result) //Phát triển right most path, từ mỗi đỉnh của rightmostpath sẽ thêm vào các cạnh nào? Danh dách các cạnh sẽ được lưu vào result
{
	result.clear ();


	
	int tolabel = graph[e->to].label;
	
	for (Vertex::edge_iterator it = graph[e->from].edge.begin() ; //Duyệt qua các cạnh kề với đỉnh 0 trong đồ thị có id=0
		 it != graph[e->from].edge.end() ; ++it)
	{
		int tolabel2 = graph[it->to].label;
		if (e->to == it->to || minlabel > tolabel2 || history.hasVertex (it->to))//Cạnh không hợp lệ khi: có id của đỉnh to bằng với id của cạnh thuộc rmpath chính là e->to.
			continue; //hoặc là những cạnh có nhãn đỉnh to nhỏ hơn minlabel hoặc là những cạnh đã thuộc DFS_CODE rồi.
		
		if (e->elabel < it->elabel || (e->elabel == it->elabel && tolabel <= tolabel2)) //nhãn cạnh của cạnh đang xét nhỏ hơn nhãn cạnh mở rộng, hoặc nhãn cạnh đang xét phải bằng với nhãn cạnh mở rộng và nhãn đỉnh của đỉnh đang xét nhỏ hơn nhãn đỉnh mở rộng
			result.push_back (&(*it));
	}
	
	return (! result.empty());
}

bool get_forward_pure (Graph &graph, Edge *e, int minlabel, History& history, EdgeList &result)
{
	result.clear (); //Tìm các forward edge và lưu kết quả trong result.
	for (Vertex::edge_iterator it = graph[e->to].edge.begin() ; //bắt đầu mở rộng cạnh từ đỉnh to, lưu ý đỉnh này phải thuộc right most path
		 it != graph[e->to].edge.end() ; ++it) //ở đây là duyệt qua tất cả các cạnh kề với đỉnh to trên right most path
	{
		if (minlabel > graph[it->to].label || history.hasVertex (it->to)) //Nếu đỉnh của cạnh muốn thêm đã thuộc DFS_CODE hoặc nhãn đỉnh mới < minlabel của DFS_CODE thì bỏ qua cạnh đó
			continue; //bỏ qua cạnh đó.
		
		result.push_back (&(*it));
	}
	
	return (! result.empty());
}

bool get_forward_root (Graph &g, Vertex &v, EdgeList &result)
{
	result.clear (); //xóa tất cả các phần tử trong result, tức là làm rỗng result.
	for (Vertex::edge_iterator it = v.edge.begin(); it != v.edge.end(); ++it) { //duyệt qua tất cả các cạnh của đỉnh v đang xét
		if (v.label <= g[it->to].label) //nếu như nhãn của đỉnh v nhỏ hơn nhãn đỉnh 'to' kề với nó thì lưu cạnh đó vào EdgeList &result.
			result.push_back (&(*it)); //it là một edge_iterator, về mặt kỹ thuật nó là một con trỏ, nó trỏ đến tất cả các cạnh kết nối với đỉnh v.
	}
	
	return (! result.empty()); //nếu result không rỗng tức là tồn tại forward_edge
}

Edge *get_backward (Graph &graph, Edge* e1, Edge* e2, History& history)
{
	if (e1 == e2)
		return 0;
	
	for (Vertex::edge_iterator it = graph[e2->to].edge.begin() ;
		 it != graph[e2->to].edge.end() ; ++it)
	{
		if (history.hasEdge (it->id))
			continue;
		
		if ( (it->to == e1->from) &&
			( (e1->elabel < it->elabel) ||
			 (e1->elabel == it->elabel) &&
			 (graph[e1->to].label <= graph[e2->to].label)
			 ) )
		{
			return &(*it);
		}
	}
	
	return 0;
}

	.text
	.file	"misc.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_ZN7DFSCode11buildRMPathEv      # -- Begin function _ZN7DFSCode11buildRMPathEv
	.p2align	1, 0x90
	.type	_ZN7DFSCode11buildRMPathEv,@function
_ZN7DFSCode11buildRMPathEv:             # @_ZN7DFSCode11buildRMPathEv
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	movq	56(%rdi), %rax
	cmpq	%rax, 64(%rdi)
	je	.LBB0_2
# %bb.1:
	movq	%rax, 64(%rbx)
.LBB0_2:                                # %_ZNSt6vectorIiSaIiEE5clearEv.exit
	leaq	56(%rbx), %r14
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	subq	%rax, %rcx
	shrq	$2, %rcx
	imull	$-858993459, %ecx, %ecx         # imm = 0xCCCCCCCD
	decl	%ecx
	movl	%ecx, 12(%rsp)
	js	.LBB0_12
# %bb.3:                                # %.lr.ph
	movl	$-1, %edx
	leaq	12(%rsp), %r15
.LBB0_4:                                # =>This Inner Loop Header: Depth=1
	movl	%ecx, %esi
	leaq	(%rsi,%rsi,4), %rsi
	movl	4(%rax,%rsi,4), %edi
	cmpl	%edi, (%rax,%rsi,4)
	jge	.LBB0_11
# %bb.5:                                #   in Loop: Header=BB0_4 Depth=1
	movq	64(%rbx), %rsi
	cmpq	%rsi, 56(%rbx)
	je	.LBB0_7
# %bb.6:                                #   in Loop: Header=BB0_4 Depth=1
	cmpl	%edi, %edx
	jne	.LBB0_11
.LBB0_7:                                #   in Loop: Header=BB0_4 Depth=1
	cmpq	72(%rbx), %rsi
	je	.LBB0_9
# %bb.8:                                #   in Loop: Header=BB0_4 Depth=1
	movl	%ecx, (%rsi)
	addq	$4, %rsi
	movq	%rsi, 64(%rbx)
	jmp	.LBB0_10
.LBB0_9:                                #   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	movq	(%rbx), %rax
.LBB0_10:                               # %_ZNSt6vectorIiSaIiEE9push_backERKi.exit
                                        #   in Loop: Header=BB0_4 Depth=1
	movslq	12(%rsp), %rcx
	leaq	(%rcx,%rcx,4), %rdx
	movl	(%rax,%rdx,4), %edx
.LBB0_11:                               #   in Loop: Header=BB0_4 Depth=1
	decl	%ecx
	movl	%ecx, 12(%rsp)
	jns	.LBB0_4
.LBB0_12:                               # %._crit_edge
	movq	%r14, %rax
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_ZN7DFSCode11buildRMPathEv, .Lfunc_end0-_ZN7DFSCode11buildRMPathEv
	.cfi_endproc
                                        # -- End function
	.globl	_ZN7History5buildER5GraphP4PDFS # -- Begin function _ZN7History5buildER5GraphP4PDFS
	.p2align	1, 0x90
	.type	_ZN7History5buildER5GraphP4PDFS,@function
_ZN7History5buildER5GraphP4PDFS:        # @_ZN7History5buildER5GraphP4PDFS
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	cmpq	%rax, 8(%rdi)
	je	.LBB1_2
# %bb.1:
	movq	%rax, 8(%rbx)
.LBB1_2:                                # %_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv.exit
	leaq	24(%rbx), %r14
	movq	24(%rbx), %rax
	cmpq	%rax, 32(%rbx)
	je	.LBB1_4
# %bb.3:
	movq	%rax, 32(%rbx)
.LBB1_4:                                # %_ZNSt6vectorIiSaIiEE5clearEv.exit
	movl	24(%r13), %esi
	movq	%r14, %rdi
	callq	_ZNSt6vectorIiSaIiEE6resizeEm
	leaq	48(%rbx), %r15
	movq	48(%rbx), %rax
	cmpq	%rax, 56(%rbx)
	je	.LBB1_6
# %bb.5:
	movq	%rax, 56(%rbx)
.LBB1_6:                                # %_ZNSt6vectorIiSaIiEE5clearEv.exit20
	movq	8(%r13), %rsi
	subq	(%r13), %rsi
	sarq	$5, %rsi
	movq	%r15, %rdi
	callq	_ZNSt6vectorIiSaIiEE6resizeEm
	testq	%r12, %r12
	je	.LBB1_16
# %bb.7:
	leaq	8(%r12), %rdx
	movq	8(%rbx), %rsi
	cmpq	16(%rbx), %rsi
	je	.LBB1_9
# %bb.8:
	movq	(%rdx), %rax
	movq	%rax, (%rsi)
	addq	$8, 8(%rbx)
	jmp	.LBB1_10
.LBB1_9:
	movq	%rbx, %rdi
	callq	_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
.LBB1_10:                               # %_ZNSt6vectorIP4EdgeSaIS1_EE9push_backERKS1_.exit
	movq	8(%r12), %rax
	movslq	4(%rax), %rcx
	movq	(%r15), %rdx
	movl	$1, %ebp
.LBB1_11:                               # %_ZNSt6vectorIP4EdgeSaIS1_EE9push_backERKS1_.exit
                                        # =>This Inner Loop Header: Depth=1
	movl	%ebp, (%rdx,%rcx,4)
	movslq	(%rax), %rcx
	movl	%ebp, (%rdx,%rcx,4)
	movl	12(%rax), %eax
	movq	(%r14), %rcx
	movl	%ebp, (%rcx,%rax,4)
	movq	16(%r12), %r12
	testq	%r12, %r12
	je	.LBB1_12
# %bb.17:                               # %.lr.ph
                                        #   in Loop: Header=BB1_11 Depth=1
	leaq	8(%r12), %rdx
	movq	8(%rbx), %rsi
	cmpq	16(%rbx), %rsi
	je	.LBB1_19
# %bb.18:                               #   in Loop: Header=BB1_11 Depth=1
	movq	(%rdx), %rax
	movq	%rax, (%rsi)
	addq	$8, 8(%rbx)
	jmp	.LBB1_20
.LBB1_19:                               #   in Loop: Header=BB1_11 Depth=1
	movq	%rbx, %rdi
	callq	_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
.LBB1_20:                               # %_ZNSt6vectorIP4EdgeSaIS1_EE9push_backERKS1_.exit22
                                        #   in Loop: Header=BB1_11 Depth=1
	movq	8(%r12), %rax
	movslq	4(%rax), %rcx
	movq	(%r15), %rdx
	jmp	.LBB1_11
.LBB1_12:                               # %._crit_edge
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	cmpq	%rcx, %rax
	je	.LBB1_16
# %bb.13:                               # %._crit_edge
	addq	$-8, %rcx
	cmpq	%rax, %rcx
	jbe	.LBB1_16
# %bb.14:                               # %.lr.ph.i.i.preheader
	addq	$8, %rax
.LBB1_15:                               # %.lr.ph.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	-8(%rax), %rdx
	movq	(%rcx), %rsi
	movq	%rsi, -8(%rax)
	movq	%rdx, (%rcx)
	addq	$-8, %rcx
	leaq	8(%rax), %rdx
	cmpq	%rcx, %rax
	movq	%rdx, %rax
	jb	.LBB1_15
.LBB1_16:                               # %_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPP4EdgeSt6vectorIS3_SaIS3_EEEEEvT_S9_.exit
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_ZN7History5buildER5GraphP4PDFS, .Lfunc_end1-_ZN7History5buildER5GraphP4PDFS
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIiSaIiEE6resizeEm,"axG",@progbits,_ZNSt6vectorIiSaIiEE6resizeEm,comdat
	.weak	_ZNSt6vectorIiSaIiEE6resizeEm   # -- Begin function _ZNSt6vectorIiSaIiEE6resizeEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEE6resizeEm,@function
_ZNSt6vectorIiSaIiEE6resizeEm:          # @_ZNSt6vectorIiSaIiEE6resizeEm
	.cfi_startproc
# %bb.0:
	movq	(%rdi), %rdx
	movq	8(%rdi), %rcx
	movq	%rcx, %r8
	subq	%rdx, %r8
	sarq	$2, %r8
	movq	%rsi, %rax
	subq	%r8, %rax
	jbe	.LBB2_1
# %bb.5:
	movq	%rax, %rsi
	jmp	_ZNSt6vectorIiSaIiEE17_M_default_appendEm # TAILCALL
.LBB2_1:
	jae	.LBB2_4
# %bb.2:
	leaq	(%rdx,%rsi,4), %rax
	cmpq	%rax, %rcx
	je	.LBB2_4
# %bb.3:
	movq	%rax, 8(%rdi)
.LBB2_4:                                # %_ZNSt6vectorIiSaIiEE15_M_erase_at_endEPi.exit
	retq
.Lfunc_end2:
	.size	_ZNSt6vectorIiSaIiEE6resizeEm, .Lfunc_end2-_ZNSt6vectorIiSaIiEE6resizeEm
	.cfi_endproc
                                        # -- End function
	.text
	.globl	_Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE # -- Begin function _Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE
	.type	_Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE,@function
_Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE: # @_Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r8, %rbx
	movq	%rcx, %r14
	movl	%edx, %ebp
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%r8), %rdx
	cmpq	%rdx, 8(%r8)
	je	.LBB3_2
# %bb.1:
	movq	%rdx, 8(%rbx)
.LBB3_2:                                # %_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv.exit
	movq	(%r12), %rcx
	movslq	(%r15), %rax
	movq	%rax, %rdi
	shlq	$5, %rdi
	movq	8(%rcx,%rdi), %r13
	movq	%rdx, %rsi
	cmpq	16(%rcx,%rdi), %r13
	je	.LBB3_13
# %bb.3:
	movslq	4(%r15), %rdx
	shlq	$5, %rdx
	movl	(%rcx,%rdx), %edx
	movl	%edx, 12(%rsp)                  # 4-byte Spill
.LBB3_4:                                # =>This Inner Loop Header: Depth=1
	movl	4(%r13), %esi
	cmpl	%esi, 4(%r15)
	je	.LBB3_11
# %bb.5:                                #   in Loop: Header=BB3_4 Depth=1
	movslq	%esi, %rdx
	shlq	$5, %rdx
	movl	(%rcx,%rdx), %edx
	cmpl	%ebp, %edx
	jl	.LBB3_11
# %bb.6:                                #   in Loop: Header=BB3_4 Depth=1
	movq	48(%r14), %rdi
	cmpl	$0, (%rdi,%rsi,4)
	jne	.LBB3_11
# %bb.7:                                #   in Loop: Header=BB3_4 Depth=1
	movl	8(%r13), %esi
	cmpl	%esi, 8(%r15)
	jl	.LBB3_10
# %bb.8:                                #   in Loop: Header=BB3_4 Depth=1
	jne	.LBB3_11
# %bb.9:                                #   in Loop: Header=BB3_4 Depth=1
	cmpl	%edx, 12(%rsp)                  # 4-byte Folded Reload
	jg	.LBB3_11
.LBB3_10:                               #   in Loop: Header=BB3_4 Depth=1
	movq	%r13, 16(%rsp)
	movq	%rbx, %rdi
	leaq	16(%rsp), %rsi
	callq	_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_
	movl	(%r15), %eax
	movq	(%r12), %rcx
.LBB3_11:                               #   in Loop: Header=BB3_4 Depth=1
	addq	$16, %r13
	movslq	%eax, %rdx
	shlq	$5, %rdx
	cmpq	16(%rcx,%rdx), %r13
	jne	.LBB3_4
# %bb.12:                               # %._crit_edge.loopexit
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
.LBB3_13:                               # %._crit_edge
	cmpq	%rdx, %rsi
	setne	%al
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE, .Lfunc_end3-_Z18get_forward_rmpathR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE
	.cfi_endproc
                                        # -- End function
	.globl	_Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE # -- Begin function _Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE
	.type	_Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE,@function
_Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE: # @_Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r8, %rbx
	movq	%rcx, %r14
	movl	%edx, %ebp
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%r8), %rdx
	cmpq	%rdx, 8(%r8)
	je	.LBB4_2
# %bb.1:
	movq	%rdx, 8(%rbx)
.LBB4_2:                                # %_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv.exit
	movslq	4(%r15), %rax
	movq	(%r12), %rcx
	movq	%rax, %rdi
	shlq	$5, %rdi
	movq	8(%rcx,%rdi), %r13
	movq	%rdx, %rsi
	cmpq	16(%rcx,%rdi), %r13
	je	.LBB4_8
.LBB4_3:                                # =>This Inner Loop Header: Depth=1
	movslq	4(%r13), %rdx
	movq	%rdx, %rsi
	shlq	$5, %rsi
	cmpl	%ebp, (%rcx,%rsi)
	jl	.LBB4_6
# %bb.4:                                #   in Loop: Header=BB4_3 Depth=1
	movl	%edx, %edx
	movq	48(%r14), %rsi
	cmpl	$0, (%rsi,%rdx,4)
	jne	.LBB4_6
# %bb.5:                                #   in Loop: Header=BB4_3 Depth=1
	movq	%r13, (%rsp)
	movq	%rbx, %rdi
	movq	%rsp, %rsi
	callq	_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_
	movl	4(%r15), %eax
	movq	(%r12), %rcx
.LBB4_6:                                #   in Loop: Header=BB4_3 Depth=1
	addq	$16, %r13
	movslq	%eax, %rdx
	shlq	$5, %rdx
	cmpq	16(%rcx,%rdx), %r13
	jne	.LBB4_3
# %bb.7:                                # %._crit_edge.loopexit
	movq	(%rbx), %rsi
	movq	8(%rbx), %rdx
.LBB4_8:                                # %._crit_edge
	cmpq	%rdx, %rsi
	setne	%al
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE, .Lfunc_end4-_Z16get_forward_pureR5GraphP4EdgeiR7HistoryRSt6vectorIS2_SaIS2_EE
	.cfi_endproc
                                        # -- End function
	.globl	_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE # -- Begin function _Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE
	.type	_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE,@function
_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE: # @_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdx), %rcx
	cmpq	%rcx, 8(%rdx)
	je	.LBB5_2
# %bb.1:
	movq	%rcx, 8(%rbx)
.LBB5_2:                                # %_ZNSt6vectorIP4EdgeSaIS1_EE5clearEv.exit
	movq	8(%r14), %r13
	movq	16(%r14), %rax
	movq	%rcx, %rdx
	cmpq	%rax, %r13
	je	.LBB5_8
# %bb.3:
	leaq	8(%rsp), %r12
.LBB5_4:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	(%r14), %ecx
	movslq	4(%r13), %rdx
	movq	(%r15), %rsi
	shlq	$5, %rdx
	cmpl	(%rsi,%rdx), %ecx
	jg	.LBB5_6
# %bb.5:                                #   in Loop: Header=BB5_4 Depth=1
	movq	%r13, 8(%rsp)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_
	movq	16(%r14), %rax
.LBB5_6:                                #   in Loop: Header=BB5_4 Depth=1
	addq	$16, %r13
	cmpq	%rax, %r13
	jne	.LBB5_4
# %bb.7:                                # %._crit_edge.loopexit
	movq	(%rbx), %rdx
	movq	8(%rbx), %rcx
.LBB5_8:                                # %._crit_edge
	cmpq	%rcx, %rdx
	setne	%al
	addq	$16, %rsp
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE, .Lfunc_end5-_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE
	.cfi_endproc
                                        # -- End function
	.globl	_Z12get_backwardR5GraphP4EdgeS2_R7History # -- Begin function _Z12get_backwardR5GraphP4EdgeS2_R7History
	.type	_Z12get_backwardR5GraphP4EdgeS2_R7History,@function
_Z12get_backwardR5GraphP4EdgeS2_R7History: # @_Z12get_backwardR5GraphP4EdgeS2_R7History
	.cfi_startproc
# %bb.0:
	cmpq	%rdx, %rsi
	je	.LBB6_1
# %bb.3:
	movslq	4(%rdx), %rdx
	movq	(%rdi), %rdi
	shlq	$5, %rdx
	movq	8(%rdi,%rdx), %rax
	movq	16(%rdi,%rdx), %r8
	cmpq	%r8, %rax
	je	.LBB6_1
# %bb.4:                                # %.lr.ph
	addq	%rdi, %rdx
	movq	24(%rcx), %rcx
.LBB6_5:                                # =>This Inner Loop Header: Depth=1
	movl	12(%rax), %r9d
	cmpl	$0, (%rcx,%r9,4)
	jne	.LBB6_10
# %bb.6:                                #   in Loop: Header=BB6_5 Depth=1
	movl	4(%rax), %r9d
	cmpl	(%rsi), %r9d
	jne	.LBB6_10
# %bb.7:                                #   in Loop: Header=BB6_5 Depth=1
	movl	8(%rax), %r9d
	cmpl	%r9d, 8(%rsi)
	jl	.LBB6_2
# %bb.8:                                #   in Loop: Header=BB6_5 Depth=1
	jne	.LBB6_10
# %bb.9:                                #   in Loop: Header=BB6_5 Depth=1
	movslq	4(%rsi), %r9
	shlq	$5, %r9
	movl	(%rdi,%r9), %r9d
	cmpl	(%rdx), %r9d
	jle	.LBB6_2
.LBB6_10:                               #   in Loop: Header=BB6_5 Depth=1
	addq	$16, %rax
	cmpq	%r8, %rax
	jne	.LBB6_5
.LBB6_1:
	xorl	%eax, %eax
.LBB6_2:                                # %.loopexit
	retq
.Lfunc_end6:
	.size	_Z12get_backwardR5GraphP4EdgeS2_R7History, .Lfunc_end6-_Z12get_backwardR5GraphP4EdgeS2_R7History
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,comdat
	.weak	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_ # -- Begin function _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_,@function
_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_: # @_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, (%rsp)                    # 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str, %edx
	callq	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	movq	(%rbx), %r13
	movq	8(%rbx), %r15
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	subq	%r13, %r12
	movq	%r12, %r14
	sarq	$2, %r14
	testq	%rax, %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB7_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIiE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB7_3
.LBB7_1:
	xorl	%ebp, %ebp
.LBB7_3:                                # %_ZNSt12_Vector_baseIiSaIiEE11_M_allocateEm.exit
	movq	(%rsp), %rax                    # 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, (%rbp,%r14,4)
	testq	%r12, %r12
	jle	.LBB7_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB7_5:                                # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit
	addq	%rbp, %r12
	addq	$4, %r12
	movq	8(%rsp), %rsi                   # 8-byte Reload
	subq	%rsi, %r15
	testq	%r15, %r15
	jle	.LBB7_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB7_7:                                # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit16
	testq	%r13, %r13
	je	.LBB7_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB7_9:                                # %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit
	addq	%r15, %r12
	movq	%rbp, (%rbx)
	movq	%r12, 8(%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(,%rax,4), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end7:
	.size	_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, .Lfunc_end7-_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc,@function
_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc: # @_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$2305843009213693951, %rcx      # imm = 0x1FFFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$2, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB8_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB8_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end8:
	.size	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc, .Lfunc_end8-_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIiE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIiE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIiE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIiE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIiE8allocateEmPKv,@function
_ZNSt15__new_allocatorIiE8allocateEmPKv: # @_ZNSt15__new_allocatorIiE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$61, %rax
	jne	.LBB9_1
# %bb.3:
	shlq	$2, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB9_1:
	.cfi_def_cfa_offset 16
	shrq	$62, %rsi
	je	.LBB9_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB9_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end9:
	.size	_ZNSt15__new_allocatorIiE8allocateEmPKv, .Lfunc_end9-_ZNSt15__new_allocatorIiE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIiSaIiEE17_M_default_appendEm,"axG",@progbits,_ZNSt6vectorIiSaIiEE17_M_default_appendEm,comdat
	.weak	_ZNSt6vectorIiSaIiEE17_M_default_appendEm # -- Begin function _ZNSt6vectorIiSaIiEE17_M_default_appendEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorIiSaIiEE17_M_default_appendEm,@function
_ZNSt6vectorIiSaIiEE17_M_default_appendEm: # @_ZNSt6vectorIiSaIiEE17_M_default_appendEm
	.cfi_startproc
# %bb.0:
	testq	%rsi, %rsi
	je	.LBB10_16
# %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	16(%rdi), %rax
	subq	%r15, %rax
	sarq	$2, %rax
	cmpq	%rsi, %rax
	jae	.LBB10_2
# %bb.5:
	movq	(%rbx), %r12
	subq	%r12, %r15
	movq	%r15, %r13
	sarq	$2, %r13
	movl	$.L.str.1, %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ZNKSt6vectorIiSaIiEE12_M_check_lenEmPKc
	testq	%rax, %rax
	movq	%rax, (%rsp)                    # 8-byte Spill
	je	.LBB10_6
# %bb.7:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIiE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB10_8
.LBB10_2:
	movl	$0, (%r15)
	leaq	4(%r15), %rdi
	cmpq	$1, %r14
	je	.LBB10_4
# %bb.3:                                # %_ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i
	leaq	-4(,%r14,4), %rdx
	xorl	%esi, %esi
	callq	memset@PLT
	leaq	(%r15,%r14,4), %rdi
.LBB10_4:                               # %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit
	movq	%rdi, 8(%rbx)
	jmp	.LBB10_15
.LBB10_6:
	xorl	%ebp, %ebp
.LBB10_8:
	leaq	(,%r13,4), %r13
	addq	%rbp, %r13
	movl	$0, (%r13)
	cmpq	$1, %r14
	je	.LBB10_10
# %bb.9:                                # %_ZSt6fill_nIPimiET_S1_T0_RKT1_.exit.loopexit.i.i.i30
	leaq	4(%r13), %rdi
	leaq	-4(,%r14,4), %rdx
	xorl	%esi, %esi
	callq	memset@PLT
.LBB10_10:                              # %_ZSt27__uninitialized_default_n_aIPimiET_S1_T0_RSaIT1_E.exit32
	testq	%r15, %r15
	jle	.LBB10_12
# %bb.11:
	movq	%rbp, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB10_12:                              # %_ZNSt6vectorIiSaIiEE11_S_relocateEPiS2_S2_RS0_.exit
	testq	%r12, %r12
	je	.LBB10_14
# %bb.13:
	movq	%r12, %rdi
	callq	_ZdlPv
.LBB10_14:                              # %_ZNSt12_Vector_baseIiSaIiEE13_M_deallocateEPim.exit35
	movq	%rbp, (%rbx)
	leaq	(,%r14,4), %rax
	addq	%r13, %rax
	movq	%rax, 8(%rbx)
	movq	(%rsp), %rax                    # 8-byte Reload
	leaq	(,%rax,4), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
.LBB10_15:
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r13
	.cfi_restore %r14
	.cfi_restore %r15
	.cfi_restore %rbp
.LBB10_16:
	retq
.Lfunc_end10:
	.size	_ZNSt6vectorIiSaIiEE17_M_default_appendEm, .Lfunc_end10-_ZNSt6vectorIiSaIiEE17_M_default_appendEm
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,"axG",@progbits,_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,comdat
	.weak	_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_ # -- Begin function _ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,@function
_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_: # @_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, (%rsp)                    # 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str, %edx
	callq	_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc
	movq	(%rbx), %r13
	movq	8(%rbx), %r15
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	subq	%r13, %r12
	movq	%r12, %r14
	sarq	$3, %r14
	testq	%rax, %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB11_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIP4EdgeE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB11_3
.LBB11_1:
	xorl	%ebp, %ebp
.LBB11_3:                               # %_ZNSt12_Vector_baseIP4EdgeSaIS1_EE11_M_allocateEm.exit
	movq	(%rsp), %rax                    # 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, (%rbp,%r14,8)
	testq	%r12, %r12
	jle	.LBB11_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB11_5:                               # %_ZNSt6vectorIP4EdgeSaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit
	addq	%rbp, %r12
	addq	$8, %r12
	movq	8(%rsp), %rsi                   # 8-byte Reload
	subq	%rsi, %r15
	testq	%r15, %r15
	jle	.LBB11_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB11_7:                               # %_ZNSt6vectorIP4EdgeSaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit16
	testq	%r13, %r13
	je	.LBB11_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB11_9:                               # %_ZNSt12_Vector_baseIP4EdgeSaIS1_EE13_M_deallocateEPS1_m.exit
	addq	%r15, %r12
	movq	%rbp, (%rbx)
	movq	%r12, 8(%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(,%rax,8), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end11:
	.size	_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_, .Lfunc_end11-_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc,@function
_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc: # @_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$1152921504606846975, %rcx      # imm = 0xFFFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$3, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB12_2
# %bb.1:
	cmpq	%rsi, %r8
	cmovaq	%r8, %rsi
	leaq	(%rsi,%r8), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%r8, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB12_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end12:
	.size	_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc, .Lfunc_end12-_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorIP4EdgeE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorIP4EdgeE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorIP4EdgeE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorIP4EdgeE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorIP4EdgeE8allocateEmPKv,@function
_ZNSt15__new_allocatorIP4EdgeE8allocateEmPKv: # @_ZNSt15__new_allocatorIP4EdgeE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$60, %rax
	jne	.LBB13_1
# %bb.3:
	shlq	$3, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB13_1:
	.cfi_def_cfa_offset 16
	shrq	$61, %rsi
	je	.LBB13_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB13_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end13:
	.size	_ZNSt15__new_allocatorIP4EdgeE8allocateEmPKv, .Lfunc_end13-_ZNSt15__new_allocatorIP4EdgeE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_,"axG",@progbits,_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_,comdat
	.weak	_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_ # -- Begin function _ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_,@function
_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_: # @_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rsi, %rdx
	movq	%rdi, %rbx
	movq	8(%rdi), %rsi
	cmpq	16(%rdi), %rsi
	je	.LBB14_2
# %bb.1:
	movq	(%rdx), %rax
	movq	%rax, (%rsi)
	movq	8(%rbx), %rax
	addq	$8, %rax
	movq	%rax, 8(%rbx)
	jmp	.LBB14_3
.LBB14_2:
	movq	%rbx, %rdi
	callq	_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
	movq	8(%rbx), %rax
.LBB14_3:
	addq	$-8, %rax
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end14:
	.size	_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_, .Lfunc_end14-_ZNSt6vectorIP4EdgeSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,"axG",@progbits,_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,comdat
	.weak	_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_ # -- Begin function _ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
	.p2align	1, 0x90
	.type	_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_,@function
_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_: # @_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rdx, (%rsp)                    # 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	$1, %esi
	movl	$.L.str, %edx
	callq	_ZNKSt6vectorIP4EdgeSaIS1_EE12_M_check_lenEmPKc
	movq	(%rbx), %r13
	movq	8(%rbx), %r15
	movq	%r12, 8(%rsp)                   # 8-byte Spill
	subq	%r13, %r12
	movq	%r12, %r14
	sarq	$3, %r14
	testq	%rax, %rax
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	je	.LBB15_1
# %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorIP4EdgeE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB15_3
.LBB15_1:
	xorl	%ebp, %ebp
.LBB15_3:                               # %_ZNSt12_Vector_baseIP4EdgeSaIS1_EE11_M_allocateEm.exit
	movq	(%rsp), %rax                    # 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, (%rbp,%r14,8)
	testq	%r12, %r12
	jle	.LBB15_5
# %bb.4:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	memmove@PLT
.LBB15_5:                               # %_ZNSt6vectorIP4EdgeSaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit
	addq	%rbp, %r12
	addq	$8, %r12
	movq	8(%rsp), %rsi                   # 8-byte Reload
	subq	%rsi, %r15
	testq	%r15, %r15
	jle	.LBB15_7
# %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memmove@PLT
.LBB15_7:                               # %_ZNSt6vectorIP4EdgeSaIS1_EE11_S_relocateEPS1_S4_S4_RS2_.exit16
	testq	%r13, %r13
	je	.LBB15_9
# %bb.8:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB15_9:                               # %_ZNSt12_Vector_baseIP4EdgeSaIS1_EE13_M_deallocateEPS1_m.exit
	addq	%r15, %r12
	movq	%rbp, (%rbx)
	movq	%r12, 8(%rbx)
	movq	16(%rsp), %rax                  # 8-byte Reload
	leaq	(,%rax,8), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end15:
	.size	_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_, .Lfunc_end15-_ZNSt6vectorIP4EdgeSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"vector::_M_realloc_insert"
	.size	.L.str, 26

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"vector::_M_default_append"
	.size	.L.str.1, 26

	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_cuid_

	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
