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

#include "gspan.cuh"
#include <cstring>
#include <string>
#include <iterator>
#include <set>
using namespace std;

void DFSCode::add(int vi,int vj,int li,int lij,int lj)
{
	if (nodeCount()==0)
	{
		push(vi,vj,li,lij,lj); //Push 1st edge to empty DFS_CODE
		minLabel = vi;
		maxId = vj;
		return;
	}
	if(vi<vj)
	{
		push(vi,vj,-1,lij,lj);//build DFS_CODE forward
		maxId=vj;
	}
	else
	{
		push(vi,vj,-1,lij,-1);//xây dựng DFS_CODE backward
	}
}

void DFSCode::remove(int vi,int vj)
{
	pop();
	if (vi<vj)
	{
		--maxId;
	}
}

void DFSCode::fromGraph(Graph& g){
	clear();
	EdgeList edges;
	for(unsigned int from=0;from<g.size();++from)
	{
		if(get_forward_root(g,g[from],edges)==false)
			continue;
		for(EdgeList::iterator it = edges.begin();it!=edges.end();++it)
			push(from,(*it)->to,g[(*it)->from].label,(*it)->elabel,g[(*it)->to].label);
	}
}

bool DFSCode::toGraph(Graph& g) //Convert DFSCode sang đồ thị.
{
	g.clear(); //g là một graph hay là một vector<vertex>, mỗi một phần tử của vector là một vertex và kèm theo các cạnh gắn liền với đỉnh đó.
	
	for(DFSCode::iterator it = begin();it != end(); ++it){ //Duyệt qua DFSCODE
		g.resize(std::max (it->from,it->to) +1); //khởi tạo kích thước cho đồ thị g chính bằng số lượng đỉnh của DFSCode
		
		if(it->fromlabel != -1) //nếu như nhãn của đỉnh là hợp lệ
			g[it->from].label = it->fromlabel; //
		if(it->tolabel != -1)
			g[it->to].label = it->tolabel;
		g[it->from].push (it->from,it->to,it->elabel);
		if(g.directed == false)
			g[it->to].push (it->to,it->from,it->elabel);
	}
	
	g.buildEdge();
	
	return (true);
}


unsigned int DFSCode::nodeCount(void) //giải thuật đếm node trên cây
{
	unsigned int nodecount = 0;
	for(DFSCode::iterator it = begin();it != end(); ++it)
		nodecount = std::max(nodecount,(unsigned int) (std::max(it->from,it->to) + 1)); 
	return (nodecount);
}

std::ostream& DFSCode::write(std::ostream& os)
{
	if(size()==0) return os;
	
	os<<"("<<(*this)[0].fromlabel<<") "<<(*this)[0].elabel<<" (of"<<(*this)[0].tolabel<<")";
	
	for(unsigned int i=1;i<size();++i){
		if((*this)[i].from < (*this)[i].to){
			os<<" "<<(*this)[i].elabel<<" ("<<(*this)[i].from<<"f"<<(*this)[i].tolabel<<")";
		}else{
			os<<" "<<(*this)[i].elabel<<" (b"<<(*this)[i].to<<")";
		}
	}
	return os;
}

	.file	"tmpxft_0036cdff_00000000-6_dfs.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB5019:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE5019:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.globl	_ZN7DFSCode9nodeCountEv
	.type	_ZN7DFSCode9nodeCountEv, @function
_ZN7DFSCode9nodeCountEv:
.LFB5015:
	.cfi_startproc
	endbr64
	movq	8(%rdi), %r8
	movq	(%rdi), %rdx
	xorl	%ecx, %ecx
.L3:
	cmpq	%r8, %rdx
	je	.L6
	movl	(%rdx), %eax
	movl	4(%rdx), %esi
	cmpl	%esi, %eax
	cmovl	%esi, %eax
	incl	%eax
	cmpl	%eax, %ecx
	cmovb	%eax, %ecx
	addq	$20, %rdx
	jmp	.L3
.L6:
	movl	%ecx, %eax
	ret
	.cfi_endproc
.LFE5015:
	.size	_ZN7DFSCode9nodeCountEv, .-_ZN7DFSCode9nodeCountEv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"("
.LC1:
	.string	") "
.LC2:
	.string	" (of"
.LC3:
	.string	")"
.LC4:
	.string	" "
.LC5:
	.string	" ("
.LC6:
	.string	"f"
.LC7:
	.string	" (b"
	.text
	.align 2
	.globl	_ZN7DFSCode5writeERSo
	.type	_ZN7DFSCode5writeERSo, @function
_ZN7DFSCode5writeERSo:
.LFB5016:
	.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
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	pushq	%rcx
	.cfi_def_cfa_offset 64
	movq	(%rdi), %rax
	cmpq	%rax, 8(%rdi)
	je	.L14
	movq	%rdi, %rbx
	leaq	.LC0(%rip), %rsi
	movq	%r12, %rdi
	movl	$1, %r13d
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC3(%rip), %r14
	movabsq	$-3689348814741910323, %r15
	movq	%rax, %rdi
	movq	(%rbx), %rax
	movl	8(%rax), %esi
	call	_ZNSolsEi@PLT
	leaq	.LC1(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	(%rbx), %rax
	movl	12(%rax), %esi
	call	_ZNSolsEi@PLT
	leaq	.LC2(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	(%rbx), %rax
	movl	16(%rax), %esi
	call	_ZNSolsEi@PLT
	movq	%r14, %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
.L9:
	movq	(%rbx), %rdx
	movq	8(%rbx), %rax
	movl	%r13d, %ebp
	subq	%rdx, %rax
	sarq	$2, %rax
	imulq	%r15, %rax
	cmpq	%rax, %rbp
	jnb	.L14
	imulq	$20, %rbp, %rbp
	movq	%r12, %rdi
	leaq	.LC4(%rip), %rsi
	addq	%rbp, %rdx
	movl	4(%rdx), %eax
	cmpl	%eax, (%rdx)
	jge	.L10
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	(%rbx), %rax
	movl	12(%rax,%rbp), %esi
	call	_ZNSolsEi@PLT
	leaq	.LC5(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	(%rbx), %rax
	movl	(%rax,%rbp), %esi
	call	_ZNSolsEi@PLT
	leaq	.LC6(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	(%rbx), %rax
	movl	16(%rax,%rbp), %esi
	jmp	.L16
.L10:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	(%rbx), %rax
	movl	12(%rax,%rbp), %esi
	call	_ZNSolsEi@PLT
	leaq	.LC7(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movq	(%rbx), %rax
	movl	4(%rax,%rbp), %esi
.L16:
	call	_ZNSolsEi@PLT
	movq	%r14, %rsi
	incl	%r13d
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	jmp	.L9
.L14:
	popq	%rdx
	.cfi_def_cfa_offset 56
	movq	%r12, %rax
	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
.LFE5016:
	.size	_ZN7DFSCode5writeERSo, .-_ZN7DFSCode5writeERSo
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB5042:
	.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
.LFE5042:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text._ZNSt12_Vector_baseIP4EdgeSaIS1_EED2Ev,"axG",@progbits,_ZNSt12_Vector_baseIP4EdgeSaIS1_EED5Ev,comdat
	.align 2
	.weak	_ZNSt12_Vector_baseIP4EdgeSaIS1_EED2Ev
	.type	_ZNSt12_Vector_baseIP4EdgeSaIS1_EED2Ev, @function
_ZNSt12_Vector_baseIP4EdgeSaIS1_EED2Ev:
.LFB5385:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L19
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L19:
	ret
	.cfi_endproc
.LFE5385:
	.size	_ZNSt12_Vector_baseIP4EdgeSaIS1_EED2Ev, .-_ZNSt12_Vector_baseIP4EdgeSaIS1_EED2Ev
	.weak	_ZNSt12_Vector_baseIP4EdgeSaIS1_EED1Ev
	.set	_ZNSt12_Vector_baseIP4EdgeSaIS1_EED1Ev,_ZNSt12_Vector_baseIP4EdgeSaIS1_EED2Ev
	.section	.rodata._ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm.str1.1,"aMS",@progbits,1
.LC8:
	.string	"vector::_M_default_append"
	.section	.text._ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm,"axG",@progbits,_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm,comdat
	.align 2
	.weak	_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm
	.type	_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm, @function
_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm:
.LFB5563:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	je	.L39
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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
	movq	%rsi, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rax
	movq	(%rdi), %r14
	subq	%rcx, %rax
	sarq	$4, %rax
	cmpq	%rsi, %rax
	jb	.L23
	movq	%rsi, %rdx
	movq	%rcx, %rax
.L24:
	xorl	%esi, %esi
	addq	$16, %rax
	movl	%esi, -16(%rax)
	movl	%esi, -12(%rax)
	movl	%esi, -8(%rax)
	movl	%esi, -4(%rax)
	decq	%rdx
	jne	.L24
	salq	$4, %rbx
	addq	%rcx, %rbx
	movq	%rbx, 8(%rbp)
	jmp	.L21
.L23:
	movq	%rcx, %rax
	subq	%r14, %rax
	movq	%rax, %r15
	movq	%rax, (%rsp)
	movabsq	$576460752303423487, %rax
	sarq	$4, %r15
	subq	%r15, %rax
	cmpq	%rsi, %rax
	jnb	.L25
	leaq	.LC8(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L25:
	cmpq	%r15, %rsi
	movq	%r15, %r12
	movq	%rcx, 8(%rsp)
	movabsq	$576460752303423487, %rax
	cmovnb	%rsi, %r12
	addq	%r15, %r12
	cmpq	%rax, %r12
	cmova	%rax, %r12
	salq	$4, %r12
	movq	%r12, %rdi
	call	_Znwm@PLT
	movq	8(%rsp), %rcx
	movq	%rbx, %rsi
	movq	%rax, %r13
	movq	(%rsp), %rax
	addq	%r13, %rax
.L26:
	xorl	%edx, %edx
	addq	$16, %rax
	movl	%edx, -16(%rax)
	movl	%edx, -12(%rax)
	movl	%edx, -8(%rax)
	movl	%edx, -4(%rax)
	decq	%rsi
	jne	.L26
	movq	%r13, %rsi
	movq	%r14, %rax
.L27:
	cmpq	%rax, %rcx
	je	.L42
	movups	(%rax), %xmm0
	addq	$16, %rsi
	addq	$16, %rax
	movups	%xmm0, -16(%rsi)
	jmp	.L27
.L42:
	testq	%r14, %r14
	je	.L29
	movq	16(%rbp), %rsi
	movq	%r14, %rdi
	subq	%r14, %rsi
	call	_ZdlPvm@PLT
.L29:
	addq	%r15, %rbx
	movq	%r13, 0(%rbp)
	salq	$4, %rbx
	addq	%r13, %rbx
	addq	%r12, %r13
	movq	%rbx, 8(%rbp)
	movq	%r13, 16(%rbp)
.L21:
	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
.L39:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE5563:
	.size	_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm, .-_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm
	.section	.text._ZN6Vertex4pushEiii,"axG",@progbits,_ZN6Vertex4pushEiii,comdat
	.align 2
	.weak	_ZN6Vertex4pushEiii
	.type	_ZN6Vertex4pushEiii, @function
_ZN6Vertex4pushEiii:
.LFB4935:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	%ecx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movq	%rdi, %rbx
	pushq	%r8
	.cfi_def_cfa_offset 48
	movq	16(%rdi), %rdx
	movq	8(%rdi), %rax
	movq	%rdx, %rcx
	subq	%rax, %rcx
	cmpq	$-16, %rcx
	je	.L44
	leaq	8(%rdi), %rdi
	movl	$1, %esi
	call	_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm
	jmp	.L45
.L44:
	cmpq	%rax, %rdx
	je	.L45
	movq	%rax, 16(%rdi)
.L45:
	movq	16(%rbx), %rax
	movl	%r13d, -16(%rax)
	movl	%r12d, -12(%rax)
	movl	%ebp, -8(%rax)
	popq	%rax
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4935:
	.size	_ZN6Vertex4pushEiii, .-_ZN6Vertex4pushEiii
	.section	.text._ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm,"axG",@progbits,_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm,comdat
	.align 2
	.weak	_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm
	.type	_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm, @function
_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm:
.LFB5581:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	je	.L65
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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
	movq	%rsi, %rbx
	movabsq	$-3689348814741910323, %rsi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	8(%rdi), %rcx
	movq	16(%rdi), %rax
	movq	(%rdi), %r13
	subq	%rcx, %rax
	sarq	$2, %rax
	imulq	%rsi, %rax
	cmpq	%rbx, %rax
	jb	.L49
	movq	%rbx, %rdx
	movq	%rcx, %rax
.L50:
	xorl	%esi, %esi
	addq	$20, %rax
	movl	%esi, -20(%rax)
	movl	%esi, -16(%rax)
	movl	%esi, -12(%rax)
	movl	%esi, -8(%rax)
	movl	%esi, -4(%rax)
	decq	%rdx
	jne	.L50
	imulq	$20, %rbx, %rbx
	addq	%rcx, %rbx
	movq	%rbx, 8(%rbp)
	jmp	.L47
.L49:
	movq	%rcx, %rax
	subq	%r13, %rax
	movq	%rax, %r15
	movq	%rax, (%rsp)
	movabsq	$461168601842738790, %rax
	sarq	$2, %r15
	imulq	%rsi, %r15
	subq	%r15, %rax
	cmpq	%rbx, %rax
	jnb	.L51
	leaq	.LC8(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L51:
	cmpq	%r15, %rbx
	movq	%r15, %r12
	movq	%rcx, 8(%rsp)
	movabsq	$461168601842738790, %rax
	cmovnb	%rbx, %r12
	addq	%r15, %r12
	cmpq	%rax, %r12
	cmova	%rax, %r12
	imulq	$20, %r12, %r12
	movq	%r12, %rdi
	call	_Znwm@PLT
	movq	8(%rsp), %rcx
	movq	%rbx, %rsi
	movq	%rax, %r14
	movq	(%rsp), %rax
	addq	%r14, %rax
.L52:
	xorl	%edx, %edx
	addq	$20, %rax
	movl	%edx, -20(%rax)
	movl	%edx, -16(%rax)
	movl	%edx, -12(%rax)
	movl	%edx, -8(%rax)
	movl	%edx, -4(%rax)
	decq	%rsi
	jne	.L52
	movq	%r14, %rsi
	movq	%r13, %rax
.L53:
	cmpq	%rax, %rcx
	je	.L68
	movups	(%rax), %xmm0
	movl	16(%rax), %edi
	addq	$20, %rsi
	addq	$20, %rax
	movups	%xmm0, -20(%rsi)
	movl	%edi, -4(%rsi)
	jmp	.L53
.L68:
	testq	%r13, %r13
	je	.L55
	movq	16(%rbp), %rsi
	movq	%r13, %rdi
	subq	%r13, %rsi
	call	_ZdlPvm@PLT
.L55:
	addq	%r15, %rbx
	movq	%r14, 0(%rbp)
	imulq	$20, %rbx, %rbx
	addq	%r14, %rbx
	addq	%r12, %r14
	movq	%rbx, 8(%rbp)
	movq	%r14, 16(%rbp)
.L47:
	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
.L65:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE5581:
	.size	_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm, .-_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm
	.section	.text._ZNSt6vectorI3DFSSaIS0_EE6resizeEm,"axG",@progbits,_ZNSt6vectorI3DFSSaIS0_EE6resizeEm,comdat
	.align 2
	.weak	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm
	.type	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm, @function
_ZNSt6vectorI3DFSSaIS0_EE6resizeEm:
.LFB5375:
	.cfi_startproc
	endbr64
	movq	8(%rdi), %rcx
	movq	(%rdi), %rdx
	movabsq	$-3689348814741910323, %r8
	movq	%rcx, %rax
	subq	%rdx, %rax
	sarq	$2, %rax
	imulq	%r8, %rax
	cmpq	%rsi, %rax
	jnb	.L70
	subq	%rax, %rsi
	jmp	_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm
.L70:
	cmpq	%rax, %rsi
	jnb	.L69
	imulq	$20, %rsi, %rsi
	leaq	(%rdx,%rsi), %rax
	cmpq	%rcx, %rax
	je	.L69
	movq	%rax, 8(%rdi)
.L69:
	ret
	.cfi_endproc
.LFE5375:
	.size	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm, .-_ZNSt6vectorI3DFSSaIS0_EE6resizeEm
	.section	.text._ZN7DFSCode4pushEiiiii,"axG",@progbits,_ZN7DFSCode4pushEiiiii,comdat
	.align 2
	.weak	_ZN7DFSCode4pushEiiiii
	.type	_ZN7DFSCode4pushEiiiii, @function
_ZN7DFSCode4pushEiiiii:
.LFB4959:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%r8d, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%ecx, %r14d
	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
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%r9d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	pushq	%rax
	.cfi_def_cfa_offset 64
	movq	8(%rdi), %rsi
	movabsq	$-3689348814741910323, %rax
	subq	(%rdi), %rsi
	sarq	$2, %rsi
	imulq	%rax, %rsi
	incq	%rsi
	call	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm
	movq	8(%rbx), %rax
	movl	%r12d, -20(%rax)
	movl	%r13d, -16(%rax)
	movl	%r14d, -12(%rax)
	movl	%r15d, -8(%rax)
	movl	%ebp, -4(%rax)
	popq	%rdx
	.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
.LFE4959:
	.size	_ZN7DFSCode4pushEiiiii, .-_ZN7DFSCode4pushEiiiii
	.text
	.align 2
	.globl	_ZN7DFSCode3addEiiiii
	.type	_ZN7DFSCode3addEiiiii, @function
_ZN7DFSCode3addEiiiii:
.LFB5011:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movl	%ecx, 12(%rsp)
	movl	%r8d, 8(%rsp)
	call	_ZN7DFSCode9nodeCountEv
	movl	8(%rsp), %r8d
	movl	12(%rsp), %ecx
	testl	%eax, %eax
	jne	.L75
	movl	%ebp, %edx
	movl	%r12d, %esi
	call	_ZN7DFSCode4pushEiiiii
	movl	%r12d, 24(%rbx)
	jmp	.L79
.L75:
	cmpl	%ebp, %r12d
	jge	.L77
	orl	$-1, %ecx
	movl	%ebp, %edx
	movl	%r12d, %esi
	call	_ZN7DFSCode4pushEiiiii
.L79:
	movl	%ebp, 28(%rbx)
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L77:
	.cfi_restore_state
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	movl	%ebp, %edx
	movl	%r12d, %esi
	orl	$-1, %r9d
	popq	%rbx
	.cfi_def_cfa_offset 24
	orl	$-1, %ecx
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	jmp	_ZN7DFSCode4pushEiiiii
	.cfi_endproc
.LFE5011:
	.size	_ZN7DFSCode3addEiiiii, .-_ZN7DFSCode3addEiiiii
	.align 2
	.globl	_ZN7DFSCode9fromGraphER5Graph
	.type	_ZN7DFSCode9fromGraphER5Graph, @function
_ZN7DFSCode9fromGraphER5Graph:
.LFB5013:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA5013
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rsi, %rbx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	movq	(%rdi), %rax
	cmpq	8(%rdi), %rax
	je	.L81
	movq	%rax, 8(%rdi)
.L81:
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	movq	%rsp, %r13
	movq	%rax, (%rsp)
	movq	%rax, 8(%rsp)
	movq	%rax, 16(%rsp)
.L82:
	movq	(%rbx), %rsi
	movq	8(%rbx), %rax
	movl	%r12d, %edx
	subq	%rsi, %rax
	sarq	$5, %rax
	cmpq	%rax, %rdx
	jnb	.L94
	salq	$5, %rdx
	movq	%rbx, %rdi
	addq	%rdx, %rsi
	movq	%r13, %rdx
.LEHB0:
	call	_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE@PLT
	testb	%al, %al
	jne	.L83
.L86:
	incl	%r12d
	jmp	.L82
.L83:
	movq	(%rsp), %r14
.L84:
	movq	(%rbx), %rsi
	cmpq	%r14, 8(%rsp)
	je	.L86
	movq	(%r14), %rdx
	movslq	4(%rdx), %rcx
	movslq	(%rdx), %rax
	movl	8(%rdx), %r8d
	movq	%rcx, %rdi
	salq	$5, %rax
	salq	$5, %rcx
	movl	%edi, %edx
	movq	%rbp, %rdi
	movl	(%rsi,%rcx), %r9d
	movl	(%rsi,%rax), %ecx
	movl	%r12d, %esi
	call	_ZN7DFSCode4pushEiiiii
.LEHE0:
	addq	$8, %r14
	jmp	.L84
.L94:
	movq	%r13, %rdi
	call	_ZNSt12_Vector_baseIP4EdgeSaIS1_EED2Ev
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	je	.L90
	jmp	.L92
.L91:
	endbr64
	movq	%rax, %rbx
.L88:
	movq	%r13, %rdi
	call	_ZNSt12_Vector_baseIP4EdgeSaIS1_EED2Ev
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L92
	movq	%rbx, %rdi
.LEHB1:
	call	_Unwind_Resume@PLT
.LEHE1:
.L92:
	call	__stack_chk_fail@PLT
.L90:
	addq	$32, %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
.LFE5013:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA5013:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE5013-.LLSDACSB5013
.LLSDACSB5013:
	.uleb128 .LEHB0-.LFB5013
	.uleb128 .LEHE0-.LEHB0
	.uleb128 .L91-.LFB5013
	.uleb128 0
	.uleb128 .LEHB1-.LFB5013
	.uleb128 .LEHE1-.LEHB1
	.uleb128 0
	.uleb128 0
.LLSDACSE5013:
	.text
	.size	_ZN7DFSCode9fromGraphER5Graph, .-_ZN7DFSCode9fromGraphER5Graph
	.align 2
	.globl	_ZN7DFSCode6removeEii
	.type	_ZN7DFSCode6removeEii, @function
_ZN7DFSCode6removeEii:
.LFB5012:
	.cfi_startproc
	endbr64
	movabsq	$-3689348814741910323, %rax
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%esi, %ebx
	movq	8(%rdi), %rsi
	subq	(%rdi), %rsi
	sarq	$2, %rsi
	imulq	%rax, %rsi
	decq	%rsi
	call	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm
	cmpl	%r12d, %ebx
	jge	.L95
	decl	28(%rbp)
.L95:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE5012:
	.size	_ZN7DFSCode6removeEii, .-_ZN7DFSCode6removeEii
	.section	.text._ZNSt12_Vector_baseI4EdgeSaIS0_EED2Ev,"axG",@progbits,_ZNSt12_Vector_baseI4EdgeSaIS0_EED5Ev,comdat
	.align 2
	.weak	_ZNSt12_Vector_baseI4EdgeSaIS0_EED2Ev
	.type	_ZNSt12_Vector_baseI4EdgeSaIS0_EED2Ev, @function
_ZNSt12_Vector_baseI4EdgeSaIS0_EED2Ev:
.LFB5960:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	.L98
	movq	16(%rdi), %rsi
	movq	%rax, %rdi
	subq	%rax, %rsi
	jmp	_ZdlPvm@PLT
.L98:
	ret
	.cfi_endproc
.LFE5960:
	.size	_ZNSt12_Vector_baseI4EdgeSaIS0_EED2Ev, .-_ZNSt12_Vector_baseI4EdgeSaIS0_EED2Ev
	.weak	_ZNSt12_Vector_baseI4EdgeSaIS0_EED1Ev
	.set	_ZNSt12_Vector_baseI4EdgeSaIS0_EED1Ev,_ZNSt12_Vector_baseI4EdgeSaIS0_EED2Ev
	.section	.text._ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm,"axG",@progbits,_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm,comdat
	.align 2
	.weak	_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm
	.type	_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm, @function
_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm:
.LFB5626:
	.cfi_startproc
	endbr64
	testq	%rsi, %rsi
	je	.L118
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rdi, %r13
	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
	movq	%rsi, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	8(%rdi), %rsi
	movq	16(%rdi), %rax
	movq	(%rdi), %r8
	subq	%rsi, %rax
	sarq	$5, %rax
	cmpq	%rbx, %rax
	jb	.L102
	movq	%rbx, %r8
	movq	%rsi, %rdx
	xorl	%eax, %eax
.L103:
	movq	%rdx, %rdi
	movl	$8, %ecx
	addq	$32, %rdx
	rep stosl
	decq	%r8
	jne	.L103
	salq	$5, %rbx
	addq	%rsi, %rbx
	movq	%rbx, 8(%r13)
	jmp	.L100
.L102:
	movabsq	$288230376151711743, %rax
	movq	%rsi, %rbp
	subq	%r8, %rbp
	movq	%rbp, %r15
	sarq	$5, %r15
	subq	%r15, %rax
	cmpq	%rbx, %rax
	jnb	.L104
	leaq	.LC8(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L104:
	cmpq	%r15, %rbx
	movq	%r15, %r12
	movq	%rsi, 16(%rsp)
	movabsq	$288230376151711743, %rax
	cmovnb	%rbx, %r12
	movq	%r8, 8(%rsp)
	addq	%r15, %r12
	cmpq	%rax, %r12
	cmova	%rax, %r12
	salq	$5, %r12
	movq	%r12, %rdi
	call	_Znwm@PLT
	movq	16(%rsp), %rsi
	movq	8(%rsp), %r8
	movq	%rbx, %r9
	movq	%rax, %r14
	addq	%rax, %rbp
	xorl	%eax, %eax
.L105:
	movq	%rbp, %rdi
	movl	$8, %ecx
	addq	$32, %rbp
	rep stosl
	decq	%r9
	jne	.L105
	movq	%r14, %rax
	movq	%r8, %rbp
.L106:
	cmpq	%rbp, %rsi
	je	.L121
	movl	0(%rbp), %edx
	movq	%rax, 8(%rsp)
	leaq	8(%rbp), %rdi
	addq	$32, %rbp
	movq	%rsi, 24(%rsp)
	movl	%edx, (%rax)
	movq	-24(%rbp), %rdx
	movq	%r8, 16(%rsp)
	movq	%rdx, 8(%rax)
	movq	-16(%rbp), %rdx
	movq	%rdx, 16(%rax)
	movq	-8(%rbp), %rdx
	movq	%rdx, 24(%rax)
	xorl	%eax, %eax
	movq	%rax, -8(%rbp)
	movq	%rax, -16(%rbp)
	movq	%rax, -24(%rbp)
	call	_ZNSt12_Vector_baseI4EdgeSaIS0_EED2Ev
	movq	8(%rsp), %rax
	movq	24(%rsp), %rsi
	movq	16(%rsp), %r8
	addq	$32, %rax
	jmp	.L106
.L121:
	testq	%r8, %r8
	je	.L108
	movq	16(%r13), %rsi
	movq	%r8, %rdi
	subq	%r8, %rsi
	call	_ZdlPvm@PLT
.L108:
	addq	%r15, %rbx
	movq	%r14, 0(%r13)
	salq	$5, %rbx
	addq	%r14, %rbx
	addq	%r12, %r14
	movq	%rbx, 8(%r13)
	movq	%r14, 16(%r13)
.L100:
	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
.L118:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE5626:
	.size	_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm, .-_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm
	.text
	.align 2
	.globl	_ZN7DFSCode7toGraphER5Graph
	.type	_ZN7DFSCode7toGraphER5Graph, @function
_ZN7DFSCode7toGraphER5Graph:
.LFB5014:
	.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
	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	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdi, %rbx
	pushq	%rcx
	.cfi_def_cfa_offset 64
	movq	(%rsi), %r13
	movq	8(%rsi), %r14
	cmpq	%r14, %r13
	je	.L123
	movq	%r13, %r12
.L124:
	leaq	8(%r12), %rdi
	addq	$32, %r12
	call	_ZNSt12_Vector_baseI4EdgeSaIS0_EED2Ev
	cmpq	%r12, %r14
	jne	.L124
	movq	%r13, 8(%rbp)
.L123:
	movq	(%rbx), %r12
.L125:
	cmpq	%r12, 8(%rbx)
	je	.L142
	movl	(%r12), %eax
	movl	4(%r12), %esi
	movq	8(%rbp), %r15
	movq	0(%rbp), %r13
	cmpl	%eax, %esi
	cmovl	%eax, %esi
	movq	%r15, %rax
	subq	%r13, %rax
	incl	%esi
	sarq	$5, %rax
	movslq	%esi, %rsi
	cmpq	%rsi, %rax
	jnb	.L126
	subq	%rax, %rsi
	movq	%rbp, %rdi
	call	_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm
	jmp	.L127
.L126:
	cmpq	%rax, %rsi
	jnb	.L127
	salq	$5, %rsi
	addq	%rsi, %r13
	cmpq	%r13, %r15
	je	.L127
	movq	%r13, %r14
.L128:
	leaq	8(%r14), %rdi
	addq	$32, %r14
	call	_ZNSt12_Vector_baseI4EdgeSaIS0_EED2Ev
	cmpq	%r14, %r15
	jne	.L128
	movq	%r13, 8(%rbp)
.L127:
	movslq	(%r12), %rdi
	movq	0(%rbp), %rcx
	movl	8(%r12), %eax
	movq	%rdi, %rsi
	salq	$5, %rdi
	addq	%rcx, %rdi
	cmpl	$-1, %eax
	je	.L129
	movl	%eax, (%rdi)
.L129:
	movl	16(%r12), %r8d
	movl	4(%r12), %edx
	cmpl	$-1, %r8d
	je	.L130
	movslq	%edx, %rax
	salq	$5, %rax
	movl	%r8d, (%rcx,%rax)
.L130:
	movl	12(%r12), %ecx
	call	_ZN6Vertex4pushEiii
	cmpb	$0, 28(%rbp)
	jne	.L131
	movslq	4(%r12), %rdi
	movl	12(%r12), %ecx
	movl	(%r12), %edx
	movq	%rdi, %rsi
	salq	$5, %rdi
	addq	0(%rbp), %rdi
	call	_ZN6Vertex4pushEiii
.L131:
	addq	$20, %r12
	jmp	.L125
.L142:
	movq	%rbp, %rdi
	call	_ZN5Graph9buildEdgeEv@PLT
	popq	%rdx
	.cfi_def_cfa_offset 56
	movb	$1, %al
	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
.LFE5014:
	.size	_ZN7DFSCode7toGraphER5Graph, .-_ZN7DFSCode7toGraphER5Graph
	.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
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.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:

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


#include <hip/hip_runtime.h>
#include "gspan.cuh"
#include <cstring>
#include <string>
#include <iterator>
#include <set>
using namespace std;

void DFSCode::add(int vi,int vj,int li,int lij,int lj)
{
	if (nodeCount()==0)
	{
		push(vi,vj,li,lij,lj); //Push 1st edge to empty DFS_CODE
		minLabel = vi;
		maxId = vj;
		return;
	}
	if(vi<vj)
	{
		push(vi,vj,-1,lij,lj);//build DFS_CODE forward
		maxId=vj;
	}
	else
	{
		push(vi,vj,-1,lij,-1);//xây dựng DFS_CODE backward
	}
}

void DFSCode::remove(int vi,int vj)
{
	pop();
	if (vi<vj)
	{
		--maxId;
	}
}

void DFSCode::fromGraph(Graph& g){
	clear();
	EdgeList edges;
	for(unsigned int from=0;from<g.size();++from)
	{
		if(get_forward_root(g,g[from],edges)==false)
			continue;
		for(EdgeList::iterator it = edges.begin();it!=edges.end();++it)
			push(from,(*it)->to,g[(*it)->from].label,(*it)->elabel,g[(*it)->to].label);
	}
}

bool DFSCode::toGraph(Graph& g) //Convert DFSCode sang đồ thị.
{
	g.clear(); //g là một graph hay là một vector<vertex>, mỗi một phần tử của vector là một vertex và kèm theo các cạnh gắn liền với đỉnh đó.
	
	for(DFSCode::iterator it = begin();it != end(); ++it){ //Duyệt qua DFSCODE
		g.resize(std::max (it->from,it->to) +1); //khởi tạo kích thước cho đồ thị g chính bằng số lượng đỉnh của DFSCode
		
		if(it->fromlabel != -1) //nếu như nhãn của đỉnh là hợp lệ
			g[it->from].label = it->fromlabel; //
		if(it->tolabel != -1)
			g[it->to].label = it->tolabel;
		g[it->from].push (it->from,it->to,it->elabel);
		if(g.directed == false)
			g[it->to].push (it->to,it->from,it->elabel);
	}
	
	g.buildEdge();
	
	return (true);
}


unsigned int DFSCode::nodeCount(void) //giải thuật đếm node trên cây
{
	unsigned int nodecount = 0;
	for(DFSCode::iterator it = begin();it != end(); ++it)
		nodecount = std::max(nodecount,(unsigned int) (std::max(it->from,it->to) + 1)); 
	return (nodecount);
}

std::ostream& DFSCode::write(std::ostream& os)
{
	if(size()==0) return os;
	
	os<<"("<<(*this)[0].fromlabel<<") "<<(*this)[0].elabel<<" (of"<<(*this)[0].tolabel<<")";
	
	for(unsigned int i=1;i<size();++i){
		if((*this)[i].from < (*this)[i].to){
			os<<" "<<(*this)[i].elabel<<" ("<<(*this)[i].from<<"f"<<(*this)[i].tolabel<<")";
		}else{
			os<<" "<<(*this)[i].elabel<<" (b"<<(*this)[i].to<<")";
		}
	}
	return os;
}

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

                                        # End of file scope inline assembly
	.globl	_ZN7DFSCode3addEiiiii           # -- Begin function _ZN7DFSCode3addEiiiii
	.p2align	1, 0x90
	.type	_ZN7DFSCode3addEiiiii,@function
_ZN7DFSCode3addEiiiii:                  # @_ZN7DFSCode3addEiiiii
	.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
	movl	%r9d, %ebp
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	(%rdi), %rcx
	movq	8(%rdi), %rax
	cmpq	%rax, %rcx
	je	.LBB0_7
# %bb.1:                                # %.lr.ph.i.preheader
	xorl	%edx, %edx
	movq	%rcx, %rsi
.LBB0_2:                                # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	movl	%edx, %edi
	movl	(%rsi), %r8d
	movl	4(%rsi), %edx
	cmpl	%edx, %r8d
	cmovgl	%r8d, %edx
	incl	%edx
	cmpl	%edx, %edi
	cmoval	%edi, %edx
	addq	$20, %rsi
	cmpq	%rax, %rsi
	jne	.LBB0_2
# %bb.3:                                # %_ZN7DFSCode9nodeCountEv.exit
	testl	%edx, %edx
	je	.LBB0_7
# %bb.4:
	subq	%rcx, %rax
	sarq	$2, %rax
	movabsq	$-3689348814741910323, %rsi     # imm = 0xCCCCCCCCCCCCCCCD
	imulq	%rax, %rsi
	incq	%rsi
	movq	%r14, %rdi
	callq	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movl	%r15d, -20(%rcx)
	movl	%ebx, -16(%rcx)
	movl	$-1, -12(%rcx)
	movl	%r12d, -8(%rcx)
	subq	%rax, %rcx
	cmpl	%ebx, %r15d
	jge	.LBB0_8
# %bb.5:
	movl	%ebp, -4(%rax,%rcx)
	jmp	.LBB0_6
.LBB0_7:                                # %_ZN7DFSCode9nodeCountEv.exit.thread
	subq	%rcx, %rax
	sarq	$2, %rax
	movabsq	$-3689348814741910323, %rsi     # imm = 0xCCCCCCCCCCCCCCCD
	imulq	%rax, %rsi
	incq	%rsi
	movq	%r14, %rdi
	callq	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm
	movq	8(%r14), %rax
	movl	%r15d, -20(%rax)
	movl	%ebx, -16(%rax)
	movl	%r13d, -12(%rax)
	movl	%r12d, -8(%rax)
	movl	%ebp, -4(%rax)
	movl	%r15d, 24(%r14)
.LBB0_6:
	movl	%ebx, 28(%r14)
.LBB0_9:
	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
.LBB0_8:
	.cfi_def_cfa_offset 64
	movl	$-1, -4(%rax,%rcx)
	jmp	.LBB0_9
.Lfunc_end0:
	.size	_ZN7DFSCode3addEiiiii, .Lfunc_end0-_ZN7DFSCode3addEiiiii
	.cfi_endproc
                                        # -- End function
	.globl	_ZN7DFSCode9nodeCountEv         # -- Begin function _ZN7DFSCode9nodeCountEv
	.p2align	1, 0x90
	.type	_ZN7DFSCode9nodeCountEv,@function
_ZN7DFSCode9nodeCountEv:                # @_ZN7DFSCode9nodeCountEv
	.cfi_startproc
# %bb.0:
	movq	(%rdi), %rcx
	movq	8(%rdi), %rdx
	cmpq	%rdx, %rcx
	je	.LBB1_1
# %bb.3:                                # %.lr.ph.preheader
	xorl	%esi, %esi
.LBB1_4:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rcx), %edi
	movl	4(%rcx), %eax
	cmpl	%eax, %edi
	cmovgl	%edi, %eax
	incl	%eax
	cmpl	%eax, %esi
	cmoval	%esi, %eax
	addq	$20, %rcx
	movl	%eax, %esi
	cmpq	%rdx, %rcx
	jne	.LBB1_4
# %bb.2:                                # %._crit_edge
	retq
.LBB1_1:
	xorl	%eax, %eax
	retq
.Lfunc_end1:
	.size	_ZN7DFSCode9nodeCountEv, .Lfunc_end1-_ZN7DFSCode9nodeCountEv
	.cfi_endproc
                                        # -- End function
	.globl	_ZN7DFSCode6removeEii           # -- Begin function _ZN7DFSCode6removeEii
	.p2align	1, 0x90
	.type	_ZN7DFSCode6removeEii,@function
_ZN7DFSCode6removeEii:                  # @_ZN7DFSCode6removeEii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %rbp, -16
	movl	%edx, %ebp
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	subq	(%rdi), %rax
	sarq	$2, %rax
	movabsq	$-3689348814741910323, %rsi     # imm = 0xCCCCCCCCCCCCCCCD
	imulq	%rax, %rsi
	decq	%rsi
	callq	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm
	cmpl	%ebp, %r14d
	jge	.LBB2_2
# %bb.1:
	decl	28(%rbx)
.LBB2_2:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_ZN7DFSCode6removeEii, .Lfunc_end2-_ZN7DFSCode6removeEii
	.cfi_endproc
                                        # -- End function
	.globl	_ZN7DFSCode9fromGraphER5Graph   # -- Begin function _ZN7DFSCode9fromGraphER5Graph
	.p2align	1, 0x90
	.type	_ZN7DFSCode9fromGraphER5Graph,@function
_ZN7DFSCode9fromGraphER5Graph:          # @_ZN7DFSCode9fromGraphER5Graph
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %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	$56, %rsp
	.cfi_def_cfa_offset 112
	.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, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	cmpq	%rax, 8(%rdi)
	je	.LBB3_2
# %bb.1:
	movq	%rax, 8(%r14)
.LBB3_2:                                # %_ZNSt6vectorI3DFSSaIS0_EE5clearEv.exit
	xorps	%xmm0, %xmm0
	movaps	%xmm0, 16(%rsp)
	movq	$0, 32(%rsp)
	movq	(%rbx), %rax
	cmpq	%rax, 8(%rbx)
	je	.LBB3_13
# %bb.3:                                # %.lr.ph27
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	movq	%rcx, 8(%rsp)                   # 8-byte Spill
	movq	%rbx, 48(%rsp)                  # 8-byte Spill
.LBB3_4:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_8 Depth 2
	shlq	$5, %rsi
	addq	%rax, %rsi
.Ltmp0:
	movq	%rbx, %rdi
	leaq	16(%rsp), %rdx
	callq	_Z16get_forward_rootR5GraphR6VertexRSt6vectorIP4EdgeSaIS5_EE
.Ltmp1:
# %bb.5:                                #   in Loop: Header=BB3_4 Depth=1
	testb	%al, %al
	je	.LBB3_10
# %bb.6:                                #   in Loop: Header=BB3_4 Depth=1
	movq	16(%rsp), %rbp
	cmpq	24(%rsp), %rbp
	je	.LBB3_10
# %bb.7:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB3_4 Depth=1
	movq	(%r14), %rax
	movq	8(%r14), %rsi
.LBB3_8:                                # %.lr.ph
                                        #   Parent Loop BB3_4 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	subq	%rax, %rsi
	movq	(%rbp), %rax
	movslq	4(%rax), %r15
	movslq	(%rax), %rcx
	movq	(%rbx), %rdx
	shlq	$5, %rcx
	movl	(%rdx,%rcx), %r12d
	movl	8(%rax), %ebx
	movq	%r15, %rax
	shlq	$5, %rax
	movl	(%rdx,%rax), %r13d
	sarq	$2, %rsi
	movabsq	$-3689348814741910323, %rax     # imm = 0xCCCCCCCCCCCCCCCD
	imulq	%rax, %rsi
	incq	%rsi
.Ltmp3:
	movq	%r14, %rdi
	callq	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm
.Ltmp4:
# %bb.9:                                #   in Loop: Header=BB3_8 Depth=2
	movq	(%r14), %rax
	movq	8(%r14), %rsi
	movq	8(%rsp), %rcx                   # 8-byte Reload
	movl	%ecx, -20(%rsi)
	movl	%r15d, -16(%rsi)
	movl	%r12d, -12(%rsi)
	movl	%ebx, -8(%rsi)
	movl	%r13d, -4(%rsi)
	addq	$8, %rbp
	cmpq	24(%rsp), %rbp
	movq	48(%rsp), %rbx                  # 8-byte Reload
	jne	.LBB3_8
.LBB3_10:                               # %.loopexit
                                        #   in Loop: Header=BB3_4 Depth=1
	movq	8(%rsp), %rdx                   # 8-byte Reload
	incl	%edx
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	subq	%rax, %rcx
	sarq	$5, %rcx
	movq	%rdx, %rsi
	movq	%rdx, 8(%rsp)                   # 8-byte Spill
	cmpq	%rdx, %rcx
	ja	.LBB3_4
# %bb.11:                               # %._crit_edge
	movq	16(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB3_13
# %bb.12:
	callq	_ZdlPv
.LBB3_13:                               # %_ZNSt6vectorIP4EdgeSaIS1_EED2Ev.exit
	addq	$56, %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
.LBB3_15:
	.cfi_def_cfa_offset 112
.Ltmp2:
	jmp	.LBB3_16
.LBB3_14:
.Ltmp5:
.LBB3_16:
	movq	%rax, %rbx
	movq	16(%rsp), %rdi
	testq	%rdi, %rdi
	je	.LBB3_18
# %bb.17:
	callq	_ZdlPv
.LBB3_18:                               # %_ZNSt6vectorIP4EdgeSaIS1_EED2Ev.exit16
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end3:
	.size	_ZN7DFSCode9fromGraphER5Graph, .Lfunc_end3-_ZN7DFSCode9fromGraphER5Graph
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table3:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 1 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp4-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp4
	.uleb128 .Ltmp5-.Lfunc_begin0           #     jumps to .Ltmp5
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp4-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Lfunc_end3-.Ltmp4             #   Call between .Ltmp4 and .Lfunc_end3
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.globl	_ZN7DFSCode7toGraphER5Graph     # -- Begin function _ZN7DFSCode7toGraphER5Graph
	.p2align	1, 0x90
	.type	_ZN7DFSCode7toGraphER5Graph,@function
_ZN7DFSCode7toGraphER5Graph:            # @_ZN7DFSCode7toGraphER5Graph
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_ZNSt6vectorI6VertexSaIS0_EE5clearEv
	movq	(%r14), %r12
	movq	%r14, (%rsp)                    # 8-byte Spill
	cmpq	8(%r14), %r12
	je	.LBB4_8
.LBB4_1:                                # =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	movl	4(%r12), %ecx
	cmpl	%ecx, %eax
	cmovgl	%eax, %ecx
	incl	%ecx
	movslq	%ecx, %rsi
	movq	%rbx, %rdi
	callq	_ZNSt6vectorI6VertexSaIS0_EE6resizeEm
	movl	8(%r12), %ecx
	movq	(%rbx), %rax
	cmpl	$-1, %ecx
	je	.LBB4_3
# %bb.2:                                #   in Loop: Header=BB4_1 Depth=1
	movslq	(%r12), %rdx
	shlq	$5, %rdx
	movl	%ecx, (%rax,%rdx)
.LBB4_3:                                #   in Loop: Header=BB4_1 Depth=1
	movl	16(%r12), %ecx
	cmpl	$-1, %ecx
	je	.LBB4_5
# %bb.4:                                #   in Loop: Header=BB4_1 Depth=1
	movslq	4(%r12), %rdx
	shlq	$5, %rdx
	movl	%ecx, (%rax,%rdx)
.LBB4_5:                                #   in Loop: Header=BB4_1 Depth=1
	movslq	(%r12), %r13
	movl	4(%r12), %ebp
	movl	12(%r12), %r14d
	movq	%r13, %rcx
	shlq	$5, %rcx
	leaq	(%rax,%rcx), %r15
	addq	$8, %r15
	movq	8(%r15), %rsi
	subq	(%r15), %rsi
	sarq	$4, %rsi
	incq	%rsi
	movq	%r15, %rdi
	callq	_ZNSt6vectorI4EdgeSaIS0_EE6resizeEm
	movq	8(%r15), %rax
	movl	%r13d, -16(%rax)
	movl	%ebp, -12(%rax)
	movl	%r14d, -8(%rax)
	cmpb	$0, 28(%rbx)
	jne	.LBB4_7
# %bb.6:                                #   in Loop: Header=BB4_1 Depth=1
	movslq	4(%r12), %r14
	movq	(%rbx), %rax
	movl	(%r12), %ebp
	movl	12(%r12), %r13d
	movq	%r14, %rcx
	shlq	$5, %rcx
	leaq	(%rax,%rcx), %r15
	addq	$8, %r15
	movq	8(%r15), %rsi
	subq	(%r15), %rsi
	sarq	$4, %rsi
	incq	%rsi
	movq	%r15, %rdi
	callq	_ZNSt6vectorI4EdgeSaIS0_EE6resizeEm
	movq	8(%r15), %rax
	movl	%r14d, -16(%rax)
	movl	%ebp, -12(%rax)
	movl	%r13d, -8(%rax)
.LBB4_7:                                #   in Loop: Header=BB4_1 Depth=1
	addq	$20, %r12
	movq	(%rsp), %rax                    # 8-byte Reload
	cmpq	8(%rax), %r12
	jne	.LBB4_1
.LBB4_8:                                # %._crit_edge
	movq	%rbx, %rdi
	callq	_ZN5Graph9buildEdgeEv
	movb	$1, %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	_ZN7DFSCode7toGraphER5Graph, .Lfunc_end4-_ZN7DFSCode7toGraphER5Graph
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorI6VertexSaIS0_EE5clearEv,"axG",@progbits,_ZNSt6vectorI6VertexSaIS0_EE5clearEv,comdat
	.weak	_ZNSt6vectorI6VertexSaIS0_EE5clearEv # -- Begin function _ZNSt6vectorI6VertexSaIS0_EE5clearEv
	.p2align	1, 0x90
	.type	_ZNSt6vectorI6VertexSaIS0_EE5clearEv,@function
_ZNSt6vectorI6VertexSaIS0_EE5clearEv:   # @_ZNSt6vectorI6VertexSaIS0_EE5clearEv
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	(%rdi), %r14
	movq	8(%rdi), %r15
	cmpq	%r14, %r15
	je	.LBB5_6
# %bb.1:                                # %.lr.ph.i.i.i.i.preheader
	movq	%rdi, %rbx
	movq	%r14, %r12
.LBB5_2:                                # %.lr.ph.i.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	.LBB5_4
# %bb.3:                                #   in Loop: Header=BB5_2 Depth=1
	callq	_ZdlPv
.LBB5_4:                                # %_ZSt8_DestroyI6VertexEvPT_.exit.i.i.i.i
                                        #   in Loop: Header=BB5_2 Depth=1
	addq	$32, %r12
	cmpq	%r15, %r12
	jne	.LBB5_2
# %bb.5:                                # %_ZSt8_DestroyIP6VertexS0_EvT_S2_RSaIT0_E.exit.i
	movq	%r14, 8(%rbx)
.LBB5_6:                                # %_ZNSt6vectorI6VertexSaIS0_EE15_M_erase_at_endEPS0_.exit
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_ZNSt6vectorI6VertexSaIS0_EE5clearEv, .Lfunc_end5-_ZNSt6vectorI6VertexSaIS0_EE5clearEv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorI6VertexSaIS0_EE6resizeEm,"axG",@progbits,_ZNSt6vectorI6VertexSaIS0_EE6resizeEm,comdat
	.weak	_ZNSt6vectorI6VertexSaIS0_EE6resizeEm # -- Begin function _ZNSt6vectorI6VertexSaIS0_EE6resizeEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorI6VertexSaIS0_EE6resizeEm,@function
_ZNSt6vectorI6VertexSaIS0_EE6resizeEm:  # @_ZNSt6vectorI6VertexSaIS0_EE6resizeEm
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movq	8(%rdi), %r15
	movq	%r15, %rcx
	subq	%r14, %rcx
	sarq	$5, %rcx
	movq	%rsi, %rax
	subq	%rcx, %rax
	jbe	.LBB6_1
# %bb.9:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm # TAILCALL
.LBB6_1:
	.cfi_def_cfa_offset 48
	jae	.LBB6_8
# %bb.2:
	shlq	$5, %rsi
	addq	%rsi, %r14
	cmpq	%r14, %r15
	je	.LBB6_8
# %bb.3:                                # %.lr.ph.i.i.i.i.preheader
	movq	%r14, %r12
.LBB6_4:                                # %.lr.ph.i.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	.LBB6_6
# %bb.5:                                #   in Loop: Header=BB6_4 Depth=1
	callq	_ZdlPv
.LBB6_6:                                # %_ZSt8_DestroyI6VertexEvPT_.exit.i.i.i.i
                                        #   in Loop: Header=BB6_4 Depth=1
	addq	$32, %r12
	cmpq	%r15, %r12
	jne	.LBB6_4
# %bb.7:                                # %_ZSt8_DestroyIP6VertexS0_EvT_S2_RSaIT0_E.exit.i
	movq	%r14, 8(%rbx)
.LBB6_8:                                # %_ZNSt6vectorI6VertexSaIS0_EE15_M_erase_at_endEPS0_.exit
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_ZNSt6vectorI6VertexSaIS0_EE6resizeEm, .Lfunc_end6-_ZNSt6vectorI6VertexSaIS0_EE6resizeEm
	.cfi_endproc
                                        # -- End function
	.text
	.globl	_ZN7DFSCode5writeERSo           # -- Begin function _ZN7DFSCode5writeERSo
	.p2align	1, 0x90
	.type	_ZN7DFSCode5writeERSo,@function
_ZN7DFSCode5writeERSo:                  # @_ZN7DFSCode5writeERSo
	.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	%rsi, 8(%rsp)                   # 8-byte Spill
	movq	8(%rdi), %rax
	cmpq	(%rdi), %rax
	je	.LBB7_7
# %bb.1:
	movq	%rdi, %r14
	movl	$1, %r12d
	movl	$.L.str, %esi
	movl	$1, %edx
	movq	8(%rsp), %rbx                   # 8-byte Reload
	movq	%rbx, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r14), %rax
	movl	8(%rax), %esi
	movq	%rbx, %rdi
	callq	_ZNSolsEi
	movq	%rax, %r15
	movl	$.L.str.1, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r14), %rax
	movl	12(%rax), %esi
	movq	%r15, %rdi
	callq	_ZNSolsEi
	movq	%rax, %r15
	movl	$.L.str.2, %esi
	movl	$4, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r14), %rax
	movl	16(%rax), %esi
	movq	%r15, %rdi
	callq	_ZNSolsEi
	movl	$.L.str.3, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	subq	%rax, %rcx
	sarq	$2, %rcx
	movabsq	$-3689348814741910323, %rdx     # imm = 0xCCCCCCCCCCCCCCCD
	imulq	%rdx, %rcx
	cmpq	$2, %rcx
	jb	.LBB7_7
# %bb.2:                                # %.lr.ph.preheader
	movl	$2, %ebp
.LBB7_3:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movq	%r12, 16(%rsp)                  # 8-byte Spill
	leaq	(,%r12,4), %rcx
	leaq	(%rcx,%rcx,4), %r13
	movl	(%rax,%r13), %ebx
	movl	4(%rax,%r13), %r12d
	movl	$.L.str.4, %esi
	movl	$1, %edx
	movq	8(%rsp), %r15                   # 8-byte Reload
	movq	%r15, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r14), %rax
	movl	12(%rax,%r13), %esi
	movq	%r15, %rdi
	callq	_ZNSolsEi
	movq	%rax, %r15
	cmpl	%r12d, %ebx
	jge	.LBB7_5
# %bb.4:                                #   in Loop: Header=BB7_3 Depth=1
	movl	$.L.str.5, %esi
	movl	$2, %edx
	movq	%r15, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r14), %rax
	movl	(%rax,%r13), %esi
	movq	%r15, %rdi
	callq	_ZNSolsEi
	movq	%rax, %r15
	movl	$.L.str.6, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r14), %rax
	addq	%r13, %rax
	addq	$16, %rax
	jmp	.LBB7_6
.LBB7_5:                                #   in Loop: Header=BB7_3 Depth=1
	movl	$.L.str.7, %esi
	movl	$3, %edx
	movq	%r15, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%r14), %rax
	movq	16(%rsp), %rcx                  # 8-byte Reload
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%rax,%rcx,4), %rax
	addq	$4, %rax
.LBB7_6:                                #   in Loop: Header=BB7_3 Depth=1
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ZNSolsEi
	movl	$.L.str.3, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	%ebp, %r12d
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	subq	%rax, %rcx
	sarq	$2, %rcx
	movabsq	$-3689348814741910323, %rdx     # imm = 0xCCCCCCCCCCCCCCCD
	imulq	%rdx, %rcx
	incl	%ebp
	cmpq	%r12, %rcx
	ja	.LBB7_3
.LBB7_7:                                # %.loopexit
	movq	8(%rsp), %rax                   # 8-byte Reload
	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	_ZN7DFSCode5writeERSo, .Lfunc_end7-_ZN7DFSCode5writeERSo
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorI3DFSSaIS0_EE6resizeEm,"axG",@progbits,_ZNSt6vectorI3DFSSaIS0_EE6resizeEm,comdat
	.weak	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm # -- Begin function _ZNSt6vectorI3DFSSaIS0_EE6resizeEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm,@function
_ZNSt6vectorI3DFSSaIS0_EE6resizeEm:     # @_ZNSt6vectorI3DFSSaIS0_EE6resizeEm
	.cfi_startproc
# %bb.0:
	movq	(%rdi), %rdx
	movq	8(%rdi), %rcx
	movq	%rcx, %rax
	subq	%rdx, %rax
	sarq	$2, %rax
	movabsq	$-3689348814741910323, %r8      # imm = 0xCCCCCCCCCCCCCCCD
	imulq	%rax, %r8
	movq	%rsi, %rax
	subq	%r8, %rax
	jbe	.LBB8_1
# %bb.5:
	movq	%rax, %rsi
	jmp	_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm # TAILCALL
.LBB8_1:
	jae	.LBB8_4
# %bb.2:
	leaq	(%rsi,%rsi,4), %rax
	leaq	(%rdx,%rax,4), %rax
	cmpq	%rax, %rcx
	je	.LBB8_4
# %bb.3:
	movq	%rax, 8(%rdi)
.LBB8_4:                                # %_ZNSt6vectorI3DFSSaIS0_EE15_M_erase_at_endEPS0_.exit
	retq
.Lfunc_end8:
	.size	_ZNSt6vectorI3DFSSaIS0_EE6resizeEm, .Lfunc_end8-_ZNSt6vectorI3DFSSaIS0_EE6resizeEm
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm,"axG",@progbits,_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm,comdat
	.weak	_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm # -- Begin function _ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm,@function
_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm: # @_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm
	.cfi_startproc
# %bb.0:
	testq	%rsi, %rsi
	je	.LBB9_13
# %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
	movabsq	$-3689348814741910323, %rax     # imm = 0xCCCCCCCCCCCCCCCD
	movq	16(%rdi), %rcx
	subq	%r15, %rcx
	sarq	$2, %rcx
	imulq	%rax, %rcx
	cmpq	%rsi, %rcx
	jae	.LBB9_2
# %bb.3:
	movq	(%rbx), %r12
	movq	%r15, %r13
	subq	%r12, %r13
	sarq	$2, %r13
	imulq	%rax, %r13
	movl	$.L.str.8, %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ZNKSt6vectorI3DFSSaIS0_EE12_M_check_lenEmPKc
	testq	%rax, %rax
	movq	%rax, (%rsp)                    # 8-byte Spill
	je	.LBB9_4
# %bb.5:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorI3DFSE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB9_6
.LBB9_2:                                # %_ZSt27__uninitialized_default_n_aIP3DFSmS0_ET_S2_T0_RSaIT1_E.exit
	shlq	$2, %r14
	leaq	(%r14,%r14,4), %r14
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	addq	%r14, %r15
	movq	%r15, 8(%rbx)
	jmp	.LBB9_12
.LBB9_4:
	xorl	%ebp, %ebp
.LBB9_6:
	leaq	(,%r13,4), %rax
	addq	%r13, %rax
	leaq	(%rbp,%rax,4), %r13
	leaq	(,%r14,4), %rax
	leaq	(%rax,%rax,4), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	cmpq	%r15, %r12
	je	.LBB9_9
# %bb.7:                                # %.lr.ph.i.i.i.preheader
	movq	%rbp, %rax
	movq	%r12, %rcx
.LBB9_8:                                # %.lr.ph.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movl	16(%rcx), %edx
	movl	%edx, 16(%rax)
	movups	(%rcx), %xmm0
	movups	%xmm0, (%rax)
	addq	$20, %rcx
	addq	$20, %rax
	cmpq	%r15, %rcx
	jne	.LBB9_8
.LBB9_9:                                # %_ZNSt6vectorI3DFSSaIS0_EE11_S_relocateEPS0_S3_S3_RS1_.exit
	testq	%r12, %r12
	je	.LBB9_11
# %bb.10:
	movq	%r12, %rdi
	callq	_ZdlPv
.LBB9_11:                               # %_ZNSt12_Vector_baseI3DFSSaIS0_EE13_M_deallocateEPS0_m.exit37
	movq	%rbp, (%rbx)
	leaq	(%r14,%r14,4), %rax
	leaq	(,%rax,4), %rax
	addq	%r13, %rax
	movq	%rax, 8(%rbx)
	movq	(%rsp), %rax                    # 8-byte Reload
	leaq	(%rax,%rax,4), %rax
	leaq	(,%rax,4), %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
.LBB9_12:
	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
.LBB9_13:
	retq
.Lfunc_end9:
	.size	_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm, .Lfunc_end9-_ZNSt6vectorI3DFSSaIS0_EE17_M_default_appendEm
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorI3DFSSaIS0_EE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorI3DFSSaIS0_EE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorI3DFSSaIS0_EE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorI3DFSSaIS0_EE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorI3DFSSaIS0_EE12_M_check_lenEmPKc,@function
_ZNKSt6vectorI3DFSSaIS0_EE12_M_check_lenEmPKc: # @_ZNKSt6vectorI3DFSSaIS0_EE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$461168601842738790, %rcx       # imm = 0x666666666666666
	movq	8(%rdi), %rax
	subq	(%rdi), %rax
	sarq	$2, %rax
	movabsq	$-3689348814741910323, %rdi     # imm = 0xCCCCCCCCCCCCCCCD
	imulq	%rax, %rdi
	movq	%rcx, %rax
	subq	%rdi, %rax
	cmpq	%rsi, %rax
	jb	.LBB10_2
# %bb.1:
	cmpq	%rsi, %rdi
	cmovaq	%rdi, %rsi
	leaq	(%rsi,%rdi), %rax
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	addq	%rdi, %rsi
	cmovbq	%rcx, %rax
	retq
.LBB10_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end10:
	.size	_ZNKSt6vectorI3DFSSaIS0_EE12_M_check_lenEmPKc, .Lfunc_end10-_ZNKSt6vectorI3DFSSaIS0_EE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorI3DFSE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorI3DFSE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorI3DFSE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorI3DFSE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorI3DFSE8allocateEmPKv,@function
_ZNSt15__new_allocatorI3DFSE8allocateEmPKv: # @_ZNSt15__new_allocatorI3DFSE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movabsq	$461168601842738791, %rax       # imm = 0x666666666666667
	cmpq	%rax, %rsi
	jae	.LBB11_1
# %bb.3:
	shlq	$2, %rsi
	leaq	(%rsi,%rsi,4), %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB11_1:
	.cfi_def_cfa_offset 16
	movabsq	$922337203685477581, %rax       # imm = 0xCCCCCCCCCCCCCCD
	cmpq	%rax, %rsi
	jb	.LBB11_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB11_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end11:
	.size	_ZNSt15__new_allocatorI3DFSE8allocateEmPKv, .Lfunc_end11-_ZNSt15__new_allocatorI3DFSE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorI4EdgeSaIS0_EE6resizeEm,"axG",@progbits,_ZNSt6vectorI4EdgeSaIS0_EE6resizeEm,comdat
	.weak	_ZNSt6vectorI4EdgeSaIS0_EE6resizeEm # -- Begin function _ZNSt6vectorI4EdgeSaIS0_EE6resizeEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorI4EdgeSaIS0_EE6resizeEm,@function
_ZNSt6vectorI4EdgeSaIS0_EE6resizeEm:    # @_ZNSt6vectorI4EdgeSaIS0_EE6resizeEm
	.cfi_startproc
# %bb.0:
	movq	(%rdi), %rcx
	movq	8(%rdi), %rdx
	movq	%rdx, %r8
	subq	%rcx, %r8
	sarq	$4, %r8
	movq	%rsi, %rax
	subq	%r8, %rax
	jbe	.LBB12_1
# %bb.5:
	movq	%rax, %rsi
	jmp	_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm # TAILCALL
.LBB12_1:
	jae	.LBB12_4
# %bb.2:
	shlq	$4, %rsi
	addq	%rsi, %rcx
	cmpq	%rcx, %rdx
	je	.LBB12_4
# %bb.3:
	movq	%rcx, 8(%rdi)
.LBB12_4:                               # %_ZNSt6vectorI4EdgeSaIS0_EE15_M_erase_at_endEPS0_.exit
	retq
.Lfunc_end12:
	.size	_ZNSt6vectorI4EdgeSaIS0_EE6resizeEm, .Lfunc_end12-_ZNSt6vectorI4EdgeSaIS0_EE6resizeEm
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm,"axG",@progbits,_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm,comdat
	.weak	_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm # -- Begin function _ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm,@function
_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm: # @_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm
	.cfi_startproc
# %bb.0:
	testq	%rsi, %rsi
	je	.LBB13_13
# %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	$4, %rax
	cmpq	%rsi, %rax
	jae	.LBB13_2
# %bb.3:
	movq	(%rbx), %rax
	movq	%r15, %r12
	movq	%rax, (%rsp)                    # 8-byte Spill
	subq	%rax, %r12
	sarq	$4, %r12
	movl	$.L.str.8, %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ZNKSt6vectorI4EdgeSaIS0_EE12_M_check_lenEmPKc
	movq	%rax, %rbp
	testq	%rax, %rax
	je	.LBB13_4
# %bb.5:
	movq	%rbx, %rdi
	movq	%rbp, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorI4EdgeE8allocateEmPKv
	movq	%rax, %r13
	jmp	.LBB13_6
.LBB13_2:                               # %_ZSt27__uninitialized_default_n_aIP4EdgemS0_ET_S2_T0_RSaIT1_E.exit
	shlq	$4, %r14
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	addq	%r15, %r14
	movq	%r14, 8(%rbx)
	jmp	.LBB13_12
.LBB13_4:
	xorl	%r13d, %r13d
.LBB13_6:
	shlq	$4, %r12
	addq	%r13, %r12
	shlq	$4, %r14
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	movq	(%rsp), %rdi                    # 8-byte Reload
	cmpq	%r15, %rdi
	je	.LBB13_9
# %bb.7:                                # %.lr.ph.i.i.i.preheader
	movq	%r13, %rax
	movq	%rdi, %rcx
.LBB13_8:                               # %.lr.ph.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	movups	(%rcx), %xmm0
	movups	%xmm0, (%rax)
	addq	$16, %rcx
	addq	$16, %rax
	cmpq	%r15, %rcx
	jne	.LBB13_8
.LBB13_9:                               # %_ZNSt6vectorI4EdgeSaIS0_EE11_S_relocateEPS0_S3_S3_RS1_.exit
	testq	%rdi, %rdi
	je	.LBB13_11
# %bb.10:
	callq	_ZdlPv
.LBB13_11:                              # %_ZNSt12_Vector_baseI4EdgeSaIS0_EE13_M_deallocateEPS0_m.exit37
	movq	%r13, (%rbx)
	addq	%r14, %r12
	movq	%r12, 8(%rbx)
	shlq	$4, %rbp
	addq	%r13, %rbp
	movq	%rbp, 16(%rbx)
.LBB13_12:
	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
.LBB13_13:
	retq
.Lfunc_end13:
	.size	_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm, .Lfunc_end13-_ZNSt6vectorI4EdgeSaIS0_EE17_M_default_appendEm
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorI4EdgeSaIS0_EE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorI4EdgeSaIS0_EE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorI4EdgeSaIS0_EE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorI4EdgeSaIS0_EE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorI4EdgeSaIS0_EE12_M_check_lenEmPKc,@function
_ZNKSt6vectorI4EdgeSaIS0_EE12_M_check_lenEmPKc: # @_ZNKSt6vectorI4EdgeSaIS0_EE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$576460752303423487, %rcx       # imm = 0x7FFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$4, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB14_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
.LBB14_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end14:
	.size	_ZNKSt6vectorI4EdgeSaIS0_EE12_M_check_lenEmPKc, .Lfunc_end14-_ZNKSt6vectorI4EdgeSaIS0_EE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorI4EdgeE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorI4EdgeE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorI4EdgeE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorI4EdgeE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorI4EdgeE8allocateEmPKv,@function
_ZNSt15__new_allocatorI4EdgeE8allocateEmPKv: # @_ZNSt15__new_allocatorI4EdgeE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$59, %rax
	jne	.LBB15_1
# %bb.3:
	shlq	$4, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB15_1:
	.cfi_def_cfa_offset 16
	shrq	$60, %rsi
	je	.LBB15_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB15_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end15:
	.size	_ZNSt15__new_allocatorI4EdgeE8allocateEmPKv, .Lfunc_end15-_ZNSt15__new_allocatorI4EdgeE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm,"axG",@progbits,_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm,comdat
	.weak	_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm # -- Begin function _ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm
	.p2align	1, 0x90
	.type	_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm,@function
_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm: # @_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm
	.cfi_startproc
# %bb.0:
	testq	%rsi, %rsi
	je	.LBB16_13
# %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	$5, %rax
	cmpq	%rsi, %rax
	jae	.LBB16_2
# %bb.3:
	movq	(%rbx), %r13
	movq	%r15, %r12
	subq	%r13, %r12
	sarq	$5, %r12
	movl	$.L.str.8, %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ZNKSt6vectorI6VertexSaIS0_EE12_M_check_lenEmPKc
	testq	%rax, %rax
	movq	%rax, (%rsp)                    # 8-byte Spill
	je	.LBB16_4
# %bb.5:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_ZNSt15__new_allocatorI6VertexE8allocateEmPKv
	movq	%rax, %rbp
	jmp	.LBB16_6
.LBB16_2:                               # %_ZSt27__uninitialized_default_n_aIP6VertexmS0_ET_S2_T0_RSaIT1_E.exit
	shlq	$5, %r14
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	addq	%r15, %r14
	movq	%r14, 8(%rbx)
	jmp	.LBB16_12
.LBB16_4:
	xorl	%ebp, %ebp
.LBB16_6:
	shlq	$5, %r12
	addq	%rbp, %r12
	shlq	$5, %r14
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	cmpq	%r15, %r13
	je	.LBB16_9
# %bb.7:                                # %.lr.ph.i.i.i.preheader
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
.LBB16_8:                               # %.lr.ph.i.i.i
                                        # =>This Inner Loop Header: Depth=1
	leaq	(%rax,%r13), %rcx
	addq	$32, %rcx
	movl	-32(%rcx), %edx
	movl	%edx, (%rbp,%rax)
	movq	-24(%rcx), %rdx
	movq	%rdx, 8(%rbp,%rax)
	movq	-16(%rcx), %rdx
	movq	%rdx, 16(%rbp,%rax)
	movq	-8(%rcx), %rdx
	movq	%rdx, 24(%rbp,%rax)
	movups	%xmm0, -24(%rcx)
	movq	$0, -8(%rcx)
	addq	$32, %rax
	cmpq	%r15, %rcx
	jne	.LBB16_8
.LBB16_9:                               # %_ZNSt6vectorI6VertexSaIS0_EE11_S_relocateEPS0_S3_S3_RS1_.exit
	testq	%r13, %r13
	je	.LBB16_11
# %bb.10:
	movq	%r13, %rdi
	callq	_ZdlPv
.LBB16_11:                              # %_ZNSt12_Vector_baseI6VertexSaIS0_EE13_M_deallocateEPS0_m.exit37
	movq	%rbp, (%rbx)
	addq	%r14, %r12
	movq	%r12, 8(%rbx)
	movq	(%rsp), %rax                    # 8-byte Reload
	shlq	$5, %rax
	addq	%rbp, %rax
	movq	%rax, 16(%rbx)
.LBB16_12:
	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
.LBB16_13:
	retq
.Lfunc_end16:
	.size	_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm, .Lfunc_end16-_ZNSt6vectorI6VertexSaIS0_EE17_M_default_appendEm
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNKSt6vectorI6VertexSaIS0_EE12_M_check_lenEmPKc,"axG",@progbits,_ZNKSt6vectorI6VertexSaIS0_EE12_M_check_lenEmPKc,comdat
	.weak	_ZNKSt6vectorI6VertexSaIS0_EE12_M_check_lenEmPKc # -- Begin function _ZNKSt6vectorI6VertexSaIS0_EE12_M_check_lenEmPKc
	.p2align	1, 0x90
	.type	_ZNKSt6vectorI6VertexSaIS0_EE12_M_check_lenEmPKc,@function
_ZNKSt6vectorI6VertexSaIS0_EE12_M_check_lenEmPKc: # @_ZNKSt6vectorI6VertexSaIS0_EE12_M_check_lenEmPKc
	.cfi_startproc
# %bb.0:
	movabsq	$288230376151711743, %rcx       # imm = 0x3FFFFFFFFFFFFFF
	movq	8(%rdi), %r8
	subq	(%rdi), %r8
	sarq	$5, %r8
	movq	%rcx, %rax
	subq	%r8, %rax
	cmpq	%rsi, %rax
	jb	.LBB17_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
.LBB17_2:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rdx, %rdi
	callq	_ZSt20__throw_length_errorPKc
.Lfunc_end17:
	.size	_ZNKSt6vectorI6VertexSaIS0_EE12_M_check_lenEmPKc, .Lfunc_end17-_ZNKSt6vectorI6VertexSaIS0_EE12_M_check_lenEmPKc
	.cfi_endproc
                                        # -- End function
	.section	.text._ZNSt15__new_allocatorI6VertexE8allocateEmPKv,"axG",@progbits,_ZNSt15__new_allocatorI6VertexE8allocateEmPKv,comdat
	.weak	_ZNSt15__new_allocatorI6VertexE8allocateEmPKv # -- Begin function _ZNSt15__new_allocatorI6VertexE8allocateEmPKv
	.p2align	1, 0x90
	.type	_ZNSt15__new_allocatorI6VertexE8allocateEmPKv,@function
_ZNSt15__new_allocatorI6VertexE8allocateEmPKv: # @_ZNSt15__new_allocatorI6VertexE8allocateEmPKv
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movq	%rsi, %rax
	shrq	$58, %rax
	jne	.LBB18_1
# %bb.3:
	shlq	$5, %rsi
	movq	%rsi, %rdi
	popq	%rax
	.cfi_def_cfa_offset 8
	jmp	_Znwm                           # TAILCALL
.LBB18_1:
	.cfi_def_cfa_offset 16
	shrq	$59, %rsi
	je	.LBB18_2
# %bb.4:
	callq	_ZSt28__throw_bad_array_new_lengthv
.LBB18_2:
	callq	_ZSt17__throw_bad_allocv
.Lfunc_end18:
	.size	_ZNSt15__new_allocatorI6VertexE8allocateEmPKv, .Lfunc_end18-_ZNSt15__new_allocatorI6VertexE8allocateEmPKv
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"("
	.size	.L.str, 2

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	") "
	.size	.L.str.1, 3

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	" (of"
	.size	.L.str.2, 5

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	")"
	.size	.L.str.3, 2

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	" "
	.size	.L.str.4, 2

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	" ("
	.size	.L.str.5, 3

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"f"
	.size	.L.str.6, 2

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	" (b"
	.size	.L.str.7, 4

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"vector::_M_default_append"
	.size	.L.str.8, 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 _Unwind_Resume
	.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
